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: --eval (was: emacsclient proposal) Date: Sat, 21 Jul 2007 21:34:28 +0300 Organization: JURTA Message-ID: <87644dy5aj.fsf_-_@jurta.org> References: <86myxs8rl4.fsf@lola.quinscape.zz> <86sl7k1djm.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185042952 15725 80.91.229.12 (21 Jul 2007 18:35:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2007 18:35:52 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 21 20:35:50 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 1ICJnw-0003RB-Ov for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2007 20:35:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICJnw-0004z0-4l for ged-emacs-devel@m.gmane.org; Sat, 21 Jul 2007 14:35:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICJns-0004yU-E7 for emacs-devel@gnu.org; Sat, 21 Jul 2007 14:35:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICJnr-0004yH-AS for emacs-devel@gnu.org; Sat, 21 Jul 2007 14:35:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICJnr-0004yE-5S for emacs-devel@gnu.org; Sat, 21 Jul 2007 14:35:43 -0400 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 1ICJnp-0005Av-Sr; Sat, 21 Jul 2007 14:35:42 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1ICJnc-000GAR-Ni; Sat, 21 Jul 2007 21:35:39 +0300 In-Reply-To: <86sl7k1djm.fsf@lola.quinscape.zz> (David Kastrup's message of "Thu\, 19 Jul 2007 19\:58\:05 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Scanner-Signature: 565941832c2f675ae953af64aa3a5396 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 1263 [July 20 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 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: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) 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:75254 Archived-At: > Uh, -f was a typo. I really meant --eval in my example. BTW, a pity that Emacs doesn't provide a short option for the `--eval' command line argument! By analogy with `--funcall' that have the corresponding `-f', the short option for `--eval' and `--execute' would be `-e'. Even though startup.el currently treats `-e' as a shorthand of `-funcall', it seems that such use of `-e' is obsolete and we are free to reassign it to `--eval' and `--execute' because the manual doesn't document it: Index: lisp/startup.el =================================================================== RCS file: /sources/emacs/emacs/lisp/startup.el,v retrieving revision 1.440 diff -c -r1.440 startup.el *** lisp/startup.el 3 Jul 2007 02:54:42 -0000 1.440 --- lisp/startup.el 21 Jul 2007 18:30:09 -0000 *************** *** 1834,1846 **** ((member argi '("-f" ; what the manual claims "-funcall" ! "-e")) ; what the source used to say (setq tem (intern (or argval (pop command-line-args-left)))) (if (commandp tem) (command-execute tem) (funcall tem))) ! ((member argi '("-eval" "-execute")) (eval (read (or argval (pop command-line-args-left))))) ((member argi '("-L" "-directory")) --- 1874,1886 ---- ((member argi '("-f" ; what the manual claims "-funcall" ! )) (setq tem (intern (or argval (pop command-line-args-left)))) (if (commandp tem) (command-execute tem) (funcall tem))) ! ((member argi '("-e" "-eval" "-execute")) (eval (read (or argval (pop command-line-args-left))))) ((member argi '("-L" "-directory")) -- Juri Linkov http://www.jurta.org/emacs/