From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Refile: refile to any open file. Date: Thu, 14 Aug 2014 00:45:22 -0400 Message-ID: <87iolvhe71.fsf@kmlap.domain.org> References: <83r4xis8ah.fsf@gmail.com> <87zjf8hym9.fsf@yale.edu> <87r40jg1xu.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHmtt-0004xC-22 for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 00:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHmto-0002wQ-Au for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 00:44:32 -0400 Received: from mail-qa0-f47.google.com ([209.85.216.47]:62056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHmto-0002wM-7n for emacs-orgmode@gnu.org; Thu, 14 Aug 2014 00:44:28 -0400 Received: by mail-qa0-f47.google.com with SMTP id i13so579062qae.34 for ; Wed, 13 Aug 2014 21:44:27 -0700 (PDT) Received: from localhost ([2601:6:5480:1e5:9e4e:36ff:fe3d:ae9c]) by mx.google.com with ESMTPSA id s13sm4344953qga.40.2014.08.13.21.44.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Aug 2014 21:44:26 -0700 (PDT) In-Reply-To: <87r40jg1xu.fsf@pierrot.dokosmarshall.org> (Nick Dokos's message of "Wed, 13 Aug 2014 23:55:25 -0400") 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 Nick Dokos wrote: > jorge.alfaro-murillo@yale.edu (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