From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Do not indent option keywords Date: Fri, 10 May 2013 19:57:10 +0200 Message-ID: <84E4FC16-3269-4639-B880-3D99FF80FC4B@gmail.com> References: <8738twge3b.fsf@Rainer.invalid> <87txmbgaeg.fsf@Rainer.invalid> <41207E77-189F-40AB-909D-3581EFA38288@gmail.com> <874nebfie5.fsf@Rainer.invalid> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UarZE-0004v1-3F for emacs-orgmode@gnu.org; Fri, 10 May 2013 13:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UarZC-0008Dw-VU for emacs-orgmode@gnu.org; Fri, 10 May 2013 13:57:16 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:51578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UarZC-0008Dm-On for emacs-orgmode@gnu.org; Fri, 10 May 2013 13:57:14 -0400 Received: by mail-wg0-f45.google.com with SMTP id l18so4502160wgh.24 for ; Fri, 10 May 2013 10:57:13 -0700 (PDT) In-Reply-To: <874nebfie5.fsf@Rainer.invalid> 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: Achim Gratz Cc: emacs-orgmode@gnu.org On 10.5.2013, at 08:39, Achim Gratz wrote: > Carsten Dominik writes: >> by decoration you mean font-lock support? >=20 > Yes, but I also don't think these should ever become indented in the > first place. That's debatable of course, the syntax as defined by > org-element does not require this IIRC. Well, which are the ones you think should never become indented? = OPTIONS, TITLE, of maybe you mean the whole suite of keywords? I sometimes put the setup below a major headline "* setup" or so, to = make them hide away and give the buffer a clean look. Depending on = indentation setting it then does make some sense to allow indentation. = So I think the font-lock fix is more important than the indentation one. Please read on below. >=20 >> Maybe this would be a better fix: >>=20 >> Modified lisp/org.el >> diff --git a/lisp/org.el b/lisp/org.el >> index 745fb82..43df094 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -5867,7 +5867,8 @@ by a #." >> ((or (equal dc1 "+results") >> (member dc1 '("+begin:" "+end:" "+caption:" "+label:" >> "+orgtbl:" "+tblfm:" "+tblname:" = "+results:" >> - "+call:" "+header:" "+headers:" "+name:")) >> + "+call:" "+header:" "+headers:" "+name:" >> + "+options:")) >> (and (match-end 4) (equal dc3 "+attr"))) >> (add-text-properties >> beg (match-end 0) >=20 > Sure, that helps too and has certainly less potential for controversy. >=20 > I think we should make an effort to shift most if not all the regex > stuff in org.el into org-element. There's far too much duplication = with > subtle differences sprinkled all over the place to get match data to > work with and it's almost hopeless to try and find all such uses for a > single element. What do you mean? Do you meant to use the org-elemnt parser and base also font-lock on it? Or do you mean all the definitions of regexp constants. This sounds desirable - but it also sounds like an extremely daunting task with possibilities for problems in side effects of regexp matching that will be difficult to find and might only show after a long time. I guess we could start such a process one regexp at a time. - Carsten