Domanda

I am trying to create a key binding for "Evaluate buffer till here" in Emacs & ESS, which is situated in ESS => ESS Eval menu. Most of the commands in that menu are listed in help files (http://ess.r-project.org/Manual/ess.html, and in Emacs options), but this particular one is not. If I place following code in .emacs file:

(eval-after-load "ess-mode" '(define-key ess-mode-map (kbd "C-.") 'ess-eval-buffer-till-here))

I get a following message when trying to use the binding: Symbol´s function definition is void: ess-eval-buffer-till-here. Obviously I am calling for wrong name. What is the right name for this command and how can I see all of the commands for ESS?

È stato utile?

Soluzione

So it's a menu item? Type C-hk and then select that item.

(Menus are implemented as keymaps, so this is just the normal describe-key functionality.)

You can also see the non-interactive call form of the last command with C-xESCESC or C-xM-:. It's easy to figure out the command name once you have that. (thanks event_jr)

For listing all commands, most modes will list all their key bindings in their docstring, so you can use C-hm to describe the modes in use in the buffer.

As there may be commands without bindings, you could also use M-x apropos-command to list them all (most likely specifying ^ess as a pattern, if it uses that as a consistent name space).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top