From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian van den Broek Subject: {Feature Request] Have org-capture-refile treat the buffer from which org-capture was called as current buffer Date: Thu, 2 Feb 2012 02:00:57 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsk7P-000320-76 for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 19:01:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rsk7N-000648-UY for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 19:01:39 -0500 Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:54849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rsk7N-000643-QA for emacs-orgmode@gnu.org; Wed, 01 Feb 2012 19:01:37 -0500 Received: by obbta7 with SMTP id ta7so2554412obb.0 for ; Wed, 01 Feb 2012 16:01:37 -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: emacs-orgmode Hi all, My org-refile-targets definition includes ((nil :maxlevel . 5) (org-agenda-files :maxlevel . 10) ;; snip irrelevant details ) The list starting with nil works fine to allow me to refile items from within an org file being visited to that same file irrespective of whether that file appears elsewhere in the org-refile-targets definition and that is indeed useful. However, most of the time I am wanting to refile to an occasional use (thus, not in org-refile-targets) org file, the desire arises when I am working in that file and want to use org-capture to get an item with one of my capture templates' boilerplate materials included. From within the org-capture buffer, org-capture-refile doesn't offer the buffer from which org-capture was invoked as a target (unless, of course, it is visiting a file otherwise specified in org-refile-targets). That behaviour is completely in keeping with org-refile-targets' docstring: "Nil means consider headings in the current buffer." After all, once org-capture has been invoked, the capture-buffer is the current buffer. What I would like is for nil in org-refile-targets to mean is "consider headings in the current buffer unless that buffer is a capture buffer, in which case consider headings in the buffer from which org-capture was invoked". (Actually, what I would really like is for someone to point out that this is already possible and to forgive my failure to find out how on my own ;-) Thanks and best, Brian vdB