From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-depend: multi-file TRIGGER and BLOCKER tasks Date: Fri, 28 Jul 2017 15:48:01 +0200 Message-ID: <87o9s4u0z2.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db5ce-0005pg-ES for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 09:48:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db5cZ-0003rQ-Ov for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 09:48:08 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:35223) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db5cZ-0003qb-Im for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 09:48:03 -0400 In-Reply-To: (Adrian Bradd's message of "Thu, 27 Jul 2017 22:12:01 -0400") 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" To: Adrian Bradd Cc: emacs-orgmode@gnu.org Hello, Adrian Bradd 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 > 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