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

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Mon, 12 Oct 2020 14:28:02 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Boruch Baum <boruch_baum <at> gmx.com>
To: 43961 <at> debbugs.gnu.org
Subject: bug#43961: read carefully: dired-file-name-at-point vs dired-filename-at-point
Date: Mon, 12 Oct 2020 10:26:38 -0400
[Message part 1 (text/plain, inline)]
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
[dired-name-confusion.patch (text/x-diff, attachment)]

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

Previous Next


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