all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 15568@debbugs.gnu.org
Subject: bug#15568: Lookup this-command-keys without a prefix argument
Date: Fri, 11 Oct 2013 02:58:35 +0300	[thread overview]
Message-ID: <871u3sy7io.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwv4n8qhrn5.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Wed, 09 Oct 2013 21:02:57 -0400")

>> Also I discovered that to support a key sequence like
>> `C-s C-u C-u C-l' requires adding the command `universal-argument-more'
>> (and `universal-argument-minus' for completeness).
>
> Indeed, tho I think your fix is a workaround rather than a real fix:
> Basically after the first C-u we're in some kind of transient
> "universal-argument mode" and isearch shouldn't have to know the list of
> commands that can be run in this mode, it should instead just "wait for
> the mode to exit".
>
> This is a general issue regarding interaction between various uses of
> set-temporary-overlay-map (and friends, since isearch doesn't actually
> use set-temporary-overlay-map).  There should be some kind of notion of
> nesting, where the outer set-temporary-overlay-map should not exit as
> long as the inner one is still active.

Maybe `universal-argument--mode' should be defined as a minor mode
and provide a variable with the same name that can be checked by isearch.
This mode can be disabled using `on-exit'.  Something like:

(defun universal-argument--mode ()
  (setq universal-argument--mode t)
  (set-temporary-overlay-map
   universal-argument-map nil
   (lambda () (setq universal-argument--mode nil))))

and in isearch.el:

          (and isearch-allow-prefix
	       (or (memq this-command '(universal-argument
					digit-argument
					negative-argument))
		   universal-argument--mode))





  reply	other threads:[~2013-10-10 23:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 23:21 bug#15568: Lookup this-command-keys without a prefix argument Juri Linkov
2013-10-09 18:14 ` Stefan Monnier
2013-10-09 23:57   ` Juri Linkov
2013-10-10  1:02     ` Stefan Monnier
2013-10-10 23:58       ` Juri Linkov [this message]
2013-10-11  2:30         ` Stefan Monnier
2013-10-11 12:50           ` Stefan Monnier
2013-10-11 23:49             ` Juri Linkov

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

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

  git send-email \
    --in-reply-to=871u3sy7io.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=15568@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.