emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Capture failure [7.7]
@ 2011-12-12  4:24 François Pinard
  2011-12-18 19:39 ` David Maus
  0 siblings, 1 reply; 3+ messages in thread
From: François Pinard @ 2011-12-12  4:24 UTC (permalink / raw)
  To: emacs-orgmode

Hi, Org mode people.

I had some misery trying to debug a special personal machinery to
capture URLs from Chrome into Org.  Not worth detailing here.  And
moreover, as it works now, I'm happy with this.

However, I had to make the following modification to get it going.  I'm
not sure what are the meaning of "beg" and "end" in this function, so
someone knowledgeable should check if (point) is appropriate as a value.

One sure thing is that "beg" and "end" should be initialized, as they
get later consulted in the function, and whenever :exact-position got a
value, that initialization does not occur.

François

P.S. This is using a copy of the Git repository as updated yesterday.


diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 566fb96..783fe70 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -913,7 +913,8 @@ it.  When it is a variable, retrieve the value.  Return whatever we get."
         beg end)
     (cond
      ((org-capture-get :exact-position)
-      (goto-char (org-capture-get :exact-position)))
+      (goto-char (org-capture-get :exact-position))
+      (setq beg (point) end (point)))
      ((not target-entry-p)
       ;; Insert as top-level entry, either at beginning or at end of file
       (setq beg (point-min) end (point-max)))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-19  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12  4:24 Capture failure [7.7] François Pinard
2011-12-18 19:39 ` David Maus
2011-12-19  5:59   ` François Pinard

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).