GNU bug report logs -
#60213
[PATCH] Copy Info-goto-node-web URL as kill with prefix argument
Previous Next
To reply to this bug, email your comments to 60213 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Tue, 20 Dec 2022 04:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 20 Dec 2022 04:45:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Severity: wishlist
The attached patch make `Info-goto-node-web' copy the URL as kill with a
prefix argument, instead of opening it with `browse-url'. I've seen
this feature requested a couple of times now by various people.
Since `Info-goto-node-web' is new in Emacs 29, this could perhaps be
considered safe enough for emacs-29, but master is also fine, of course.
[0002-Copy-Info-goto-node-web-URL-as-kill-with-prefix-arg.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Tue, 20 Dec 2022 14:05:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60213 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Mon, 19 Dec 2022 22:44:33 -0600
>
> The attached patch make `Info-goto-node-web' copy the URL as kill with a
> prefix argument, instead of opening it with `browse-url'. I've seen
> this feature requested a couple of times now by various people.
>
> Since `Info-goto-node-web' is new in Emacs 29, this could perhaps be
> considered safe enough for emacs-29, but master is also fine, of course.
I prefer master. We aren't even sure how popular the new command will
be, and this addition modifies its behavior in very non-trivial ways.
I'm not aware of many command in Emacs that, given an argument, just
copy a name to the kill-ring instead of acting on that name.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Tue, 20 Dec 2022 17:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 60213 <at> debbugs.gnu.org (full text, mbox):
> The attached patch make `Info-goto-node-web' copy the URL as kill with a
> prefix argument, instead of opening it with `browse-url'. I've seen
> this feature requested a couple of times now by various people.
Couple of times, various people? Any besides
the one time and one person (Marcin)? Based
on what, a month of experience with the new
command? What's the inconvenience that the
enhancement request would overcome - just
killing/copying the URL in the minibuffer?
What about using the prefix arg to open the
URL in a separate browser window? After all,
that's the behavior of `Info-goto-node-web'
(the original).
[If not then `info+.el' will keep needing to
define the command (now REdefine), even after
Emacs 29. OK, I'm used to it...]
That's the behavior users have enjoyed for
almost a decade. During those years, I never
once received a request to add copying the
URL to the kill-ring. Not that that's a
horrible idea - but how useful is it compared
to the longstanding prefix-arg behavior?
Consider also: how hard is it to get the URL
to the kill-ring? Just copy (or kill & yank)
it in the minibuffer to begin with. If you
forget to do that, then when you use the same
minibuffer history again, `M-p C-k' retrieves
the URL and adds it to the kill ring. Not a
big deal.
And compare, e.g., `find-file'. There we
have a separate command for `other-window'.
(Not a browser window, but ~same idea.) We
don't have anything special for saving the
file location (abs-name) to the kill-ring.
We haven't needed that for 40 years... Has
anyone even requested it?
For `find-file' and such, it's apparently
enough that you can get to the file name
with `M-p' - we've felt no need to add it
to the kill-ring.
Or perhaps combine both optional behaviors,
as I suggested in my msg in thread #60190?
If you insist on doing what you're doing
then I'd suggest you at least add another
command for opening the URL in a separate
browser window. And perhaps yet another
to open it in a separate browser tab.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 01:58:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 60213 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
>> The attached patch make `Info-goto-node-web' copy the URL as kill
>> with a prefix argument, instead of opening it with `browse-url'.
>> I've seen this feature requested a couple of times now by various
>> people.
>
> Couple of times, various people? Any besides the one time and one
> person (Marcin)?
One of them is yours truly, the other is Marcin. I also saw it
requested on Reddit somewhere, I think.
> Based on what, a month of experience with the new command? What's the
> inconvenience that the enhancement request would overcome - just
> killing/copying the URL in the minibuffer?
I myself never need to open the URL. I only ever need to copy it (to
give to others, or use elsewhere). So firing up a web browser mostly
just gets in the way for me.
> What about using the prefix arg to open the URL in a separate browser
> window? After all, that's the behavior of `Info-goto-node-web' (the
> original).
That can be customized in `browse-url', so I'd personally use the prefix
argument for something more useful. But I won't protest if someone
wants to do that.
Anyways, we could consider moving the functionality I want to a positive
prefix argument of `Info-copy-current-node-name'. Or a negative prefix
argument of `Info-goto-node-web'. I don't really care which it is, as
long as its somewhere.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 06:02:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 60213 <at> debbugs.gnu.org (full text, mbox):
> > What's the inconvenience that the enhancement request
> > would overcome - just killing/copying the URL in the minibuffer?
>
> I myself never need to open the URL. I only ever need to copy it (to
> give to others, or use elsewhere). So firing up a web browser mostly
> just gets in the way for me.
I don't understand. We're talking about
`Info-goto-node-web', right? Its purpose
is to visit a manual node in a web browser.
If all you want to do is copy the URL that
the command would use to open that page in
a web browser, then you can do that with a
new command that does just that.
> > What about using the prefix arg to open the URL in a separate browser
> > window? After all, that's the behavior of `Info-goto-node-web' (the
> > original).
>
> That can be customized in `browse-url', so I'd personally use the prefix
> argument for something more useful. But I won't protest if someone
> wants to do that.
If you're not really talking about what
`Info-goto-node-web' does or is for, then
maybe you should ask for what you want as
a separate enhancement request: an Info
command that copies the URL for a given
node to the kill-ring.
That's not what `Info-goto-node-web' is
about. Accessing the manual with a web
browser is what the command is about.
You might find what you want to be "more
useful", but this is a command whose job
it is to get you to the manual in a web
browser.
> Anyways, we could consider moving the functionality I want to a positive
> prefix argument of `Info-copy-current-node-name'. Or a negative prefix
> argument of `Info-goto-node-web'. I don't really care which it is, as
> long as its somewhere.
It sounds like what you want should be a
new command. It's not about copying the
node _name_ to the kill-ring, and it's
not about visiting the node on the web.
Yes, by a loose analogy with
`dired-copy-filename-as-kill' we could
imagine that `Info-copy-current-node-name'
with some prefix arg would copy the node's
URL instead of its name. The URL can be
thought of as another "name" for the node.
[Dunno why only a zero prefix arg for
`Info-copy-current-node-name' has any
significance. Odd.
That command isn't in Emacs 20, and in
Emacs 22 the prefix-arg behavior is
already limited to zero. Maybe it was
introduced in Emacs 21 and other prefix
arg values had some other behavior?]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 08:37:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 60213 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> Yes, by a loose analogy with `dired-copy-filename-as-kill' we could
> imagine that `Info-copy-current-node-name' with some prefix arg would
> copy the node's URL instead of its name.
So let's do that, then.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 09:00:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 60213 <at> debbugs.gnu.org (full text, mbox):
>> What about using the prefix arg to open the URL in a separate browser
>> window? After all, that's the behavior of `Info-goto-node-web' (the
>> original).
>
> That can be customized in `browse-url', so I'd personally use the prefix
> argument for something more useful. But I won't protest if someone
> wants to do that.
It would make sense to use eww by default to browse an external Info
in the same Emacs window. And with a prefix argument open that Info
in an external browser.
> Anyways, we could consider moving the functionality I want to a positive
> prefix argument of `Info-copy-current-node-name'. Or a negative prefix
> argument of `Info-goto-node-web'. I don't really care which it is, as
> long as its somewhere.
Using a different prefix argument for `w' (`Info-copy-current-node-name')
makes sense as well like in `dired-copy-filename-as-kill' where the prefix
argument supports different values. Another variant is to add new key 'W'
for URL copying. OTOH, 'W' has a nice mnemonic to open a web browser.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 16:06:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 60213 <at> debbugs.gnu.org (full text, mbox):
> >> What about using the prefix arg to open the URL in a separate browser
> >> window? After all, that's the behavior of `Info-goto-node-web' (the
> >> original).
> >
> > That can be customized in `browse-url', so I'd personally use the
> > prefix argument for something more useful. But I won't protest
> > if someone wants to do that.
>
> It would make sense to use eww by default to browse an external Info
> in the same Emacs window. And with a prefix argument open that Info
> in an external browser.
Not sure what you're suggesting. But (for me) the
point of a command such as `Info-goto-node-web' is
to visit a URL (for a manual node) in your browser
of choice - not to substitute whatever browser we
might think you should use - whether within Emacs
or not.
I'm not saying that's what you're suggesting. I
don't know just what you're suggesting. But we
should (1) let users tell Emacs which browser they
want to use by default, for such things and (2)
use that browser by default, for such things.
One reason to open a manual in a web browser might
just be to get HTML rendering. Another, perhaps
more important reason (IMO), might be in order to
use a non-Emacs web browser.
> Using a different prefix argument for `w' (`Info-copy-current-node-name')
> makes sense as well like in `dired-copy-filename-as-kill' where the
> prefix argument supports different values. Another variant is to add new key
> 'W' for URL copying. OTOH, 'W' has a nice mnemonic to open a web browser.
I chose `G' for `Info-goto-node-web' to correspond
to `g' for `Info-goto-node' - i.e., for "go to".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60213
; Package
emacs
.
(Wed, 21 Dec 2022 16:08:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 60213 <at> debbugs.gnu.org (full text, mbox):
> > Yes, by a loose analogy with `dired-copy-filename-as-kill' we could
> > imagine that `Info-copy-current-node-name' with some prefix arg would
> > copy the node's URL instead of its name.
>
> So let's do that, then.
OK by me. See what Eli says.
This bug report was last modified 2 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.