GNU bug report logs - #39145
28.0.50; dired: Show broken/circular links in different font

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Wed, 15 Jan 2020 21:07:01 UTC

Severity: wishlist

Found in version 28.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 39145 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 39145 <at> debbugs.gnu.org
Cc: rgm <at> gnu.org, stefan <at> marxist.se, uyennhi.qm <at> gmail.com, larsi <at> gnus.org,
 jidanni <at> jidanni.org, eliz <at> gnu.org
Subject: Re: bug#39145: 28.0.50; dired: Show broken/circular links in
 different font
Date: Tue, 25 Aug 2020 18:34:08 +0200
Tino Calancha <tino.calancha <at> gmail.com> writes:

> Today I have updated the patch to match what bash does
> now I only use dired-broken-symlink at 'foo' and 'bar' keeping '->' with
> dired-symlink.
>
> commit d250625b8f79a3b9273de6640f4840b5c8e54fe8
> Author: Tino Calancha <ccalancha <at> suse.com>
> Date:   Mon Aug 24 19:44:29 2020 +0200
>
>     dired: Show broken/circular links w/ different face
>     
>     * lisp/dired.el (dired-broken-symlink): New face.
>     (dired-font-lock-keywords) Use the new face for broken/circular links.
>     
>     * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
>     Announce this change.
>     
>     * test/lisp/dired-tests.el (dired-test-dired-broken-symlink-face):
>     Add a test.

Would be more emacsy to add an user option to enable/disable the feature?
Something like:

(defcustom dired-alert-on-broken-links t
  "If non-nil, display broken and circular links with `dired-broken-symlink'."
  :type 'boolean
  :group 'dired
  :version "28.1")

There is still something else that worries me.

If I have a broken link, and I create the missing target with
`dired-create-directory' or `dired-create-empty-file', then
I need to manually call `revert-buffer' to get the link face updated.

Same if teh target do exist and I decide to delete it with
`dired-do-delete'.
Note, this is not the case if you modify the target with wdired, because
wdired revert the buffer after applying the changes. 

A solution would be to call `dired-revert' at functions like
`dired-internal-do-deletions', `dired-create-empty-file' or
`dired-create-directory'.
That call could be optional in case we add a user option to control this feature.




This bug report was last modified 4 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.