|
From: | Jorge A. Alfaro-Murillo |
Subject: | Re: [O] Refile: refile to any open file. |
Date: | Wed, 13 Aug 2014 17:24:14 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Similar to this previous post, I am trying to file orgmode items to files/buffers currently opened. Being elisp rookie, I tried and came up with the following: (defun opened-buffer-files () "Return the list of files currently opened in emacs" (delq nil (mapcar (function buffer-file-name) (buffer-list))) )
Perhaps you should return instead only the org mode files that are opened, something like this:
#+BEGIN_SRC emacs-lisp (delq nil (mapcar (lambda (x) (if (and (buffer-file-name x) (string-match "\\.org$" (buffer-file-name x))) (buffer-file-name x))) (buffer-list))) #+END_SRC
Best, -- Jorge.
[Prev in Thread] | Current Thread | [Next in Thread] |