[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39853: 26.3; Sort on file-newer-than-file-p does not work outside ho
From: |
Stefan Kangas |
Subject: |
bug#39853: 26.3; Sort on file-newer-than-file-p does not work outside home folder |
Date: |
Mon, 24 Aug 2020 04:36:59 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Mär 01 2020, dalanicolai wrote:
>
>> Although I tried to send this mail from plain emacs and from spacemacs. I
>> was not sure if it worked and did not find a way to check if it worked (At
>> least I did not receive any confirmation e-mail). Although I created this
>> bug report in spacemacs. I tested the behavior using emacs -Q
>>
>> 1. evaluate (sort (directory-files "~") 'file-newer-than-file-p)
>> 2. evaluate previous sexp with a different path ~ inserted: e.g.
>> .emacs.d folder as shown in the attachment
>>
>> The sexp with the home folder returns a date modified list while the
>> sexp with a different folder does not. The attachment shows both folder
>> contents of ordered on date modified in nautilus and the returned lists
>> from evaluating the sexps. The order of the home folder list is
>> consistent with that nautilus while that of the .emacs.d folder is not.
>
> That's because most of the files from ~/.emacs.d don't exist in
> default-directory, and nonexisting files are sorted last by
> file-newer-than-file-p. Either use (directory-files "~/.emacs.d" t), or
> (let ((default-directory "~/.eamcs.d")) ...).
This is behaving as documented, and is not a bug. Andreas Schwab
explains above how to use this function correctly. I'm therefore
closing this bug report.
Best regards,
Stefan Kangas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#39853: 26.3; Sort on file-newer-than-file-p does not work outside home folder,
Stefan Kangas <=