all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Tassilo Horn <tassilo@member.fsf.org>, emacs-orgmode@gnu.org
Subject: Re: org-protocol://remember:// question
Date: Thu, 02 Apr 2009 20:00:17 +0200	[thread overview]
Message-ID: <87ocvfgclq.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <1B37177B-3E1E-41CF-BAB7-85EB815432F1@gmail.com> (Carsten Dominik's message of "Thu, 2 Apr 2009 18:03:26 +0200")

Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Sebastian, Tassilo,
>
> this can be easily fixed.
>
> Org-protocol may add arbitrary properties to the link properties.
> For example, after a call
>
>       (org-store-link-props :type type
>                             :link url
>                             :region region
>                             :description title
>                             :hello "Hello world")
>
> a template could use "%:hello" to access and insert this
> string.  I have just changed org-remember so that the
> property :annotation will be the default for %a.
> Sebastian, could you please add
>
>    :annotation (concat "[[" url "][" title "]]")
>
> or something similar to the call to org-store-link-props?
>
> Also, feel free to add any other properties that might
> provide useful information for a template.


Doesn't that apply to certain link types only?

Also, the situation seems to be different for org-protocol-remember. I
think it's the way remember is used inside that function that has to be
changed.
Maybe I can figure that out.



Anyway, I pulled and restarted emacs.
But still, for

(setq org-remember-templates
      '(
        ;; Test template:
        (?z "* %^{Title}\n\n a: %a\n A: %A\n i: %i\n t: %t\n T: %T\n u: %u\n U: %U\n n: %n\n c: %c\n x: %x\n:bla: %:bla\n:description: %:description\n %?\n\n" "~/xy.org" "Remember")
        ))


The template is filled with this (when I use org-protocol-remember):


* Results

   a: 
   A: 
   i: initial content, the region when remember is called with C-u. 
   t: <2009-04-02 Do>
   T: <2009-04-02 Do 19:36>
   u: [2009-04-02 Do]
   U: [2009-04-02 Do 19:36]
   n: %n
   c: [[http://orgmode.org/manual/Remember-templates.html#Remember-templates][Remember templates - The Org Manual]]
   x: [[http://orgmode.org/manual/Remember-templates.html#Remember-templates][Remember templates - The Org Manual]]
  :bla: %:bla
  :description: %:description
  
 


If I call org-remember directly through `C-c r', the template is filled differently:

  * asdf
  
   a: [[file:~/emacs/lisp/sr-org-mode.el::]]
   A: [[file:~/emacs/lisp/sr-org-mode.el::][asdf]]
   i: 
   t: <2009-04-02 Do>
   T: <2009-04-02 Do 19:47>
   u: [2009-04-02 Do]
   U: [2009-04-02 Do 19:47]
   n: %n
   c:         (?x "* \n\n a: %a\n A: %A\n i: %i\n t: %t\n T: %T\n u: %u\n U: %U\n n: %n\n c: %c\n x: %x\n:bla: %:bla\n:description: %:description\n %?\n\n" "~/xy.org" "Remember")
  
   x:         (?x "* %^{Title}\n\n a: %a\n A: %A\n i: %i\n t: %t\n T: %T\n u: %u\n U: %U\n n: %n\n c: %c\n x: %x\n:bla: %:bla\n:description: %:description\n %?\n\n" "~/xy.org" "Remember")
  
  :bla: %:bla
  :description: %:description


Note that %n is not filled too.


> HTH
>
> - Carsten
>
> On Apr 2, 2009, at 1:10 PM, Sebastian Rose wrote:
>
>> Hi Tassilo,
>>
>>
>> your right, the docs are wrong, Sorry for the inconvenience.
>>
>> Actually, I now understand Bastiens comment in org-annotation-
>> helper.el:
>>
>> 	;; FIXME can't access %a in the template -- how to set annotation?
>>
>> I'll fix the table in the docs.
>>
>> I'll be back as soon as possible.
>>
>>   Sebastian
>>
>>
>> Tassilo Horn <tassilo@member.fsf.org> writes:
>>
>>> Hi all,
>>>
>>> first I'd like to say that this is superb.  It'll deprecate my
>>> home-brewn remember webpage hacks for conkeror soon. :-)
>>>
>>> Ok, now the problem I have: I defined a remember template for
>>> remembering pages from my browser like that:
>>>
>>>
>>> (setq org-default-notes-file "~/repos/org/remember.org"
>>>      org-remember-default-headline 'bottom
>>>      org-remember-templates
>>>      '(;; TODOs
>>>        ("TODO"    ?t "* TODO %?\n  (created: %U)\n  %i\n  %a")
>>>        ("BROWSER" ?b "* BROWSER %a\n  (created: %U)\n\n  %A\n\n  %i")))
>>>
>>> When I execute
>>>
>>>  emacsclient \
>>>  'org-protocol://remember://b/http:%2F%2Flocalhost%2Findex.html/The
>>> %20title/body'
>>>
>>> now I get a remember buffer with these contents:
>>>
>>>
>>> * BROWSER
>>>  (created: [2009-04-02 Thu 08:41])
>>>
>>>
>>>
>>>  body
>>>
>>> Accorting to the template table at [1] I thought that the TITLE would be
>>> filled in after BROWSER, and the [[URL][TITLE]] link between the
>>> timestamp and the BODY.  But that's not the case.  The [[URL]
>>> [TITLE]] is
>>> on top of the kill-ring, though.
>>>
>>> What am I doing wrong?
>>>
>>> BTW: Has some Conkeror user managed to setup an org-protocol handler
>>> yet?
>>>
>>> Bye,
>>> Tassilo
>>> __________
>>> [1] http://orgmode.org/worg/org-contrib/org-protocol.php
>>
>> --
>> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
>> Tel.:  +49 (0)511 - 36 58 472
>> Fax:   +49 (0)1805 - 233633 - 11044
>> mobil: +49 (0)173 - 83 93 417
>> Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
>> Http:  www.emma-stil.de
>>
>>
>> _______________________________________________
>> 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
>

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

  reply	other threads:[~2009-04-02 17:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02  6:50 org-protocol://remember:// question Tassilo Horn
2009-04-02 11:10 ` Sebastian Rose
2009-04-02 12:28   ` Sebastian Rose
2009-04-02 16:03     ` Carsten Dominik
2009-04-02 16:03   ` Carsten Dominik
2009-04-02 18:00     ` Sebastian Rose [this message]
2009-04-03  7:47       ` Carsten Dominik
2009-04-03 12:06         ` Sebastian Rose
2009-04-03 12:34         ` Sebastian Rose
2009-04-03 16:58           ` Carsten Dominik
2009-04-03 22:59 ` Sebastian Rose
2009-04-04  9:42   ` Tassilo Horn
2009-04-04 13:39     ` Sebastian Rose
2009-04-04 17:36       ` Tassilo Horn

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocvfgclq.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tassilo@member.fsf.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.