unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 39349@debbugs.gnu.org
Subject: bug#39349: browse-url-of-dired-file should respect directory symlinks
Date: Sun, 19 Jul 2020 21:48:36 +0200	[thread overview]
Message-ID: <87lfjfl20b.fsf@gnus.org> (raw)
In-Reply-To: <87lfpqveo7.5.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Wed, 29 Jan 2020 16:40:24 +0800")

積丹尼 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





  reply	other threads:[~2020-07-19 19:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29  8:40 bug#39349: browse-url-of-dired-file should respect directory symlinks 積丹尼 Dan Jacobson
2020-07-19 19:48 ` Lars Ingebrigtsen [this message]
2020-07-20 14:54   ` 積丹尼 Dan Jacobson
2020-07-23 14:05     ` Lars Ingebrigtsen
2020-07-23 14:19       ` Andreas Schwab
2020-07-23 14:32         ` Lars Ingebrigtsen
2020-07-23 14:33           ` Andreas Schwab
2020-07-23 14:39             ` Lars Ingebrigtsen
2020-07-30 12:39               ` 積丹尼 Dan Jacobson
2020-07-31  2:47                 ` Lars Ingebrigtsen
2020-07-31 11:58                   ` 積丹尼 Dan Jacobson
2020-07-31 12:04                     ` Lars Ingebrigtsen
2020-07-31 16:14                       ` 積丹尼 Dan Jacobson

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=87lfjfl20b.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=39349@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /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).