all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Adrian Bradd <adrian.bradd@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks
Date: Fri, 28 Jul 2017 15:48:01 +0200	[thread overview]
Message-ID: <87o9s4u0z2.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAMYmr8ytWW3KdGKoQO1z5h6dxCPT+J0Kq51hu+gsvtiqTuweXw@mail.gmail.com> (Adrian Bradd's message of "Thu, 27 Jul 2017 22:12:01 -0400")

Hello,

Adrian Bradd <adrian.bradd@gmail.com> 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 <adrian.bradd@gmail.com>
> 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	other threads:[~2017-07-28 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28  2:12 [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks Adrian Bradd
2017-07-28 13:48 ` Nicolas Goaziou [this message]
2017-07-29 23:12   ` Adrian Bradd
2017-08-01  8:34     ` Nicolas Goaziou

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9s4u0z2.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=adrian.bradd@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.