From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: org-depend improvements: ID picker Date: Sun, 18 Dec 2016 09:49:56 -0800 Message-ID: <87r355160r.fsf@ericabrahamsen.net> References: <2016-08-25T14-36-57@devnull.Karl-Voit.at> <877fb429j4.fsf@saiph.selenimh> <2016-08-25T17-05-15@devnull.Karl-Voit.at> <87mvg2t8g0.fsf@artlab.createcnix.lan> <2016-12-12T12-38-45@devnull.Karl-Voit.at> <2016-12-12T15-59-38@devnull.Karl-Voit.at> <2016-12-18T13-03-17@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIfbA-0001yc-Oh for emacs-orgmode@gnu.org; Sun, 18 Dec 2016 12:50:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIfb6-0001Aj-Fz for emacs-orgmode@gnu.org; Sun, 18 Dec 2016 12:50:12 -0500 Received: from [195.159.176.226] (port=36783 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cIfb6-00018b-94 for emacs-orgmode@gnu.org; Sun, 18 Dec 2016 12:50:08 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cIfaz-0004dO-71 for emacs-orgmode@gnu.org; Sun, 18 Dec 2016 18:50:01 +0100 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: emacs-orgmode@gnu.org Karl Voit writes: > * Karl Voit wrote: >> * Carsten Dominik wrote: >> >>> Since ord-depend was only proof of concept, we could also think a bit more >>> broadly about what it should be able to do. Is there specific >>> functionality it also should support, besides the TRIGGER/BLOCKER functions >>> it has right now? [...] > 1 Improvement: ID Picker > ======================== > > First of all, I'd like to see some kind of ID picker when defining > `:TRIGGER:' and `:BLOCKER:' dependencies. > > This should work like this: after setting up the task in headings and > giving them IDs, I'd like to invoke a "I want to define a > dependency"-command. It first asks me what property I want to set: > `:TRIGGER:' or `:BLOCKER:'. > > Then I get asked to select any ID which could be found within the same > sub-hierarchy (or even in all files?). > > After being asked for the KEYWORD to be set for `:TRIGGER:' > dependencies (if applicable), the property is added to the current > heading accordingly. > > This would drastically improve creating dependency definitions and > prevent typing errors in the first place. I like this a lot, for more uses than just org-depend, and it would be very easy to implement. We've got `org-property-set-functions-alist' for using special functions to read the values of special properties, and we've got `org-id-get-with-outline-(drilling|path-completion), so it's pretty much already done! (defun my-trigger-property-prompt () (when (derived-mode-p 'org-mode) (let ((id (org-id-get-with-outline-drilling)) (kw (org-completing-read "Keyword: " org-todo-keywords-1))) (do-something-with-id-and-kw)))) (push '("TRIGGER" . my-trigger-property-prompt) org-property-set-functions-alist) I don't actually know how the TRIGGER property is meant to be formatted (and I didn't really test the above), but something very near to the above should do what you want. Eric