From: Nick Dokos <nicholas.dokos@hp.com>
To: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?
Date: Mon, 04 Jun 2012 12:13:06 -0400 [thread overview]
Message-ID: <26575.1338826386@alphaville> (raw)
In-Reply-To: Message from "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> of "Mon, 04 Jun 2012 16:34:51 +0200." <80sjebkuwk.fsf@somewhere.org>
Sebastien Vauban <wxhgmqzgwmuf@spammotel.com> wrote:
> (progn (debug) (message "non-existent agenda file %s. [R]emove from list =
> or [A]bort?" (abbreviate-file-name file)) (let ((r (downcase (read-char-exc=
> lusive)))) (cond ((equal r 114) (org-remove-file file) (throw (quote nextfi=
> le) t)) (t (error "Abort")))))
> (if (not (file-exists-p file)) (progn (debug) (message "non-existent agen=
> da file %s. [R]emove from list or [A]bort?" (abbreviate-file-name file)) (l=
> et ((r (downcase (read-char-exclusive)))) (cond ((equal r 114) (org-remove-=
> file file) (throw (quote nextfile) t)) (t (error "Abort"))))))
> (when (not (file-exists-p file)) (debug) (message "non-existent agenda fi=
> le %s. [R]emove from list or [A]bort?" (abbreviate-file-name file)) (let ((=
> r (downcase (read-char-exclusive)))) (cond ((equal r 114) (org-remove-file =
> file) (throw (quote nextfile) t)) (t (error "Abort")))))
> org-check-agenda-file("c:/home/sva/Projects/ttttttttttttttt.txt")
> ...
> org-prepare-agenda-buffers(("c:/home/sva/Projects/ttttttttttttttt.txt"))
> ...
> org-map-entries((lambda nil (let ((alltags (split-string (or (org-entry-get (point) "ALLTAGS") "") ":")) local inherited tag) (dolist (tag alltags) (if (get-text-property 0 (quote inherited) tag) (push tag inherited) (push tag local))) (dolist (tag local) (if (member tag inherited) (org-toggle-tag tag (quote off)))))) t nil)
> ...
> my/org-remove-redundant-tags()
> (progn (my/org-remove-redundant-tags) (org-align-all-tags) (org-update-al=
> l-dblocks) (org-table-iterate-buffer-tables))
> (if (eq major-mode (quote org-mode)) (progn (my/org-remove-redundant-tags=
> ) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-t=
> ables)))
> (when (eq major-mode (quote org-mode)) (my/org-remove-redundant-tags) (or=
> g-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-tables=
> ))
> (lambda nil (when (eq major-mode (quote org-mode)) (my/org-remove-redunda=
> nt-tags) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-b=
> uffer-tables)))()
> run-hooks(before-save-hook)
> basic-save-buffer()
> save-buffer(1)
> call-interactively(save-buffer nil nil)
>
org-map-entries calls org-prepare-agenda-buffers like this:
(org-prepare-agenda-buffers
(list (buffer-file-name (current-buffer))))
In turn, this calls org-check-agenda-file() and if the current buffer
has not been written out yet, this pops the question.
So there is a chicken-and-egg problem here, because you added the
function to the before-save hook. Not sure how to resolve it though.
Nick
next prev parent reply other threads:[~2012-06-04 16:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 11:52 non-existent agenda file ~/file.txt. [R]emove from list or [A]bort? Sebastien Vauban
2012-05-21 13:26 ` Bastien
2012-05-21 15:28 ` François Pinard
2012-05-21 15:43 ` Nick Dokos
2012-05-21 16:05 ` Nick Dokos
2012-06-04 12:58 ` Sebastien Vauban
2012-06-04 13:35 ` Nick Dokos
2012-06-04 14:29 ` Sylvain Rousseau
2012-06-04 14:34 ` Sebastien Vauban
2012-06-04 16:13 ` Nick Dokos [this message]
2012-06-04 16:45 ` Sebastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26575.1338826386@alphaville \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=wxhgmqzgwmuf@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).