all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gilaras Drakeson <gilaras@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: emacsclient 22 and 23 incompatibility
Date: Sat, 01 Aug 2009 16:33:33 -0400	[thread overview]
Message-ID: <86fxcbtgte.fsf@gmail.com> (raw)
In-Reply-To: 85545288-C7CC-49A9-8782-483C801D635F@gmail.com

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\"\;





      parent reply	other threads:[~2009-08-01 20:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-01  8:25 emacsclient 22 and 23 incompatibility David Reitter
2009-08-01 10:55 ` David Kastrup
2009-08-01 11:04   ` David Reitter
2009-08-01 19:18     ` Christian Lynbech
2009-08-01 19:58       ` CHENG Gao
2009-08-01 22:18         ` Ken Raeburn
2009-08-02  6:52           ` CHENG Gao
2009-08-02 19:24       ` David Reitter
2009-08-02 21:20         ` Leo
2009-08-03  7:29           ` Vagn Johansen
2009-08-03  9:41             ` Leo
2009-08-03 15:14               ` Vagn Johansen
2009-08-07 16:22                 ` Ian Eure
2009-08-03 10:15             ` Christoph Conrad
2009-08-03 10:47               ` Leo
2009-08-03 12:47                 ` Christoph Conrad
2009-08-03 13:10                   ` Leo
2009-08-04  0:23                   ` YAMAMOTO Mitsuharu
2009-08-04 17:00                     ` Stefan Monnier
2009-08-01 20:33     ` Gilaras Drakeson [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

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

  git send-email \
    --in-reply-to=86fxcbtgte.fsf@gmail.com \
    --to=gilaras@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.