emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* New lines (return chracter?) in capture templates
@ 2010-11-17 18:13 Jeff Horn
  2010-11-23  0:18 ` Jeff Horn
  2010-11-23  0:55 ` Russell Adams
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Horn @ 2010-11-17 18:13 UTC (permalink / raw)
  To: Org-mode ml

Quick question. I'm playing with a new template and the new line
characters are being inserted as string-literals (?) instead of being
read as new lines.

In other words, my template is
,----
| * %U\n *%^{Note Title}* %?\n %i %a
`----

When called, I get the following after typing "Test" at the prompt:
,----
| **** [2010-11-17 Wed 13:11]\n *Test* \n
`----

When the following is expected:
,----
|  **** [2010-11-17 Wed 13:11]
|       *Test*
|       <cursor placed here>
`----

The template is uses date trees.

Thanks for any help.

Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

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

* Re: New lines (return chracter?) in capture templates
  2010-11-17 18:13 New lines (return chracter?) in capture templates Jeff Horn
@ 2010-11-23  0:18 ` Jeff Horn
  2010-11-23  0:55 ` Russell Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff Horn @ 2010-11-23  0:18 UTC (permalink / raw)
  To: Org-mode ml

I don't normally do this, but *bump*...

Or rather, "halp!?" Thanks.

Jeff

On Wed, Nov 17, 2010 at 1:13 PM, Jeff Horn <jrhorn424@gmail.com> wrote:
> Quick question. I'm playing with a new template and the new line
> characters are being inserted as string-literals (?) instead of being
> read as new lines.
>
> In other words, my template is
> ,----
> | * %U\n *%^{Note Title}* %?\n %i %a
> `----
>
> When called, I get the following after typing "Test" at the prompt:
> ,----
> | **** [2010-11-17 Wed 13:11]\n *Test* \n
> `----
>
> When the following is expected:
> ,----
> |  **** [2010-11-17 Wed 13:11]
> |       *Test*
> |       <cursor placed here>
> `----
>
> The template is uses date trees.
>
> Thanks for any help.
>
> Jeff
>
> --
> Jeffrey Horn
> Graduate Lecturer and PhD Student in Economics
> George Mason University
>
> (704) 271-4797
> jhorn@gmu.edu
> jrhorn424@gmail.com
>
> http://www.failuretorefrain.com/jeff/
>



-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

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

* Re: New lines (return chracter?) in capture templates
  2010-11-17 18:13 New lines (return chracter?) in capture templates Jeff Horn
  2010-11-23  0:18 ` Jeff Horn
@ 2010-11-23  0:55 ` Russell Adams
  2010-11-23  1:28   ` Jeff Horn
  1 sibling, 1 reply; 7+ messages in thread
From: Russell Adams @ 2010-11-23  0:55 UTC (permalink / raw)
  To: emacs-orgmode

Jeff,

Can you post the relevant section of your config file?

I understand you included that template, but the context may help.

Thanks.

On Wed, Nov 17, 2010 at 01:13:55PM -0500, Jeff Horn wrote:
> Quick question. I'm playing with a new template and the new line
> characters are being inserted as string-literals (?) instead of being
> read as new lines.
>
> In other words, my template is
> ,----
> | * %U\n *%^{Note Title}* %?\n %i %a
> `----
>
> When called, I get the following after typing "Test" at the prompt:
> ,----
> | **** [2010-11-17 Wed 13:11]\n *Test* \n
> `----
>
> When the following is expected:
> ,----
> |  **** [2010-11-17 Wed 13:11]
> |       *Test*
> |       <cursor placed here>
> `----
>
> The template is uses date trees.
>
> Thanks for any help.
>
> Jeff
>
> --
> Jeffrey Horn
> Graduate Lecturer and PhD Student in Economics
> George Mason University
>
> (704) 271-4797
> jhorn@gmu.edu
> jrhorn424@gmail.com
>
> http://www.failuretorefrain.com/jeff/
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: New lines (return chracter?) in capture templates
  2010-11-23  0:55 ` Russell Adams
@ 2010-11-23  1:28   ` Jeff Horn
  2010-11-23  1:34     ` Jeff Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Horn @ 2010-11-23  1:28 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Nov 22, 2010 at 7:55 PM, Russell Adams
<RLAdams@adamsinfoserv.com> wrote:
> Can you post the relevant section of your config file?
>
> I understand you included that template, but the context may help.

No problem! Thanks for your willingness to help, Russell. The relevant
section is below.

,----
|  '(org-capture-templates (quote (("t" "Todo" entry (file+headline
|  "~/org/ftr/jeff/notes/tasks.org" "Tasks") "* TODO %? %i %a") ("n"
|  "Note" entry (file+datetree "~/org/ftr/jeff/notes/notes.org") "* %U\\n
|  *%^{Note Title}* %?\\n %i %a"))))
`----

The variable was set through customize. If I'm reading this correctly,
it appears that the customize interface is inserting an *additional*
escape character before the slash. I'd consider this a bug, since this
was not expected.

Do you know of a way to insert a newline through customize that doesn't
get escaped automatically when the string is saved?

Thanks,
Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

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

