unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: wrapper fn for message and minibuffer-message?
Date: Fri, 7 Oct 2005 15:29:54 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICEECICNAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1ENiWx-00026w-Gt@fencepost.gnu.org>

        differences between `message' and `minibuffer-message':
         - `message' exits the minibuffer (and recursive edit);

    No it doesn't.

My bad.

         - `minibuffer-message' wraps the message in "  [...]";
           `message' does not

    That's just a matter of how to make it stand out at the end of
    the minibuffer.

Yes, of course.

I should also have mentioned this difference:

 - `message' temporarily erases the minibuffer before
   displaying the message; `minibuffer-message appends
   the message to the minibuffer contents, so both are
   visible together

I guess that's part of what you're referring to with your variable
`minibuffer-message-at-end': if non-nil, the message would be appended,
without first erasing the minibuffer.

I still have the same question: Would the variable also be set to non-nil
implicitly, whenever `minibufferp'? (That was the behavior I originally
suggested: use `minibuffer-message' when the minibuffer is active.)

If no, then what is now a simple call to `minibuffer-message' would require
something like (let ((minibuffer-message-at-end t)) (message ...)). If yes,
then a simple call to `message' could require (let
((minibuffer-message-at-end nil)) (message ...)). IIUC, I don't see the
advantage of the variable. But I'm probably missing something.

        It could use the same mechanism as now; or, maybe it would
        be cleaner to change the lower levels of redisplay to display
        the message at the end of the minibuffer when it is selected.

    Sorry, I don't understand you, here. Could you elaborate a bit?

 {}?

Do you mean that low-level redisplay would, in effect, use
`minibuffer-message' when the minibuffer is active and `message' otherwise?
If so, that's the behavior of the function I suggested.

However, if that is the behavior for `message', then my comment above
applies: you would need to do (let ((minibuffer-message-at-end nil))
(message ...)) to get the current effect of `message' (erase content first)
when the minibuffer is active. Sometimes you want to erase the minibuffer
first, even if the minibuffer is active. Most of the time you don't.

Why is your solution "cleaner" than just having `message' (erase first),
`minibuffer-message' (append without erasing), and a wrapper function that
DTRT most of the time (based on `minibufferp')?

  reply	other threads:[~2005-10-07 22:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 21:58 wrapper fn for message and minibuffer-message? Drew Adams
2005-10-05 15:53 ` Stefan Monnier
2005-10-05 16:23   ` Drew Adams
2005-10-06  5:28   ` Richard M. Stallman
2005-10-06 15:52     ` Drew Adams
2005-10-07  3:04       ` Richard M. Stallman
2005-10-07 22:29         ` Drew Adams [this message]
2005-10-09 18:16           ` Richard M. Stallman
2005-10-09 21:25             ` Drew Adams
2005-10-10 18:06               ` Richard M. Stallman
2005-10-10 19:52               ` Drew Adams
2005-10-15 13:08                 ` Juri Linkov
2005-10-15 14:39                   ` Drew Adams
2005-10-15 14:57                     ` Juri Linkov
2005-10-16 14:40                   ` Richard M. Stallman
2005-10-17  8:04                     ` Searching in the minibuffer (was: wrapper fn for message and minibuffer-message?) Juri Linkov
2005-10-17 21:57                       ` Richard M. Stallman
2005-10-18  8:05                         ` Searching in the minibuffer Juri Linkov
2005-10-19  2:43                           ` Richard M. Stallman
2005-10-19 15:55                             ` Juri Linkov
2005-10-20  4:54                               ` Richard M. Stallman
2005-10-21 15:38                                 ` Juri Linkov
2005-10-21 22:19                                   ` Richard M. Stallman
2005-10-21 22:30                                     ` Drew Adams

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=DNEMKBNJBGPAOPIJOOICEECICNAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).