From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gilaras Drakeson Newsgroups: gmane.emacs.devel Subject: Re: emacsclient 22 and 23 incompatibility Date: Sat, 01 Aug 2009 16:33:33 -0400 Message-ID: <86fxcbtgte.fsf@gmail.com> References: <40968C64-648B-4601-89EB-6197D65E5020@gmail.com> <87d47fby7n.fsf@lola.goethe.zz> <85545288-C7CC-49A9-8782-483C801D635F@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249158855 18432 80.91.229.12 (1 Aug 2009 20:34:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Aug 2009 20:34:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 01 22:34:08 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MXLHK-0006SE-1g for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2009 22:34:06 +0200 Original-Received: from localhost ([127.0.0.1]:39848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXLHJ-0007jD-1L for ged-emacs-devel@m.gmane.org; Sat, 01 Aug 2009 16:34:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXLHD-0007fY-64 for emacs-devel@gnu.org; Sat, 01 Aug 2009 16:33:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXLH8-0007bL-Km for emacs-devel@gnu.org; Sat, 01 Aug 2009 16:33:58 -0400 Original-Received: from [199.232.76.173] (port=48574 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXLH8-0007bE-HR for emacs-devel@gnu.org; Sat, 01 Aug 2009 16:33:54 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:51346 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MXLH8-0002Ik-0S for emacs-devel@gnu.org; Sat, 01 Aug 2009 16:33:54 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MXLH4-0000Ts-O0 for emacs-devel@gnu.org; Sat, 01 Aug 2009 20:33:50 +0000 Original-Received: from 76-10-132-254.dsl.teksavvy.com ([76.10.132.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2009 20:33:50 +0000 Original-Received: from gilaras by 76-10-132-254.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2009 20:33:50 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 91 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 76-10-132-254.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:YNWkTtxiQGhvDKcmME7kt+IDIEA= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113531 Archived-At: 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\"\;