unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
@ 2014-02-24  3:30 R. Michael Weylandt
  2014-02-24  9:30 ` Andreas Schwab
  2022-02-05 22:57 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 11+ messages in thread
From: R. Michael Weylandt @ 2014-02-24  3:30 UTC (permalink / raw)
  To: 16861

Confirmed with Emacs 24.3 & 22.1:

Enter eshell, change to / and then cd to ".." and eshell/pwd reports
"/.." instead of the canonical "/":

~ $ cd /
/ $ cd ..
/.. $ cd ..
/ $

It's pretty much a non-issue, but it may be an easy fix for someone.

I can submit a patch, but not sure if that's helpful without signing
FSF papers.

Michael





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24  3:30 bug#16861: 24.3; Eshell /.. eshell/pwd Bug R. Michael Weylandt
@ 2014-02-24  9:30 ` Andreas Schwab
  2014-02-24 10:13   ` Thierry Volpiatto
  2014-02-24 15:39   ` R. Michael Weylandt <michael.weylandt@gmail.com>
  2022-02-05 22:57 ` Lars Ingebrigtsen
  1 sibling, 2 replies; 11+ messages in thread
From: Andreas Schwab @ 2014-02-24  9:30 UTC (permalink / raw)
  To: R. Michael Weylandt; +Cc: 16861

"R. Michael Weylandt" <michael.weylandt@gmail.com> writes:

> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
> "/.." instead of the canonical "/":

(expand-file-name ".." "/") -> "/.."

See its doc string.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24  9:30 ` Andreas Schwab
@ 2014-02-24 10:13   ` Thierry Volpiatto
  2014-02-24 10:23     ` Andreas Schwab
  2014-02-24 15:39   ` R. Michael Weylandt <michael.weylandt@gmail.com>
  1 sibling, 1 reply; 11+ messages in thread
From: Thierry Volpiatto @ 2014-02-24 10:13 UTC (permalink / raw)
  To: 16861

Andreas Schwab <schwab@suse.de> writes:

> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
>
>> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
>> "/.." instead of the canonical "/":
>
> (expand-file-name ".." "/") -> "/.."
>
> See its doc string.

We are speaking here of `eshell/pwd' which should return "/" like
`*pwd', `expand-filename' is unrelated to this.
The prompt of eshell is also showing "/.." which is not correct.

