Sebastien Vauban <wxhgmqzgw...@spammotel.com> 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