[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org: add property names from #+PROPERTY keywords to completi
Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list
Wed, 08 Jul 2020 11:47:02 -0400
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Kyle Meyer <firstname.lastname@example.org> writes:
> Nick Dokos writes:
>> Here's the amended patch: it includes the fixes from Kyle's review, the
>> he suggested that adds the plain property for each _ALL property to the list
>> and a few test cases to the test/org-buffer-property-keys test.
> Thank you for the updates. Applied (bc4fa8a00).
>> - nil)))
>> + ;; Get property names from #+PROPERTY keywords as well
>> + (mapcar (lambda (s)
>> + (nth 0 (split-string s)))
>> + (cdar (org-collect-keywords '("PROPERTY"))))
>> + nil))
> I didn't spot it earlier, but this nil (not added by your patch) is
> unnecessary. Since the patch is touching the line anyway, I've dropped
> it on apply.
>> + bare-props)
>> (goto-char (point-min))
>> (while (re-search-forward org-property-start-re nil t)
>> @@ -13132,7 +13137,15 @@ COLUMN formats in the current buffer."
>> (let ((p (match-string-no-properties 1 value)))
>> (unless (member-ignore-case p org-special-properties)
>> (push p props))))))))))
>> - (sort (delete-dups props) (lambda (a b) (string< (upcase a) (upcase
>> + (sort (delete-dups (append props
>> + ;; for each xxx_ALL property, make sure
>> + ;; the bare xxx property is also
>> + ;; included
>> + (dolist (x props bare-props)
>> + (if (string-match "_ALL\\b" x)
>> + (setq bare-props (cons (substring x 0 -4)
>> + bare-props))))))
> I did a cosmetic rewrite here to use mapcar, which I hope you won't
Not at all - thanks!
> Thanks again.