From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Open files in a new frames from command line Date: Sat, 31 Jan 2004 00:44:16 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87llnpatnz.fsf@ID-87814.user.dfncis.de> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1075511829 28987 80.91.224.253 (31 Jan 2004 01:17:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2004 01:17:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 31 02:17:06 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Amjkv-0001yb-00 for ; Sat, 31 Jan 2004 02:17:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Amjk5-0006y9-52 for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jan 2004 20:16:13 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!dialin-212-144-106-249.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Original-NNTP-Posting-Host: dialin-212-144-106-249.arcor-ip.net (212.144.106.249) Original-X-Trace: news.uni-berlin.de 1075510871 29410294 212.144.106.249 ([87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:PcKMCMOVMVozNUfCtMK8w7Viw6zClmpHw55vKw== Original-Xref: shelby.stanford.edu gnu.emacs.help:120591 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16538 "Michael B. Schmidt" writes: > Hello, > > I need to open multiple files to work with them. I use the command: > "emacs foo bar baz". This open the file foo,bar and baz each in a new > Buffer. Is there away (command line option,script) to open the files > in frames instead of new Buffers? (I know that I can open one of the > files and then open each file with c-x 5 f but this is to much work > :-))) There is no such command line option, but you could make your own command line option, if you put something like this (only slightly tested) into your .emacs: (defun my-is-option-p (str) "Return non-nil if STR is an command line option." (string-match "^--?" str)) (defun my-command-line-make-new-frames () "Process open each files in a new frame. This function is supposed to be an element of `command-line-functions' (q.v.). Its functionality is triggered if ARGI is \"--as-frames\" and opens each element in COMMAND-LINE-ARGS-LEFT not starting with a slash as a file in a separate frame." (when (string= argi "--as-frames") (unless (my-is-option-p (car command-line-args-left)) (find-file (pop command-line-args-left))) (while (and command-line-args-left (not (my-is-option-p (car command-line-args-left)))) (find-file-other-frame (pop command-line-args-left)) t))) (push 'my-command-line-make-new-frames command-line-functions) Use as emacs --as-frames lirum.txt larum.txt Oliver -- 12 Pluviôse an 212 de la Révolution Liberté, Egalité, Fraternité!