From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose 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 Message-ID: <874ooqkv9h.fsf@gmx.de> References: <649C26F5-AB40-4757-86A9-658FEBB08CD6@iu.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBFRI-0003Nj-QA for emacs-orgmode@gnu.org; Thu, 19 Nov 2009 17:25:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBFRE-0003La-4O for emacs-orgmode@gnu.org; Thu, 19 Nov 2009 17:25:20 -0500 Received: from [199.232.76.173] (port=50638 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBFRD-0003LT-S4 for emacs-orgmode@gnu.org; Thu, 19 Nov 2009 17:25:15 -0500 Received: from mail.gmx.net ([213.165.64.20]:33186) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NBFRD-00089l-53 for emacs-orgmode@gnu.org; Thu, 19 Nov 2009 17:25:15 -0500 In-Reply-To: (Andrew J. Korty's message of "Thu, 19 Nov 2009 16:22:37 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Andrew J. Korty" Cc: Org Mode --=-=-= "Andrew J. Korty" 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-protocol-fix-initial.patch 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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--