all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* open file at the end from command line
@ 2013-12-01 23:18 Harry Putnam
  2013-12-01 23:51 ` Peter Dyballa
  2013-12-02  0:46 ` Drew Adams
  0 siblings, 2 replies; 5+ messages in thread
From: Harry Putnam @ 2013-12-01 23:18 UTC (permalink / raw)
  To: help-gnu-emacs

I cannot believe that after 10 minutes with google, I haven't found
the answer to my subject line.

  How to: open a file at the end from the command line

I thought I remembered something similar to vim where you could open a
file at the end using '+'

Of course there is `emacs +N file'  (with whatever number=N).  And
even find grained enough to bring the cursor to a specific column.

  emacs +N:N file

But is there not a way to open a file at the end? 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: open file at the end from command line
  2013-12-01 23:18 open file at the end from command line Harry Putnam
@ 2013-12-01 23:51 ` Peter Dyballa
  2013-12-02  0:12   ` Emanuel Berg
  2013-12-02  0:46 ` Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Dyballa @ 2013-12-01 23:51 UTC (permalink / raw)
  To: Harry Putnam; +Cc: help-gnu-emacs


Am 02.12.2013 um 00:18 schrieb Harry Putnam:

> But is there not a way to open a file at the end? 

Tail.

--
Greetings

  Pete

"When you breath, you inspire. When you do not breath, you expire."




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: open file at the end from command line
  2013-12-01 23:51 ` Peter Dyballa
@ 2013-12-02  0:12   ` Emanuel Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2013-12-02  0:12 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 02.12.2013 um 00:18 schrieb Harry Putnam:
>
>> But is there not a way to open a file at the end? 
>
> Tail.

How about:

emacs +`cat file.txt | wc -l` file.txt

or

emacs file.txt --funcall end-of-buffer

But I prefer having Emacs run all the time. Open files
*from* Emacs, not *with* Emacs.

PS. I couldn't send this because of a "bad word"! Let's
see if this works. DS.

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: open file at the end from command line
  2013-12-01 23:18 open file at the end from command line Harry Putnam
  2013-12-01 23:51 ` Peter Dyballa
@ 2013-12-02  0:46 ` Drew Adams
  2013-12-03  0:46   ` Harry Putnam
  1 sibling, 1 reply; 5+ messages in thread
From: Drew Adams @ 2013-12-02  0:46 UTC (permalink / raw)
  To: Harry Putnam, help-gnu-emacs

> I thought I remembered something similar to vim where you could open a
> file at the end using '+'
> 
> Of course there is `emacs +N file'  (with whatever number=N).  And
> even find grained enough to bring the cursor to a specific column.
>   emacs +N:N file
> But is there not a way to open a file at the end?

The same question was recently answered on Stack Overflow:

http://stackoverflow.com/questions/20262652/how-to-start-emacs-with-cursor-at-the-end-of-a-given-file



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: open file at the end from command line
  2013-12-02  0:46 ` Drew Adams
@ 2013-12-03  0:46   ` Harry Putnam
  0 siblings, 0 replies; 5+ messages in thread
From: Harry Putnam @ 2013-12-03  0:46 UTC (permalink / raw)
  To: help-gnu-emacs

First to other posters... thanks for some pretty inventive ideas

Drew Adams <drew.adams@oracle.com> writes:

>> I thought I remembered something similar to vim where you could open a
>> file at the end using '+'
>> 
>> Of course there is `emacs +N file'  (with whatever number=N).  And
>> even find grained enough to bring the cursor to a specific column.
>>   emacs +N:N file
>> But is there not a way to open a file at the end?
>
> The same question was recently answered on Stack Overflow:
>
> http://stackoverflow.com/questions/20262652/how-to-start-emacs-with-cursor-at-the-end-of-a-given-file

(Leaving one of those here for any searched on this group)
That last one:
emacs filename --eval "(goto-char (point-max))"

That will be just the ticket for me since the place I needed it, was in
an ~/.xbindkeyrc script where it allows me to press a C+S+f on my
linux host keyboard to invoke emacs displaying a specific file that I
only ever want to edit or read at the end.

~/.xbindkeysrc syntax looks like this

    "emacsclient -e '(set-background-color "darkslategray")' -e '(set-foreground-color "cornsilk2")' -e '(set-cursor-color "magenta")' -e '(set-default-font "-dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1")' -s prg -c -e '(find-file "/pub/PERSONAL/.0finAct")'  -e '(goto-char (point-max))'"
    control+shift + f 

And works just dandy.

PS - I wish I liked those gwene groups better, I'd probably like that
emacs group, but unless they've improved quite a lot since a couple
yrs ago... the ones I tried seemed really confusing... not nice and
orderly like the rest of gmane or the regular nntp use-net.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-03  0:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-01 23:18 open file at the end from command line Harry Putnam
2013-12-01 23:51 ` Peter Dyballa
2013-12-02  0:12   ` Emanuel Berg
2013-12-02  0:46 ` Drew Adams
2013-12-03  0:46   ` Harry Putnam

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.