[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39349: browse-url-of-dired-file should respect directory symlinks
From: |
Lars Ingebrigtsen |
Subject: |
bug#39349: browse-url-of-dired-file should respect directory symlinks |
Date: |
Sun, 19 Jul 2020 21:48:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
積丹尼 Dan Jacobson <jidanni@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
- bug#39349: browse-url-of-dired-file should respect directory symlinks,
Lars Ingebrigtsen <=
- bug#39349: browse-url-of-dired-file should respect directory symlinks, 積丹尼 Dan Jacobson, 2020/07/20
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Lars Ingebrigtsen, 2020/07/23
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Andreas Schwab, 2020/07/23
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Lars Ingebrigtsen, 2020/07/23
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Andreas Schwab, 2020/07/23
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Lars Ingebrigtsen, 2020/07/23
- bug#39349: browse-url-of-dired-file should respect directory symlinks, 積丹尼 Dan Jacobson, 2020/07/30
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Lars Ingebrigtsen, 2020/07/30
- bug#39349: browse-url-of-dired-file should respect directory symlinks, 積丹尼 Dan Jacobson, 2020/07/31
- bug#39349: browse-url-of-dired-file should respect directory symlinks, Lars Ingebrigtsen, 2020/07/31