From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [PATCH] Don't indent footnote definitions Date: Fri, 18 Mar 2011 20:37:41 +0100 Message-ID: <1300477061-16514-1-git-send-email-n.goaziou@gmail.com> Return-path: Received: from [140.186.70.92] (port=47348 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0fUe-0005SI-8O for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 15:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0fUc-0003kq-UK for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 15:37:52 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:56345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0fUc-0003kG-PM for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 15:37:50 -0400 Received: by fxm18 with SMTP id 18so4572961fxm.0 for ; Fri, 18 Mar 2011 12:37:49 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org mode list Cc: Nicolas Goaziou * lisp/org.el (org-indent-line-function): footnote definition must stay at column 0 to be recognized as such. Body below can have normal indentation, so it should ignore its definition when computing indentation. --- lisp/org.el | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 27a3949..77f42a3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19039,6 +19039,8 @@ If point is in an inline task, mark that task instead." ((looking-at "# ") (setq column 0)) ;; Headings ((looking-at "\\*+ ") (setq column 0)) + ;; Footnote definition + ((looking-at org-footnote-definition-re) (setq column 0)) ;; Literal examples ((looking-at "[ \t]*:[ \t]") (setq column (org-get-indentation))) ; do nothing @@ -19077,15 +19079,16 @@ If point is in an inline task, mark that task instead." (not (looking-at org-drawer-regexp)) ;; When point started in an inline task, do not move ;; above task starting line. - (not (and inline-task-p - (looking-at inline-re))) - ;; Skip comments, verbatim, empty lines, tables, - ;; inline tasks, lists, drawers and blocks. + (not (and inline-task-p (looking-at inline-re))) + ;; Skip drawers, blocks, empty lines, verbatim, + ;; comments, tables, footnotes definitions, lists, + ;; inline tasks. (or (and (looking-at "[ \t]*:END:") (re-search-backward org-drawer-regexp nil t)) (and (looking-at "[ \t]*#\\+end_") (re-search-backward "[ \t]*#\\+begin_"nil t)) (looking-at "[ \t]*[\n:#|]") + (looking-at org-footnote-definition-re) (and (ignore-errors (goto-char (org-in-item-p))) (goto-char (org-list-get-top-point (org-list-struct)))) -- 1.7.4.1