unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: set-transient-map and a question
Date: Wed, 12 Jul 2023 10:55:50 +0200	[thread overview]
Message-ID: <87ilap7bl5.fsf@gmail.com> (raw)
In-Reply-To: <87cz0x94sb.fsf@web.de> (Michael Heerdegen's message of "Wed, 12 Jul 2023 05:39:48 +0200")

>>>>> On Wed, 12 Jul 2023 05:39:48 +0200, Michael Heerdegen <michael_heerdegen@web.de> said:

    Michael> "T.V Raman" <raman@google.com> writes:
    >> For me, hitting c-x c-e at the end of that code while in the gnus
    >> article buffer did not appear to work, it continued to call keys in the
    >> buffer-local gnus article mode.

    Michael> Works for me.  C-c C-e C-c C-b tries to compile the article buffer, for
    Michael> example.  It was a silly example, of course, but it should work.

    Michael> There are not many bindings in `emacs-lisp-mode-map'.  You really tried
    Michael> one of those keys _immediately_ after evaluating the `set-transient-map'
    Michael> expression (note that the transient map is gone after one entering one
    Michael> key binding not present in the map)?

I tried the following in "*scratch*", and I get "deactivated" in
*Messages* after hitting "+" (or indeed any key).

    (set-transient-map
     (let ((map (make-sparse-keymap)))
       (define-key map "+" (lambda () (interactive) (message "whoohoo")))
       map)
     nil (lambda () (message "deactivated")))

which means my proposed doc update is wrong.

Moral: test before documenting, not after :-)

Robert
-- 



      reply	other threads:[~2023-07-12  8:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  1:12 set-transient-map and a question T.V Raman
2023-07-11  8:03 ` Robert Pluim
2023-07-11 14:09   ` T.V Raman
2023-07-11 16:08     ` Robert Pluim
2023-07-11 17:16       ` T.V Raman
2023-07-11 17:44         ` Robert Pluim
2023-07-11 17:53           ` T.V Raman
2023-07-11 18:10             ` Bob Rogers
2023-07-11 20:29               ` Robert Pluim
2023-07-11 20:53                 ` T.V Raman
2023-07-12  8:51                   ` Robert Pluim
2023-07-12 13:49                     ` T.V Raman
2023-07-12  1:28                 ` Michael Heerdegen
2023-07-12  1:58                   ` T.V Raman
2023-07-12  2:32                     ` Michael Heerdegen
2023-07-12  2:49                       ` Michael Heerdegen
2023-07-12  3:21                         ` T.V Raman
2023-07-12  3:39                           ` Michael Heerdegen
2023-07-12  8:55                             ` Robert Pluim [this message]

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilap7bl5.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.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).