diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d6a0f76..425be41 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2010-03-11 Mikael Fornius + * org.el (org-set-property, org-delete-property) + (org-delete-property-globally): Suggest property at cursor as + initial input in completing-read instead of taking it as chosen. + For a more natural behavior. (Initial input does not work with + iswtichb.) + +2010-03-11 Mikael Fornius + * org.el (org-at-property-p): Check if we are inside a property drawer not just any drawer. (org-set-property, org-delete-property): When cursor is on a diff --git a/lisp/org.el b/lisp/org.el index a4932a2..0ba61fe 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12986,8 +12986,8 @@ in the current file." (interactive (let* ((completion-ignore-case t) (keys (org-buffer-property-keys nil t t)) - (prop0 (or (when (org-at-property-p) (org-match-string-no-properties 2)) - (org-icompleting-read "Property: " (mapcar 'list keys)))) + (prop0 (org-icompleting-read "Property: " (mapcar 'list keys) nil nil + (when (org-at-property-p) (org-match-string-no-properties 2)))) (prop (if (member prop0 keys) prop0 (or (cdr (assoc (downcase prop0) @@ -13014,9 +13014,8 @@ in the current file." "In the current entry, delete PROPERTY." (interactive (let* ((completion-ignore-case t) - (prop (or (when (org-at-property-p) (org-match-string-no-properties 2)) - (org-icompleting-read - "Property: " (org-entry-properties nil 'standard))))) + (prop (org-icompleting-read "Property: " (org-entry-properties nil 'standard) nil nil + (when (org-at-property-p) (org-match-string-no-properties 2))))) (list prop))) (message "Property %s %s" property (if (org-entry-delete nil property) @@ -13027,9 +13026,9 @@ in the current file." "Remove PROPERTY globally, from all entries." (interactive (let* ((completion-ignore-case t) - (prop (org-icompleting-read - "Globally remove property: " - (mapcar 'list (org-buffer-property-keys))))) + (prop (org-icompleting-read "Globally remove property: " + (mapcar 'list (org-buffer-property-keys)) nil nil + (when (org-at-property-p) (org-match-string-no-properties 2))))) (list prop))) (save-excursion (save-restriction