From: Ingo Lohmar <i.lohmar@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] ls-lisp.el ls-lisp-insert-directory fix empty dir bug
Date: Sat, 27 Apr 2013 15:56:27 +0200 [thread overview]
Message-ID: <87vc78cc1g.fsf@acer.localhost.com> (raw)
In-Reply-To: <83y5c4ruzm.fsf@gnu.org>
On Sat, Apr 27 2013 14:58 (+0200), Eli Zaretskii wrote:
>> From: Ingo Lohmar <i.lohmar@gmail.com>
>> Date: Sat, 27 Apr 2013 12:31:56 +0000 (UTC)
>>
>> I noticed a bug with ls-lisp's insert-directory when the list of files is
>> empty. Since point is at the beginning of the buffer before inserting the
>> total-line, save-excursion does not work like it does when there are files
>> (ie, buffer content) already: point afterwards is still before the text,
>> and dired-insert-directory does not correctly indent the content then.
>>
>> Below is a one-line patch (so no FSF assignment necessary, which is still
>> on my TODOs...) to correct this whenever the list of files was empty. I
>> do not use the repository but a recent snapshot, apologies for any necessary
>> reformatting. HTH.
>
> Thanks.
>
> Can you show a simple recipe for reproducing the problem?
Hi Eli,
Glad you asked, I now noticed that the problem only occurs when removing
the dot entries via dired-listing-switches (so when the local files
variable is really nil before populating the buffer):
(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)
;; only occurs if we do not have "." and ".."
(setq dired-listing-switches "-l -h")
;; now create some empty dir, and do
(dired "my-empty-dir")
;; notice that last two lines are not indented, get wrong text
;; properties due to that...
Regards,
Ingo
next prev parent reply other threads:[~2013-04-27 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 12:31 [PATCH] ls-lisp.el ls-lisp-insert-directory fix empty dir bug Ingo Lohmar
2013-04-27 12:58 ` Eli Zaretskii
2013-04-27 13:56 ` Ingo Lohmar [this message]
2013-04-27 16:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vc78cc1g.fsf@acer.localhost.com \
--to=i.lohmar@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.