diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-05-07 23:07:23 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-05-07 23:07:23 -0400 |
commit | f8e3333b193cc22767e095b91f9cfdfc0079c3c7 (patch) | |
tree | 15d6b64ddb2a5415c8711bd2f38fe6f1cb88ef55 /bog.el | |
parent | edd6ca2281f07634a5eb57543295ef9f7208cf99 (diff) | |
download | bog-f8e3333b193cc22767e095b91f9cfdfc0079c3c7.tar.gz |
Use marker directly instead of extracting position
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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)))) |