unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 39145@debbugs.gnu.org
Cc: rgm@gnu.org, stefan@marxist.se, uyennhi.qm@gmail.com,
	larsi@gnus.org, jidanni@jidanni.org
Subject: bug#39145: 28.0.50; dired: Show broken/circular links in different font
Date: Tue, 25 Aug 2020 18:34:08 +0200	[thread overview]
Message-ID: <871rjusn0f.fsf@gmail.com> (raw)
In-Reply-To: <87364bq5qe.fsf@gmail.com> (Tino Calancha's message of "Mon, 24 Aug 2020 20:05:45 +0200")

Tino Calancha <tino.calancha@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@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.





  reply	other threads:[~2020-08-25 16:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 21:06 bug#39145: 28.0.50; dired: Show broken/circular links in different font Tino Calancha
2020-01-15 22:28 ` Glenn Morris
2020-08-24 18:05   ` Tino Calancha
2020-08-25 16:34     ` Tino Calancha [this message]
2020-08-25 16:51       ` Eli Zaretskii
2020-08-25 17:05         ` Tino Calancha
2020-08-25 17:18           ` Tino Calancha
2020-08-25 18:22             ` Eli Zaretskii
2020-08-27  8:30               ` Tino Calancha
2020-08-27  9:03                 ` Eli Zaretskii
2020-08-27  9:37     ` Stefan Kangas
2020-08-27  9:58       ` Tino Calancha
2020-01-15 23:13 ` Juri Linkov
2020-08-24 17:52   ` Tino Calancha

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rjusn0f.fsf@gmail.com \
    --to=tino.calancha@gmail.com \
    --cc=39145@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=larsi@gnus.org \
    --cc=rgm@gnu.org \
    --cc=stefan@marxist.se \
    --cc=uyennhi.qm@gmail.com \
    /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 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).