unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Alberto Simões" <hashashin@gmail.com>
To: Chunyang Xu <xuchunyang56@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Emacs, Mac OS X and opening from Shell
Date: Fri, 25 Sep 2015 19:44:45 +0100	[thread overview]
Message-ID: <CAAkRyruPVEybKDaJPeKuUrrK3qZ71C84mJHfT++pNf4L=u7tuw@mail.gmail.com> (raw)
In-Reply-To: <m2oagq1gtk.fsf@gmail.com>

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


      reply	other threads:[~2015-09-25 18:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 14:47 Emacs, Mac OS X and opening from Shell Alberto Simões
2015-09-25 17:33 ` Eli Zaretskii
2015-09-25 17:38   ` Alberto Simões
2015-09-25 18:31     ` Eli Zaretskii
2015-09-25 18:41       ` Alberto Simões
2015-09-28 11:32         ` Alan Schmitt
2015-09-25 18:42 ` Chunyang Xu
2015-09-25 18:44   ` Alberto Simões [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAkRyruPVEybKDaJPeKuUrrK3qZ71C84mJHfT++pNf4L=u7tuw@mail.gmail.com' \
    --to=hashashin@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xuchunyang56@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).