From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: fix for bug#29935 copyright-update inserts year at random places Date: Mon, 08 Jan 2018 17:18:23 -0500 Message-ID: References: <868tdh5fag.fsf@stephe-leake.org> <837et0ckou.fsf@gnu.org> <86shbm4ks9.fsf@stephe-leake.org> <86k1wy48ch.fsf@stephe-leake.org> <861sj54wox.fsf@stephe-leake.org> <5A524604.6070909@gmx.at> <5A533F7D.4090505@gmx.at> <5A53B5E1.5080608@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515449801 21347 195.159.176.226 (8 Jan 2018 22:16:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 22:16:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 08 23:16:36 2018 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 1eYfiZ-0004qz-N2 for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 23:16:31 +0100 Original-Received: from localhost ([::1]:34520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYfkY-0003le-Sp for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 17:18:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYfkS-0003lU-Mv for emacs-devel@gnu.org; Mon, 08 Jan 2018 17:18:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYfkP-0005ZJ-JB for emacs-devel@gnu.org; Mon, 08 Jan 2018 17:18:28 -0500 Original-Received: from pmta21.teksavvy.com ([76.10.157.36]:39646) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYfkP-0005Xo-DW for emacs-devel@gnu.org; Mon, 08 Jan 2018 17:18:25 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HSOwDB7VNa/yyKSC1dHgEGDIM/gVqJS?= =?us-ascii?q?YR6jnSCApc+ggGFRQKENkMUAQEBAQEBAQEBA2gohSUBBAF5BQsLDScSFBgxijw?= =?us-ascii?q?IsF8hAooXAQEBAQYCASWEIIIVgz+DLoRjhjcFkiWBFJAll1WGGYNeKIdTimCNc?= =?us-ascii?q?zYjgVAyGggwgmiEdCOIXyuCIAEBAQ?= X-IPAS-Result: =?us-ascii?q?A2HSOwDB7VNa/yyKSC1dHgEGDIM/gVqJSYR6jnSCApc+ggG?= =?us-ascii?q?FRQKENkMUAQEBAQEBAQEBA2gohSUBBAF5BQsLDScSFBgxijwIsF8hAooXAQEBA?= =?us-ascii?q?QYCASWEIIIVgz+DLoRjhjcFkiWBFJAll1WGGYNeKIdTimCNczYjgVAyGggwgmi?= =?us-ascii?q?EdCOIXyuCIAEBAQ?= X-IronPort-AV: E=Sophos;i="5.46,332,1511845200"; d="scan'208";a="17130900" Original-Received: from unknown (HELO pastel.home) ([45.72.138.44]) by smtp.teksavvy.com with ESMTP; 08 Jan 2018 17:18:24 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id F1B746080A; Mon, 8 Jan 2018 17:18:23 -0500 (EST) In-Reply-To: <5A53B5E1.5080608@gmx.at> (martin rudalics's message of "Mon, 08 Jan 2018 19:18:09 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.36 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:221733 Archived-At: > `quit-restore-window' remembers what buffer the window it quits > displayed before calling `with-temp-buffer-window' and also the > respective `window-start' and `window-point' positions, sometimes also > the window's size. So it also remembers if the previous buffer was the same buffer? Sounds like it would do the job, then. Except that with-temp-buffer-window starts by erasing the buffer, whereas here the buffer is already ready to be displayed (it's a file buffer). >>> So please tell what's missing in `with-temp-buffer-window'. >> It forces scoping. > Where and how? I guess I was confused by the `with` in the name. > IIUC your > > (let ((x (temporary-display-buffer BUF))) > > + > > (temporary-undisplay-buffer x) > > would force scoping No: the `x` could be stored anywhere you like. > but `quit-restore-window' doesn't rely on any scoping. Good. So we just need to extract the "display-buffer" part of with-temp-buffer-window? Stefan