From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: minibuffer-exit when emacsclient executes Lisp code Date: Wed, 16 May 2007 13:43:24 +0200 Message-ID: <86hcqduh7n.fsf@lola.quinscape.zz> References: <464A1C4B.8060504@gmail.com> <464AEAD4.8010102@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179315815 23290 80.91.229.12 (16 May 2007 11:43:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 11:43:35 +0000 (UTC) Cc: Klaus Zeitler , emacs-devel@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 16 13:43:33 2007 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 1HoHun-00078L-02 for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 13:43:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoI2l-0003yb-9q for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 07:51:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoI2h-0003yF-Lu for emacs-devel@gnu.org; Wed, 16 May 2007 07:51:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoI2g-0003wY-Ba for emacs-devel@gnu.org; Wed, 16 May 2007 07:51:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoI2g-0003wM-48 for emacs-devel@gnu.org; Wed, 16 May 2007 07:51:42 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HoHug-0001s5-OH for emacs-devel@gnu.org; Wed, 16 May 2007 07:43:27 -0400 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id NAA08490 for ; Wed, 16 May 2007 13:43:20 +0200 X-Delivered-To: Original-Received: (qmail 26133 invoked from network); 16 May 2007 11:43:24 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 16 May 2007 11:43:24 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id B82AF8F230; Wed, 16 May 2007 13:43:24 +0200 (CEST) In-Reply-To: <464AEAD4.8010102@gmail.com> (Lennart Borgman's message of "Wed\, 16 May 2007 13\:28\:20 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:71158 Archived-At: "Lennart Borgman (gmail)" writes: > Klaus Zeitler wrote: >>>>>>> "Lennart" == Lennart Borgman (gmail) writes: >> Lennart> Lennart> Yes, it is probably due to a change a >> while ago to avoid problems >> Lennart> if the minibuffer was active. How are you calling emacsclient? Is >> Lennart> it to open files or to eval some elisp code? >> >> My script calls emacsclient with --eval to evaluate lisp code. >> Here's a simple example: >> 1. in your emacs do M-x to enter the minibuffer >> 2. in a shell type e.g.: emacsclient --eval cvs-emacs >> => emacs quits the minibuffer >> >> Klaus > > Unfortunately there is currently no way to distinguish your case > from the more normal case where emacsclient is used to open a > file. In the later case I think the change does what is needed, but > for your (a bit more unusual) usage it breaks it. --eval '(find-file "xxxx") I think we should probably try to address this in connection with another issue: a suitable way for opening a tty: open a frame only once it is "needed". One problem we currently have is that it is not really pleasing to specify Emacs frame geometries, colors, toolbar or menubar presence by using .emacs and/or customize: that way, the initial frame will first get mapped wrongly, then flicker into shape/position. So one would want to have a delayed mapping, basically happening when sit-for is called. If this point is never reached, we don't need a mapping at all. In a similar vein, if emacsclient never reaches a point where it would be interested in looking at tty input, maybe it is not worth mapping a frame (and stealing the minibuffer). Of course, the question when to call "top-level" remains. -- David Kastrup