From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: non-existent agenda file ~/file.txt. [R]emove from list or [A]bort? Date: Mon, 04 Jun 2012 09:35:54 -0400 Message-ID: <24826.1338816954@alphaville> References: <804nr9sqcz.fsf@somewhere.org> <80lik3nsim.fsf@somewhere.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbXS0-000707-TD for emacs-orgmode@gnu.org; Mon, 04 Jun 2012 09:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbXRw-0000aK-2H for emacs-orgmode@gnu.org; Mon, 04 Jun 2012 09:36:04 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:34997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbXRv-0000Zb-Ry for emacs-orgmode@gnu.org; Mon, 04 Jun 2012 09:35:59 -0400 In-Reply-To: Message from "Sebastien Vauban" of "Mon, 04 Jun 2012 14:58:09 +0200." <80lik3nsim.fsf@somewhere.org> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org Sebastien Vauban wrote: > Hello, > > Thanks a lot Nick, Fran=C3=A7ois, Bastien... and Carsten who put me on right > tracks... > > "Sebastien Vauban" wrote: > > These last days, I've observed that, whenever creating a new Org file (to= > be > > precise, when saving it), I'm asked: > > > > non-existent agenda file ~/file.txt. [R]emove from list or [A]bort? > > > > I'm then forced to answer `R' for the save to be done. > > I found the responsible: the call to `dmj/org-remove-redundant-tags'[1] in = > the > `before-save-hook': > > #+begin_src emacs-lisp > ;; make sure that things are clean and always up-to-date > (add-hook 'before-save-hook > '(lambda () > (when (eq major-mode 'org-mode) > (dmj/org-remove-redundant-tags) > (org-align-all-tags) > (org-update-all-dblocks) > (org-table-iterate-buffer-tables) > ))) > #+end_src > > Without it, the above problem disappears. > > Any idea on how to get that work done (i.e., removing redundant tags when > saving the file), without bringing the problem back to the scene? > Did you get a backtrace? I don't think you posted one here. I looked at the function you fingered and there is nothing in there to raise my hackles (but maybe I'm blind: it wouldn't be the first time). A backtrace would be *much* more useful imo. Nick