From unknown Sun Aug 10 11:49:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18550 <18550@debbugs.gnu.org> To: bug#18550 <18550@debbugs.gnu.org> Subject: Status: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer Reply-To: bug#18550 <18550@debbugs.gnu.org> Date: Sun, 10 Aug 2025 18:49:11 +0000 retitle 18550 eww-history-browse may end up calling eww-restore-history in = an arbitrary buffer=20 reassign 18550 emacs submitter 18550 Ivan Shmakov severity 18550 normal tag 18550 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 17:19:21 2014 Received: (at submit) by debbugs.gnu.org; 24 Sep 2014 21:19:22 +0000 Received: from localhost ([127.0.0.1]:51082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWty4-0004JR-QG for submit@debbugs.gnu.org; Wed, 24 Sep 2014 17:19:21 -0400 Received: from fely.am-1.org ([78.47.74.50]:34098) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWty1-0004JH-V5 for submit@debbugs.gnu.org; Wed, 24 Sep 2014 17:19:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=ztNt6WG/zsPDICQ8sqbI1w++BSvn7MZ+dzszZjxzEdM=; b=CjE0ekarIaAfM8z/5ugDKnJu/TsrQYIYkpkDeaf6n9PdLCvqxzEJUxWsrqcIi0AHpS0yC3ofxqV0aSp0JN5tIFlRTAwJ5ajhUZFL74pIgaaMMul0n8qZtx98bhedpOjp9LJhHkTZHxPu0ZRKrcSagT4wUzNGI+nWQSrlykVOCtA=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XWtxz-0007IU-Uf for submit@debbugs.gnu.org; Wed, 24 Sep 2014 21:19:16 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XWtxs-0004N8-8X for submit@debbugs.gnu.org; Thu, 25 Sep 2014 04:19:08 +0700 From: Ivan Shmakov To: submit@debbugs.gnu.org Subject: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer Date: Wed, 24 Sep 2014 21:19:07 +0000 Message-ID: <87tx3wn2d0.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: emacs Severity: normal Shortly: go to *eww*, H, C-x 1, C-x b *foo* RET, C-x b RET, RET, =E2=80=93 the EWW history entry will be rendered in *foo*, /not/ *eww*. As of 0ee10aff098b, eww-history-browse uses quit-window to leave the history buffer, switching to the =E2=80=9Cnext=E2=80=9D buffer =E2=80= =93 as per (buffer-list), =E2=80=93 and calls eww-restore-history right there. While the user may generally be expected to use M-x eww-history (which makes the current *eww* buffer the =E2=80=9Cnext=E2=80=9D one), sel= ect an entry, and M-x eww-history-browse it, =E2=80=93 it=E2=80=99s also possible= for the user to switch buffers arbitrarily between the calls. This way, quit-window may select a completely unrelated buffer, and eww-restore-history will then call (erase-buffer) for it. (Naturally, that gets much worse if the buffer that the user choose to take a look at actually has some important data.) As for #16211, my suggestion would be to employ a separate buffer-local variable to track the current =E2=80=9Cbrowsing=E2=80=9D buff= er. In the patch MIMEd, I assume that it=E2=80=99s named eww-current-buffer (just like in the #16211 patch), although eww-browsing-buffer seems like a more appropriate name to me now. As suggested, the code behaves as before when the variable is nil. It may make sense to raise an error in that case instead, so to avoid possible corruption of an arbitrary buffer. PS. Beware of the loose line numbers in the diff. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/diff Content-Disposition: inline --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1290,9 +1290,11 @@ defun eww-list-histories () (interactive) (when (null eww-history) (error "No eww-histories are defined")) - (let ((eww-history-trans eww-history)) + (let ((eww-history-trans eww-history) + (buffer (current-buffer))) (set-buffer (get-buffer-create "*eww history*")) (eww-history-mode) + (setq-local eww-current-buffer buffer) (let ((inhibit-read-only t) (domain-length 0) (title-length 0) @@ -1302,6 +1304,9 @@ defun eww-history-browse () (unless history (error "No history on the current line")) - (quit-window) + (let ((buffer eww-current-buffer)) + (quit-window) + (when buffer + (switch-to-buffer buffer))) (eww-restore-history history))) (defvar eww-history-mode-map --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 24 17:40:22 2014 Received: (at control) by debbugs.gnu.org; 24 Sep 2014 21:40:22 +0000 Received: from localhost ([127.0.0.1]:51094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWuIP-00057t-MH for submit@debbugs.gnu.org; Wed, 24 Sep 2014 17:40:21 -0400 Received: from fely.am-1.org ([78.47.74.50]:34107) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWuIM-00057h-EP for control@debbugs.gnu.org; Wed, 24 Sep 2014 17:40:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=jW0KyO38HomDy362+1CaPWmXUjfVpzfa4L9KHn9rME4=; b=i7mAQ0oiKlvc5XUtDKxaZzayHfveHUSnan6Bgz1EH49awcvnGQ8QXbPDMdylbWjR3j7dLH3OhEcRW+WNsot5BZx+K/Gy/92uLFoHt9Frm326h6rb6bQypWH1uo1HUqATBzqXJ0gX9ZELp5p++zakE/J4j8DnO/6/gLBts4ILACQ=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XWuIL-0007SU-PI for control@debbugs.gnu.org; Wed, 24 Sep 2014 21:40:17 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XWuIE-0004Q7-QC for control@debbugs.gnu.org; Thu, 25 Sep 2014 04:40:10 +0700 From: Ivan Shmakov To: control@debbugs.gnu.org Subject: tweaking recent reports Date: Wed, 24 Sep 2014 21:40:10 +0000 Message-ID: <87fvfgn1dx.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) retitle 18551 regression: erc-format-nick is now essentially an alias to er= c-format-@nick=20 tag 18551 + patch tag 18550 + patch thanks --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 13 12:05:16 2014 Received: (at 18550) by debbugs.gnu.org; 13 Nov 2014 17:05:16 +0000 Received: from localhost ([127.0.0.1]:59592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoxpc-0002FW-8P for submit@debbugs.gnu.org; Thu, 13 Nov 2014 12:05:16 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:60046) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoxpa-0002FP-PW for 18550@debbugs.gnu.org; Thu, 13 Nov 2014 12:05:15 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xoxo9-0006QS-05; Thu, 13 Nov 2014 18:03:45 +0100 From: Lars Magne Ingebrigtsen To: Ivan Shmakov Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> X-Now-Playing: Eurythmics's _Sweet Dreams (Are Made Of This)_: "This Is The House" X-Hashcash: 1:23:141113:18550@debbugs.gnu.org::ApT+PlZ8mUAyPPN4:0000000000000000000000000000000000000000E2Vg X-Hashcash: 1:23:141113:ivan@siamics.net::C2/aPtF5sKhIL28t:0aB9z Date: Thu, 13 Nov 2014 18:03:44 +0100 In-Reply-To: <87tx3wn2d0.fsf@violet.siamics.net> (Ivan Shmakov's message of "Wed, 24 Sep 2014 21:19:07 +0000") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1Xoxo9-0006QS-05 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1416503025.26863@0DxgefG/ILcCvrojz8VumQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18550 Cc: 18550@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ivan Shmakov writes: > Shortly: go to *eww*, H, C-x 1, C-x b *foo* RET, C-x b RET, RET, > =96 the EWW history entry will be rendered in *foo*, /not/ *eww*. > > As of 0ee10aff098b, eww-history-browse uses quit-window to leave > the history buffer, switching to the =93next=94 buffer =96 as per > (buffer-list), =96 and calls eww-restore-history right there. > > While the user may generally be expected to use M-x eww-history > (which makes the current *eww* buffer the =93next=94 one), select an > entry, and M-x eww-history-browse it, =96 it=92s also possible for > the user to switch buffers arbitrarily between the calls. This > way, quit-window may select a completely unrelated buffer, and > eww-restore-history will then call (erase-buffer) for it. Hm.... -------- (quit-window &optional KILL WINDOW) Quit WINDOW and bury its buffer. WINDOW must be a live window and defaults to the selected one. With prefix argument KILL non-nil, kill the buffer instead of burying it. According to information stored in WINDOW's `quit-restore' window parameter either (1) delete WINDOW and its frame, (2) delete WINDOW, (3) restore the buffer previously displayed in WINDOW, or (4) make WINDOW display some other buffer than the present one. If non-nil, reset `quit-restore' parameter to nil. -------- So I guess eww should set up the `quit-restore' thing properly. I'll have a peek. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 13 12:14:58 2014 Received: (at 18550) by debbugs.gnu.org; 13 Nov 2014 17:14:58 +0000 Received: from localhost ([127.0.0.1]:59620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoxyw-0002VL-Lo for submit@debbugs.gnu.org; Thu, 13 Nov 2014 12:14:58 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:42037) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoxyq-0002V7-TC for 18550@debbugs.gnu.org; Thu, 13 Nov 2014 12:14:52 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XoxyS-0007E8-64; Thu, 13 Nov 2014 18:14:24 +0100 From: Lars Magne Ingebrigtsen To: Ivan Shmakov Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> X-Now-Playing: Eurythmics's _Sweet Dreams (Are Made Of This)_: "This City Never Sleeps" X-Hashcash: 1:23:141113:18550@debbugs.gnu.org::/jZJkKES4BPlB4GI:00000000000000000000000000000000000000003NUa X-Hashcash: 1:23:141113:ivan@siamics.net::TcO8SLWtFE6AusJ+:09h/3 Date: Thu, 13 Nov 2014 18:14:23 +0100 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 13 Nov 2014 18:03:44 +0100") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1XoxyS-0007E8-64 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1416503665.81055@7fERHb7QvUXEozwGo02vXQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18550 Cc: 18550@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Lars Magne Ingebrigtsen writes: > So I guess eww should set up the `quit-restore' thing properly. I'll > have a peek. Actually, that doesn't provide a way to do this (rather obvious) thing. Shouldn't there be a way to instruct `quit-window' to go to a specific buffer (if that buffer is still alive)? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 19 06:30:38 2014 Received: (at 18550) by debbugs.gnu.org; 19 Nov 2014 11:30:38 +0000 Received: from localhost ([127.0.0.1]:37876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr3T0-0007f2-Be for submit@debbugs.gnu.org; Wed, 19 Nov 2014 06:30:38 -0500 Received: from fely.am-1.org ([78.47.74.50]:41369) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr3Su-0007eo-0S for 18550@debbugs.gnu.org; Wed, 19 Nov 2014 06:30:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=Z3s+WXrhyjh+l5xDMemeudQd4ZyWMjL9RUhfLGWtQBo=; b=r2L0WTw1XHMe4Kzmn+p91P5UOl/VhrR4icjt35cmNnZkXjCZCswGTf8u+mkp0ecf7CTGeeOLmaUdN+ITO+A/GqysGv1PGYCj0OX8ccSlfB4VdBppKBmKrqz5xcGIkc8l4FziJQRoPXD8g53UuCBNJuoT9oWFy9CCBz+3RPpZAq4=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xr3Sr-0003Nu-UG for 18550@debbugs.gnu.org; Wed, 19 Nov 2014 11:30:26 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xr3Sj-0005vH-VJ for 18550@debbugs.gnu.org; Wed, 19 Nov 2014 18:30:18 +0700 From: Ivan Shmakov To: 18550@debbugs.gnu.org Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> Date: Wed, 19 Nov 2014 11:30:16 +0000 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 13 Nov 2014 18:14:23 +0100") Message-ID: <87zjbn5sxj.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18550 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Lars Magne Ingebrigtsen writes: >>>>> Lars Magne Ingebrigtsen writes: >> So I guess eww should set up the `quit-restore' thing properly. >> I'll have a peek. > Actually, that doesn't provide a way to do this (rather obvious) > thing. > Shouldn't there be a way to instruct `quit-window' to go to a > specific buffer (if that buffer is still alive)? I see no reason to abuse quit-window for what=E2=80=99s essentially switching to a buffer to edit one. That is: the eww-restore-history call right after quit-window edits the /current/ buffer. Thus, it indeed makes sense to explicitly use set-buffer before that. (Or to wrap the call in with-current-buffer, anyway.) Moreover, vc.el already uses a dedicated buffer-local variable for a similar purpose, and so does rcirc.el, and perhaps a few more modes out there. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 19 12:26:18 2014 Received: (at 18550) by debbugs.gnu.org; 19 Nov 2014 17:26:18 +0000 Received: from localhost ([127.0.0.1]:38536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr91F-0002Rv-K8 for submit@debbugs.gnu.org; Wed, 19 Nov 2014 12:26:17 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:33125) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xr91E-0002Rn-GS for 18550@debbugs.gnu.org; Wed, 19 Nov 2014 12:26:16 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xr90w-0002dy-Ce; Wed, 19 Nov 2014 18:25:58 +0100 From: Lars Magne Ingebrigtsen To: Ivan Shmakov Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> <87zjbn5sxj.fsf@violet.siamics.net> X-Now-Playing: Mapstation's _Distance Told Me Things To Be Said_: "The Way Things Change" X-Hashcash: 1:23:141119:ivan@siamics.net::GCdRZvsB73W3b9Tr:0KiOa X-Hashcash: 1:23:141119:18550@debbugs.gnu.org::BIH0FRmN0dE2ZIUD:0000000000000000000000000000000000000000aSFT Date: Wed, 19 Nov 2014 18:25:57 +0100 In-Reply-To: <87zjbn5sxj.fsf@violet.siamics.net> (Ivan Shmakov's message of "Wed, 19 Nov 2014 11:30:16 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1Xr90w-0002dy-Ce X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1417022759.41373@oL+Tzia7C4zq9Gl21Pob9Q X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18550 Cc: 18550@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ivan Shmakov writes: > I see no reason to abuse quit-window for what=92s essentially > switching to a buffer to edit one. That is: the > eww-restore-history call right after quit-window edits the > /current/ buffer. Thus, it indeed makes sense to explicitly use > set-buffer before that. (Or to wrap the call in > with-current-buffer, anyway.) > > Moreover, vc.el already uses a dedicated buffer-local variable > for a similar purpose, and so does rcirc.el, and perhaps a few > more modes out there. I think you're arguing against yourself here. If this is such a common thing to do, then something in this setup should provide this functionality, so that all these modes don't have to implement it again and again. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 25 10:40:45 2014 Received: (at 18550) by debbugs.gnu.org; 25 Nov 2014 15:40:45 +0000 Received: from localhost ([127.0.0.1]:45103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtIEK-0006tm-Ri for submit@debbugs.gnu.org; Tue, 25 Nov 2014 10:40:44 -0500 Received: from fely.am-1.org ([78.47.74.50]:42324) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtIE7-0006tP-ST for 18550@debbugs.gnu.org; Tue, 25 Nov 2014 10:40:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=Uuq4ZwjrUYFD06vCMqA1JL3s9SXGnreAWDrlSchm+os=; b=ntVRzPnk2X3x9xpOp9HVJ/bFEySFagb4v6th9ogChetvYrPoSGdbIpLA4M/TWSN/va9KrrIUPku3OK7e0FKZ1Hh6f2tGtnM22RgbxUVZtYpCdBVDMRqRv77TrenLVx+RDBRr3Z6BzCBDbPFtI+VCKSrPPUJOt1hO6ElWtOhkxaA=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XtIDt-0004Ip-Vf for 18550@debbugs.gnu.org; Tue, 25 Nov 2014 15:40:14 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XtIDm-0001hy-LP for 18550@debbugs.gnu.org; Tue, 25 Nov 2014 22:40:06 +0700 From: Ivan Shmakov To: 18550@debbugs.gnu.org Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> <87zjbn5sxj.fsf@violet.siamics.net> Mail-Followup-To: 18550@debbugs.gnu.org Date: Tue, 25 Nov 2014 15:40:06 +0000 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 19 Nov 2014 18:25:57 +0100") Message-ID: <87a93fs2zt.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18550 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Lars Magne Ingebrigtsen writes: >>>>> Ivan Shmakov writes: >> I see no reason to abuse quit-window for what=E2=80=99s essentially >> switching to a buffer to edit one. That is: the eww-restore-history >> call right after quit-window edits the /current/ buffer. Thus, it >> indeed makes sense to explicitly use set-buffer before that. (Or to >> wrap the call in with-current-buffer, anyway.) >> Moreover, vc.el already uses a dedicated buffer-local variable for a >> similar purpose, and so does rcirc.el, and perhaps a few more modes >> out there. > I think you're arguing against yourself here. Not in the least. > If this is such a common thing to do, then something in this setup > should provide this functionality, so that all these modes don't have > to implement it again and again. The vc-parent-buffer variable is /not/ used just to get back to the controlled file=E2=80=99s buffer; instead, it allows for the VC commands to be used in the associated buffers /as if/ they were invoked in the file=E2=80=99s own one. As in: the user does C-x v =3D to see the diff; finds something of interest, and =E2=80=93 whoa! =E2=80=93 t= he VC log is only C-x v l away. In the case of eww-history-browse, (quit-window) is part of the user interface, and I=E2=80=99m perfectly fine with it. (Although I /do/ imagine a use case which would require eww-history-browse to leave the history window in place.) On the contrary, the requirement to be invoked in the right buffer is part of the eww-restore-history calling convention. Even though the users may have different opinions regarding which buffer or window (if any) to select upon finishing with the history, the necessity to call eww-restore-history from the right one remains entirely the same. There is indeed some freedom with respect to the location the EWW buffer proper gets referenced from, =E2=80=93 it could be a variable (as I=E2=80=99ve suggested before), a text property, or some arcane location quit-window would use. However, I=E2=80=99d like to note that I currently also use EWW to render previews of the buffer=E2=80=99s MediaWiki markup [1], and that already benefits from having the target EWW buffer linked via a buffer-local variable. (Contrary to, say, M-x mml-preview, it /is/ reasonable to direct the output into a single buffer for all the repeated uses of the command in the same =E2=80=9Csource=E2=80=9D buffer, thanks to this very =E2=80=9Chistory=E2=80=9D feature EWW provides.) [1] http://am-1.org/~ivan/archives/git/gitweb.cgi?p=3Dmw-el-2014.git;a=3Dbl= ob;f=3Dmw-eww.el I presume that such an approach will hold for the other cases where a given buffer=E2=80=99s contents needs to be rendered with EWW, possibly after passing through a specific local (say, $ markdown) or remote software. It=E2=80=99s even possible to provide an M-x eww-preview command of some kind for that very purpose. The command will either use the (live) buffer pointed to by this new buffer-local variable; or will search for one, or create one anew, possibly by running a user-specified function or hook. (The command would employ one another hook to perform the conversion of the source data into HTML.) --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 07 14:39:16 2014 Received: (at 18550) by debbugs.gnu.org; 7 Dec 2014 19:39:17 +0000 Received: from localhost ([127.0.0.1]:56544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xxhfo-0000ve-HV for submit@debbugs.gnu.org; Sun, 07 Dec 2014 14:39:16 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:57669) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xxhfm-0000vQ-9C for 18550@debbugs.gnu.org; Sun, 07 Dec 2014 14:39:14 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XxhfP-0007FB-RL; Sun, 07 Dec 2014 20:38:51 +0100 From: Lars Magne Ingebrigtsen To: Ivan Shmakov Subject: Re: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer References: <87tx3wn2d0.fsf@violet.siamics.net> X-Now-Playing: X-TG's _Desertshore_: "All That Is My Own" X-Hashcash: 1:23:141207:18550@debbugs.gnu.org::LRs4NrbULXpoUIyU:00000000000000000000000000000000000000001Hif X-Hashcash: 1:23:141207:ivan@siamics.net::Y+ao+j431CWEzPwY:0R2++ Date: Sun, 07 Dec 2014 20:38:51 +0100 In-Reply-To: <87tx3wn2d0.fsf@violet.siamics.net> (Ivan Shmakov's message of "Wed, 24 Sep 2014 21:19:07 +0000") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1XxhfP-0007FB-RL X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418585932.14308@OuYAMGO0f4c6VoY37jyhrg X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18550 Cc: 18550@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ivan Shmakov writes: > Shortly: go to *eww*, H, C-x 1, C-x b *foo* RET, C-x b RET, RET, > =96 the EWW history entry will be rendered in *foo*, /not/ *eww*. Thanks; applied. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 07 14:39:16 2014 Received: (at control) by debbugs.gnu.org; 7 Dec 2014 19:39:16 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xxhfo-0000vc-2Z for submit@debbugs.gnu.org; Sun, 07 Dec 2014 14:39:16 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:57668) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xxhfk-0000vN-KL for control@debbugs.gnu.org; Sun, 07 Dec 2014 14:39:13 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XxhfS-0007FI-4S for control@debbugs.gnu.org; Sun, 07 Dec 2014 20:38:54 +0100 Date: Sun, 07 Dec 2014 20:38:53 +0100 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #18550 X-MailScanner-ID: 1XxhfS-0007FI-4S X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418585934.61159@Bi39pMv0Y+hEbeiKvydYew X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 18550 fixed close 18550 25.1 From unknown Sun Aug 10 11:49:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 05 Jan 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator