"Andrew J. Korty" <[email protected]> writes:
> I've learned some more details. The behavior I describe only occurs when
> remember is called via org-protocol. When that happens, `initial' is nil, so
> the following code in org-remember.el doesn't run:
>
> (save-match-data
> (let* ((lead (buffer-substring
> (point-at-bol) (match-beginning 0))))
> (setq v-i (mapconcat 'identity
> (org-split-string initial "\n")
> (concat "\n" lead)))))
>
> I'm not sure of the best way to fix it.
>
> ajk
Hi Andrew,
the best way to fix it will be to fix the function
`org-protocol-remember'. If the behaviour occurs solely when called
through org-protocol, this is the place to fix it.
I'll take a look in it....
Hm - initial _should_ be set...
It is here actually. My `?w' template depends on it:
(setq org-remember-templates
'(
;; ... more templates here... ;;
;; Default org-protocol:
( ?w "* %^{Title}\n\n Quelle: %u, %c\n\n %i" nil "Notizen"))
Ahhh - OK, patch is here - please test:
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 5c65fb0..0684f7a 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -471,7 +471,7 @@ Now template ?b will be used."
(type (if (string-match "^\\([a-z]+\\):" url)
(match-string 1 url)))
(title (cadr parts))
- (region (caddr parts))
+ (region (or (caddr parts) ""))
(orglink (org-make-link-string url title))
remember-annotation-functions)
(setq org-stored-links
Best wishes
Sebastian
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode