help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to execute certain commands like get-byte, char-* ...


From: Marcin Borkowski
Subject: Re: How to execute certain commands like get-byte, char-* ...
Date: Wed, 11 Feb 2015 20:08:35 +0100

On 2015-02-11, at 19:41, Drew Adams <drew.adams@oracle.com> wrote:

>> When I do:
>> M-x get-byte <RET>
>> Emacs says: "no match", why?
>
> `get-byte' is not a command.

Just to clarify (I guess Drew's time is more precious than mine - no
irony here, just the statement about our relative competence):
a "command" is a function which has an "interactive" declaration.  If
you want to run a function, which is not a command, you can:

- change its definition to include the "interactive" clause (might not
  be trivial, depending on its signature),

- write a wrapper command for it,

- or use M-: (eval-expression, or - if you use Icicles -
  icicle-pp-eval-expression), and write a piece of Elisp (complete with
  the parens), like M-: (get-byte 4 "hello world")

(This list is probably not exhaustive.)

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]