[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs, Mac OS X and opening from Shell
From: |
Alberto Simões |
Subject: |
Re: Emacs, Mac OS X and opening from Shell |
Date: |
Fri, 25 Sep 2015 19:44:45 +0100 |
Hi all,
Sorry for posting at the top, but I think this is the correct place for
this:
as far as i can tell, the sh script I think is being executed, is not.
So, sorry, as I wasn't really testing emacsclient :-(
Best,
Alberto
On Fri, Sep 25, 2015 at 7:42 PM, Chunyang Xu <xuchunyang56@gmail.com> wrote:
>
> Alberto Simões writes:
>
> > Dear Emacs users,
> >
> > I've been an Emacs user for some decades, but never a really emacs
> hacker.
> > In the latest months I've been using Sublime for Mac, but I am missing
> > emacs a lot.
> >
> > So, in the come back, I am trying to make the emacs command to open an
> > emacs window, if one is open, or opening a new buffer in the current
> window
> > (and focus that buffer if possible).
>
> open(1) works for me, for example,
>
> $ open -a Emacs ~/.emacs.d/init.el
>
> if *.el has been set Emacs as its default opening App, you can also omit
> '-a Emacs':
>
> $ open ~/.emacs.d/init.el
>
> It should work out-of-box, i.e., no configuration needed from the Emacs
> side, the following should works for you:
>
> # Start a fresh Emacs
> $ open -a /Applications/Emacs.app -n --args -Q
> # Open a file
> $ open -a /Applications/Emacs.app ~/.emacs.d/init.el
>
>
> BTW, emacsclient(1) works as well. After 'M-x server-start' from a GUI
> Emacs window:
>
> $ emacsclient --no-wait ~/.emacs.d/init.el
>
> > Currently, my emacs command line is a shell script that looks like this:
> >
> > /Applications/Emacs.app/Contents/MacOS/Emacs "$@" &
> >
> > This, of course, open a new window (although I usually close it, as the
> > buffers are shared among windows).
> >
> > Any idea how I can make it behave as I described earlier?
> >
> > Thank you,
> > Alberto
>
> --
> Chunyang Xu
>
--
Alberto Simões
Re: Emacs, Mac OS X and opening from Shell, Chunyang Xu, 2015/09/25
- Re: Emacs, Mac OS X and opening from Shell,
Alberto Simões <=