emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG][PATCH] Marker points into wrong buffer
Date: Tue, 12 Nov 2013 23:14:37 +0100	[thread overview]
Message-ID: <87fvr1w9ma.fsf@gmx.us> (raw)
In-Reply-To: 87k3gdfhy9.fsf@Rainer.invalid

Achim Gratz <Stromeko@nexgo.de> writes:
> Introduced with r114064 on Emacs trunk.  Not sure if this is a bug in
> Org or Emacs, but the patch restores the previous behaviour.
> ---
>  lisp/ob-ref.el | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el
> index 5a3c8ba..251fa55 100644
> --- a/lisp/ob-ref.el
> +++ b/lisp/ob-ref.el
> @@ -85,7 +85,9 @@ (defun org-babel-ref-parse (assignment)
>        (cons (intern var)
>  	    (let ((out (save-excursion
>  			 (when org-babel-current-src-block-location
> -			   (goto-char org-babel-current-src-block-location))
> +			   (goto-char (if (markerp org-babel-current-src-block-location)
> +					  (marker-position org-babel-current-src-block-location)
> +					org-babel-current-src-block-location)))

Right.  I didn't know that marker ≠ char and that marker contains the
buffer.  markerp is the better test here.

–Rasmus

-- 
Summon the Mothership!

  parent reply	other threads:[~2013-11-12 22:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 23:55 [BUG] Marker points into wrong buffer Rasmus
2013-11-12  1:44 ` [BUG][PATCH] " Rasmus
2013-11-12 10:41   ` Eric S Fraga
2013-11-12 16:57   ` Eric S Fraga
2013-11-12 21:06   ` Achim Gratz
2013-11-12 21:48     ` Bastien
2013-11-13 18:28       ` Achim Gratz
2013-11-12 22:14     ` Rasmus [this message]
2013-11-12 19:49 ` [BUG] " Achim Gratz

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=87fvr1w9ma.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).