* Re: New lines (return chracter?) in capture templates
  2010-11-23  1:28   ` Jeff Horn
@ 2010-11-23  1:34     ` Jeff Horn
  2010-11-23  1:47       ` Russell Adams
  2010-11-23  5:58       ` Carsten Dominik
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Horn @ 2010-11-23  1:34 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Nov 22, 2010 at 8:28 PM, Jeff Horn <jrhorn424@gmail.com> wrote:
> On Mon, Nov 22, 2010 at 7:55 PM, Russell Adams
> <RLAdams@adamsinfoserv.com> wrote:
>> Can you post the relevant section of your config file?
>>
>> I understand you included that template, but the context may help.
>
> No problem! Thanks for your willingness to help, Russell. The relevant
> section is below.
>
> ,----
> |  '(org-capture-templates (quote (("t" "Todo" entry (file+headline
> |  "~/org/ftr/jeff/notes/tasks.org" "Tasks") "* TODO %? %i %a") ("n"
> |  "Note" entry (file+datetree "~/org/ftr/jeff/notes/notes.org") "* %U\\n
> |  *%^{Note Title}* %?\\n %i %a"))))
> `----
>
> The variable was set through customize. If I'm reading this correctly,
> it appears that the customize interface is inserting an *additional*
> escape character before the slash. I'd consider this a bug, since this
> was not expected.

Removing the extra escapes fixes the issue.

> Do you know of a way to insert a newline through customize that doesn't
> get escaped automatically when the string is saved?

Manually editing the customize init file and then viewing the variable
through the customize interface reveals the solution: simply press
return when inputting the string. The newline is picked up
automatically.

Thanks for suggesting I look at the config again!

Jeff

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

http://www.failuretorefrain.com/jeff/

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

* Re: New lines (return chracter?) in capture templates
  2010-11-23  1:34     ` Jeff Horn
@ 2010-11-23  1:47       ` Russell Adams
  2010-11-23  5:58       ` Carsten Dominik
  1 sibling, 0 replies; 7+ messages in thread
From: Russell Adams @ 2010-11-23  1:47 UTC (permalink / raw)
  To: emacs-orgmode

> > The variable was set through customize. If I'm reading this correctly,
> > it appears that the customize interface is inserting an *additional*
> > escape character before the slash. I'd consider this a bug, since this
> > was not expected.
>
> Removing the extra escapes fixes the issue.

I saw that!

> Manually editing the customize init file and then viewing the variable
> through the customize interface reveals the solution: simply press
> return when inputting the string. The newline is picked up
> automatically.

I always manually set mine up, the Customize interface is new to
me. I'm impressed it lets you do multiline entry.

> Thanks for suggesting I look at the config again!

No problem, glad you solved your problem!

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: New lines (return chracter?) in capture templates
  2010-11-23  1:34     ` Jeff Horn
  2010-11-23  1:47       ` Russell Adams
@ 2010-11-23  5:58       ` Carsten Dominik
  1 sibling, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2010-11-23  5:58 UTC (permalink / raw)
  To: Jeff Horn; +Cc: emacs-orgmode


On Nov 23, 2010, at 2:34 AM, Jeff Horn wrote:

> On Mon, Nov 22, 2010 at 8:28 PM, Jeff Horn <jrhorn424@gmail.com>  
> wrote:
>> On Mon, Nov 22, 2010 at 7:55 PM, Russell Adams
>> <RLAdams@adamsinfoserv.com> wrote:
>>> Can you post the relevant section of your config file?
>>>
>>> I understand you included that template, but the context may help.
>>
>> No problem! Thanks for your willingness to help, Russell. The  
>> relevant
>> section is below.
>>
>> ,----
>> |  '(org-capture-templates (quote (("t" "Todo" entry (file+headline
>> |  "~/org/ftr/jeff/notes/tasks.org" "Tasks") "* TODO %? %i %a") ("n"
>> |  "Note" entry (file+datetree "~/org/ftr/jeff/notes/notes.org") "*  
>> %U\\n
>> |  *%^{Note Title}* %?\\n %i %a"))))
>> `----
>>
>> The variable was set through customize. If I'm reading this  
>> correctly,
>> it appears that the customize interface is inserting an *additional*
>> escape character before the slash. I'd consider this a bug, since  
>> this
>> was not expected.
>
> Removing the extra escapes fixes the issue.
>
>> Do you know of a way to insert a newline through customize that  
>> doesn't
>> get escaped automatically when the string is saved?
>
> Manually editing the customize init file and then viewing the variable
> through the customize interface reveals the solution: simply press
> return when inputting the string. The newline is picked up
> automatically.

In the customize interface, you can create a newline in the template  
using C-j or C-o or C-q C-j

- Carsten

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

end of thread, other threads:[~2010-11-23  5:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17 18:13 New lines (return chracter?) in capture templates Jeff Horn
2010-11-23  0:18 ` Jeff Horn
2010-11-23  0:55 ` Russell Adams
2010-11-23  1:28   ` Jeff Horn
2010-11-23  1:34     ` Jeff Horn
2010-11-23  1:47       ` Russell Adams
2010-11-23  5:58       ` Carsten Dominik

Code repositories for project(s) associated with this 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).