From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.devel Subject: Re: emacsclient's option decoding code Date: Thu, 13 Nov 2008 22:08:37 +0100 (CET) Message-ID: <20081113.220837.888516269.thorsten.bonow@post.rwth-aachen.de> References: <87k5b7cs1z.fsf@jurta.org> <87abc3bbrw.fsf@justinbogner.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226615233 19327 80.91.229.12 (13 Nov 2008 22:27:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 22:27:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 13 23:28:14 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 1L0kfc-0004lV-AP for ged-emacs-devel@m.gmane.org; Thu, 13 Nov 2008 23:28:13 +0100 Original-Received: from localhost ([127.0.0.1]:34586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0keU-0006hj-4q for ged-emacs-devel@m.gmane.org; Thu, 13 Nov 2008 17:27:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0jQq-0001Xv-1Z for emacs-devel@gnu.org; Thu, 13 Nov 2008 16:08:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0jQp-0001XU-0v for emacs-devel@gnu.org; Thu, 13 Nov 2008 16:08:51 -0500 Original-Received: from [199.232.76.173] (port=53283 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0jQo-0001XR-QY for emacs-devel@gnu.org; Thu, 13 Nov 2008 16:08:50 -0500 Original-Received: from h93074.serverkompetenz.net ([81.169.138.67]:54069) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0jQo-0006rs-7o for emacs-devel@gnu.org; Thu, 13 Nov 2008 16:08:50 -0500 Original-Received: by h93074.serverkompetenz.net (Postfix, from userid 105) id 3DC437241CA; Thu, 13 Nov 2008 22:08:46 +0100 (CET) Original-Received: from catweazle (pD951FB71.dip.t-dialin.net [217.81.251.113]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h93074.serverkompetenz.net (Postfix) with ESMTP id E72497241C9 for ; Thu, 13 Nov 2008 22:08:38 +0100 (CET) Original-Received: from localhost ([127.0.0.1] ident=toto) by catweazle with esmtp (Exim 4.69) (envelope-from ) id 1L0jQb-00070F-Cp for emacs-devel@gnu.org; Thu, 13 Nov 2008 22:08:37 +0100 In-Reply-To: <87abc3bbrw.fsf@justinbogner.com> X-Face: ,i\0yx1|cRm0qV.lmJ%Z(_0e-.@or]1; 7lZof/?"lf; yH3U0}^Fl+-=1/VPQ8u2aW-k_q3V +YG_z3tmNc,QQg=F`wZg9ZufzHu/CJ?(sz5h>5@5juZnD'V/Jxe#$B<{ X-Mailer: Mew version 5.2 on XEmacs 21.4.21 (Educational Television) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Thu, 13 Nov 2008 17:26:44 -0500 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:105674 Archived-At: >>>>> "mail" == mail writes: mail> Juri Linkov writes: >>> . if -c was specified, try creating a GUI frame, and failing that, try a >>> tty frame; >>> >>> . if --tty was specified, try make-frame-on-tty, if it fails, try using >>> the current tty or a GUI frame. >> >> This looks mostly clear for me. The only thing I don't understand is why >> we need -c? Emacs has no option for creating a GUI frame and has -nw for >> running on a tty, so why should emacsclient be different? The following >> rules are more consistent with the traditional Emacs invocation: >> >> . if -nw was specified, try make-frame-on-tty, if it fails, try using the >> current tty or a GUI frame; >> >> . if no option specified, try creating a GUI frame, and failing that, try >> a tty frame. >> >> for consistency with >> >> emacsclient = emacs (create a new GUI frame) emacsclient -nw = emacs -nw >> (run emacs on a tty) emacsclient FILE = emacs FILE (open a file in a new >> GUI frame) emacsclient -nw FILE = emacs -nw FILE (open a file in a tty) mail> But emacsclient has to additionally support "use the existing frame", mail> which is what it does (and has always done) when no arguments are mail> specified. Hi, I kid myself thinking that I asked for a "-c" option first, back in 2003 :-) I would like to remind you of the discussion back than and my reasons for asking for it. Removing the "--create-frame" option and make emacs behave as proposed above would cripple my setup---again. I'm quoting from "gnu/emacs client --create-frame somehow?" (http://lists.gnu.org/archive/html/help-gnu-emacs/2003-12/msg00007.html): >>>>> "Stefan" == Stefan Monnier writes: >> What I'm looking for is some way of simulating a --create-frame >> option and then calling emacsclient/gnuclient --create-frame >> FILE Stefan> Since server.el and emacsclient.c do not offer any way to Stefan> add new options like --create-frame, your best bet is Stefan> probably something like Stefan> emacsclient --eval '(find-file-other-frame "FILE")' Yes, this opens up a new frame, but then I am loosing the [+line-number] option of gnu/emacsclient. My problem started when writing with LaTeX in Emacs, previewing with xdvi: With the inverse search feature, switching between a line in the document and the preview of this part of your document is possible. So I wouldn't want to loose the line-number information or open up a new frame every time I switch. But in other cases---say when clicking on a "mailto:"-tag in my web-browser, I want a new frame for composing an email. Stefan> But maybe you have a point that it should be possible to Stefan> add new options, kind of like what is done with Stefan> `command-switch-alist'. [...] To put it in a nutshell, even under X, I sometimes want to let emacsclient create a frame, but sometimes not. Toto -- Contact information and PGP key at http://www.withouthat.org/~toto/contact.html [...] the dangerous role of the troublemakers in history has often fallen to the Jewish people. Anne Frankly, it should be noted, in passing, that a great deal of good for the advancement of mankind has been accomplished between circumcision, where they cut off the tip of your dick, to crucifixion, where they throw the whole Jew away. Friedman, Kinky (1995), "God Bless John Wayne", Simon and Shuster, New York