mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-02 08:22:16 +00:00
org.el (org-delete-property): Don't suggest to delete the CATEGORY property
* org.el (org-delete-property): Don't suggest to delete the CATEGORY property when the category is not explicitely set in the property drawer. Also enforce matching when completing. Thanks to Oleh for providing a preliminary patch for this.
This commit is contained in:
parent
250abf061b
commit
b28ebdf3f1
15
lisp/org.el
15
lisp/org.el
@ -15805,13 +15805,16 @@ When optional argument DELETE-EMPTY-DRAWER is a string, it defines
|
||||
an empty drawer to delete."
|
||||
(interactive
|
||||
(let* ((completion-ignore-case t)
|
||||
(prop (org-icompleting-read "Property: "
|
||||
(org-entry-properties nil 'standard))))
|
||||
(cat (org-entry-get (point) "CATEGORY"))
|
||||
(props0 (org-entry-properties nil 'standard))
|
||||
(props (if cat props0
|
||||
(delete `("CATEGORY" . ,(org-get-category)) props0)))
|
||||
(prop (if (< 1 (length props))
|
||||
(org-icompleting-read "Property: " props nil t)
|
||||
(caar props))))
|
||||
(list prop)))
|
||||
(message "Property %s %s" property
|
||||
(if (org-entry-delete nil property delete-empty-drawer)
|
||||
"deleted"
|
||||
"was not present in the entry")))
|
||||
(if (org-entry-delete nil property delete-empty-drawer)
|
||||
(message "Property %s deleted" property)))
|
||||
|
||||
(defun org-delete-property-globally (property)
|
||||
"Remove PROPERTY globally, from all entries."
|
||||
|
Loading…
Reference in New Issue
Block a user