GNU bug report logs - #69098
[PATCH] Add new command 'browse-url-here'

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Tue, 13 Feb 2024 10:11:02 UTC

Severity: wishlist

Tags: patch

Full log


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

From: Felician Nemeth <felician.nemeth <at> gmail.com>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 69098 <at> debbugs.gnu.org
Subject: Re: bug#69098: [PATCH] Add new command 'browse-url-here'
Date: Tue, 13 Feb 2024 12:57:57 +0100
Philip Kaludercic <philipk <at> posteo.net> writes:

> The idea is to have a command that can be used to open a file or
> directory using something outside Emacs.
>
> I find this useful, but it might be that there are edge-cases that I am
> not considering that don't pop up on my system.

Shouldn't it do something when the buffer is modified?

> +(defun browse-url-here (arg)

Since browse-url-of-buffer does something similar, the name could be
more descriptive.   Maybe browse-url-of-buffer-external?  

> +  "Open current file or directory with external tools.
> +With prefix argument ARG, open the current `default-directory' instead
> +of the buffer of the current file."

"the file of the current buffer."

> +  (interactive "P")
> +  (let ((browse-url-default-handlers '()))

This is strange.  There are other ways to use an external browser-kind.
Maybe you could use browse-url-secondary-browser-function, which is
"usually an external browser".

> +    (browse-url-of-file
> +     (expand-file-name
> +      (or (and arg ".")
> +          (and (derived-mode-p 'dired-mode)
> +               (dired-get-filename))
> +          buffer-file-name ".")))))




This bug report was last modified 126 days ago.

Previous Next


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