How do I send the form for crdt-share-buffer? - emacs

I can't see how I can send the form when starting a new nrdt.el share.
It says that I should press RET, but pressing enter in the gui or terminal doesn't work.
Any help?
Edit: I'm new to emacs and I just don't know how to send a form, and I don't know how it's actually named, which is why I couldn't find anything googling.
I'm using doom emacs with a client-daemon configuration.

OK, so I found why it wasn't working: Doom Emacs rebinds exit-recursive-edit to C-M-c (which you have to use to send the form).

Related

How do I add carriage return to the beginning of my tramp-shell-prompt-pattern?

I am using a new server that when sshing into requires me the press "return" in order to see my shell prompt. I believe this is causing my emacs tramp to get hung up. When I tried to open a file through tramp on the new server I am repeatedly asked for the password. I read that this could be due to tramp not recognizing the prompt. The prompt is the same as on other servers that work, which makes me think it is this that is causing issues.
I'm thinking the solution would be to add carriage return to the variable tramp-shell-prompt-pattern. How would I do this?
maybe something like:
(setq tramp-shell-prompt-pattern "\r\(?:^\|\)[^]#$%> ]*#?[]#$%>] *\(\[[0-9;]*[a-zA-Z] *\)*")
adding \r to the front of the default?
Also, I don't know if it will be possible to remove this behavior on the server side. I tried creating a .hushlogin file in my home directory, but it had no effect.
I came across this question which addresses the problem of the shell requiring user input. The solution didn't work
(setq tramp-shell-prompt-pattern "^[^$>\n]*[#$%>] *\\(\[[0-9;]*[a-zA-Z] *\\)*")
Thanks for your help. Clearly I'm a novice.

Eclipse : how can I disable this popup?

I'm sorry if this question has been ask before or can be found on the net. I have no idea how do I call this popup. I have no idea of the keyword to google. I tried "popup", "dialog", "confirmation" and a lot else but didn't success.
Back to the question, I've just migrate to my development machine and did fresh install for Eclipse. After that, I copy all the setting in workspace/.metadata folder from my previous machine to the new one. Everything looks fine (theme, key bindings and else) except that I have this popup appearing whenever I press some shortcut. For example, Ctrl+Space to bring up the code assist, the following dialog appears.
This popup never appeared before in my previous machine. It is annoying since I have to hit enter once every time I press those shortcut. Do you have any idea how can I turn this off?
Best
Note
I don't think this popup is code assist specific issue, I brought code assist up as an example. I also got this popup when I press shortcut to
Open Resource
Run
Refactor/Rename
Add getter/setter
and 10s other shortcut too. Also, I don't have conflict shortcut. Not that I know.
This question may have been answered here already: Disable content assist in Eclipse
Refer to the following link for the documentation on Content Assist: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist.htm
The point is to disable the actions that trigger the Content Assist.

How to clear all the content of a file in emacs?

This question may sound stupid. But I do search online and couldn't find a answer. So what's the emacs command to clear all the content in a file? I want to clear my error_log file.
Rather than erase-buffer, you can use C-x h C-w.
Is M-x erase-buffer what you are looking for? Note that it is disabled by default because new users find it confusing and you'll be asked about enabling it temporarily or permanently the first time you run it. You can then bind it to a keyboard shortcut for convenience.

emacs copy kill-ring to system clipboard in nowindow mode

I'm running "emacs -nw" under terminator program in Ubuntu. My issue, I couldn't get kill-ring to system clipboard with that. However, things works if run in X11 mode. Could you please help me with that?.
Thanks in advance..
Emacs in "nw" mode is not linked to any of the X11 libraries. Because of this, you have no access to the X11 clipboard. In other words, this just isn't possible by itself. There are utilities that allow command-line access to and from the X11 clipboard. You would have to write some elisp code to tie kill-ring activity to whatever command-line tools you may use.
One such program you might look at is xclip. Getting the selection from the kill-ring into the clipboard won't be as hard as getting from the clipboard into the kill-ring. This is because you have control over the event when you add to the kill-ring. But emacs has no knowledge of when X11 updates the clipboard. So you may have to have a custom command rather than the typical yanking from kill-ring, one that uses xclip to fetch the current clipboard content.
This seems to me like something that someone would have already solved. I don't know enough elisp to tackle it by any measure, or I'd dig into it myself. I did find this blog post that points to an elisp library that wraps xclip. I don't know if that will help or not.
Randy

How to change emacs config in Lisp In A Box

I have been a programmer for a decade now, but I believe this is the first time I've ever asked a question on a forum. I just can't figure this out and can't find the answer already online.
I am trying to turn on CUA mode so that emacs is more bearable for a windows user (normal copy paste functions). I am running Windows 7 and installed emacs through the Lisp In A Box package. I understand that I need to add a line to my .emacs file or init.el file. I'm not sure which, but I can't find either in my Lip In A Box install directory. The emacs package install also did not come with any tutorials or help files, so its really hard to pick this up.
I am stuck, any help is greatly appreciated!
The .emacs can be found by looking at the answers to this similar question.
Regarding documentation and tutorials, it looks like the link you provided for "Lisp in a Box" says:
If you are new to Emacs, it is
recommended that you read the Emacs
Tutorial which you can access from
with Emacs by going to the Help menu,
or by typing Control-h, letting go,
and hitting t. A more extensive manual
is also available from the Help menu,
or on the web at
http://www.gnu.org/software/emacs/manual/.
Which makes it sound like the manual is there, and certainly the tutorial (I made bold the directions to get to the tutorial).
As far as other places to get information, there is a collection of screencasts on the wiki.
Your question doesn't specify whether or not you what to add to your .emacs to activate CUA mode. You can check out the CUA mode documentation on the wiki (which has links to the manual). The minimal installation is just adding this to your .emacs: (cua-mode t).
For GNU/Emacs, you can choose to use any one of the following three file names as the start-up configuration file:
${HOME}/.emacs
${HOME}/.emacs.el
${HOME}/.emacs.d/init.el
It would probably be a good idea to decide on one of the three options and then stick to it - the first one seems to be the most widely used one. In any case, ${HOME} stands for your home directory -- which is likely to be different from the Lisp In A Box install directory!
Coming from a Unix tradition, Emacs understands ~ (tilde) as an abbreviation for your home directory, so you can visit the .emacs file by typing:
C-x C-f ~/.emacs [ENTER]
(Note that the capital C is Emacs standard notation for a combination of the CTRL key and a second key, i.e. here you press CTRL-x CTRL-f which stands for "find-file" and will then ask you for a file name in the bottom part of the Frame (aka mini-buffer).)
If these are your first customizations, you will just see an empty buffer. Enter
;; start CUA mode every time Emacs starts
(cua-mode t)
and save the buffer with C-x C-s.
Next time you start Emacs, CUA mode should be turned on automatically.
What the others have told you is true: Simply adding (cua-mode t) to your dotfile would be sufficient. HOWEVER: Lisp in a box' Emacs doesn't load this file by default.
Therefore, be sure to edit the shortcut so that it does load the dotfile. This is important, because otherwise you would get weird behavior, where you would add the correct line to the dotfile, start emacs, and then not get cua mode. That would suck.
The reason it does this is to ensure that it starts a vanilla emacs everytime, instead of finding, say C:/_emacs and loading that instead, giving you another user's customizations and confusing you.
The flag for not loading an init file is -q or --no-init-file. Also make sure that --no-site-file is not there.
(I realize that this is an old post, but I found this while looking for something related, and I don't want people walking away frustrated over something that doesn't work.)