From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?K=E1roly_Lo=22rentey?= Newsgroups: gmane.emacs.devel Subject: Re: minibuffer-exit when emacsclient executes Lisp code Date: Wed, 16 May 2007 14:58:40 +0200 Message-ID: References: <464A1C4B.8060504@gmail.com> <464AEAD4.8010102@gmail.com> <86hcqduh7n.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1179390318==" X-Trace: sea.gmane.org 1179320367 7441 80.91.229.12 (16 May 2007 12:59:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 May 2007 12:59:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 16 14:59:26 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 1HoJ6B-0005yL-7m for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 14:59:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoJE9-0000Se-Ib for ged-emacs-devel@m.gmane.org; Wed, 16 May 2007 09:07:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoJE6-0000R7-4t for emacs-devel@gnu.org; Wed, 16 May 2007 09:07:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoJE5-0000QE-IF for emacs-devel@gnu.org; Wed, 16 May 2007 09:07:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoJE5-0000QB-BE for emacs-devel@gnu.org; Wed, 16 May 2007 09:07:33 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HoJ65-0002uT-VA for emacs-devel@gnu.org; Wed, 16 May 2007 08:59:18 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HoJ5s-00045a-Po for emacs-devel@gnu.org; Wed, 16 May 2007 14:59:04 +0200 Original-Received: from ns.netvisor.hu ([195.228.79.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 May 2007 14:59:04 +0200 Original-Received: from karoly by ns.netvisor.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 May 2007 14:59:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 83 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ns.netvisor.hu User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) In-Reply-To: <86hcqduh7n.fsf@lola.quinscape.zz> X-Enigmail-Version: 0.95.0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:71161 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1179390318== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5AC52D6811FABD693A3B09A2" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5AC52D6811FABD693A3B09A2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable David Kastrup wrote: > "Lennart Borgman (gmail)" writes: >=20 >> Klaus Zeitler wrote: >>> 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 >>> =3D> emacs quits the minibuffer >>> >> 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. >=20 > --eval '(find-file "xxxx") Well said. It is not clear to me if this bug report is for the multi-tty branch or the trunk, but with the multi-tty emacsclient, a more useful heuristic would be whether or not the client requested the creation of a new frame. (Incidentally, the freeze issue was to be resolved by better user feedback and an elaborate C-g-based protocol to let the user manually return to top-level from frozen frames. I like this simple approach even better.) To reduce conflicts and parallel effort, I think people should look at the multi-tty emacsclient, and (if possible) stop enhancing the trunk version. The two versions are considerably different. > 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. The flickering issue may not be strictly relevant for the emacsclient case, since the parameters that apply on the new frame are (or at least should be) already known at the time the frame is created. (Multi-tty) Emacs is dumped with a dummy (no-op) terminal, and creates the first real terminal only on the second run. One way to reduce flickering would be to delay terminal initialization until after .emacs is loaded. Is this what you mean? Wouldn't that make it harder to debug .emacs errors? > 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. I think something like (run-at-time 0 nil 'top-level) would work fine. --=20 Karoly --------------enig5AC52D6811FABD693A3B09A2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGSwAF6eoyqA+yej8RAuVyAJ4g9VpMxrrqM5SAKPYfFPLSMEBkgQCggS1t iKpvTeLrIgng681rscXkZN0= =1bOJ -----END PGP SIGNATURE----- --------------enig5AC52D6811FABD693A3B09A2-- --===============1179390318== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============1179390318==--