all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#29267: 26.0.90; find-file confused by process-environment's HOME even with absolute fname
@ 2017-11-11 23:43 João Távora
  2017-11-12  1:29 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: João Távora @ 2017-11-11 23:43 UTC (permalink / raw)
  To: 29267, rgm

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#29267: 26.0.90; find-file confused by process-environment's HOME even with absolute fname
  2017-11-11 23:43 bug#29267: 26.0.90; find-file confused by process-environment's HOME even with absolute fname João Távora
@ 2017-11-12  1:29 ` Glenn Morris
  2017-11-12 12:46   ` João Távora
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2017-11-12  1:29 UTC (permalink / raw)
  To: João Távora; +Cc: 29267


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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#29267: 26.0.90; find-file confused by process-environment's HOME even with absolute fname
  2017-11-12  1:29 ` Glenn Morris
@ 2017-11-12 12:46   ` João Távora
  0 siblings, 0 replies; 3+ messages in thread
From: João Távora @ 2017-11-12 12:46 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 29267

Glenn Morris <rgm@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?





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-12 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-11 23:43 bug#29267: 26.0.90; find-file confused by process-environment's HOME even with absolute fname João Távora
2017-11-12  1:29 ` Glenn Morris
2017-11-12 12:46   ` João Távora

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.