From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: capture inside org-edit-src-code buffer Date: Wed, 11 Jan 2012 21:28:49 +0100 Message-ID: <87d3aqm1a6.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl4nG-00005b-Q3 for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 15:29:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rl4nF-0008Db-O3 for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 15:29:10 -0500 Received: from lo.gmane.org ([80.91.229.12]:50496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rl4nF-0008Aw-IK for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 15:29:09 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rl4nE-0006L2-4E for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 21:29:08 +0100 Received: from vpn-2187.gwdg.de ([134.76.2.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jan 2012 21:29:08 +0100 Received: from andreas.leha by vpn-2187.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jan 2012 21:29:08 +0100 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 Hi all, I'd like to be able to call capture such that the captured item is stored under '* Notes' in the current org-file *from inside an org-edit-src-code buffer*. Preferably, I'd like a single capture template, that works (1) on the current org file normally (2) on the "parent org file" after doing C-' on a source block A possible capture template for (1) looks like this: ("w" "currentfile" entry (file+headline (buffer-file-name) "Notes") "") How would I extend this to (2)? Optimally, this template would record the #+name tag of the source block under the point (if the point is in a source block) in (1) or the source block being edited in (2), if such #name tag exists. Thanks for hints, Andreas