GNU bug report logs - #39349
browse-url-of-dired-file should respect directory symlinks

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 29 Jan 2020 21:41:01 UTC

Severity: wishlist

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 39349 <at> debbugs.gnu.org
Subject: Re: bug#39349: browse-url-of-dired-file should respect directory
 symlinks
Date: Sun, 19 Jul 2020 21:48:36 +0200
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> browse-url-of-dired-file should respect directory symlinks.
> E.g.,
> $ emacs -q
> C-x d /cf/updates/
> SPC SPC SPC
> M-x browse-url-of-dired-file
> should call the browser on
> file:///cf/updates/52.html
> not the absolute path
> file:///mnt/usb/cf/updates/52.html

So /cf is a symlink in your setup?

The reason for this behaviour is a patch from 2011 which attempted to
make this command work on the "." and ".." directories:

  (let ((tem (dired-get-filename t t)))
    (if tem
	(browse-url-of-file (expand-file-name tem))

So we want to call with (browse-url-of-file "/") instead of
(browse-url-of-file "/tmp/.."), for instance, and use expand-file-name
to achieve that.  However, that function also resolves any symlinks...

This function just needs to do the ../. thing.  Does Emacs have a
function that just does the right thing the ".." and "/" and does
absolutely nothing else?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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