Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

2
votes
3answers
68 views

is there a keybinding to save curor position for returning after viewing other section of same buffer?

when i am editing a large file, often need to view other sections of the same buffer only once. But after that I need to go back to the position I was editing at. Is there a key for doing that?
10
votes
1answer
401 views

decrease time until “C-x-” shows in echo area after pressing the keys

When I try enter commands via C-x, it takes 1-2 seconds until the echo area shows this prefix key, as C-x-. I'm quite new to Emacs, so this often confuses me, and I get lost. The ESC key acts ...
4
votes
1answer
126 views

OA and OB inserted by emacs

What are the OA and OB inserted by emacs? It happens, I think, when I press ESC several times. I use emacs in the -nw mode. I would rather do without these insertions.
3
votes
1answer
106 views

Process unread-command-events and redisplay

(defun pretend (keys) (dolist (e (reverse (listify-key-sequence (kbd keys)))) (push e unread-command-events) ;; (mystery-function) (redisplay t) (sleep-for 0.1))) (pretend "M-x my-...
1
vote
0answers
28 views

How to graphically represent Meta characters

Given that the variable x contains the numeric representation of the key "Control-Z", say (setq x ?\C-z), one may graphically represent its contents by issuing the command (char-to-string x), ...
3
votes
2answers
67 views

Convert bitmap vector keys into a human readable string

If you run (kbd "M-r") you'll get back the bit vector [134217842]. But what if I want to go the other way around: start with [134217842] and return M-r. How does one do that? I Have looked at the ...
0
votes
2answers
129 views

Regex search: Why C-M-s does not seem to work like other keystrokes?

The purpose of this question is primarily to serve my curiosity, but it can maybe save some time for others who may press C-M-s (isearch-forward-regexp) just like they would press C-s (isearch-forward)...
1
vote
1answer
54 views

Abbreviation expansion without spaces

I would like to set up things so that when I type Iuulius, the sequence uu is seamlessly replaced by ū (and a few more such pairs), as soon as I type the second u. I.e. the keystrokes and buffer text ...
0
votes
1answer
265 views

How to make emacs recognise C + SHIFT combinations in terminal mode?

Emacs cannot currently pick up C-SHIFT sequences in terminal mode. For example, C-) and C-( are instead just read as 0 and 9 respectively. I'm aware that using GUI mode is one way around this, but I ...
1
vote
1answer
33 views

Injecting keystrokes on console

I normally use emacs (on Linux) running in windowing mode. I have bound a number of functions to special keypresses such as <C-return> and <kp-add>. Ocasionally, I'm forced to run emacs ...
3
votes
1answer
154 views

C-) not recognized on Windows 10

In my init file, I have C-) bound to a smartparens "slurp" command. This works great on linux, but when I try to use the same keybinding on my Windows machine, nothing happens. To troubleshoot on my ...
9
votes
1answer
612 views

How to get keystrokes displayed in the echo area immediately?

How do I get keystrokes displayed in the echo area immediately? For example: when I enter the key sequence C-u j, it will not display in the echo area immediately, but then I press key k, and I ...
0
votes
1answer
26 views

“M-s-h” is being interpreted as “M-s-˙”

When I type M-s-h emacs reports: M-s-˙ is undefined That tiny dot is the 'DOT ABOVE' (U+02D9) character. I'm on OS X. This is happening when I use the emacs-plus build. With emacs-mac port I don't ...
1
vote
1answer
190 views

Is there an advantage to learning ESC- instead of ALT- beyond “maybe you'll use a system someday …”? [closed]

I've been recently persuaded and coached to take the jump from vi to emacs. But one question sits funny. Why would one prefer to use the ESC- sequence for Meta- commands rather than ALT-key ...
4
votes
0answers
72 views

How can I tell emacs to ignore the XF86AudioFoo keys?

Using 24.5.1 on OpenBSD 5.9. OpenBSD's sndiod listens for XF86AudioLowerVolume and the rest, but if emacs is running in graphical mode with either GTK2 or GTK3 (I haven't tried lucid/AWT, but I will ...
3
votes
1answer
61 views

Force append to buffer instead of at point

Is it possible to force an Emacs buffer to place any new text it receives at the end of the buffer, instead of at the mouse point? I mean all of: keystrokes, yanks, mouse paste. I'm thinking in ...
0
votes
1answer
42 views

How to know that any other key except certain was pressed

When I'm writing a php program I often face the following situation: step 1: '[' pressed: Result: [<cursor> step 2: ']' pressed Result: []<cursor> step 3: move the cursor between '[]': ...
1
vote
1answer
204 views

Help with my double tap key-binding function

I'm writing a function to enable binding a "double tap" on a key (or one key then another key in rapid succession) to a function. It almost works, but not quite. Here is the code I have in my lisp ...
3
votes
1answer
1k views

How to use the Insert key to toggle `overwrite-mode` when using a PC keyboard in OS X?

By default, when using a PC keyboard attached to a Mac, OS X treats presses of the Insert key as presses of the Help key that appears on the extended Mac keyboard. How do I map that keypress to have ...
1
vote
2answers
50 views

How do I get a string displaying the keypress of the function (like where-is shows)?

(where-is 'zap-to-char) ;; Prints ("zap-to-char is on M-znil") (where-is-internal 'zap-to-char) ;; [134217850] ;;; this number seems like junk to me! I would like a function that returns M-z I ...
2
votes
1answer
158 views

How to input '#' in Emacs with UK keyboard on Mac OS X?

I'm using Emacs 24.5.1 in Mac OS X. Recently I had to input £ frequently so I changed my input source from U.S. to British. With British keyboard, Option+3 will yield # in other editors, however, ...
1
vote
0answers
39 views

read-event read entire arrow key instead of escape

In graphical emacs on OS X, (read-event) in the scratch buffer produces left, however in iterm2 (which I configured to send esc-* for arrow keys), I get something like (read-event) 27 OD when I ...
1
vote
0answers
102 views

How to bind a keycode to hyper key in Aquamacs

I am using Aquamacs. I have used Seil to change my caps lock key to emit key code 110. I would like to bind that code to super/hyper/another modifier so that I can create more key combinations. How ...
2
votes
1answer
409 views

Automatically pressing enter and y in emacs when prompted for input

In python.el there is a command (python-shell-switch-to-shell) that opens an ipython shell. Problem is, it first asks me where to start the REPL and then whether to make a dedicated process. I always ...
6
votes
4answers
157 views

press keystroke sequence with elisp

I just installed debian 8 and emacs24. I noticed a new feature! you now can push F11 to enter fullscreen mode. I wanted to put emacs on fullscreen mode at startup, but couldn't find the command... and ...
5
votes
1answer
285 views

log keystrokes with timestamp and other metadata?

If I evaluate this form: (open-dribble-file "/home/joe/keys.log") then type something, Emacs saves what I type to the keys.log file: <return>hellow<backspace> keyloggi<down-mouse-5&...
8
votes
2answers
200 views

Translating strings to keypresses

Given a string in elisp, I'd like to simulate emacs receiving whatever keypresses are necessary to re-create that string. So given the string "Hello" emacs would act exactly the same as if I had ...
6
votes
2answers
139 views

A function which acts differently depending on the last keystroke

I would like to define a function which behaves differently depending on the last keystroke. More specifically I would like that it behaves differently if the last keystroke (before the execution of ...
4
votes
1answer
106 views

How can I convert a C-key code into a 'normal' key code?

Background With jumping packages like Ace and Avy, you can start a function, provide a query char, and then jump to somewhere based on further input. (Lately I've preferred Avy, but that's irrelevant ...
4
votes
0answers
562 views

Why can't I remap the laptop fn key modifier?

I've remapped the laptop key fn to Hyper using: (setq ns-function-modifier 'hyper) to scroll other window I set (global-set-key (kbd "H-n") 'scroll-other-window) (global-set-key (kbd "H-p" ) '...
9
votes
1answer
517 views

why doesn't emacs support key up/down events

AFAIK emacs does not support keyup/keydown events, only keypressed. An example of a consequence is that when we want to mark a region we have to first set a mark set-mark-command and can then mark the ...
2
votes
1answer
121 views

How to find the unicode control string received by emacs for a command?

I usually ssh into a machine at my university and run emacs on screen. I want to figure out what unicode strings code for a particular command ? For example when I changed the preferences in my OSX ...
5
votes
1answer
481 views

How to repeat the last n keystrokes?

As described here, by C-x z, I can repeat my last keystroke. How can I repeat my last n keystrokes?
3
votes
1answer
1k views

Control+Meta key is not working

I am using Emacs 24.4 with Ubuntu 14.04. I just discovered that the C-M keyboard sequences are not working in Emacs. For example in elisp-mode the key C-M-left is bound to backward-sexp, but when I ...
3
votes
1answer
839 views

What is the key LFD?

One of the keys Emacs refers to is the key LFD. For example, calc binds that key to calc-over. What key is this?
11
votes
8answers
2k views

Typing quickly when Control, Alt and Esc are hard to reach

I'm very new to Emacs and I'm trying the built-in tutorial. After I went through the basics, I found it really hard to reach the Ctrl and Alt or Esc keys. I'm trying to type faster but since all the ...
6
votes
2answers
411 views

Is there a package that can bind S-S (shift-shift) to an interactive function?

IntelliJ has a keybind on a double-tap of Shift. I'm curious if Emacs can emulate this functionality - my first thought was key-chord.el, since it allows double taps of regular keys like qq. But, ...
17
votes
4answers
678 views

Is there a mode for viewing keystroke lossage in realtime?

C-h l shows the lossage help buffer, which shows recent keystrokes. Pressing g appears to revert it, causing it to update. Unfortunately, enabling auto-revert-mode does not change it to update ...