From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-icalendar--combine-files aggressively releases buffers Date: Thu, 31 Aug 2017 16:00:09 +0200 Message-ID: <871snr6dna.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnQ15-0005cw-CB for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:00:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnQ0z-0007vj-GL for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:00:19 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:35397) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnQ0z-0007vU-AX for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:00:13 -0400 In-Reply-To: (=?utf-8?Q?=22Micha=C3=ABl?= Cadilhac"'s message of "Thu, 31 Aug 2017 14:33:11 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?utf-8?Q?Micha=C3=ABl?= Cadilhac Cc: emacs-orgmode@gnu.org Hello, Micha=C3=ABl Cadilhac writes: > I have an idle timer that uses org-icalendar-combine-agenda-files to > publish my agenda. It may well be that I hadn't saved one of the Org > files used in there, hence when org-icalendar--combine-files uses : > > (org-release-buffers org-agenda-new-buffers) > > =E2=80=A6I'm prompted to save before closing some buffers. Worst, I'm ev= en > asked to clock-out if I actually say yes to that question. > > Personally, I now expect org to leave quite a lot of .org files open > (namely, my inbox, my todo file, my 3 gmail agendas), so I'd be fine > with simply not having any of these closed for me. The right thing to > do, however, is probably to check org-agenda-new-buffers before and > after the files are processed, and close the new ones. > > Opinions? After a cursory look I think we should: 1. Remove (org-agenda-prepare-buffers files), which doesn't seem to be useful and can lead to errors (it can throw `nextfile') but nothing catches it. 2. let-bind `org-agenda-new-buffers' to nil around the unwind protect. I pushed it in master branch. Does it solve your issue? Regards, --=20 Nicolas Goaziou