emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Goto correct footnote insertion point in org-mode buffers
Date: Thu, 17 Mar 2011 09:24:09 +0100 (CET)	[thread overview]
Message-ID: <20110317082409.3E55F6523@myhost.localdomain> (raw)
In-Reply-To: <871v2bjh4z.fsf@fastmail.fm>

Patch 678 (http://patchwork.newartisans.com/patch/678/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C871v2bjh4z.fsf%40fastmail.fm%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Goto correct footnote insertion point in org-mode buffers
> Date: Fri, 11 Mar 2011 18:47:08 -0000
> From: Matt Lundin <mdl@imapmail.org>
> X-Patchwork-Id: 678
> Message-Id: <871v2bjh4z.fsf@fastmail.fm>
> To: Org Mode <emacs-orgmode@gnu.org>
> 
> * lisp/org-footnote.el: (org-footnote-create-definition): Don't search
>   for last footnote when in org-mode file.
> 
> The recent changes to accommodate signatures in message-mode instruct
> org-mode to search for the last footnote in the entire buffer when
> inserting a new footnote definition. This causes problems in org
> buffers, since org-footnote-goto-local-insertion-point already finds
> the correct insertion point. (I.e., the insertion point is always
> placed in beneath the last footnote in the buffer, even if
> org-footnote-section is nil.) This patch invokes the search only if in
> non org-mode buffers.
> 
> ---
> lisp/org-footnote.el |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index f2b3489..0524b41 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -310,10 +310,10 @@ or new, let the user edit the definition of the footnote."
>  	  (skip-chars-backward " \t\r\n")
>  	  (delete-region (point) max)
>  	  (insert "\n\n")
> -	  (insert org-footnote-tag-for-non-org-mode-files "\n")))))
> -    ;; Skip existing footnotes
> -    (while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> -      (forward-line))
> +	  (insert org-footnote-tag-for-non-org-mode-files "\n")))
> +	;; Skip existing footnotes
> +      (while (re-search-forward "^[[:space:]]*\\[[^]]+\\] " nil t)
> +	(forward-line))))
>      (insert "\n[" label "] \n")
>      (goto-char (1- (point)))
>      (message "Edit definition and go back with `C-c &' or, if unique, with `C-c C-c'.")))
> 

      reply	other threads:[~2011-03-17 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 13:47 [PATCH] " Matt Lundin
2011-03-17  8:24 ` Bastien Guerry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317082409.3E55F6523@myhost.localdomain \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [Accepted] Goto correct footnote insertion point in org-mode buffers' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).