From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [PATCHv4 1/4] `kill-buffer' runs query functions before checking buffer modification. Date: Mon, 24 Jun 2013 22:57:19 +0200 Message-ID: <51C8B2AF.2090409@gmx.at> References: <1c8f2cfbb1b7a321184c6d840763f1c60bbfc95b.1372076606.git.mina86@mina86.com> <51C87C47.4090300@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372107561 13275 80.91.229.3 (24 Jun 2013 20:59:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Jun 2013 20:59:21 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Michal Nazarewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 24 22:59:21 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrDr2-0007Eb-Pn for ged-emacs-devel@m.gmane.org; Mon, 24 Jun 2013 22:59:16 +0200 Original-Received: from localhost ([::1]:38054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDr2-0005oo-Fj for ged-emacs-devel@m.gmane.org; Mon, 24 Jun 2013 16:59:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDpL-0002z4-Nw for emacs-devel@gnu.org; Mon, 24 Jun 2013 16:57:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrDpK-0002Jw-GB for emacs-devel@gnu.org; Mon, 24 Jun 2013 16:57:31 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDpJ-0002Ja-Pr for emacs-devel@gnu.org; Mon, 24 Jun 2013 16:57:30 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.10]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MC6gQ-1UzzFg3JWi-008oUG for ; Mon, 24 Jun 2013 22:57:28 +0200 Original-Received: (qmail invoked by alias); 24 Jun 2013 20:57:28 -0000 Original-Received: from 62-47-57-35.adsl.highway.telekom.at (EHLO [62.47.57.35]) [62.47.57.35] by mail.gmx.net (mp010) with SMTP; 24 Jun 2013 22:57:28 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18BgYwz96MBIQaKB1wE8bagCMAXxWxmcGjtzCKlJJ SL2yumAGzzKPoU In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160986 Archived-At: >> We probably should guard against the case that the query functions >> manage to kill the buffer prematurely. > > Except this would exactly defeat the purposes of this change. Unless > I don't understand what you mean by =E2=80=9Cprematurely=E2=80=9D. I'= m assuming you > want to prevent a function from doing: > > (set-buffer-modified-p nil) > (let (kill-buffer-query-functions) > (kill-buffer (current-buffer))) > > or just that part without let. But (set-buffer-modified-p nil) is > exactly what remember-notes--kill-buffer-query wants to do (admittedly= > saving the contents prior). Sure. What I meant is that `kill-buffer' should return immediately when the buffer is dead after calling the query functions instead of entering the do_yes_or_no_p stuff with a dead buffer. Or did I miss something? martin