From f8e3333b193cc22767e095b91f9cfdfc0079c3c7 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 7 May 2014 23:07:23 -0400 Subject: Use marker directly instead of extracting position --- bog.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bog.el b/bog.el index 1364707..5f3e9c9 100644 --- a/bog.el +++ b/bog.el @@ -643,11 +643,10 @@ buffer, the narrowing is removed." (if marker (progn (switch-to-buffer (marker-buffer marker)) - (let ((pos (marker-position marker))) - (when (or (< pos (point-min)) - (> pos (point-max))) - (widen)) - (goto-char pos)) + (when (or (< marker (point-min)) + (> marker (point-max))) + (widen)) + (goto-char marker) (org-show-context)) (message "Heading for %s not found in notes" citekey)))) @@ -668,7 +667,7 @@ opened if locating a citekey from context fails." (with-current-buffer (marker-buffer marker) (save-excursion (save-restriction - (goto-char (marker-position marker)) + (goto-char marker) (org-tree-to-indirect-buffer)))) (message "Heading for %s not found in notes" citekey)))) -- cgit v1.2.3