GNU bug report logs - #15292
24.3.50; Isearch: handle commands properly when called at top level

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 6 Sep 2013 18:58:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15292 in the body.
You can then email your comments to 15292 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15292; Package emacs. (Fri, 06 Sep 2013 18:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 06 Sep 2013 18:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Isearch: handle commands properly when called at top level
Date: Fri, 6 Sep 2013 11:56:45 -0700 (PDT)
Isearch now has quite a few commands that can be invoked during Isearch,
using keys.  None of these commands currently take care of the fact that
they might get called at top level, e.g., with `isearch-mode' = nil.

Some such commands, such as `isearch-help-for-help' should be callable
outside of Isearch.  Others, such as `isearch-repeat-forward', should
not.  For those that should not, an error should be raised, saying that
the command is for use only in Isearch.

For those that should be allowable outside of Isearch, the code should
take care to DTRT when not in `isearch-mode':

* wrt messages (mostly inhibit messages, esp. if they use
  `isearch-message-prefix' etc.)

* wrt Isearch highlighting (they should not do any highlighting)

* wrt calling `isearch-update' etc. (they should not do it)

* wrt calling `exit-minibuffer' (they should not do it: no catch for
  throw)

Some commands, such as `isearch-describe-bindings' and
`isearch-highlight-regexp' can be used outside of Isearch with no change
- they work well already.  This includes even `isearch-edit-string',
which can be called outside Isearch but which then continues in Isearch
with no problem.

Among the comands that might be useful, or at least allowable, outside
of Isearch (dunno), but that might need some minor fixup are the
following.  They should not call `isearch-update' etc.

* isearch-help-for-help

* isearch-describe-key (should explicitly use `isearch-mode-map')

* isearch-describe-mode

* isearch-toggle-*

Dunno whether there is any use for these commands outside Isearch:

* isearch-cancel (moves point to last Isearch start)

* isearch-abort


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-08-23 on ODIEONE
Bzr revision: 113986 rgm <at> gnu.org-20130823185841-zoy6h1qk433ibrlf
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15292; Package emacs. (Fri, 06 Sep 2013 20:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 15292 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15292 <at> debbugs.gnu.org
Subject: Re: bug#15292: 24.3.50;
 Isearch: handle commands properly when called at top level
Date: Fri, 06 Sep 2013 23:49:29 +0300
> Among the comands that might be useful, or at least allowable, outside
> of Isearch (dunno), but that might need some minor fixup are the
> following.  They should not call `isearch-update' etc.
>
> * isearch-help-for-help
> * isearch-describe-key (should explicitly use `isearch-mode-map')
> * isearch-describe-mode
> * isearch-toggle-*

Isearch is not a library of functions, and not intended for external use.
I can't imagine how you might want to use e.g. isearch-help-for-help
outside of Isearch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15292; Package emacs. (Fri, 06 Sep 2013 21:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 15292 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 15292 <at> debbugs.gnu.org
Subject: RE: bug#15292: 24.3.50; Isearch: handle commands properly when called
 at top level
Date: Fri, 6 Sep 2013 14:04:05 -0700 (PDT)
> Isearch is not a library of functions, and not intended for external use.

Every library containing functions is a library of functions.  And there is
no "external use".  But it's clear we will continue to disagree about that.

> I can't imagine how you might want to use e.g. isearch-help-for-help
> outside of Isearch.

I have nothing particular in mind wrt that.  The main point was that
commands that should be called only when in `isearch-mode' could usefully
raise an error if called outside that mode.  Likewise, minibuffer commands
that make no sense if called outside the minibuffer, and so on.  IMO, such
commands should barf if called outside the expected context.

But it does not bother me if you decide not to do anything about such things.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15292; Package emacs. (Fri, 06 Sep 2013 22:56:01 GMT) Full text and rfc822 format available.

Message #14 received at 15292 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15292 <at> debbugs.gnu.org
Subject: Re: bug#15292: 24.3.50;
 Isearch: handle commands properly when called at top level
Date: Fri, 06 Sep 2013 18:55:38 -0400
> Some such commands, such as `isearch-help-for-help' should be callable
> outside of Isearch.

You mean via something like M-x isearch-help-for-help, right?
(I doubt anyone would bind such a command to a key).

> Others, such as `isearch-repeat-forward', should not.  For those that
> should not, an error should be raised, saying that the command is for
> use only in Isearch.

Actually, it's not important to signal an error saying "don't use it
outside Isearch mode", *unless* running that command outside Isearch
mode results in nasty behavior.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15292; Package emacs. (Fri, 06 Sep 2013 23:20:02 GMT) Full text and rfc822 format available.

Message #17 received at 15292 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15292 <at> debbugs.gnu.org
Subject: RE: bug#15292: 24.3.50; Isearch: handle commands properly when called
 at top level
Date: Fri, 6 Sep 2013 16:19:44 -0700 (PDT)
> > Some such commands, such as `isearch-help-for-help' should be callable
> > outside of Isearch.
> 
> You mean via something like M-x isearch-help-for-help, right?

Yes.

> (I doubt anyone would bind such a command to a key).

They might.  Or they might read the command name in the minibuffer from
some other command that then invokes it.  Or whatever.

After all, that command does give you a general entry to help of various
kinds on Isearch.  And for the most part it does work OK at top level.
There is just a minor hiccup because it calls `isearch-update'.  It
wouldn't cost much to make it useful pretty much anywhere, just as
`isearch-describe-bindings' already is.

> > Others, such as `isearch-repeat-forward', should not.  For those that
> > should not, an error should be raised, saying that the command is for
> > use only in Isearch.
> 
> Actually, it's not important to signal an error saying "don't use it
> outside Isearch mode", *unless* running that command outside Isearch
> mode results in nasty behavior.

I don't disagree that it's not important in such cases.  Just thought
it might be better.  It's not important to me, in any case.  Nothing
in this bug report is.

Particularly the toggle commands, I think, might be commands that
someone might mistakenly think could be used at top level.  It's not
obvious, when you do something like `apropos-command' etc., whether such
a command like `isearch-toggle-lax-whitespace' is relevant only in some
particular context.  The doc is mute about it; you find out what it does
in the wrong context only by trying it there.




Added tag(s) wontfix. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 19 Sep 2013 22:26:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15292 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 01 Feb 2014 07:15:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Mar 2014 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.