Skip to main content
Option -n stands for "no wait" (unrelated to opening the file in the existing frame)
Source Link

This is the current solution that I came out with: use emacsclient and wrap it in an application.

First, put this line in ~/.emacs:

(server-start) 

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note: Make sure that your emacsclient path is correct.

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

This is the current solution that I came out with: use emacsclient and wrap it in an application.

First, put this line in ~/.emacs:

(server-start) 

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note:

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

This is the current solution that I came out with: use emacsclient and wrap it in an application.

First, put this line in ~/.emacs:

(server-start) 

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note: Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

added 89 characters in body
Source Link
Larry
  • 36
  • 3

This is the current solution that I came out with: use emacsclient and wrap it in an application.

First, put this line in ~/.emacs:

(server-start) 

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note:

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

This is the current solution that I came out with: use emacsclient.

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note:

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

This is the current solution that I came out with: use emacsclient and wrap it in an application.

First, put this line in ~/.emacs:

(server-start) 

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note:

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.

Source Link
Larry
  • 36
  • 3

This is the current solution that I came out with: use emacsclient.

Create this bash script:

if ! pgrep Emacs; then open -a Emacs.app sleep 1 fi for f in "$@" do /usr/local/bin/emacsclient -c -n "$f" done 

Note:

  1. Remove "-n" if you want to Open the file in the existing frame.
  2. Make sure that your emacsclient path is correct.

Then create a wrapper application using this method: https://superuser.com/a/239235

But remember to change Shell to /bin/bash.