Try (setq eshell-pwd-convert-function 'file-truename)

Which fix the problem.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24 10:13   ` Thierry Volpiatto
@ 2014-02-24 10:23     ` Andreas Schwab
  2014-02-24 10:29       ` Thierry Volpiatto
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2014-02-24 10:23 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 16861

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Andreas Schwab <schwab@suse.de> writes:
>
>> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
>>
>>> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
>>> "/.." instead of the canonical "/":
>>
>> (expand-file-name ".." "/") -> "/.."
>>
>> See its doc string.
>
> We are speaking here of `eshell/pwd' which should return "/" like
> `*pwd', `expand-filename' is unrelated to this.

See eshell/cd, which uses cd which uses expand-filename.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24 10:23     ` Andreas Schwab
@ 2014-02-24 10:29       ` Thierry Volpiatto
  2014-02-24 10:34         ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Volpiatto @ 2014-02-24 10:29 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Thierry Volpiatto, 16861


Andreas Schwab <schwab@suse.de> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Andreas Schwab <schwab@suse.de> writes:
>>
>>> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
>>>
>>>> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
>>>> "/.." instead of the canonical "/":
>>>
>>> (expand-file-name ".." "/") -> "/.."
>>>
>>> See its doc string.
>>
>> We are speaking here of `eshell/pwd' which should return "/" like
>> `*pwd', `expand-filename' is unrelated to this.
>
> See eshell/cd, which uses cd which uses expand-filename.

Probably, but the problem is related to pwd.
See docstring of `eshell-pwd-convert-function'.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24 10:29       ` Thierry Volpiatto
@ 2014-02-24 10:34         ` Andreas Schwab
  2014-02-24 11:13           ` Thierry Volpiatto
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2014-02-24 10:34 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 16861

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Probably, but the problem is related to pwd.

No, the problem already started with cd.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24 10:34         ` Andreas Schwab
@ 2014-02-24 11:13           ` Thierry Volpiatto
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2014-02-24 11:13 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Thierry Volpiatto, 16861


Andreas Schwab <schwab@suse.de> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Probably, but the problem is related to pwd.
>
> No, the problem already started with cd.

`eshell/cd' more exactly that use `eshell/pwd' internally.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24  9:30 ` Andreas Schwab
  2014-02-24 10:13   ` Thierry Volpiatto
@ 2014-02-24 15:39   ` R. Michael Weylandt <michael.weylandt@gmail.com>
  2014-03-03  6:57     ` Thierry Volpiatto
  1 sibling, 1 reply; 11+ messages in thread
From: R. Michael Weylandt <michael.weylandt@gmail.com> @ 2014-02-24 15:39 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 16861@debbugs.gnu.org

On Feb 24, 2014, at 4:30, Andreas Schwab <schwab@suse.de> wrote:

> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
> 
>> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
>> "/.." instead of the canonical "/":
> 
> (expand-file-name ".." "/") -> "/.."
> 
> See its doc string.

Ok -- I hadn't run across file systems with a 'superroot' before (cf. Emacs Manual 25.8.4). I'll special case it in my Eshell prompt function then. 

Thanks for the quick reply,

Michael





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24 15:39   ` R. Michael Weylandt <michael.weylandt@gmail.com>
@ 2014-03-03  6:57     ` Thierry Volpiatto
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2014-03-03  6:57 UTC (permalink / raw)
  To: 16861

"R. Michael Weylandt <michael.weylandt@gmail.com>"
<michael.weylandt@gmail.com> writes:

> On Feb 24, 2014, at 4:30, Andreas Schwab <schwab@suse.de> wrote:
>
>> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
>> 
>>> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
>>> "/.." instead of the canonical "/":
>> 
>> (expand-file-name ".." "/") -> "/.."
>> 
>> See its doc string.
>
> Ok -- I hadn't run across file systems with a 'superroot' before (cf. Emacs Manual 25.8.4). I'll special case it in my Eshell prompt function then. 

If one is interested to fix this bug, a fix for this could be something
like:

--8<---------------cut here---------------start------------->8---
(setq eshell-pwd-convert-function (lambda (f)
                                    (if (file-equal-p (file-truename f) "/")
                                        "/" f)))
--8<---------------cut here---------------end--------------->8---

instead of 'identity as default value.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 






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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2014-02-24  3:30 bug#16861: 24.3; Eshell /.. eshell/pwd Bug R. Michael Weylandt
  2014-02-24  9:30 ` Andreas Schwab
@ 2022-02-05 22:57 ` Lars Ingebrigtsen
  2022-02-06 16:30   ` Michael Weylandt
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05 22:57 UTC (permalink / raw)
  To: R. Michael Weylandt; +Cc: 16861

"R. Michael Weylandt" <michael.weylandt@gmail.com> writes:

> Enter eshell, change to / and then cd to ".." and eshell/pwd reports
> "/.." instead of the canonical "/":
>
> ~ $ cd /
> / $ cd ..
> /.. $ cd ..
> / $
>
> It's pretty much a non-issue, but it may be an easy fix for someone.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#16861: 24.3; Eshell /.. eshell/pwd Bug
  2022-02-05 22:57 ` Lars Ingebrigtsen
@ 2022-02-06 16:30   ` Michael Weylandt
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Weylandt @ 2022-02-06 16:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16861

Thanks!

Michael

On Sat, Feb 5, 2022 at 4:58 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> "R. Michael Weylandt" <michael.weylandt@gmail.com> writes:
>
> > Enter eshell, change to / and then cd to ".." and eshell/pwd reports
> > "/.." instead of the canonical "/":
> >
> > ~ $ cd /
> > / $ cd ..
> > /.. $ cd ..
> > / $
> >
> > It's pretty much a non-issue, but it may be an easy fix for someone.
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> I've now fixed this in Emacs 29.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-02-06 16:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24  3:30 bug#16861: 24.3; Eshell /.. eshell/pwd Bug R. Michael Weylandt
2014-02-24  9:30 ` Andreas Schwab
2014-02-24 10:13   ` Thierry Volpiatto
2014-02-24 10:23     ` Andreas Schwab
2014-02-24 10:29       ` Thierry Volpiatto
2014-02-24 10:34         ` Andreas Schwab
2014-02-24 11:13           ` Thierry Volpiatto
2014-02-24 15:39   ` R. Michael Weylandt <michael.weylandt@gmail.com>
2014-03-03  6:57     ` Thierry Volpiatto
2022-02-05 22:57 ` Lars Ingebrigtsen
2022-02-06 16:30   ` Michael Weylandt

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).