GNU bug report logs - #29267
26.0.90; find-file confused by process-environment's HOME even with absolute fname

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Sat, 11 Nov 2017 23:44:02 UTC

Severity: normal

Merged with 19657

Found in versions 25.0.50, 26.0.90

Fixed in version 24.5

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29267 in the body.
You can then email your comments to 29267 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29267; Package emacs. (Sat, 11 Nov 2017 23:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to joaotavora <at> gmail.com (João Távora):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 11 Nov 2017 23:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: bug-gnu-emacs <at> gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: 26.0.90;
 find-file confused by process-environment's HOME even with absolute
 fname
Date: Sat, 11 Nov 2017 23:43:03 +0000
Hello maintainers, Glenn,

[This popped up with Glenn's idea for a fix to bug#29187 (which I
commited in 0da08f2f8ef1946978f0974e9e8cdb87fece018c). It's breaking an
interactive run of the flymake tests (which run fine with make check).]

I find, to my surprise that evaluating this form returns nil

   (let* ((tempdir (make-temp-file "some-temp-dir" t))
          (process-environment (cons (format "HOME=%s" tempdir)
                                     process-environment))
          (absolute (concat "/home/"
           		 user-login-name
           		 "/foo.txt")))
     (string= absolute
              (with-current-buffer
                  (find-file-noselect absolute)
                buffer-file-name)))

Same with find-file. find-file is unexpectedly prepending my absolute
file name with HOME found in the process environment.

It returns t, as expected, when:

* when the process-environment override is removed;

* emacs is started with HOME=/nonexistent, as is the case with
  make check;

* very curiously, if the absolute file name is *not* prefixed by
  whatever HOME was before the override;

Thanks,
João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29267; Package emacs. (Sun, 12 Nov 2017 01:30:01 GMT) Full text and rfc822 format available.

Message #8 received at 29267 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: joaotavora <at> gmail.com (João Távora)
Cc: 29267 <at> debbugs.gnu.org
Subject: Re: 26.0.90;
 find-file confused by process-environment's HOME even with absolute
 fname
Date: Sat, 11 Nov 2017 20:29:05 -0500
Let-bind abbreviated-home-dir. See https://debbugs.gnu.org/19657#20 .




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29267; Package emacs. (Sun, 12 Nov 2017 12:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 29267 <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: Glenn Morris <rgm <at> gnu.org>
Cc: 29267 <at> debbugs.gnu.org
Subject: Re: 26.0.90;
 find-file confused by process-environment's HOME even with absolute
 fname
Date: Sun, 12 Nov 2017 12:46:12 +0000
Glenn Morris <rgm <at> gnu.org> writes:

> Let-bind abbreviated-home-dir. See https://debbugs.gnu.org/19657#20 .

Yuck indeed, but done. What should I do with this bug? Close it? Merge
it with 19657?




Forcibly Merged 19657 29267. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 21 Nov 2017 17:31:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Dec 2017 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.