From: Nick Dokos <ndokos@gmail.com> To: emacs-orgmode@gnu.org Subject: Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list Date: Wed, 08 Jul 2020 11:47:02 -0400 [thread overview] Message-ID: <87imeyko09.fsf@pierrot.dokosmarshall.org> (raw) In-Reply-To: <87sge264v1.fsf@kyleam.com> Kyle Meyer <kyle@kyleam.com> writes: > Nick Dokos writes: > >> Here's the amended patch: it includes the fixes from Kyle's review, the modification >> 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) >> (org-with-wide-buffer >> (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 b)))))) >> + (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 > mind. Not at all - thanks! > > Thanks again. > > -- Nick
next prev parent reply other threads:[~2020-07-08 15:47 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-07 2:01 Nick Dokos 2020-07-07 2:40 ` Nick Dokos 2020-07-07 4:23 ` Kyle Meyer 2020-07-07 12:44 ` Nick Dokos 2020-07-07 13:38 ` Nick Dokos 2020-07-07 16:48 ` Nick Dokos 2020-07-08 3:52 ` Kyle Meyer 2020-07-08 15:47 ` Nick Dokos [this message] 2020-07-08 16:07 ` Nick Dokos 2020-07-09 4:36 ` [PATCH] agenda: Fold case when retrieving user-configured effort values Kyle Meyer 2020-07-09 7:50 ` Nick Dokos
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87imeyko09.fsf@pierrot.dokosmarshall.org \ --to=ndokos@gmail.com \ --cc=emacs-orgmode@gnu.org \ --subject='Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).