emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Refile: refile to any open file.


From: Kyle Meyer
Subject: Re: [O] Refile: refile to any open file.
Date: Thu, 14 Aug 2014 00:45:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nick Dokos <address@hidden> wrote:
> address@hidden (Jorge A. Alfaro-Murillo) writes:
[...]
>> Perhaps you should return instead only the org mode files that are
>> opened, something like this:
>>
>
> Excellent idea: refiling to an arbitrary non-org-mode file will either
> skip the file (if you are lucky, in which case you just pay a
> performance penalty) or it will try to use it in which case you'll end
> up with an error. There is no point in including arbitrary files into
> the refile list.
[...]
> It might be better to check the major mode of the buffer, rather than
> its filename: it is not necessarily true that foo.org is an org-mode
> file, or foo.txt is not.

There's a built-in Org function that does this.

#+begin_src elisp
  (org-buffer-list 'files)  
#+end_src    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]