GNU bug report logs - #29883
macOS finder opens new Emacs instance every time

Previous Next

Package: emacs;

Reported by: Artemio González López <artemiogl <at> telefonica.net>

Date: Fri, 29 Dec 2017 00:03:01 UTC

Severity: minor

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29883 in the body.
You can then email your comments to 29883 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Fri, 29 Dec 2017 00:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Artemio González López <artemiogl <at> telefonica.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Dec 2017 00:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Artemio González López <artemiogl <at> telefonica.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs server not detected in Mac OS High Sierra
Date: Fri, 29 Dec 2017 00:04:41 +0100
When a .tex file is opened in Emacs 25.3.1 under macOS 10.13.2 High Sierra by double-clicking on it always launches a second instance of Emacs, even if a server process is already running (launched by a “(server-start)” line at the beginning of my .emacs file). This problem did not occur in the previous system (macOS 10.12 Sierra).

In GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
 of 2017-09-12 built on builder10-9.local
Windowing system distributor 'Apple', version 10.3.1561
Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
  value of $LANG: en_US <at> currency=EUR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:


</body>
</html>
"
Mark set [2 times]
(No changes need to be saved)

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
password-cache epg gnus-util mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils sgml-mode browse-url
find-dired semantic/fw mode-local find-func grep dired-aux thingatpt
etags xref cl-seq project eieio eieio-core preview prv-emacs reftex-dcr
reftex-auc reftex reftex-vars bib-cite noutline outline texmathp
flyspell ispell tex-bar toolbar-x font-latex plain-tex tex-buf latex
tex-ispell tex-style tex crm advice tex-mode compile shell pcomplete
comint ansi-color ring latexenc dired paren delsel cus-start cus-load
edmacro kmacro tabbar cl-macs easy-mmode session cl exec-path-from-shell
finder-inf info tex-site package epg-config seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
server time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 487290 45697)
 (symbols 48 31265 0)
 (miscs 40 170 1083)
 (strings 32 54115 16658)
 (string-bytes 1 1816127)
 (vectors 16 50700)
 (vector-slots 8 1560700 162051)
 (floats 8 320 758)
 (intervals 56 49471 1837)
 (buffers 976 33))

Artemio González López
artemiogl <at> telefonica.net







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Fri, 29 Dec 2017 22:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Artemio González López <artemiogl <at> telefonica.net>
Cc: 29883 <at> debbugs.gnu.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Fri, 29 Dec 2017 22:12:16 +0000
On Fri, Dec 29, 2017 at 12:04:41AM +0100, Artemio González López wrote:
> When a .tex file is opened in Emacs 25.3.1 under macOS 10.13.2 High
> Sierra by double-clicking on it always launches a second instance of
> Emacs, even if a server process is already running (launched by a
> “(server-start)” line at the beginning of my .emacs file). This
> problem did not occur in the previous system (macOS 10.12 Sierra).

Hi, thanks for the report.

I’m not on 10.13 yet, so I can’t test this. Is it only .tex files that
don’t work?

When double clicking a file it should open in an existing Emacs
instance even without a server process.

Do you have more than one Emacs.app installed? Is it possible you need
to re‐associate .tex files with the correct Emacs? (Get Info ‐> Open With)
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Mon, 01 Jan 2018 15:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Artemio González López <artemiogl <at> telefonica.net>
Cc: 29883 <at> debbugs.gnu.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Mon, 1 Jan 2018 15:02:22 +0000
On Sun, Dec 31, 2017 at 01:55:42AM +0100, Artemio González López wrote:
> 
> > On Dec 29, 2017, at 11:12 PM, Alan Third <alan <at> idiocy.org> wrote:
> > 
> > On Fri, Dec 29, 2017 at 12:04:41AM +0100, Artemio González López wrote:
> >> When a .tex file is opened in Emacs 25.3.1 under macOS 10.13.2 High
> >> Sierra by double-clicking on it always launches a second instance of
> >> Emacs, even if a server process is already running (launched by a
> >> “(server-start)” line at the beginning of my .emacs file). This
> >> problem did not occur in the previous system (macOS 10.12 Sierra).
> > 
> > Hi, thanks for the report.
> > 
> > I’m not on 10.13 yet, so I can’t test this. Is it only .tex files that
> > don’t work?
> > 
> > When double clicking a file it should open in an existing Emacs
> > instance even without a server process.
> > 
> > Do you have more than one Emacs.app installed? Is it possible you need
> > to re‐associate .tex files with the correct Emacs? (Get Info ‐> Open With)
> 
> Dear Alan,
> 
> Thanks for your reply. First of all, I have checked that I don’t
> have other Emacs.app’s installed in my computer. Secondly, I’ve
> already tried reassociating my .tex file with Emacs.app, to no
> avail. Thirdly, the problem occurs with all types of files, not just
> .tex ones. In fact, even if I drag the file icon to Emacs.app’s icon
> in the dock, a second instance is launched. The only way to avoid
> this that I know of is to drag the file’s icon over an open Emacs
> window, which is very inconvenient. From what I’ve heard (see, e.g.,
> https://emacs.stackexchange.com/questions/37164/run-only-one-instance-of-emacs-on-macos)
> this problem is specific of 10.13 (it did not occur in 10.12) and
> Emacs for Mac OS X. It would be nice if somebody having access to
> 10.13 looked at it, because it’s quite annoying (in my case, when
> the second instance of Emacs.app is opened it complains of an
> existing server, etc.).

Thanks for letting us know, and please keep the bug tracker cc’d in so
other people can see your responses (and hopefully help out).
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Wed, 03 Jan 2018 07:28:01 GMT) Full text and rfc822 format available.

