emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [the culprit]


From: Uwe Brauer
Subject: Re: [the culprit]
Date: Wed, 27 Apr 2022 20:49:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "JK" == John Kitchin <jkitchin@andrew.cmu.edu> writes:

> This seems like something that could (should?) go in a personal config, as
> a custom function, or advice.

> You could, for example do something like this (lightly tested)

> #+BEGIN_SRC emacs-lisp
> (defun my-put (property value here)
>   (interactive (list nil nil current-prefix-arg))
>   (if (null here)
>       (org-set-property property value)
>     (let* ((property (or property (org-read-property-name)))
>   (value (or value (org-read-property-value property))))
>       (save-excursion
> (beginning-of-line)
> (search-forward ":")
> (backward-char)
> (insert (format ":%s: %s\n" property value))))))
> #+END_SRC

I tested it, and for my org files this is slightly better:


#+BEGIN_SRC emacs-lisp
(defun my-put (property value here)
  (interactive (list nil nil current-prefix-arg))
  (if (null here)
      (org-set-property property value)
    (let* ((property (or property (org-read-property-name)))
           (value (or value (org-read-property-value property))))
      (save-excursion
        (beginning-of-line)
        (search-forward ":")
        (backward-char)
        (insert (format ":%s: %s\n" property value))
                (indent-for-tab-command nil)))))
#+END_SRC


But this might be just me. In any case I think this functionality is
very helpful.

Uwe Brauer 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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