* bug#5548: eshell has an odd idea of file permissions
@ 2010-02-08 23:54 Glenn Morris
2010-02-09 1:58 ` Chong Yidong
0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2010-02-08 23:54 UTC (permalink / raw
To: 5548
Current trunk on GNU/Linux:
mkdir foo
cd foo
touch 1 2 3 4
chmod 644 1 # writable by owner
chmod 446 2 # writable by other
chmod 744 3 # executable by owner
chmod 447 4 # executable by other
emacs -Q -f eshell
eshell> ls
"1" appears in eshell-ls-readonly face, "2" in default face.
"3" appears in readonly face, "4" in eshell-ls-executable face.
This seems to be due to eshell-ls-applicable, which looks odd to me.
Firstly, it does different things according to whether or not a file's
owner attribute is reported in numeric or string form.
Secondly, if the attribute is a string and the file is not remote (?),
it adds 6 to the index position to be checked, meaning it checks the
"other" file permission index.
For example, to test if a file is readable, it ends up testing
the 1+6=7 th (from 0) character in "-rw-r--r--".
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5548: eshell has an odd idea of file permissions
2010-02-08 23:54 bug#5548: eshell has an odd idea of file permissions Glenn Morris
@ 2010-02-09 1:58 ` Chong Yidong
2010-02-09 5:17 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Chong Yidong @ 2010-02-09 1:58 UTC (permalink / raw
To: Glenn Morris; +Cc: 5548
Glenn Morris <rgm@gnu.org> writes:
> Current trunk on GNU/Linux:
>
> mkdir foo
> cd foo
> touch 1 2 3 4
> chmod 644 1 # writable by owner
> chmod 446 2 # writable by other
> chmod 744 3 # executable by owner
> chmod 447 4 # executable by other
>
> emacs -Q -f eshell
> eshell> ls
>
> "1" appears in eshell-ls-readonly face, "2" in default face.
> "3" appears in readonly face, "4" in eshell-ls-executable face.
>
> This seems to be due to eshell-ls-applicable, which looks odd to me.
I've re-written eshell-ls-applicable; it should work properly now.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5548: eshell has an odd idea of file permissions
2010-02-09 1:58 ` Chong Yidong
@ 2010-02-09 5:17 ` Glenn Morris
0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2010-02-09 5:17 UTC (permalink / raw
To: Chong Yidong; +Cc: 5548
Great; thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-09 5:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 23:54 bug#5548: eshell has an odd idea of file permissions Glenn Morris
2010-02-09 1:58 ` Chong Yidong
2010-02-09 5:17 ` Glenn Morris
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.