[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Copy Drawer Parameter Value

From: Eric Abrahamsen
Subject: Re: [O] Copy Drawer Parameter Value
Date: Fri, 23 May 2014 22:48:48 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Bastien <address@hidden> writes:

> Esben Stien <address@hidden> writes:
>> Are there any functions that copies the value of a parameter in drawers,
>> like: 
>> :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)
  (let* ((props (org-entry-properties))
         (prop (or prop
                   (when (org-at-property-p)
                     (org-match-string-no-properties 2))
                    "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))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]