From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Properties Drawer versus tags Date: Fri, 20 Dec 2019 11:17:15 -0600 Message-ID: <87r20yq5lw.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50248) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiLu8-00084F-RX for emacs-orgmode@gnu.org; Fri, 20 Dec 2019 12:17:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiLu7-0001Er-1F for emacs-orgmode@gnu.org; Fri, 20 Dec 2019 12:17:32 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:51286 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iiLu6-0001Be-56 for emacs-orgmode@gnu.org; Fri, 20 Dec 2019 12:17:30 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1iiLu2-000r0r-Ar for emacs-orgmode@gnu.org; Fri, 20 Dec 2019 18:17:26 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I'll try to explain my view of tags. Let's see if it makes sense. :) Conceptually, properties are like a generic key-value store for headings, and tags are like a certain property. Imagine if, instead of tags being placed in headings, like this: * Blueberries :food:fruit: ...tags were implemented as properties, like this: * Blueberries :PROPERTIES: :TAGS: food fruit :END: The meaning would be essentially the same. >From a technical perspective, putting tags on headings makes them much faster to search for, because a regexp can be used to search directly to them (local ones, anyway). In contrast, to find the next location of a certain property, a single regexp search is not enough, because even if a regexp search was done to find an entry like the previous example, like: (re-search-forward (rx bol ":TAGS:" (1+ blank) (0+ nonl) bow "food" eow) nil t) ...it would not be guaranteed that the result would actually be in a heading's property drawer, so additional checks must be done to ensure that. Some properties are special, like CATEGORY. As well, some properties are "virtual," like SCHEDULED, which is written like: * Heading SCHEDULED: <2019-12-20 Fri 11:00> ...but is accessible with org-entry-get, like a property in a drawer. So, use tags for applying simple, conceptual labels to headings, because they're faster to search for than properties and always visible. Use properties as a key-value store for details that are less likely to be used in a query and are less important to see. What do you think? :)