Message #14 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <homeros.misasa <at> gmail.com>
To: Artemio González López <artemiogl <at> telefonica.net>
Cc: 29883 <at> debbugs.gnu.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Wed, 03 Jan 2018 16:27:16 +0900
Artemio González López <artemiogl <at> telefonica.net> writes:

> When a .tex file is opened in Emacs 25.3.1 under macOS 10.13.2 High
> Sierra by double-clicking on it always launches a second instance of
> Emacs, even if a server process is already running (launched by a
> “(server-start)” line at the beginning of my .emacs file). This
> problem did not occur in the previous system (macOS 10.12 Sierra).

I cannot reproduce this on macOS 10.13.2 High Sierra.

 GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, NS appkit-1561.10 Version
 10.13.1 (Build 17B1003)) of 2017-12-19
 
 Emacs -Q
 M-: (server-start)
 double-click `foo.tex' on Finder
 File `foo.tex' is opened with pre-existing process

You may have two Emacs.app in your system.  Make sure if `Open with:'
via `Get Info' on Finder is configured properly.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Wed, 03 Jan 2018 14:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Artemio González López <artemiogl <at> telefonica.net>
To: Tak Kunihiro <homeros.misasa <at> gmail.com>
Cc: 29883 <at> debbugs.gnu.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Wed, 3 Jan 2018 15:24:15 +0100
[Message part 1 (text/plain, inline)]

> On Jan 3, 2018, at 8:27 AM, Tak Kunihiro <homeros.misasa <at> gmail.com> wrote:
> 
> Artemio González López <artemiogl <at> telefonica.net> writes:
> 
>> When a .tex file is opened in Emacs 25.3.1 under macOS 10.13.2 High
>> Sierra by double-clicking on it always launches a second instance of
>> Emacs, even if a server process is already running (launched by a
>> “(server-start)” line at the beginning of my .emacs file). This
>> problem did not occur in the previous system (macOS 10.12 Sierra).
> 
> I cannot reproduce this on macOS 10.13.2 High Sierra.
> 
> GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, NS appkit-1561.10 Version
> 10.13.1 (Build 17B1003)) of 2017-12-19
> 
> Emacs -Q
> M-: (server-start)
> double-click `foo.tex' on Finder
> File `foo.tex' is opened with pre-existing process
> 
> You may have two Emacs.app in your system.  Make sure if `Open with:'
> via `Get Info' on Finder is configured properly.

Dear Tak,

Thanks a lot for your message. First of all, I am positive that I only have a copy of Emacs in my system, and “Open with …” is configured properly (it points to this Emacs, for example, for .tex files). I think you are not seeing this because our Emacs are different (although both are 25.3.1). Indeed, yours is

GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, NS appkit-1561.10 Version
10.13.1 (Build 17B1003)) of 2017-12-19

whereas mine is

GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
of 2017-09-12 built on builder10-9.local
Windowing system distributor 'Apple', version 10.3.1561
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

