From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Huchler Subject: Re: backend for todo.txt format (todotxt.com) Date: Tue, 19 Jan 2016 07:15:19 +0100 Message-ID: <87oaciksco.fsf@jupiter.lan> References: <8760ytwb1i.fsf@jupiter.lan> <87y4bmktgp.fsf@jupiter.lan> <87h9ia155k.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLPZp-00089n-2e for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 01:15:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLPZl-0000MY-Ro for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 01:15:37 -0500 Received: from plane.gmane.org ([80.91.229.3]:47400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLPZl-0000M6-Lt for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 01:15:33 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aLPZk-0004Uh-Fs for emacs-orgmode@gnu.org; Tue, 19 Jan 2016 07:15:32 +0100 Received: from hsi-kbw-149-172-254-111.hsi13.kabel-badenwuerttemberg.de ([149.172.254.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jan 2016 07:15:32 +0100 Received: from stefan.huchler by hsi-kbw-149-172-254-111.hsi13.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jan 2016 07:15:32 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Kyle Meyer writes: > if-let has been define in Emacs's subr-x.el since c08f8be (New if-let, > when-let, thread-first and thread-last macros., 2014-06-30). is it then that your code will not run if you dont use this autohook thing? or do I have to be in a orgfile that it works? (load "~/git/org-todotxt/org-todotxt.el") (defun spiderbit/org-todotxt-auto-push-all-agendas () (interactive) ;; Sync in new tasks from this file and then push out (org-todotxt-sync "~/notes/test-todo.txt") ;; Just push out to this file, overwriting whatever was there every time. (org-todotxt-push "~/notes/test-todo.txt") (org-todotxt-pull "~/notes/test-todo.txt")) ;; Check the docstrings for these variables (setq org-todotxt-auto-push-function 'spiderbit/org-todotxt-auto-push-all-agendas org-todotxt-auto-push-delay 1 org-todotxt-auto-push-file-list '("~/notes/organizer.org") org-todotxt-inbox-for-pull "~/notes/inbox.org") ;; ;; Use settings above and install an auto-push hook ;; (org-todotxt-install-after-save-hook) thats my code, organizer is a file from me where I have most of my todos, the rest of the files I created as empty files now, because I was not shure if that was the problem. get errors like that: spiderbit/org-todotxt-auto-push-all-agendas call-interactively: Wrong number of arguments: (lambda (todotxt-file) "Pulls in any new tasks from TODOTXT-FILE into `org-todotxt-inbox-for-pull' and then overwrite it with the result of `org-todotxt-create-agenda-function'. New tasks are defined as any task without an org-id marker." (interactive) (if org-todotxt-inbox-for-pull nil (error "Define the Org file where new tasks should be pulled into in `org-todotxt-inbox-for-pull")) (org-todotxt-pull todotxt-file) (org-todotxt-push todotxt-file)), 0