I am using Emacs 24.1 on windows XP/7.
TAB/RET key works for auto-completing in elisp mode,
scratch and even ESS mode.
When I write tex file using Auctex, hitting TAB key
jumps to the next line and doesn't auto-complete the
input. C-i could auto-complete the input in Auctex.
but it takes two keys. Any suggestions to solve this?
Related
In Windows 7 / Emacs 24.5
Copy text e.g. "example" in the kill-ring
M-x
C-y (yank)
Success show text "example" in the minibuffer
But if turn on CUA-mode, the text "example" not yank (paste) by 'C-v' in the minibuffer.
CUA mode makes C-v the yank/paste command.
If you start Emacs with :
emacs -Q
Then turn on CUA mode (M-x cua-mode) you'll see that C-v works as you expect.
Without knowing your setup it's difficult to be sure but it's likely you're using a package which modifies the behavior of M-x (E.g. smex, Ido, ivy, etc.)
It's likely CUA mode won't really have anything to do with this problem. You can verify this by trying to do C-y to yank in the minibuffer too.
Packages which enhance M-x may provide a way to allow you to drop out temporarily, so you can yank text in-place.
Update
From your comments we know you are using Helm, which overrides some bindings in the minibuffer, including C-v which is bound to page down.
Because bindings are applied at different mode (context) scopes, the minibuffer modemap (list of key bindings) will override anything that's applied at a more general context (such as cua mode)
To work around this you'd need to add a binding specifically for cua-paste in the affected mode map. It would need to be applied after Helm has loaded.
I use ansi-term for my normal terminal sessions. I tend to use unicode characters in my prompt to do things like set the trailing character based on the type of source control I'm using.
I use the character "±" as my prompt for git repositories.
In Emacs' ansi-term, my prompt isn't rendered as unicode, and shows as "\302\261". Displaying the current coding system shows that it defaults to utf-8-unix for input to the process, but I get raw binary as the decoding output. I can hit C-c RET p to change the encoding and decoding coding systems. I'm drawing a blank as to how to set this automatically when I start a terminal? I've tried adding to term-mode-hook to set the buffer's coding system to no avail. I think I've found what I'm looking for in term.el, but I don't care to tweak the distribution elisp, and it appears the raw binary was added to fix a bug somewhere else.
EDIT: This was unclear originally. I'm having issues setting the default process coding system for ansi-term running under Cocoa-ized Emacs 23.3 on MacOS. Emacs itself isn't running in a terminal, my terminal is running in Emacs.
The following worked for me:
(add-hook 'term-exec-hook
(function
(lambda ()
(set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix))))
ansi-term seems to ignore the default-process-coding-system variable, so I had to set it buffer-locally after it executes my shell.
After getting a better understanding of term.el, the following works:
(defadvice ansi-term (after advise-ansi-term-coding-system)
(set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix))
(ad-activate 'ansi-term)
Trying this with term-mode-hook is broken because in term.el, term-mode-hook is called before switching to the terminal buffer, so set-buffer-process-coding-system breaks due to the lack of a process associated with the buffer.
Try
(set-terminal-coding-system 'utf-8-unix)
That's C-x RET t not C-x RET p.
So C-x RET p helps?
Unless C-h v default-process-coding-system is (utf-8-unix . utf-8-unix) try
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
I have set a key binding in Emacs using:
(global-set-key (kbd "<C-tab>") 'switch-view )
: It works in Windows but Emacs in Linux seems to ignore it. Any ideas why?
My version of Emacs is 23.2 running in text mode (.nw)
In text mode, Emacs depend upon the terminal or the console for keys combination. Terminals and consoles don't support as many keys combination as Xorg and windows do, and C-TAB is a combination that don't exist in text mode: TAB is already the same than C-i, and C-C-something don't exists.
The window manager you are using is most likely 'kidnapping' it.
On mine (which is KDE), C-tab cycles through applications on the current desktop. You can configure which keystrokes should be ignored though... but your best bet may be to map switch-view to another key sequence in your ~/.emacs file.
I load GNU emacs in it's own window by typing emacs in the terminal.
I like to use the keybindings from pc-selection-mode, which allows you to highlight characters using shift-right or shift-left, or entire lines by pressing shift-up or shift-down.
The problem is that when I run emacs in the terminal by typing emacs -nw, the latter 2 keybindings don't work. I can highlight characters using shift-left and shift-right, but pressing shift-up and shift-down doesn't do anything. The cursor stays where it is.
How do I fix this problem? Why is it even occurring? I'm using GNU Emacs 23.1.1, and I've confirmed that the same version is being used both when emacs is in it's own window and when emacs is running inside the terminal.
Thanks for any help
A lot of times the bindings just aren't listed, or are mapped wrong. You can try M-x show-lossage (or C-h l) to see if the escape sequences reach emacs or not. If they do, you might want to try xterm-extras -- it's always worked even as I migrate between different versions of linux and solaris, and as I ssh between them (which is often a source of problems).
I am using Emacs and most shortcuts work normally, but M-Del for deleting a word backwards produces either an error at the bottom of a `scan' error, and at other times moves the cursor a set of lines below. Any ideas why this may be happening? M-Del works fine for deleting forward words. (** from a comment made below it appear that the command is mapped to a down paragraph lisp function instead of delete a word backwards? How can I reset the mappings to the standard one?)
Best.
writing lisp emacs key binding and cannot specify the <delete> character
has the answer (by Gilles). It looks like there is a bug on some systems due to an overlap with a shell command shadow translating ESC-x to ESC C-d
it can be seen from running
M-x load-library edmacro
M-x edmacro-insert-key M-del
giving ESC C-d
in the folder ~/.emacs.d/ creating a file init.el and inserting
(global-set-key [escape delete] 'backward-kill-word)
this though overrides all uses of ESC from M (meta key) to be translated as escape rendering common M-d, M-w, etc all unseen except for M-del
so the solution is to remap the faulty remapping back to the correct binding.
(global-set-key (kbd "M-C-d") 'backward-kill-word)
Best