From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hugo Schmitt" Subject: org remember anything Date: Fri, 25 Jan 2008 12:42:43 -0300 Message-ID: <2f1c7d020801250742m6e92ae15k3400bb973c3a184d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0124860420==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIQha-00020B-0p for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:42:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIQhZ-0001zf-Fw for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:42:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIQhY-0001zW-Ty for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:42:45 -0500 Received: from ro-out-1112.google.com ([72.14.202.176]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIQhY-0005AU-Qu for emacs-orgmode@gnu.org; Fri, 25 Jan 2008 10:42:45 -0500 Received: by ro-out-1112.google.com with SMTP id k4so777062rog.6 for ; Fri, 25 Jan 2008 07:42:43 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0124860420== Content-Type: multipart/alternative; boundary="----=_Part_36556_7027168.1201275763451" ------=_Part_36556_7027168.1201275763451 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi. So, just wrote this and maybe there are others users of Anything.el around: Just update your anything-sources variable to include anything-org-remember. Maybe this will get more useful for people that have 10+ templates and not enough meaninful keys. - Hugo Ps: if there is a better way of achieving `list-of-fst` please tell me. I find it a little odd... --- (defun list-of-nth (list pos) (mapcar (lambda (x) (nth pos x)) list)) (defun list-of-fst (list) (list-of-nth list 0)) (setq anything-org-remember '((name . "Org Remember") (candidates . (lambda () (list-of-fst org-remember-templates))) (action . (lambda (name) (let* ((orig-template org-remember-templates) (org-remember-templates (list (assoc name orig-template)))) (call-interactively 'org-remember)))))) ------=_Part_36556_7027168.1201275763451 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi.
So, just wrote this and maybe there are others users of Anything.el around:
Just update your anything-sources variable to include anything-org-remember.

Maybe this will get more useful for people that have 10+ templates and not enough meaninful keys.

- Hugo

Ps: if there is a better way of achieving `list-of-fst` please tell me. I find it a little odd...

---
(defun list-of-nth (list pos)
  (mapcar (lambda (x) (nth pos x)) list))

(defun list-of-fst (list) (list-of-nth list 0))

(setq anything-org-remember
      '((name . "Org Remember")
        (candidates . (lambda () (list-of-fst org-remember-templates)))
        (action . (lambda (name)
                    (let* ((orig-template org-remember-templates)
                           (org-remember-templates
                            (list (assoc name orig-template))))
                      (call-interactively 'org-remember))))))


------=_Part_36556_7027168.1201275763451-- --===============0124860420== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0124860420==--