Opened 6 years ago

Closed 4 years ago

#56801 closed defect (fixed)

Incorrect path when opening emacs through the emacs.app application icon

Reported by: amicitas Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc:
Port: emacs-app

Description (last modified by amicitas)

emacs-app @26.1_3

When opening Emacs through the /Applications/MacPorts/Emacs.app, the PATH environment is incorrect. Rather than using the macports path, the default system path is used.

If I run Emacs from a terminal window by typing the command /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs, the path environment is ok.

Expected:

M-! which ssh -> /opt/local/bin/ssh

Actual:

M-! which ssh -> /usr/bin/ssh

This problem does not exist in emacs-app @25.3_0; after activating that older version the paths is correct. The problem exists in both @26.1_2 and @26.1_3 (other versions not tested).

Change History (5)

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Owner: set to drkp
Status: newassigned

In the future, please use WikiFormatting and add the port maintainer(s) to Cc (port info --maintainers emacs-app), if any.

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 6 years ago by amicitas

Description: modified (diff)

comment:4 Changed 6 years ago by amicitas

Adding the following lines to Emacs.app/Contents/Info.plist resolves this issue:

        <key>LSEnvironment</key>
        <dict>
                <key>PATH</key>
                <string>/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        </dict>

(Tested with emacs-app-devel @20181216)

comment:5 Changed 4 years ago by drkp (Dan Ports)

Resolution: fixed
Status: assignedclosed

In f5a69de6dfd04007491e3b8ef5c0dd817456f42d/macports-ports (master):

emacs-app(-devel): set PATH when starting app to include MacPorts prefix

Stop using a separate revision for emacs and emacs-app to simplify the
portfile.

Closes: #56801

Note: See TracTickets for help on using tickets.