From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Feature request : Tab-completion for 'shell-comand' Date: Fri, 07 Mar 2008 01:45:45 +0200 Organization: JURTA Message-ID: <87tzjj1kh4.fsf@jurta.org> References: <874pbmjgsy.fsf@gmx.de> <874pbknt3j.fsf@tsuchiya.vaj.namazu.org> <87mypccg6r.fsf@jurta.org> <87od9raglv.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204848153 25876 80.91.229.12 (7 Mar 2008 00:02:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 00:02:33 +0000 (UTC) Cc: Michael Albinus , TSUCHIYA Masatoshi , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 01:02:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXQ37-0003j5-PZ for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2008 01:02:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXQ2a-0002Tu-B4 for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 19:02:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXQ20-0002H5-Gq for emacs-devel@gnu.org; Thu, 06 Mar 2008 19:01:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXQ1z-0002GL-1J for emacs-devel@gnu.org; Thu, 06 Mar 2008 19:01:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXQ1y-0002GF-Pc for emacs-devel@gnu.org; Thu, 06 Mar 2008 19:01:46 -0500 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JXQ1y-0004Uh-Br for emacs-devel@gnu.org; Thu, 06 Mar 2008 19:01:46 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JXQ1m-0001Zo-DX; Fri, 07 Mar 2008 02:01:42 +0200 In-Reply-To: <87od9raglv.fsf@jurta.org> (Juri Linkov's message of "Thu, 06 Mar 2008 19:48:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: fa1e9f04260dd27375e84b1224048298 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2366 [Mar 6 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91566 Archived-At: >> 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. > > This will require changes in a lot of places to replace `message' with > `minibuffer-message'. > > But maybe `message' should take care of the active minibuffer and > display the message at the end of the minibiffer when it is active > using `minibuffer-message'? I tried to run Emacs with a small patch below that modifies `message' to call `minibuffer-message' when the minibuffer is active, and so far I see no problems. When I run a timer (run-at-time t 3 'message "Hello") that displays the message every 3 sec, and activate the minibuffer, then it correctly displays its message in the minibuffer as: Find file: ~/ [Hello] It also plays nicely with the completion messages by appending the message like (after typing TAB): Find file: ~/.emacs [Complete, but not unique] [Hello] Here is the patch if someone wants to try: Index: src/editfns.c =================================================================== RCS file: /sources/emacs/emacs/src/editfns.c,v retrieving revision 1.456 diff -u -r1.456 editfns.c --- src/editfns.c 26 Feb 2008 16:36:52 -0000 1.456 +++ src/editfns.c 6 Mar 2008 23:45:35 -0000 @@ -3365,8 +3365,21 @@ message (0); return args[0]; } - else + else if (WINDOWP (selected_window) + && MINI_WINDOW_P (XWINDOW (selected_window))) { + register Lisp_Object val1, val2; + Lisp_Object args2[2]; + + val1 = Fformat (nargs, args); + args2[0] = build_string (" [%s]"); + args2[1] = val1; + val2 = Fformat (2, args2); + + temp_echo_area_glyphs (val2); + return val1; + } + else { register Lisp_Object val; val = Fformat (nargs, args); message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); -- Juri Linkov http://www.jurta.org/emacs/