From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Copy Drawer Parameter Value Date: Fri, 23 May 2014 22:48:48 +0800 Message-ID: <87vbswlfe7.fsf@ericabrahamsen.net> References: <87a9a8vddt.fsf@quasar.esben-stien.name> <87ppj47hds.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnqjl-0005Lz-Bd for emacs-orgmode@gnu.org; Fri, 23 May 2014 10:46:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wnqjf-0000yg-Gm for emacs-orgmode@gnu.org; Fri, 23 May 2014 10:46:21 -0400 Received: from plane.gmane.org ([80.91.229.3]:38605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnqjf-0000yb-Ag for emacs-orgmode@gnu.org; Fri, 23 May 2014 10:46:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wnqjc-00044x-M3 for emacs-orgmode@gnu.org; Fri, 23 May 2014 16:46:12 +0200 Received: from 50.56.99.223 ([50.56.99.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 May 2014 16:46:12 +0200 Received: from eric by 50.56.99.223 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 May 2014 16:46:12 +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 Bastien writes: > Esben Stien writes: > >> Are there any functions that copies the value of a parameter in drawers, >> like: >> >> :PROPERTIES: >> :FOO: bar >> :END: >> >> With mark over the line with :FOO:, is there a function that just >> copies "bar"? > > Nope. I've wanted this for a bit. (defun org-property-value-save (&optional prop) (interactive) (let* ((props (org-entry-properties)) (prop (or prop (when (org-at-property-p) (org-match-string-no-properties 2)) (org-completing-read "Get property: " props t))) (val (org-entry-get-with-inheritance prop))) (if val (progn (kill-new val) (message "Saved: %s" val)) (message "No valid value for %s" prop))))