From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian =?utf-8?Q?Reu=C3=9Fe?= Subject: Re: [BUG] org-sort-entries errors out when headline is empty Date: Fri, 23 Mar 2018 11:43:08 +0100 Message-ID: <87woy3nkcj.fsf@wirrsal.net> References: <20180313165145.27160-1-seb@wirrsal.net> <87lgenb022.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezKAF-00074p-4K for emacs-orgmode@gnu.org; Fri, 23 Mar 2018 06:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezKAC-0005ww-3F for emacs-orgmode@gnu.org; Fri, 23 Mar 2018 06:43:15 -0400 Received: from wirrsal.net ([188.68.36.149]:37208 helo=mail.wirrsal.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ezKAB-0005uQ-Pl for emacs-orgmode@gnu.org; Fri, 23 Mar 2018 06:43:12 -0400 In-reply-to: <87lgenb022.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hello Nicolas, Nicolas Goaziou writes: > Sebastian Reu=C3=9Fe writes: >> I was also wondering if it might make sense to tweak >> =E2=80=98org-complex-heading-regexp=E2=80=99 so that the respective ca= pture group >> captures an empty string. This could be achieved by making the title >> group greedy again (reverting 9d334897e). Whether we want this >> probably depends on the motivation for 9d334897e. However, doing so >> would be more consistent with the org-elements API, which does assign >> a tag list to the title property when the heading is otherwise empty. > How should we treat the following: > > * :something: > > Is it an empty headline with a "something" tag, or a ":something:" > headline with no tag? All things being equal, it doesn't matter much, > whichever answer is chosen, we can get the other one with a zero-width > space or some such. As for my 5 cents on the (probably not too consequential) design issue: I=E2=80=99d probably choose to treat this as an empty headline with tags.= Due to the special syntax, tags are =E2=80=9Cmore special=E2=80=9D than headline= s, and my expectation would be that most folks would find it consistent to treat them as tags in this case as well. In practical terms, a heading enclosed in colons is probably a rarer thing to wind up with in an org file than an empty heading with tags. But that=E2=80=99s just IMHO. I agree it would be great if this were treated consistently all over the codebase. Kind regards, SR --=20 Insane cobra split the wood Trader of the lowland breed Call a jittney, drive away In the slipstream we will stay