Subject: bug#18550: eww-history-browse may end up calling eww-restore-history in an arbitrary buffer

From: Ivan Shmakov <[email-masked]>
Date: Wed, 19 Nov 2014 11:30:16 +0000

>>>>> Lars Magne Ingebrigtsen <[email-masked]> writes:
>>>>> Lars Magne Ingebrigtsen <[email-masked]> 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’s 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.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A