![]() You can always find out 'whatĮmacs is an incremental programming environment. However this fork is not about replacing the C code base, but to provide additional features using the rich ecosystem of rust.Ī community-driven port of Emacs to Rust.Įmacs will change how you think about programming.Įmacs is totally introspectable. If you are looking for a rust based emacs fork, you can take a look at emacs-ng. ![]() Now, you can type Control- x Shift- 5 Shift- 5, emacs will see C-x % %, interpret it as C-M-%, and run finally query-replace-regexp.This project isn't maintained anymore. (define-key function-key-map (kbd "C-x %") 'event-apply-control-meta-modifiers) (defun event-apply-control-meta-modifiers (ignore-prompt) Trying to stack these artificial Control and Meta modifiers also fails, because the first C-x in the second artificial modifier sequence absorbs the first artificial modifier.īut, it points to a possibility: cargo cult adaptation of event-apply-control-modifier However, it binds the artificial Control modifier to the Escape key instead of translating the trailing ESC % to M-%. When you type Control- x c Option- Shift- 5, emacs sees C-x c ESC %. This seems like it would work, but it interacts poorly with the way Terminal sends Meta keys with the “Use option as meta key” option (it sends an ESC character before the normal character). Poking around in function-key-map ( C-h v function-key-map), I found that C-x c is bound to event-apply-control-modifier. The keys work fine in emacs if I reconfigure either Terminal (⌘I Keyboard) or emacs (see below). For example, on my system (10.4), Terminal is configured with “ ESCOP” (the VT-100 key code) for F1, but emacs expects “ ESC[11~” (an ‘old’ xterm sequence). Note that F1-F4 may not work properly, depending on the configuration of Terminal and emacs. (global-set-key (kbd "") 'query-replace-regexp) I have a full-sized keyboard with an F13 on it. Any modifiers would not be passed (through the terminal) to Emacs as such, but you could map some of those combinations to the terminal key codes for higher function keys (F14-F20) (unless the combination is taken by a system shortcut-“Full Keyboard Access”, Expose, and Spaces(?)). You can assign codes to a bare F-key or an F-key with a single modifier (Shift, Control, or Option). If needed, you can configure Terminal to send whatever codes your termcap/terminfo is expecting (at least I can in the 10.4 Terminal). ![]() The ‘F keys’ are (usually) mapped in a VT-220 style that the xterm-color termcap/terminfo entries know how to parse (F1-F4/F5 may be in a VT-100 style though!). You will probably have better luck mapping query-replace-regexp to a key (combination) that actually transmits something. Since most terminal emulation programs emulate a VT-100 (and its successors, including the VT-102 and the VT-220), there is no way to actually send a Control- Shift- 5 (or whatever C-% is on your keyboard) to a terminal-based program. Back when terminals were real hardware (not just emulated by programs like Terminal and xterm), terminals like DEC's VT-100 had a Control key, but it only worked in combination with certain other keys. Unlike GUI-based apps, terminal-based apps (like almost all of those that you run inside Terminal windows) are limited in which key combinations they can sense. However, I experimented in Emacs with "xterm" and "xterm-color", and either way I have the same problem with C-M-%. I did that for reasons unrelated to this question (to prevent my colored prompt from looking funny after I cancel a reverse-i-search). For example, I can use alt-B and alt-F to go forward and back one word at a time in bash and Emacs.ĮDIT 2: I would also like to mention that I have my terminal set to declare the terminal type as "xterm" rather than the default of "xterm-color". I can do it by typing M-x query-replace-regexp, and when I do that, I see a reminder on the bottom of the screen saying I can also do it with C-M-%, but when I try C-M-%, nothing happens.ĮDIT: I would like to add that I have the "Use option as meta key" terminal option enabled, and it seems to work fine. However, when I do that, it doesn't work. Please correct me if I am wrong, since I am only starting to learn Emacs). As far as I know, this can be done by pressing C-M-% (I am assumimg this means Ctrl+Alt+Shift+5. I am trying to do a regular expression search-and-replace in Emacs, running in the Terminal program on my MacBook Pro, which is running OS X 10.6.2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |