From mboxrd@z Thu Jan 1 00:00:00 1970 From: lngndvs@gmail.com Subject: Refile: refile to any open file. Date: Sat, 25 Feb 2012 17:16:54 -0800 Message-ID: <83r4xis8ah.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1Sja-0008Gq-8Y for emacs-orgmode@gnu.org; Sat, 25 Feb 2012 20:17:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1SjT-0002RF-B4 for emacs-orgmode@gnu.org; Sat, 25 Feb 2012 20:17:06 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:47576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1SjT-0002R0-41 for emacs-orgmode@gnu.org; Sat, 25 Feb 2012 20:16:59 -0500 Received: by dadv6 with SMTP id v6so4001259dad.0 for ; Sat, 25 Feb 2012 17:16:57 -0800 (PST) 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: org-mode It occurs from time to time that I wish to refile to an open file, that is not one of my org-refile-targets. It doesn't make sense to use org-agenda-files for refile targets since I might have other files open for various reasons. So I thought, why not either declare that any open file is a refile target, or else write a function that will execture org-refile with org-refile-targets set to include all open files. In truth, it would be even better to include org-agenda-files in the set of target files. I have been using the function oog in org-occur-goto.el to search any open file, so somewhere in that file is a way to find open files. What remains is to use some condition from this file to declare org-refile-targets. I understand that a function can be used as a value of this variable. I could spend all night working on this, or, ask on this list. Can anyone point to a good way to declare that BOTH all open buffers/files AND org-agenda-files as org-refile-targets? A hint would help. Alan Davis