bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43961: read carefully: dired-file-name-at-point vs dired-filename-at


From: Boruch Baum
Subject: bug#43961: read carefully: dired-file-name-at-point vs dired-filename-at-point
Date: Mon, 12 Oct 2020 10:26:38 -0400
User-agent: NeoMutt/20180716

The attached patch takes a step to remove confusion surrounding two
unfortunately named functions, fixes bugs in one of them, and makes them
more user-friendly. If this is all acceptable, let me know and I'll add
a NEWS entry.

+ dired-filename-at-point is moved from dired-x.el to a position
  alongside its sister function dired-file-name-at-point.

+ The code for dired-filename-at-point is simplified to an almost
  carbon copy of its sister function.

  + This also fixes bugs for cases of filenames with embedded spaces

  + This also suppresses errors, due to use of dired-get-filename with
    its arg NOERROR.

+ Both get a small style tweak to remove duplicated function calls to
  abbrev- or expand- file-name.

+ Both get aliases to make them distinguishable.

A follow-up to the attached patch, if accepted, would be to refactor all
the occurrences within dired.el / dired-x.el.

It would probably be a good idea to also add a deprecation notice to the
docstrings for the original names.

I came across this while developing the diredc package I've been
mentioning a lot lately, and presenting this as a separate patch removes
it from being snagged as part of discussion about that other proposal.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0

Attachment: dired-name-confusion.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]