From mboxrd@z Thu Jan 1 00:00:00 1970 From: Isaac Subject: Re: Refile: refile to any open file. Date: Wed, 13 Aug 2014 20:15:48 +0000 (UTC) Message-ID: References: <83r4xis8ah.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHey1-0005uU-Ce for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 16:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHext-0005Mj-Pw for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 16:16:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:40814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHext-0005MP-In for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 16:16:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XHexq-0000Ao-A4 for emacs-orgmode@gnu.org; Wed, 13 Aug 2014 22:16:06 +0200 Received: from fx2.mskcc.org ([140.163.254.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Aug 2014 22:16:06 +0200 Received: from isaacpei by fx2.mskcc.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Aug 2014 22:16:06 +0200 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 suvayu ali gmail.com> writes: > > On Sun, Feb 26, 2012 at 02:16, gmail.com> wrote: > > 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. > > Look at the function oog-check-input. I believe it checks buffer-list > and the major-mode for each buffer to determine whether to include it > in the search. > > GL > Dear All, 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))) ) (setq org-refile-targets (quote ((opened-buffer-files :maxlevel . 5) (org-agenda-files :maxlevel . 5)))) Not suprisingly, it's not working ... I still can not get to the opened file/orgmode files, as target for filing. Can you help point out where I did it all wrong? Simiarly, I would like to add all opened buffers to agenda files list. I would really appreciate your inputs. Thanks, Isaac