(see my bug report). In fact, my Emacs is the stable 25.3 version downloaded from the Emacs fo Mac OS X page (emacsformacosx.com <http://emacsformacox.com/>). As I said in my previous message, other users of this version are also reporting the same problem I’m having. How did you get your Emacs? Did you build it yourself? Could you tell me how you did it (what configuration options we used, for instance), so that I could try it myself?

Thanks again,

Artemio

Artemio González López
artemiogl <at> telefonica.net



[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Wed, 03 Jan 2018 15:22:02 GMT) Full text and rfc822 format available.

Message #20 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Artemio González López <artemiogl <at> telefonica.net>
Cc: 29883 <at> debbugs.gnu.org, Tak Kunihiro <homeros.misasa <at> gmail.com>,
 david+emacsformacosx <at> porkrind.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Wed, 3 Jan 2018 15:21:27 +0000
On Wed, Jan 03, 2018 at 03:24:15PM +0100, Artemio González López wrote:
> In fact, my Emacs is the stable 25.3 version downloaded from the
> Emacs fo Mac OS X page (emacsformacosx.com
> <http://emacsformacox.com/>). As I said in my previous message,
> other users of this version are also reporting the same problem I’m
> having.

My memory of this is that the emacsformacosx.com version uses a ruby
script to select the correct executable.


David, I hope it’s OK to Cc you into this. Some background info:

    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29883

Neither Tak nor I can replicate the issue. I’m on Sierra, Tak’s on
High Sierra, but we both built our own Emacs.
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Wed, 03 Jan 2018 23:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <homeros.misasa <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: Artemio González López <artemiogl <at> telefonica.net>,
 Tak Kunihiro <homeros.misasa <at> gmail.com>, david+emacsformacosx <at> porkrind.org,
 29883 <at> debbugs.gnu.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Thu, 04 Jan 2018 08:03:24 +0900
> On Wed, Jan 03, 2018 at 03:24:15PM +0100, Artemio González López wrote:
>> In fact, my Emacs is the stable 25.3 version downloaded from the
>> Emacs fo Mac OS X page (emacsformacosx.com
>> <http://emacsformacox.com/>). As I said in my previous message,
>> other users of this version are also reporting the same problem I’m
>> having.
>
> My memory of this is that the emacsformacosx.com version uses a ruby
> script to select the correct executable.
>
> Neither Tak nor I can replicate the issue. I’m on Sierra, Tak’s on
> High Sierra, but we both built our own Emacs.

I reproduced this with 25.3.1 of emacsformacosx.com version on macOS
10.13.2 (High Sierra).

  GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
   of 2017-09-13
  
  System Software Overview:
    System Version:	macOS 10.13.2 (17C88)

Artemio, why don't you try to build Emacs.app by `brew'?

  https://www.gnu.org/software/emacs/download.html#macos




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29883; Package emacs. (Thu, 04 Jan 2018 00:01:02 GMT) Full text and rfc822 format available.

Message #26 received at 29883 <at> debbugs.gnu.org (full text, mbox):

From: Artemio González López <artemiogl <at> telefonica.net>
To: Tak Kunihiro <homeros.misasa <at> gmail.com>
Cc: 29883 <at> debbugs.gnu.org, Alan Third <alan <at> idiocy.org>,
 david+emacsformacosx <at> porkrind.org
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Thu, 4 Jan 2018 01:00:31 +0100
[Message part 1 (text/plain, inline)]
> On Jan 4, 2018, at 12:03 AM, Tak Kunihiro <homeros.misasa <at> gmail.com> wrote:
> 
>> On Wed, Jan 03, 2018 at 03:24:15PM +0100, Artemio González López wrote:
>>> In fact, my Emacs is the stable 25.3 version downloaded from the
>>> Emacs fo Mac OS X page (emacsformacosx.com
>>> <http://emacsformacox.com/>). As I said in my previous message,
>>> other users of this version are also reporting the same problem I’m
>>> having.
>> 
>> My memory of this is that the emacsformacosx.com version uses a ruby
>> script to select the correct executable.
>> 
>> Neither Tak nor I can replicate the issue. I’m on Sierra, Tak’s on
>> High Sierra, but we both built our own Emacs.
> 
> I reproduced this with 25.3.1 of emacsformacosx.com version on macOS
> 10.13.2 (High Sierra).
> 
>  GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
>   of 2017-09-13
> 
>  System Software Overview:
>    System Version:	macOS 10.13.2 (17C88)
> 
> Artemio, why don't you try to build Emacs.app by `brew'?
> 
>  https://www.gnu.org/software/emacs/download.html#macos <https://www.gnu.org/software/emacs/download.html#macos>

Thanks a lot for the suggestion, Tak! I just installed Emacs 25.3.1 with MacPorts [GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, NS appkit-1561.10 Version 10.13.1 (Build 17B48)) of 2017-11-18], and it works like a charm!

Thanks again,

Artemio


Artemio González López
artemiogl <at> telefonica.net



[Message part 2 (text/html, inline)]

Changed bug title to 'macOS finder opens new Emacs instance every time' from 'Emacs server not detected in Mac OS High Sierra' Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Sun, 26 Jan 2020 11:49:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 10 Aug 2020 15:12:02 GMT) Full text and rfc822 format available.

Notification sent to Artemio González López <artemiogl <at> telefonica.net>:
bug acknowledged by developer. (Mon, 10 Aug 2020 15:12:02 GMT) Full text and rfc822 format available.

Message #33 received at 29883-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Artemio González López <artemiogl <at> telefonica.net>
Cc: Tak Kunihiro <homeros.misasa <at> gmail.com>, 29883-done <at> debbugs.gnu.org,
 david+emacsformacosx <at> porkrind.org, Alan Third <alan <at> idiocy.org>
Subject: Re: bug#29883: Emacs server not detected in Mac OS High Sierra
Date: Mon, 10 Aug 2020 08:11:00 -0700
Artemio González López <artemiogl <at> telefonica.net> writes:

>  Artemio, why don't you try to build Emacs.app by `brew'?
>
>   https://www.gnu.org/software/emacs/download.html#macos
>
> Thanks a lot for the suggestion, Tak! I just installed Emacs 25.3.1 with MacPorts [GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, NS
> appkit-1561.10 Version 10.13.1 (Build 17B48)) of 2017-11-18], and it works like a charm!

From reading this bug report, it seems like this issue was specific to
emacsformacosx.  I'm therefore closing this bug report.

If this conclusion is incorrect, please reply to this email (use "Reply
to all" in your email client) and we can reopen the bug report.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Sep 2020 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.