From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] Do not indent option keywords Date: Thu, 09 May 2013 22:34:31 +0200 Message-ID: <87txmbgaeg.fsf@Rainer.invalid> References: <8738twge3b.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaXYE-0004dZ-M4 for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:35:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaXY8-0003Jx-NB for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:34:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:43923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaXY8-0003Jl-EE for emacs-orgmode@gnu.org; Thu, 09 May 2013 16:34:48 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UaXY7-0000Wv-6i for emacs-orgmode@gnu.org; Thu, 09 May 2013 22:34:47 +0200 Received: from pd9eb160a.dip0.t-ipconnect.de ([217.235.22.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 22:34:47 +0200 Received: from Stromeko by pd9eb160a.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 22:34:47 +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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain That was not the patch I was trying to send, sorry. Second try: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org.el-do-not-indent-option-keyword-lines.patch >From 990257c497aa9fb0b8250d770c8e899762cc7abc Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Thu, 9 May 2013 22:30:08 +0200 Subject: [PATCH] org.el: do not indent option keyword lines * lisp/org.el (org-indent-line): Keep option keyword lines at column zero so they don't lose their decoration. --- lisp/org.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 08570c3..b357c90 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21932,6 +21932,11 @@ (defun org-indent-line () (org-inlinetask-in-task-p))) (inline-re (and inline-task-p (org-inlinetask-outline-regexp))) + (opt-re (org-make-options-regexp + '("CATEGORY" "TODO" "COLUMNS" "STARTUP" "ARCHIVE" + "LINK" "PRIORITIES" "CONSTANTS" "PROPERTY" "DRAWERS" + "SETUPFILE" "OPTIONS") + "\\(?:[a-zA-Z][0-9a-zA-Z_]*_TODO\\)")) column) (if (and orgstruct-is-++ (eq pos (point))) (let ((indent-line-function (cadadr (assoc 'indent-line-function org-fb-vars)))) @@ -21976,6 +21981,8 @@ (defun org-indent-line () (org-get-indentation (match-string 0)))) (t (org-get-indentation (match-string 0)))))) + ;; Option keywords + ((looking-at opt-re) (setq column 0)) ;; This line has nothing special, look at the previous relevant ;; line to compute indentation (t -- 1.8.2.1 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra --=-=-=--