Date: Wed, 25 Sep 2002 19:52:22 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: "Gary W. Swearingen" <swear@attbi.com> Cc: Giorgos Keramidas <keramida@ceid.upatras.gr>, thursday <thursday@SDF.LONESTAR.ORG>, freebsd-questions@FreeBSD.org Subject: Re: OT: emacs command line switch Message-ID: <20020925175222.GA7598@falcon.midgard.homeip.net> In-Reply-To: <r2d6r29dg6.6r2@localhost.localdomain> References: <20020924203242.GA10714@SDF.LONESTAR.ORG> <20020924231613.GC28112@hades.hell.gr> <20020924234055.GA5292@falcon.midgard.homeip.net> <r2d6r29dg6.6r2@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 25, 2002 at 10:38:49AM -0700, Gary W. Swearingen wrote: > Erik Trulsson <ertr1013@student.uu.se> writes: > > > You can also specify Lisp functions to run directly from the commandline. > > > > emacs file.txt -f end-of-buffer > > > > seems to work fine. > > I couldn't get "-f end-of-buffer" to work when I developed my > monstrosity. Turns out that one must place it after the filename. > Weird. I knew GNU software allowed non-POSIX option placement, but I > didn't know it sometimes depended on it. I guess emacs just processes most of the command-line options from left to right. I.e 'emacs -f end-of-buffer file1' would make emacs to try to place the cursor at the end of the current buffer (which doesn't exist at that time), and then load file1 into a new buffer with the cursor at the end as usual. If, OTOH, one does 'emacs file1 -f end-of-buffer' emacs will first load file1, and then move to cursor to the end of the current buffer, which is the one file1 is in. If you try 'emacs file1 -f end-of-buffer file2' you will see that the cursor will be at the end of file1, but at the beginning of file2. With 'emacs file1 -f end-of-buffer file2 -f end-of-buffer' the cursor will be at the end of both file1 and file2. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020925175222.GA7598>