GNU bug report logs - #51176
eww switch buffer by title

Previous Next

Package: emacs;

Reported by: Yuchen Pei <hi <at> ypei.me>

Date: Wed, 13 Oct 2021 04:57:02 UTC

Severity: normal

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51176 in the body.
You can then email your comments to 51176 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 04:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yuchen Pei <hi <at> ypei.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 13 Oct 2021 04:57:02 GMT) Full text and rfc822 format available.

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

From: Yuchen Pei <hi <at> ypei.me>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: eww switch buffer by title
Date: Wed, 13 Oct 2021 15:56:07 +1100
[Message part 1 (text/plain, inline)]
Hello,

How about switching to an eww buffer by title?

I have a hacky way to do it (see below).  I'll be happy to prepare 
a patch if people think this is a sensible feature to add.

(defun eww-switch-by-title (title-and-buffer)
 "Switches to an eww buffer with selected title."
 (interactive
  (list
   (let ((com-table))
     (dolist (buffer (buffer-list))
	(with-current-buffer buffer
	  (when (equal major-mode 'eww-mode)
	    (add-to-list
	     'com-table
	     (concat (plist-get eww-data :title)
		     (propertize (concat " " (buffer-name))
				 'invisible t))))))
     (completing-read "Eww buffer title: " com-table))))
 (string-match "^.* \\(.*\\)$" title-and-buffer)
 (switch-to-buffer (match-string 1 title-and-buffer)))


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 11:53:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 13:52:42 +0200
Yuchen Pei <hi <at> ypei.me> writes:

> How about switching to an eww buffer by title?

So the use case is that you have a large number of eww buffers, but you
want to find a particular based on the title of the web page being
displayed in that buffer?

I'm not sure that's generally useful enough to include -- do people use
`C-u M-x eww' a lot?

Some code comments:

> (defun eww-switch-by-title (title-and-buffer)
>  "Switches to an eww buffer with selected title."
>  (interactive
>   (list
>    (let ((com-table))
>      (dolist (buffer (buffer-list))
> 	(with-current-buffer buffer
> 	  (when (equal major-mode 'eww-mode)
> 	    (add-to-list
> 	     'com-table

Use `push'.

> 	     (concat (plist-get eww-data :title)
> 		     (propertize (concat " " (buffer-name))
> 				 'invisible t))))))
>      (completing-read "Eww buffer title: " com-table))))

Use an alist instead of propertising a string.

There may also be several buffers with the same title, I guess, in which
case this wouldn't allow you to choose either?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 12:17:01 GMT) Full text and rfc822 format available.

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

From: Yuchen Pei <hi <at> ypei.me>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 23:15:55 +1100
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Yuchen Pei <hi <at> ypei.me> writes:
>
>> How about switching to an eww buffer by title?
>
> So the use case is that you have a large number of eww buffers, 
> but you
> want to find a particular based on the title of the web page 
> being
> displayed in that buffer?

Yes.  For me I'm just trying to use eww as my main browser.  For 
that to happen, I'd need to duplicate the tabs functionality in 
firefox, and tabs are identified by titles.

>
> I'm not sure that's generally useful enough to include -- do 
> people use
> `C-u M-x eww' a lot?

I don't know.  I assume people who use a graphical browser 
generally have more tabs open than I do (I have an addon in my 
firefox limiting the number of tabs to 15 by killing LRU tabs), 
but I don't know how many eww users use eww as their main browser 
and how many have migrated from graphical browsers to eww.

BTW I have a few functions with keybindings spawning new eww 
buffers in my init file.

>
> There may also be several buffers with the same title, I guess, 
> in which
> case this wouldn't allow you to choose either?

I think with icomplete it will show all of them in the minibuffer 
and you can choose (you can't tell which one is which though, same 
as graphical browser tabs).  But I haven't tested it without 
icomplete - will do.

-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 12:55:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 14:54:44 +0200
Yuchen Pei <hi <at> ypei.me> writes:

>> I'm not sure that's generally useful enough to include -- do people
>> use
>> `C-u M-x eww' a lot?
>
> I don't know.  I assume people who use a graphical browser generally
> have more tabs open than I do (I have an addon in my firefox limiting
> the number of tabs to 15 by killing LRU tabs), but I don't know how
> many eww users use eww as their main browser and how many have
> migrated from graphical browsers to eww.

I think in that case, perhaps it would make more sense to just rename
the eww buffer to have the title in the buffer name?  Then the normal
buffer switching commands would work automatically.

So the change would be to offer an option that renames the buffer at the
end of...  `eww-display-html', perhaps?  

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 16:36:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 19:28:38 +0300
>> I don't know.  I assume people who use a graphical browser generally
>> have more tabs open than I do (I have an addon in my firefox limiting
>> the number of tabs to 15 by killing LRU tabs), but I don't know how
>> many eww users use eww as their main browser and how many have
>> migrated from graphical browsers to eww.
>
> I think in that case, perhaps it would make more sense to just rename
> the eww buffer to have the title in the buffer name?  Then the normal
> buffer switching commands would work automatically.

In Info, forking commands (such as 'Info-follow-nearest-node FORK')
create a new buffer with the Info node name in its buffer name, e.g.
*info-TITLE*.  So instead of current *eww*<2>, eww could use the same
format *eww-TITLE*, or uniquify-like angle brackets *eww<TITLE>*.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 16:48:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 18:47:40 +0200
Juri Linkov <juri <at> linkov.net> writes:

>> I think in that case, perhaps it would make more sense to just rename
>> the eww buffer to have the title in the buffer name?  Then the normal
>> buffer switching commands would work automatically.
>
> In Info, forking commands (such as 'Info-follow-nearest-node FORK')
> create a new buffer with the Info node name in its buffer name, e.g.
> *info-TITLE*.  So instead of current *eww*<2>, eww could use the same
> format *eww-TITLE*, or uniquify-like angle brackets *eww<TITLE>*.

Yup, that's what I meant.  The wrinkle here is that we don't know the
title until we've fetched the HTML, so the buffer has to be renamed
after rendering.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 17:34:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 20:31:17 +0300
>>> I think in that case, perhaps it would make more sense to just rename
>>> the eww buffer to have the title in the buffer name?  Then the normal
>>> buffer switching commands would work automatically.
>>
>> In Info, forking commands (such as 'Info-follow-nearest-node FORK')
>> create a new buffer with the Info node name in its buffer name, e.g.
>> *info-TITLE*.  So instead of current *eww*<2>, eww could use the same
>> format *eww-TITLE*, or uniquify-like angle brackets *eww<TITLE>*.
>
> Yup, that's what I meant.  The wrinkle here is that we don't know the
> title until we've fetched the HTML, so the buffer has to be renamed
> after rendering.

I see.  Then maybe in the existing hook `eww-after-render-hook'?  This is
the standard way to customize buffer renaming, e.g. I have a lot of such
(add-hook 'occur-hook 'occur-rename-buffer) for customizing different modes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 18:15:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 20:14:08 +0200
Juri Linkov <juri <at> linkov.net> writes:

> I see.  Then maybe in the existing hook `eww-after-render-hook'?

Yup; I misread the code -- that looks like the correct place to put it.
But I can also see many people wanting this, so perhaps a user option to
rename the buffers this way would be nice.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 20:32:01 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> linkov.net>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 23:31:22 +0300
On 2021-10-13, 20:14 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Juri Linkov <juri <at> linkov.net> writes:
>
>> I see.  Then maybe in the existing hook `eww-after-render-hook'?
>
> Yup; I misread the code -- that looks like the correct place to put it.
> But I can also see many people wanting this, so perhaps a user option to
> rename the buffers this way would be nice.

That is right.  I am preparing together with another person a patch that
auto-renames eww buffers after they are rendered.  The idea is to use
either the page title or, if that is not available, the page's URL.

In terms of user options, there would be a toggle to enable the
behaviour (off by default to not upset existing users) as well as a
defcustom with ":type 'function", so users can specify exactly how the
renaming scheme should work.

I expect the code to be finalised within the coming days, in case you
have not done the work already.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 20:34:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Wed, 13 Oct 2021 22:33:04 +0200
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> In terms of user options, there would be a toggle to enable the
> behaviour (off by default to not upset existing users) as well as a
> defcustom with ":type 'function", so users can specify exactly how the
> renaming scheme should work.

Sounds good to me.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 21:27:02 GMT) Full text and rfc822 format available.

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

From: Yuchen Pei <hi <at> ypei.me>
To: Protesilaos Stavrou <info <at> protesilaos.com>,
 Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> linkov.net>
Cc: 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Thu, 14 Oct 2021 08:26:18 +1100
On 14 October 2021 07:31:22 GMT+11:00, Protesilaos Stavrou <info <at> protesilaos.com> wrote:
>On 2021-10-13, 20:14 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>
>> Juri Linkov <juri <at> linkov.net> writes:
>>
>>> I see.  Then maybe in the existing hook `eww-after-render-hook'?
>>
>> Yup; I misread the code -- that looks like the correct place to put it.
>> But I can also see many people wanting this, so perhaps a user option to
>> rename the buffers this way would be nice.
>
>That is right.  I am preparing together with another person a patch that
>auto-renames eww buffers after they are rendered.  The idea is to use
>either the page title or, if that is not available, the page's URL.
>
>In terms of user options, there would be a toggle to enable the
>behaviour (off by default to not upset existing users) as well as a
>defcustom with ":type 'function", so users can specify exactly how the
>renaming scheme should work.
>
>I expect the code to be finalised within the coming days, in case you
>have not done the work already.
>

Sgtm and looking forward :)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Wed, 13 Oct 2021 23:49:02 GMT) Full text and rfc822 format available.

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

From: Yuchen Pei <hi <at> ypei.me>
To: Juri Linkov <juri <at> linkov.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Thu, 14 Oct 2021 10:48:08 +1100
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> linkov.net> writes:

>>>> I think in that case, perhaps it would make more sense to 
>>>> just rename
>>>> the eww buffer to have the title in the buffer name?  Then 
>>>> the normal
>>>> buffer switching commands would work automatically.
>>>
>>> In Info, forking commands (such as 'Info-follow-nearest-node 
>>> FORK')
>>> create a new buffer with the Info node name in its buffer 
>>> name, e.g.
>>> *info-TITLE*.  So instead of current *eww*<2>, eww could use 
>>> the same
>>> format *eww-TITLE*, or uniquify-like angle brackets 
>>> *eww<TITLE>*.
>>
>> Yup, that's what I meant.  The wrinkle here is that we don't 
>> know the
>> title until we've fetched the HTML, so the buffer has to be 
>> renamed
>> after rendering.
>
> I see.  Then maybe in the existing hook `eww-after-render-hook'? 
> This is
> the standard way to customize buffer renaming, e.g. I have a lot 
> of such
> (add-hook 'occur-hook 'occur-rename-buffer) for customizing 
> different modes.

On a related note, I also have a function defined in a similar 
fashion switching to a shell buffer by prompts.  Are people 
interested in having this as well?  I don't see a shell hook like 
eww-after-render-hook that can achieve this though.

(defun get-comint-prompt ()
 (save-excursion
   ;; more useful than (beginning-of-line) to move past sticky 
   part
   (forward-line 0)
   (let ((end
	   ;; font-lock-face should be comint-highlight-prompt
	   (next-single-char-property-change (point) 
	   'font-lock-face)))
     (buffer-substring-no-properties (point) end))))

(defun shell-switch-by-prompt (prompt-and-buffer)
 "Switches to a shell with selected prompt."
 (interactive
  (list
   (let ((com-table))
     (dolist (buffer (buffer-list))
	(with-current-buffer buffer
	  (when (equal major-mode 'shell-mode)
	    (add-to-list
	     'com-table
	     (concat (get-comint-prompt)
		     (propertize (concat " " (buffer-name))
				 'invisible t))))))
     (completing-read "Shell prompt: " com-table))))
 (string-match "^.* \\(.*\\)$" prompt-and-buffer)
 (switch-to-buffer (match-string 1 prompt-and-buffer)))


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Thu, 14 Oct 2021 00:17:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Protesilaos Stavrou <info <at> protesilaos.com>, Lars Ingebrigtsen
 <larsi <at> gnus.org>, Juri Linkov <juri <at> linkov.net>
Cc: "51176 <at> debbugs.gnu.org" <51176 <at> debbugs.gnu.org>, Yuchen Pei <hi <at> ypei.me>
Subject: RE: [External] : bug#51176: eww switch buffer by title
Date: Thu, 14 Oct 2021 00:16:16 +0000
> >> I see.  Then maybe in the existing hook `eww-after-render-hook'?
> >
> > Yup; I misread the code -- that looks like the correct place to put it.
> > But I can also see many people wanting this, so perhaps a user option to
> > rename the buffers this way would be nice.
> 
> That is right.  I am preparing together with another person a patch
> that auto-renames eww buffers after they are rendered.  The idea is to use
> either the page title or, if that is not available, the page's URL.
> 
> In terms of user options, there would be a toggle to enable the
> behaviour (off by default to not upset existing users) as well as a
> defcustom with ":type 'function", so users can specify exactly how the
> renaming scheme should work.
> 
> I expect the code to be finalised within the coming days, in case you
> have not done the work already.

FWIW, Bookmark+ allows these kinds of automatic renaming:

(defcustom bmkp-eww-buffer-renaming nil
  "Whether and how an EWW buffer is renamed.
Non-nil values affect EWW behavior even when bookmarks are not used.

* nil:    Do not rename buffer - use `*eww*' (vanilla EWW behavior).
* `url':  Rename buffer to web-page title plus last 20 chars of URL.
* `page': Rename buffer to web-page title (only)."
  :type '(choice
          (const :tag "Do not rename buffer (use name `*eww*')"                    nil)
          (const :tag "Rename buffer to web-page title plus last 20 chars of URL"  url)
          ;; Any symbol other than `page' and nil is treated the same as `page'.
          (const :tag "Rename buffer to web-page title"                            page))
  :group 'bookmark-plus)

The code (e.g. for the after-render hook function)
is in file `bookmark+-1.el'.

https://www.emacswiki.org/emacs/BookmarkPlus




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Thu, 14 Oct 2021 11:07:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Yuchen Pei <hi <at> ypei.me>
Cc: 51176 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Thu, 14 Oct 2021 13:06:14 +0200
Yuchen Pei <hi <at> ypei.me> writes:

> On a related note, I also have a function defined in a similar fashion
> switching to a shell buffer by prompts.  Are people interested in
> having this as well?  I don't see a shell hook like
> eww-after-render-hook that can achieve this though.

Perhaps you can do something with after-change-functions in comint
buffers -- comint-last-prompt has the location of the prompt.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Thu, 14 Oct 2021 16:18:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Yuchen Pei <hi <at> ypei.me>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 51176 <at> debbugs.gnu.org
Subject: Re: bug#51176: eww switch buffer by title
Date: Thu, 14 Oct 2021 19:05:01 +0300
> On a related note, I also have a function defined in a similar fashion
> switching to a shell buffer by prompts.  Are people interested in having
> this as well?  I don't see a shell hook like eww-after-render-hook that can
> achieve this though.

project-shell uses project-prefixed-buffer-name to generate
project-specific buffer names, but not with shell prompts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 06:33:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 09:31:55 +0300
[Message part 1 (text/plain, inline)]
On 2021-10-13, 22:33 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> In terms of user options, there would be a toggle to enable the
>> behaviour (off by default to not upset existing users) as well as a
>> defcustom with ":type 'function", so users can specify exactly how the
>> renaming scheme should work.
>
> Sounds good to me.

Hello again!

Please find attached the patch which implements a renaming scheme for
EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.

What do you think?

We had entertained the notion of a single defcustom with more options,
but ultimately decided against it on the grounds that it was more
complex.

-- 
Protesilaos Stavrou
https://protesilaos.com
[0001-Implement-auto-renaming-scheme-for-eww-buffers.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 08:30:02 GMT) Full text and rfc822 format available.

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

From: miha <at> kamnitnik.top
To: Protesilaos Stavrou <info <at> protesilaos.com>, Lars Ingebrigtsen
 <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 10:32:55 +0200
[Message part 1 (text/plain, inline)]
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> Hello again!
>
> Please find attached the patch which implements a renaming scheme for
> EWW buffers.

Thanks.

> I include Abhiseck, the co-author of this patch, in Cc.
>
> What do you think?
>
> We had entertained the notion of a single defcustom with more options,
> but ultimately decided against it on the grounds that it was more
> complex.
>
> -- 
> Protesilaos Stavrou
> https://protesilaos.com
> @@ -556,6 +580,8 @@ (defun eww-render (status url &optional point buffer encode)
> +            (and eww-auto-rename-buffer-flag
> +                 (funcall eww-auto-rename-buffer-function))
>  	    (run-hooks 'eww-after-render-hook)))

With your patch, the buffer isn't renamed if the user presses "l" or "r"
to go backward and forward in history. I suggest calling your rename
function from 'eww-update-header-line-format' instead.

Best regards.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 10:36:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 12:35:25 +0200
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> Please find attached the patch which implements a renaming scheme for
> EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.
>
> What do you think?
>
> We had entertained the notion of a single defcustom with more options,
> but ultimately decided against it on the grounds that it was more
> complex.

Yeah, looks good to me, but:

miha <at> kamnitnik.top writes:

> With your patch, the buffer isn't renamed if the user presses "l" or "r"
> to go backward and forward in history. I suggest calling your rename
> function from 'eww-update-header-line-format' instead.

Yes, it has to be performed upon all updates.  But putting it in that
function would be misleading, so what about creating a new function
`eww--after-page-change' that would call 'eww-update-header-line-format'
and

            (when eww-auto-rename-buffer-flag
              (funcall eww-auto-rename-buffer-function))

and call that where 'eww-update-header-line-format' is called now.

And we don't really call user options -flag, so rename it to just
`eww-auto-rename-buffer'. 

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 11:23:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 14:22:27 +0300
[Message part 1 (text/plain, inline)]
On 2021-10-15, 12:35 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> Please find attached the patch which implements a renaming scheme for
>> EWW buffers.  I include Abhiseck, the co-author of this patch, in Cc.
>>
>> What do you think?
>>
>> We had entertained the notion of a single defcustom with more options,
>> but ultimately decided against it on the grounds that it was more
>> complex.
>
> Yeah, looks good to me, but:
>
> miha <at> kamnitnik.top writes:
>
>> With your patch, the buffer isn't renamed if the user presses "l" or "r"
>> to go backward and forward in history. I suggest calling your rename
>> function from 'eww-update-header-line-format' instead.
>
> Yes, it has to be performed upon all updates.  But putting it in that
> function would be misleading, so what about creating a new function
> `eww--after-page-change' that would call 'eww-update-header-line-format'
> and
>
>             (when eww-auto-rename-buffer-flag
>               (funcall eww-auto-rename-buffer-function))
>
> and call that where 'eww-update-header-line-format' is called now.
>
> And we don't really call user options -flag, so rename it to just
> `eww-auto-rename-buffer'. 

Thanks for the feedback!  Please find attached the revised patch, based
on what you suggested:

    0001-Implement-auto-renaming-scheme-for-EWW-buffers-simple.patch

Because it may be useful for your consideration, there also exists the
more complex approach that I alluded to earlier ("complex" may be an
exaggeration, but still).  Attached as well and also based on your
feedback.

    0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch

-- 
Protesilaos Stavrou
https://protesilaos.com
[0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch (text/x-patch, attachment)]
[0001-Implement-auto-renaming-scheme-for-EWW-buffers-simple.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 12:14:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 14:13:20 +0200
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> Because it may be useful for your consideration, there also exists the
> more complex approach that I alluded to earlier ("complex" may be an
> exaggeration, but still).  Attached as well and also based on your
> feedback.
>
>     0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch

Thanks; I thought the "complex" one was simpler, so I pushed that to
Emacs 29 (with some trivial changes and a manual entry).

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




bug marked as fixed in version 29.1, send any further explanations to 51176 <at> debbugs.gnu.org and Yuchen Pei <hi <at> ypei.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 15 Oct 2021 12:14:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 13:27:02 GMT) Full text and rfc822 format available.

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

From: Jose Antonio Ortega Ruiz <jao <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Protesilaos Stavrou
 <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 14:25:31 +0100
On Fri, Oct 15 2021, Lars Ingebrigtsen wrote:

> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> Because it may be useful for your consideration, there also exists the
>> more complex approach that I alluded to earlier ("complex" may be an
>> exaggeration, but still).  Attached as well and also based on your
>> feedback.
>>
>>     0001-Implement-auto-renaming-scheme-for-EWW-buffers-complex.patch
>
> Thanks; I thought the "complex" one was simpler, so I pushed that to
> Emacs 29 (with some trivial changes and a manual entry).

Since you went for the complex config, and additional option i'd find
useful for the ewww rename "flag" would be a string that specifies the
format to use once the title/url part has been computed.  So one can set
it to, say, "eww: %s", or whatever. I know that that use case is already
covered by the possibility of specifying a function, but having to
duplicate the default function just to change the final format string
feels a bit overkill (and i suspect changing the format is going to be a
very common reason to opt for a function call).


Cheers,
jao
-- 
Dealing with failure is easy: Work hard to improve. Success is also
easy to handle: You've solved the wrong problem. Work hard to improve.
  - Alan Perlis, Epigrams on Programming




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 14:02:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jose Antonio Ortega Ruiz <jao <at> gnu.org>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 51176 <at> debbugs.gnu.org,
 Yuchen Pei <hi <at> ypei.me>, Abhiseck Paira <abhiseckpaira <at> disroot.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 16:00:56 +0200
Jose Antonio Ortega Ruiz <jao <at> gnu.org> writes:

> Since you went for the complex config, and additional option i'd find
> useful for the ewww rename "flag" would be a string that specifies the
> format to use once the title/url part has been computed.  So one can set
> it to, say, "eww: %s", or whatever. I know that that use case is already
> covered by the possibility of specifying a function, but having to
> duplicate the default function just to change the final format string
> feels a bit overkill (and i suspect changing the format is going to be a
> very common reason to opt for a function call).

I think it's best to leave that sort of flexibility to the function
option -- there's too many ways users may want to customise this.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Fri, 15 Oct 2021 20:00:02 GMT) Full text and rfc822 format available.

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

From: Jose Antonio Ortega Ruiz <jao <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Protesilaos Stavrou <info <at> protesilaos.com>, 51176 <at> debbugs.gnu.org,
 Yuchen Pei <hi <at> ypei.me>, Abhiseck Paira <abhiseckpaira <at> disroot.org>,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Fri, 15 Oct 2021 20:59:43 +0100
On Fri, Oct 15 2021, Lars Ingebrigtsen wrote:

> Jose Antonio Ortega Ruiz <jao <at> gnu.org> writes:
>
>> Since you went for the complex config, and additional option i'd find
>> useful for the ewww rename "flag" would be a string that specifies the
>> format to use once the title/url part has been computed.  So one can set
>> it to, say, "eww: %s", or whatever. I know that that use case is already
>> covered by the possibility of specifying a function, but having to
>> duplicate the default function just to change the final format string
>> feels a bit overkill (and i suspect changing the format is going to be a
>> very common reason to opt for a function call).
>
> I think it's best to leave that sort of flexibility to the function
> option -- there's too many ways users may want to customise this.

but, 43.45% of users will simply want to change the format and get rid
of "# eww" at the end to see more of the title! :)

specifying a format string is extremely common in many packages out
there for things like this, and is, in my opinion, much more
user-friendly: to change that format with a function, one has to study
eww's api for obtaining title and url, and write a non-trivial piece of
elisp, probably (although admittedly not necessarily) outside the
customization interface.

in other words, i find the format string option as natural and common as
the nil and t ones (which, in a way, are also redundant and could be
removed, since it's trivial to write a function for them).

but i'm probably exaggerating: people will simply copy and paste the
relevant piece of elisp in their init files and call it a day.  so i'll
stop the bike-shedding now :)

cheers,
jao
-- 
Love, friendship, respect, do not unite people as much as a common
hatred for something. -Anton Chekhov (1860-1904)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Sat, 16 Oct 2021 04:17:01 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Jose Antonio Ortega Ruiz <jao <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Sat, 16 Oct 2021 07:16:31 +0300
On 2021-10-15, 20:59 +0100, Jose Antonio Ortega Ruiz <jao <at> gnu.org> wrote:

> On Fri, Oct 15 2021, Lars Ingebrigtsen wrote:
>
>> Jose Antonio Ortega Ruiz <jao <at> gnu.org> writes:
>>
>>> Since you went for the complex config, and additional option i'd find
>>> useful for the ewww rename "flag" would be a string that specifies the
>>> format to use once the title/url part has been computed.  So one can set
>>> it to, say, "eww: %s", or whatever. I know that that use case is already
>>> covered by the possibility of specifying a function, but having to
>>> duplicate the default function just to change the final format string
>>> feels a bit overkill (and i suspect changing the format is going to be a
>>> very common reason to opt for a function call).
>>
>> I think it's best to leave that sort of flexibility to the function
>> option -- there's too many ways users may want to customise this.
>
> but, 43.45% of users will simply want to change the format and get rid
> of "# eww" at the end to see more of the title! :)
>
> specifying a format string is extremely common in many packages out
> there for things like this, and is, in my opinion, much more
> user-friendly: to change that format with a function, one has to study
> eww's api for obtaining title and url, and write a non-trivial piece of
> elisp, probably (although admittedly not necessarily) outside the
> customization interface.
>
> in other words, i find the format string option as natural and common as
> the nil and t ones (which, in a way, are also redundant and could be
> removed, since it's trivial to write a function for them).
>
> but i'm probably exaggerating: people will simply copy and paste the
> relevant piece of elisp in their init files and call it a day.  so i'll
> stop the bike-shedding now :)

How about we add a sample function in the doc string?  That would give
users all the information they need to get started, no?

Like this function:

    (defun my-eww-rename-buffer ()
      (when (eq major-mode 'eww-mode)
        (when-let ((string (or (plist-get eww-data :title)
                               (plist-get eww-data :url))))
          (rename-buffer (format "*%s*" string) t))))

And we add it here:

    (defcustom eww-auto-rename-buffer nil
      "Automatically rename EWW buffers once the page is rendered.

    When nil, do not rename the buffer.  With a non-nil value
    determine the renaming scheme, as follows:

    - `title': Use the web page's title.
    - `url': Use the web page's URL.
    - a function's symbol: Run a user-defined function that returns a
      string with which to rename the buffer.  Sample of a
      user-defined function:

        (defun my-eww-rename-buffer ()
          (when (eq major-mode 'eww-mode)
            (when-let ((string (or (plist-get eww-data :title)
                                   (plist-get eww-data :url))))
              (rename-buffer (format \"*%s*\" string) t))))

    The string of `title' and `url' is always truncated to the value
    of `eww-buffer-name-length'."
      :version "29.1"
      :type '(choice
              (const :tag "Do not rename buffers (default)" nil)
              (const :tag "Rename buffer to web page title" title)
              (const :tag "Rename buffer to web page URL" url)
              (function :tag "A user-defined function to rename the buffer"))
      :group 'eww)

I can prepare a patch if you think this is worth it.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Sat, 16 Oct 2021 04:21:01 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Jose Antonio Ortega Ruiz <jao <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Sat, 16 Oct 2021 07:20:43 +0300
On 2021-10-16, 07:16 +0300, Protesilaos Stavrou <info <at> protesilaos.com> wrote:

> On 2021-10-15, 20:59 +0100, Jose Antonio Ortega Ruiz <jao <at> gnu.org> wrote:
>
>> On Fri, Oct 15 2021, Lars Ingebrigtsen wrote:
>>
>>> Jose Antonio Ortega Ruiz <jao <at> gnu.org> writes:
>>>
>>>> Since you went for the complex config, and additional option i'd find
>>>> useful for the ewww rename "flag" would be a string that specifies the
>>>> format to use once the title/url part has been computed.  So one can set
>>>> it to, say, "eww: %s", or whatever. I know that that use case is already
>>>> covered by the possibility of specifying a function, but having to
>>>> duplicate the default function just to change the final format string
>>>> feels a bit overkill (and i suspect changing the format is going to be a
>>>> very common reason to opt for a function call).
>>>
>>> I think it's best to leave that sort of flexibility to the function
>>> option -- there's too many ways users may want to customise this.
>>
>> but, 43.45% of users will simply want to change the format and get rid
>> of "# eww" at the end to see more of the title! :)
>>
>> specifying a format string is extremely common in many packages out
>> there for things like this, and is, in my opinion, much more
>> user-friendly: to change that format with a function, one has to study
>> eww's api for obtaining title and url, and write a non-trivial piece of
>> elisp, probably (although admittedly not necessarily) outside the
>> customization interface.
>>
>> in other words, i find the format string option as natural and common as
>> the nil and t ones (which, in a way, are also redundant and could be
>> removed, since it's trivial to write a function for them).
>>
>> but i'm probably exaggerating: people will simply copy and paste the
>> relevant piece of elisp in their init files and call it a day.  so i'll
>> stop the bike-shedding now :)
>
> How about we add a sample function in the doc string?  That would give
> users all the information they need to get started, no?

Sorry, I sent the wrong version...  I meant this function:

    (defun my-eww-rename-buffer ()
      (when (eq major-mode 'eww-mode)
        (when-let ((string (or (plist-get eww-data :title)
                               (plist-get eww-data :url))))
          (format "*%s*" string))))

And we edit this doc string:

    (defcustom eww-auto-rename-buffer nil
      "Automatically rename EWW buffers once the page is rendered.

    When nil, do not rename the buffer.  With a non-nil value
    determine the renaming scheme, as follows:

    - `title': Use the web page's title.
    - `url': Use the web page's URL.
    - a function's symbol: Run a user-defined function that returns a
      string with which to rename the buffer.  Sample of a
      user-defined function:

        (defun my-eww-rename-buffer ()
          (when (eq major-mode 'eww-mode)
            (when-let ((string (or (plist-get eww-data :title)
                                   (plist-get eww-data :url))))
              (format \"*%s*\" string))))

    The string of `title' and `url' is always truncated to the value
    of `eww-buffer-name-length'."
      :version "29.1"
      :type '(choice
              (const :tag "Do not rename buffers (default)" nil)
              (const :tag "Rename buffer to web page title" title)
              (const :tag "Rename buffer to web page URL" url)
              (function :tag "A user-defined function to rename the buffer"))
      :group 'eww)

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Sat, 16 Oct 2021 14:32:01 GMT) Full text and rfc822 format available.

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

From: Jose Antonio Ortega Ruiz <jao <at> gnu.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>, Lars Ingebrigtsen
 <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Sat, 16 Oct 2021 15:31:35 +0100
On Sat, Oct 16 2021, Protesilaos Stavrou wrote:

[...]

> How about we add a sample function in the doc string?  That would give
> users all the information they need to get started, no?

imho, that'd be excellent, even if we also had the string option.

cheers,
jao
-- 
More people would learn from their mistakes if they weren't so busy
denying them - Harlod J. Smith




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Mon, 18 Oct 2021 06:45:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Jose Antonio Ortega Ruiz <jao <at> gnu.org>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Mon, 18 Oct 2021 08:43:44 +0200
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> How about we add a sample function in the doc string?  That would give
> users all the information they need to get started, no?

Makes sense to me.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Mon, 18 Oct 2021 07:16:02 GMT) Full text and rfc822 format available.

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

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Jose Antonio Ortega Ruiz <jao <at> gnu.org>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Mon, 18 Oct 2021 10:15:11 +0300
[Message part 1 (text/plain, inline)]
On 2021-10-18, 08:43 +0200, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> How about we add a sample function in the doc string?  That would give
>> users all the information they need to get started, no?
>
> Makes sense to me.

Patch attached.  I only updated the doc string, thinking that this
addition does not need to be added to the NEWS.

-- 
Protesilaos Stavrou
https://protesilaos.com
[0001-Add-sample-user-function-in-eww-auto-rename-buffer.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51176; Package emacs. (Mon, 18 Oct 2021 07:17:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 51176 <at> debbugs.gnu.org, Yuchen Pei <hi <at> ypei.me>,
 Jose Antonio Ortega Ruiz <jao <at> gnu.org>,
 Abhiseck Paira <abhiseckpaira <at> disroot.org>, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51176: eww switch buffer by title
Date: Mon, 18 Oct 2021 09:16:06 +0200
Protesilaos Stavrou <info <at> protesilaos.com> writes:

> Patch attached.  I only updated the doc string, thinking that this
> addition does not need to be added to the NEWS.

Thanks; pushed to Emacs 29.

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Nov 2021 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 163 days ago.

Previous Next


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