From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Fix inconsistency in drawer handling Date: Wed, 19 Sep 2012 16:02:31 +0200 Message-ID: <87haqudsaw.fsf@gmail.com> References: <1347710412-23188-1-git-send-email-yann.hodique@gmail.com> <87boh7layo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEKvN-0001Hy-2P for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 10:06:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEKvD-0006n6-Hp for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 10:06:44 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEKvD-0006mc-BQ for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 10:06:35 -0400 Received: by wibhm2 with SMTP id hm2so6506409wib.0 for ; Wed, 19 Sep 2012 07:06:34 -0700 (PDT) In-Reply-To: (Yann Hodique's message of "Sun, 16 Sep 2012 19:03:51 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Yann Hodique Cc: emacs-orgmode@gnu.org Hello, Yann Hodique writes: > thanks for the quick review. Of course I don't mind, but I'm just > curious to understand the purpose, as duplicating constants seems to > make room for future mistakes (even though in this case I guess we're > stuck with that regexp forever :)). As far as Org Element goes, there's no duplication as each regexp would be used but once. My point is that such constants do not make much sense. You are not guaranteed to find a real drawer when you use (re-search-forward org-drawer-regexp) even if the regexp matches: you also need to make sure that (eq (org-element-type (org-element-at-point)) 'drawer) is non-nil. Worse, I think that these constants are misleading as they sound self-sufficient. Therefore, I'd rather not support them in Elements. But I may be too cautious on this. What do you think? In the long run, I think that, structure-wise, org.el should handle any action directly related to headlines, but org-element.el should be the core library for everything else. Regards, -- Nicolas Goaziou