unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org, Michael Albinus <michael.albinus@gmx.de>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	TSUCHIYA Masatoshi <tsuchiya@namazu.org>
Subject: Re: Feature request : Tab-completion for 'shell-comand'
Date: Fri, 07 Mar 2008 01:48:32 +0200	[thread overview]
Message-ID: <87r6en4e9n.fsf@jurta.org> (raw)
In-Reply-To: <87lk4vpxnk.fsf@catnip.gol.com> (Miles Bader's message of "Fri, 07 Mar 2008 02:31:11 +0900")

>> I think that when the minibuffer is active, we should still output
>> a message, only differently (as does minibuffer-message).  Maybe just
>> using minibuffer-message (and changing it so it uses plain "message"
>> when the minibuffer is not active) would do the trick.
>
> I wish _all_ messages would display ala minibuffer-message when the
> user's editing in the minibuffer -- the current behavior (temporarily
> ovewriting the minibuffer to show messages) is stupid and annoying,
> especially given that many errors one gets are fairly trivial or
> transient.
>
> I made a patch to do this sometime before Emacs 21 was released, and
> recall various issues popping up though... I think mainly it was the
> somewhat more exotic users of message, like quail completion info etc.

I see that quail completion currently doesn't work correctly in the
minibuffer: it doesn't display completions in the minibuffer for
multi-key input methods.  So this needs fixing anyway.

BTW, I see there are several duplicate implementations of
`minibuffer-message' in Emacs.  Maybe they all can be replaced
with a simple call to `minibuffer-message'?

(defun quail-minibuffer-message (string)
  (message nil)
  (let ((point-max (point-max))
	(inhibit-quit t))
    (save-excursion
      (goto-char point-max)
      (insert string))
    (sit-for 1000000)
    (delete-region point-max (point-max))
    (when quit-flag
      (setq quit-flag nil
	    unread-command-events '(7)))))

(defun file-cache-temp-minibuffer-message (msg)
  "A Lisp version of `temp_minibuffer_message' from minibuf.c."
  (let ((savemax (point-max)))
    (save-excursion
      (goto-char (point-max))
      (insert msg))
    (let ((inhibit-quit t))
      (sit-for 2)
      (delete-region savemax (point-max))
      (if quit-flag
	  (setq quit-flag nil
		unread-command-events (list 7))))))

(defun calc-temp-minibuffer-message (m)
  (let ((savemax (point-max)))
    (save-excursion
      (goto-char (point-max))
      (insert m))
    (let ((okay nil))
      (unwind-protect
	  (progn
	    (sit-for 2)
	    (identity 1)   ; this forces a call to QUIT; in bytecode.c.
	    (setq okay t))
	(progn
	  (delete-region savemax (point-max))
	  (or okay (abort-recursive-edit)))))))

(defun PC-temp-minibuffer-message (message)
  "A Lisp version of `temp_minibuffer_message' from minibuf.c."
  (cond (PC-not-minibuffer
	 (message "%s" message)
	 (sit-for 2)
	 (message ""))
	((fboundp 'temp-minibuffer-message)
	 (temp-minibuffer-message message))
	(t
	 (let ((point-max (point-max)))
	   (save-excursion
	     (goto-char point-max)
	     (insert message))
	   (let ((inhibit-quit t))
	     (sit-for 2)
	     (delete-region point-max (point-max))
	     (when quit-flag
	       (setq quit-flag nil
		     unread-command-events '(7))))))))

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




  parent reply	other threads:[~2008-03-06 23:48 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 [this message]
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
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

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