From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IO4IFgJDBV9OTQAA0tVLHw (envelope-from ) for ; Wed, 08 Jul 2020 03:52:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id XX/KEQJDBV88LwAAbx9fmQ (envelope-from ) for ; Wed, 08 Jul 2020 03:52:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 69B94940AC5 for ; Wed, 8 Jul 2020 03:52:33 +0000 (UTC) Received: from localhost ([::1]:50470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jt18K-0001n7-D6 for larch@yhetil.org; Tue, 07 Jul 2020 23:52:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt17x-0001mo-HJ for emacs-orgmode@gnu.org; Tue, 07 Jul 2020 23:52:09 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:52738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt17v-0008DJ-2m for emacs-orgmode@gnu.org; Tue, 07 Jul 2020 23:52:09 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0A27365731; Tue, 7 Jul 2020 23:52:05 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=Y8ZtMg3bwHNIp2caP9QxlpFfkt4=; b=Q3unvQ RhuU/ZTs1pUmVig7H9F7wwHeSYpSW8SrFaljYxdNKK1FR1MrfGY8zhJMw1PHum7W yJG8oViIMy1mr8vrNc69rMJeWRVAWxB2+LrsiHVhe6d2CRGOMHLY3Lrv+b1yKBQq tuJPDljhYkIaWsPRWjyi2lzmRbsaRNoC1yEZ4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id DBA146572E; Tue, 7 Jul 2020 23:52:04 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=rrAsqFWlxSg6OE4Vtcb/pCUICATUi43OAUu0kw0bZKg=; b=C9l8Wi5uLE6V8iho2sGMKred4SMk7Xu0AMe0jdVfHtJE5rQnO5HRJwCZMejBkbH9rpMvJSHcH266JxVuuVG+6VNOkFsKKNLYeXXA7I/87HYg10GC7gMW1MeSHJW3AWhjMBKdzd9GAl5J/WfYYL35Dt9v7VYxow4y1K9YqKdH4Vs= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id E3FBB6572D; Tue, 7 Jul 2020 23:52:02 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Nick Dokos Subject: Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list In-Reply-To: <87y2nvw9t1.fsf@alphaville.usersys.redhat.com> References: <87o8osxevq.fsf@alphaville.usersys.redhat.com> <87v9j054ya.fsf@kyleam.com> <87y2nvw9t1.fsf@alphaville.usersys.redhat.com> Date: Tue, 07 Jul 2020 23:52:02 -0400 Message-ID: <87sge264v1.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 6213BFCC-C0CE-11EA-B21F-D1361DBA3BAF-24757444!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com; helo=pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/07 23:52:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=Q3unvQ R; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=C9l8Wi5u; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: eUA9HDXxLnnq 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. Thanks again.