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 08:15:18 -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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515417248 27446 195.159.176.226 (8 Jan 2018 13:14:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 13:14:08 +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 14:14:04 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 1eYXFZ-0006gO-LG for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 14:14:01 +0100 Original-Received: from localhost ([::1]:33957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYXHZ-0005vL-2P for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 08:16:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYXGv-0005uo-0p for emacs-devel@gnu.org; Mon, 08 Jan 2018 08:15:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYXGq-0006X0-Lr for emacs-devel@gnu.org; Mon, 08 Jan 2018 08:15:24 -0500 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:31298) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYXGq-0006Vi-F7 for emacs-devel@gnu.org; Mon, 08 Jan 2018 08:15:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2HVOQBOblNa/yyKSC1eHQEBBQELAYM/g?= =?us-ascii?q?VqJSYR6jnGCApc+ggGFRQKEMkMUAQEBAQEBAQEBA2gohSUBBAFnEgULCw0nEhQ?= =?us-ascii?q?YMYo8CLN7IQKKDQEBAQEGAgElhCCCFYM/gy6EY4Y3BZM5kCWLfItZhhmDXiiHU?= =?us-ascii?q?4pgjXM2I4FQMhoIMIJohHQjiFQrgiABAQE?= X-IPAS-Result: =?us-ascii?q?A2HVOQBOblNa/yyKSC1eHQEBBQELAYM/gVqJSYR6jnGCApc?= =?us-ascii?q?+ggGFRQKEMkMUAQEBAQEBAQEBA2gohSUBBAFnEgULCw0nEhQYMYo8CLN7IQKKD?= =?us-ascii?q?QEBAQEGAgElhCCCFYM/gy6EY4Y3BZM5kCWLfItZhhmDXiiHU4pgjXM2I4FQMho?= =?us-ascii?q?IMIJohHQjiFQrgiABAQE?= X-IronPort-AV: E=Sophos;i="5.46,330,1511845200"; d="scan'208";a="17627429" Original-Received: from unknown (HELO pastel.home) ([45.72.138.44]) by smtp.teksavvy.com with ESMTP; 08 Jan 2018 08:15:18 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id B587A60732; Mon, 8 Jan 2018 08:15:18 -0500 (EST) In-Reply-To: <5A533F7D.4090505@gmx.at> (martin rudalics's message of "Mon, 08 Jan 2018 10:53:01 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.34 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:221708 Archived-At: >> But this is a fairly normal/common need: display a buffer temporarily. >> So we should have a "canned" answer. >> I'm thinking of something like >> >> (let ((x (temporary-display-buffer BUF))) > > What kind of object would "x" be? The kind of object that carries the necessary information from temporary-display-buffer to temporary-undisplay-buffer so that they together DTRT. >> (temporary-undisplay-buffer x) >> where hopefully this would handle the case where >> temporary-display-buffer needs to use a separate frame, as well as the >> case where BUF is already displayed somewhere. > If "x" is a window, then `quit-restore-window' should know how to deal > with it. If `x` is just a window, how does quit-restore-window know that we want to hide BUF (and not some other buffer that happens to be displayed in the window once we get to quit-restore-window)? If `x` is just a window, how does quit-restore-window know whether BUF was already displayed in that window before temporary-undisplay-buffer was called (in order to decide whether to change the window's buffer or not)? > So please tell what's missing in `with-temp-buffer-window'. It forces scoping. IOW it can't be used when the temporary-undisplay-buffer part needs to be done at some arbitrary later time (e.g. after the user has run a bunch of commands). Stefan