all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org, michael.albinus@gmx.de,
	monnier@iro.umontreal.ca, tsuchiya@namazu.org
Subject: Re: Feature request : Tab-completion for 'shell-comand'
Date: Sun, 09 Mar 2008 19:45:43 +0200	[thread overview]
Message-ID: <87iqzves3k.fsf@jurta.org> (raw)
In-Reply-To: <E1JYOYz-0006oY-Qd@fencepost.gnu.org> (Richard Stallman's message of "Sun, 09 Mar 2008 12:39:53 -0400")

>     > I have doubts that this is uniformly the best thing to do.
>     > I think that the best thing to do depends on the message:
>     > some messages are good to display at the end of the minibuffer,
>     > as in `minibuffer-message', and some are better just omitted
>     > while in the minibuffer.
>
>     Currently messages displayed when the minibuffer is active don't get
>     omitted.  They just obscure the minibuffer content from the user.
>
> The message I replied to showed an example of code that omits
> the message when the minibuffer is active.

Then I agree that if some messages are not important they should be
omitted while in the minibuffer (by using a condition that check if the
minibuffer is active before calling `minibuffer-message', or in `message'
if it will call `minibuffer-message').  Otherwise, a message should be
appended to the end of the minibuffer.  But I think messages should never
overwrite the content of the active minibuffer.

>     With the patch I sent (that changes `message' to call `minibuffer-message'
>     in the active minibuffer), Isearch in the minibuffer works mostly without
>     changes,
>
> I am surprised.  How does it do that?  If `message' calls
> `minibuffer-message', how come that doesn't cause all the isearch
> messages to appear after the minibuffer text?

This is due to the special function `minibuffer-history-isearch-message'
that doesn't call `isearch-message' if isearch is not failed.

If we will change `message' to call `minibuffer-message' in the active
minibuffer, then something like this could be implemented in a few
special cases where using `minibuffer-message' will be not desirable.

> 	     but there is a difference on failed Isearch: without this patch
>     the Isearch error message overwrites the minibuffer content, but with this
>     patch it appends the error message to the end of the minibuffer, e.g.
>
>     I-search backward: foo [Failing I-search backward: bar]
>
> I am not sure how to interpret that, because I do not know what foo
> and bar stand for.

The former is is the minibuffer content and the latter is the search string.
The complete workflow looks like:

1. Activate the minibuffer and type some text like "text":

Prompt: text

2. Type C-r and type a character "t":

I-search backward: text

The successful isearch highlights the found character "t".

3. Type a search string like "search string".
When isearch fails, it will display using `minibuffer-message':

I-search backward: text [Failing I-search backward: search string]

5. But currently it displays:

Failing I-search backward: search string

> But it cannot be right to have two isearch messages at once.
> Whether the search succeeds or fails, its message should be displayed
> in the same place, in the same way.

So it seems it would be better to leave its current behavior.

>     Otherwise, we could just fix this particular case not to use
>     `minibuffer-message'.
>
> If `message' automatically calls `minibuffer-message' when the minibuffer
> is active, how is it possible to fix one case not to do that?

We could add a condition to `message' to check for the value of
a variable like `minibuffer-message-timeout', and if it is nil
then don't call `minibuffer-message'.

-- 
Juri Linkov
http://www.jurta.org/emacs/




  reply	other threads:[~2008-03-09 17:45 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 16:42 Feature request : Tab-completion for 'shell-comand' paul r
2008-03-04 21:54 ` Michael Albinus
2008-03-04 23:17   ` Juri Linkov
2008-03-05  1:55     ` Stefan Monnier
2008-03-06  8:40   ` TSUCHIYA Masatoshi
2008-03-06 10:04     ` Juri Linkov
2008-03-06 16:04       ` Stefan Monnier
2008-03-06 16:14         ` Drew Adams
2008-03-06 17:31         ` Miles Bader
2008-03-06 17:46           ` Drew Adams
2008-03-06 18:21           ` Stefan Monnier
2008-03-07  2:14             ` Miles Bader
2008-03-06 23:48           ` Juri Linkov
2008-03-06 17:48         ` Juri Linkov
2008-03-06 23:45           ` Juri Linkov
2008-03-06 23:47         ` Juri Linkov
2008-03-08 17:39         ` Richard Stallman
2008-03-08 22:21           ` Juri Linkov
2008-03-08 22:38             ` Lennart Borgman (gmail)
2008-03-08 22:57               ` Juri Linkov
2008-03-09  0:21                 ` Lennart Borgman (gmail)
2008-03-08 23:27               ` Stefan Monnier
2008-03-09 16:39             ` Richard Stallman
2008-03-09 17:45               ` Juri Linkov [this message]
2008-03-10  6:12                 ` Richard Stallman
2008-03-10 14:44                   ` Cannot build the trunk since unicode (was: Feature request : Tab-completion for 'shell-comand') Stefan Monnier
2008-03-11  9:24                     ` Richard Stallman
2008-03-11  9:40                       ` Andreas Schwab
2008-03-10 22:35                   ` Feature request : Tab-completion for 'shell-comand' Juri Linkov
2008-03-11 20:24                     ` Richard Stallman
2008-03-12  0:31                       ` Juri Linkov
2008-03-12 23:13                         ` Johan Bockgård
2008-03-12 23:19                           ` David Kastrup
2008-03-12 23:36                             ` Johan Bockgård
2008-03-13  2:14                           ` Juri Linkov
2008-03-13  9:28                             ` Johan Bockgård
2008-03-13 14:54                               ` Stefan Monnier
2008-03-13 19:02                                 ` martin rudalics
2008-03-14  2:54                                   ` Richard Stallman
2008-03-14  7:46                                     ` martin rudalics
2008-03-14 15:07                                       ` Stefan Monnier
2008-03-15  3:23                                       ` Richard Stallman
2008-03-15  3:24                                       ` Richard Stallman
2008-03-14  3:21                                   ` Stefan Monnier
2008-03-14  7:47                                     ` martin rudalics
2008-03-14 15:05                                       ` Stefan Monnier
2008-03-14 18:33                                         ` martin rudalics
2008-03-14 19:20                                           ` Stefan Monnier
2008-03-14 22:31                                             ` martin rudalics
2008-03-15  0:59                                               ` Stefan Monnier
2008-03-16 14:24                                             ` martin rudalics
2008-03-16 18:28                                               ` Stefan Monnier
2008-03-17  7:36                                                 ` martin rudalics
2008-03-17 15:00                                                   ` Stefan Monnier
2008-03-14  1:04                           ` Juri Linkov
2008-03-09 14:01       ` TSUCHIYA Masatoshi
2008-03-09 17:48         ` Juri Linkov
2008-03-10  0:08           ` TSUCHIYA Masatoshi
2008-03-10  0:57             ` Drew Adams
2008-03-10  1:29             ` Juri Linkov
2008-03-10  2:20               ` Johan Bockgård
2008-03-10  2:37                 ` Lennart Borgman (gmail)
2008-03-10 22:31                   ` Juri Linkov
2008-03-12  1:31               ` TSUCHIYA Masatoshi
2008-03-12  2:12                 ` Stefan Monnier
2008-03-12 10:42                   ` Juri Linkov
2008-03-15  8:29                   ` TSUCHIYA Masatoshi
2008-03-15 10:24                     ` paul r
2008-03-15 21:35                     ` Juri Linkov
2008-03-20 19:58                     ` Stefan Monnier
2008-03-20 20:55                       ` Juri Linkov
2008-03-21 17:17                         ` Stefan Monnier

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=87iqzves3k.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    --cc=tsuchiya@namazu.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 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.