From: Sebastian Rose <sebastian_rose@gmx.de>
To: "Andrew J. Korty" <ajk@iu.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Org-mode version 6.32b; org-remember only indents first line of %i substitution
Date: Thu, 19 Nov 2009 23:24:58 +0100 [thread overview]
Message-ID: <874ooqkv9h.fsf@gmx.de> (raw)
In-Reply-To: <A2973C82-953D-486C-B4F1-4E22A9F074B6@iu.edu> (Andrew J. Korty's message of "Thu, 19 Nov 2009 16:22:37 -0500")
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
"Andrew J. Korty" <ajk@iu.edu> 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-protocol-fix-initial.patch --]
[-- Type: text/x-diff, Size: 550 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 29 bytes --]
Best wishes
Sebastian
[-- Attachment #4: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2009-11-19 22:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 15:27 Org-mode version 6.32b; org-remember only indents first line of %i substitution Andrew J. Korty
2009-11-18 22:54 ` Carsten Dominik
2009-11-19 21:22 ` Andrew J. Korty
2009-11-19 22:24 ` Sebastian Rose [this message]
2009-11-19 22:47 ` Sebastian Rose
2009-11-20 5:48 ` Carsten Dominik
2009-11-20 22:10 ` Sebastian Rose
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=874ooqkv9h.fsf@gmx.de \
--to=sebastian_rose@gmx.de \
--cc=ajk@iu.edu \
--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).