emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient 22 and 23 incompatibility


From: Gilaras Drakeson
Subject: Re: emacsclient 22 and 23 incompatibility
Date: Sat, 01 Aug 2009 16:33:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi,

>>> It's a pity that this doesn't work out-of-the-box, given that not all
>>> platforms use an install procedure that will update a centrally
>>> installed emacsclient program along with the new Emacs main
>>> application.
>>
>> All platforms supported by Emacs do AFAICT.  If there are install
>> procedures outside of the control of the Emacs maintainers which don't
>> do the right thing, I don't see why it would be a good idea to bend
>> over
>> backwards to support them.
>
> Oh, I must have been missing out on something.  Could you please
> explain how the Nextstep port does that?
>
> According to what I know:
> "make install" installs a .app in the nextstep folder, which is then
> supposed to be moved by the user wherever they want on their file
> system.  The emacsclient binary is inside the .app and not copied to
> anywhere in PATH.   That is why the existing 22 emacsclient binary
> (which is in PATH) stays in place and gets called by other
> applications such as "Skim" in order to communicate with Emacs, which
> fails.

Regarding Mac OS 10.5.*,
It's a pity that /usr/libexec/path_helper does not do exactly what it
says in the commentary at the top of it. If you fix it [1], you can
actually decide what goes in PATH (and MANPATH), and in which order.

--
Gilaras

[1] patch for /usr/libexec/path_helper at the bottom of this message,
patch /etc/paths.d according to something like this:
  $ ls -l /etc/paths.d
  total 48
  -rw-r--r--   1 root  wheel    31 Apr 15 20:28 30-port
  -rw-r--r--   1 root  wheel    82 Apr 15 21:04 31-emacs
  lrwxr-xr-x   1 root  wheel    10 Apr 15 21:19 50-default -> /etc/paths
  -rwxr-xr-x   1 root  wheel    12 Nov  5  2008 70-TeX
  -rw-r--r--   1 root  wheel    13 Dec  5  2007 71-X11
  -rw-r--r--   1 root  wheel    50 Apr 15 21:05 72-inkscape
also patch /etc/manpaths.d to look like:
  $ ls -l /etc/manpaths.d
  total 32
  -rw-r--r--  1 root  wheel  15 Apr 15 20:27 30-port
  lrwxr-xr-x  1 root  wheel  13 Apr 15 21:20 50-default -> /etc/manpaths
  -rwxr-xr-x  1 root  wheel  52 Nov  5  2008 70-TeX
  -rw-r--r--  1 root  wheel  13 Dec  5  2007 71-X11

patch for /usr/libexec/path_helper:
diff:
--- path_helper.old     2009-08-01 16:09:25.000000000 -0400
+++ path_helper.new     2009-08-01 16:10:00.000000000 -0400
@@ -1,8 +1,10 @@
 #!/bin/sh
 #
-# Each line of the text files in /etc/paths are directories that should be
-# added to the current path.  We source /etc/paths/default first, so that
-# the default paths (/usr/bin:/bin:/usr/sbin:/sbin) appear early in the path.
+# Each line of the text files in /etc/paths.d are directories that
+# should be added to the current path. The text files are read in
+# lexical order, and the default file is /etc/paths.d/50-default.  
+# We source /etc/paths.d/50-default first, so that the default paths
+# (/usr/bin:/bin:/usr/sbin:/sbin) appear early in the path.
 #
 
 shopt -s extglob
@@ -11,8 +13,8 @@
 NEWPATH="$2"
 SEP=""
 IFS=$'\n'
-if [ -d "$DIR".d ]; then
-       for f in "$DIR" "$DIR".d/* ; do
+if [ -d "$DIR" ]; then
+       for f in "$DIR"/* ; do
          if [ -f "$f" ]; then
                for p in $(< "$f") ; do
                        [[ "$NEWPATH" = *(*:)${p}*(:*) ]] && continue
@@ -25,8 +27,8 @@
 echo $NEWPATH
 }
 
-P=`read_path_dir /etc/paths "$PATH"`
-MP=`read_path_dir /etc/manpaths "$MANPATH"`
+P=`read_path_dir /etc/paths.d`
+MP=`read_path_dir /etc/manpaths.d`
 
 if [ "$1" == "-c" -o \( -z "$1" -a "${SHELL%csh}" != "$SHELL" \) ]; then
        echo setenv PATH \"$P\"\;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]