From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Custom todo-like thing in agenda? Date: Sat, 16 Aug 2014 04:15:25 +0200 Message-ID: <20140816041525.540bbb3a@aga-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XITWs-00089A-IT for emacs-orgmode@gnu.org; Fri, 15 Aug 2014 22:15:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XITWm-0003l6-EJ for emacs-orgmode@gnu.org; Fri, 15 Aug 2014 22:15:38 -0400 Received: from msg.wmi.amu.edu.pl ([150.254.78.50]:39211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XITWl-0003ky-Tn for emacs-orgmode@gnu.org; Fri, 15 Aug 2014 22:15:32 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 3DD4D69BFE for ; Sat, 16 Aug 2014 04:15:27 +0200 (CEST) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XhPnH95xGm8a for ; Sat, 16 Aug 2014 04:15:27 +0200 (CEST) Received: from aga-netbook (unknown [185.13.171.31]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 20626400BC for ; Sat, 16 Aug 2014 04:15:27 +0200 (CEST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode mailing list Hi all, I was wondering whether something like this is possible. (Well, I'm pretty sure it is, what I don't know whether I'm competent enough to pull it off...) I'd like to be able to create a special agenda view (or block in a "normal" agenda, this shouldn't make much difference, since I may use block agenda instead of the usual C-c a a), in which the lines would behave much like TODOs, with the exception that their source would not be an Org file, but something else. In my case, it would be a web todo-like service, with the possibility of extracting info (like the deadline and such) using some command-line curl invocation. Then, I could (rather easily, I guess) write some Elisp to parse this info, and (here the hard part - at least for me - begins) somehow insert it in the agenda buffer. Of course, I could also just generate an "intermediate", temporary org file, using curl -> parsing -> buffer -> save and include it in the agenda. This would most probably speed up the process of generating the agenda (which is a plus). However, I'd like another functionality: I'd like to have the `t' command to send some information to the web service I'm using. Where should I start? Is there anything even remotely similar to what I'm trying to achieve so that I could analyze its source, for instance? Is the "intermediate org file" idea a reasonable one (the more I think about it, the more I like it)? If I decide to go the "intermediate-file" way, where could I hook into the agenda generation, so that it is e.g. created only once each day (to save time) or on explicit demand (this part is easy, I guess - just some command to create it and a key in org-agenda-mode-map...)? Should I advise org-agenda or is there some hook run *before* agenda generation? Should I advise org-todo? (Just looking at its source made my head spin...) Should I use some hooks for the todo behavior I described? (I found org-trigger-hook and org-after-todo-state-change-hook; frankly, I don't really get why both are there... Sorry for being a bit vague - this is still a concept in a preliminary stage, and it's 4:07 am here;)... Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University