From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document' Date: Sun, 17 Dec 2017 22:22:34 +0200 Message-ID: <83zi6hp0j9.fsf@gnu.org> References: <20171216141055.30854.67661@vcs0.savannah.gnu.org> <20171216141056.8391A24612@vcs0.savannah.gnu.org> <83bmiyslq7.fsf@gnu.org> <83a7yhqrys.fsf@gnu.org> <5A36AF3D.8040406@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1513542052 16842 195.159.176.226 (17 Dec 2017 20:20:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2017 20:20:52 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 17 21:20:48 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQfQV-00042a-VZ for ged-emacs-devel@m.gmane.org; Sun, 17 Dec 2017 21:20:48 +0100 Original-Received: from localhost ([::1]:55365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQfSU-0004SA-1a for ged-emacs-devel@m.gmane.org; Sun, 17 Dec 2017 15:22:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQfSN-0004Rt-Jk for emacs-devel@gnu.org; Sun, 17 Dec 2017 15:22:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQfSJ-0001JS-3Y for emacs-devel@gnu.org; Sun, 17 Dec 2017 15:22:43 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQfSJ-0001JJ-0A; Sun, 17 Dec 2017 15:22:39 -0500 Original-Received: from [176.228.60.248] (port=4733 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eQfSH-00005M-5Q; Sun, 17 Dec 2017 15:22:38 -0500 In-reply-to: <5A36AF3D.8040406@gmx.at> (message from martin rudalics on Sun, 17 Dec 2017 18:54:05 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221186 Archived-At: > Date: Sun, 17 Dec 2017 18:54:05 +0100 > From: martin rudalics > Cc: emacs-devel@gnu.org > > (if (not (get-buffer-window (current-buffer))) > (let ((window-point (window-point))) > (prog1 > (save-window-excursion > ;; Avoid errors if the selected window is a dedicated one, > ;; and they just want to insert a document into it. > (set-window-dedicated-p nil nil) > (set-window-buffer nil (current-buffer)) > (car (window-text-pixel-size nil (line-beginning-position) (point)))) > (set-window-point nil window-point))) If we do that, then why use save-window-excursion in the first place? That's what it's supposed to preserve (among other things), right? If it doesn't do that much, let's do its job by hand altogether. (And then, of course, a few years down the line someone will come and ask herself why don't they just use save-window-excursion.)