From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12123: Date: Sun, 07 Apr 2013 22:06:32 +0300 Message-ID: <8338v2cg93.fsf@gnu.org> References: <1B611D1D-B0AB-4E06-A8C4-EF89E5093154@mit.edu> <83txnkeumm.fsf@gnu.org> <515FC500.1080609@cs.ucla.edu> <83fvz4dq5l.fsf@gnu.org> <516086FD.4000003@cs.ucla.edu> <83r4incb9b.fsf@gnu.org> <2xfvz2i430.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1365361719 17039 80.91.229.3 (7 Apr 2013 19:08:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Apr 2013 19:08:39 +0000 (UTC) Cc: 12123@debbugs.gnu.org, yandros@MIT.EDU, eggert@cs.ucla.edu To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 07 21:08:41 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UOuxE-0004Dc-UT for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Apr 2013 21:08:41 +0200 Original-Received: from localhost ([::1]:45584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOuxE-0005N8-3e for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Apr 2013 15:08:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOuxA-0005N1-AP for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2013 15:08:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOux8-0008Mp-Qe for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2013 15:08:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOux8-0008Mi-Ne for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2013 15:08:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UOv0U-0004lS-Go for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2013 15:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Apr 2013 19:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12123 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12123-submit@debbugs.gnu.org id=B12123.136536188518268 (code B ref 12123); Sun, 07 Apr 2013 19:12:02 +0000 Original-Received: (at 12123) by debbugs.gnu.org; 7 Apr 2013 19:11:25 +0000 Original-Received: from localhost ([127.0.0.1]:38784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOuzt-0004ka-Cn for submit@debbugs.gnu.org; Sun, 07 Apr 2013 15:11:25 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:39917) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOuzr-0004kT-HW for 12123@debbugs.gnu.org; Sun, 07 Apr 2013 15:11:24 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MKW00C00FGT1B00@a-mtaout20.012.net.il> for 12123@debbugs.gnu.org; Sun, 07 Apr 2013 22:06:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKW00BBLFQOSU70@a-mtaout20.012.net.il>; Sun, 07 Apr 2013 22:06:25 +0300 (IDT) In-reply-to: <2xfvz2i430.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73243 Archived-At: > From: Glenn Morris > Cc: Paul Eggert , 12123@debbugs.gnu.org, yandros@MIT.EDU > Date: Sun, 07 Apr 2013 14:32:51 -0400 > > I must be missing something, because AFAICS, invocation-directory has > already solved this problem. What cases are not already handled that are > relevant and need extra code adding from progreloc.c? Code in emacs.c that sets invocation-directory relies on argv[0] to either be an absolute file name, or relative to cwd, or a base name without leading directories that can be found on PATH. But on Posix platforms, argv[0] can be anything, while on Windows argv[0] might be neither absolute nor on PATH. progreloc.c solves this in platform-specific ways. E.g., on GNU/Linux, it looks at /proc/PID/exe.