emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks
Date: Fri, 28 Jul 2017 15:48:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Adrian Bradd <address@hidden> writes:

> Adds multi-file TRIGGER and BLOCKER tasks to org-depend by first searching
> the current file `org-find-entry-with-id` and then all files visisble
> through `org-find-id`.
> From d4095a57f1c9c42426d8c0d51ca7f4640f036a3a Mon Sep 17 00:00:00 2001
> From: Adrian Bradd <address@hidden>
> Date: Thu, 13 Jul 2017 22:49:26 -0400
> Subject: [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks

Thank you.

You need to list the functions modified in the commit message:

    lisp/contrib/org-depend.el (...function...): ....

>      (catch 'return
>        (unless (eq type 'todo-state-change)
>       ;; We are only handling todo-state-change....
> @@ -336,11 +336,18 @@ This does two different kinds of triggers:
>         (setq id (match-string 1 tr)
>               kwd (match-string 2 tr)
>               p1 (org-find-entry-with-id id))
> -       (when p1
> +       ;; first check current buffer, then all files
> +       (if p1
>           ;; there is an entry with this ID, mark it TODO
>           (save-excursion
>             (goto-char p1)
> -           (org-todo kwd))))
> +           (org-todo kwd))
> +         (when (setq p2 (org-id-find id))
> +           (save-excursion
> +             (save-window-excursion
> +               (find-file (car p2))

I suggest to use 

  (with-current-buffer (find-file-noselect (car p2))
   ...)

Then, `save-window-excursion' is not necessary.

> +            ((setq p2 (org-id-find bl))
> +             (save-excursion
> +               (save-window-excursion
> +                 (find-file (car p2))

Ditto.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]