From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: C-x RET r utf-8 RET
Date: Mon, 08 Dec 2014 17:39:43 +0800 [thread overview]
Message-ID: <87mw6yzdi8.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87r3wa8qt8.fsf@wmi.amu.edu.pl
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> On 2014-12-08, at 08:35, Eric Abrahamsen wrote:
>
>> [...] You could do that in a lambda, but
>> it probably won't accept a non-interactive function, [...]
>
> Out of curiosity: can't a lambda (in e.g. global-set-key) be made
> interactive? I did this right now:
>
> (global-set-key (kbd "C-z C-s") (lambda () (interactive) (message "It can be done!")))
>
> and it seems to work. Is it going to change e.g. in future Emacs
> versions, IOW, is it deprecated or something?
No, you're quite right, I was just answering off the cuff, without
thorough thought. It is indeed possible to stick (interactive) inside of
a lambda, though intuition tells me that that it's not generally good
practice -- Emacs' introspection functions will probably at some point
bark at you for not having a named function, and it will make it harder
to use the built-in help functions to figure out what's going on. But
yes, you're right, it's definitely possible.
E
next prev parent reply other threads:[~2014-12-08 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 6:09 C-x RET r utf-8 RET Sharon Kimble
2014-12-08 7:35 ` Eric Abrahamsen
2014-12-08 9:00 ` Marcin Borkowski
2014-12-08 9:39 ` Eric Abrahamsen [this message]
2014-12-08 12:09 ` Marcin Borkowski
2014-12-08 13:34 ` Sharon Kimble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw6yzdi8.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).