emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* newlines in capture templates from the customize buffer
@ 2010-12-10 11:39 suvayu ali
  2010-12-10 12:18 ` Giovanni Ridolfi
  0 siblings, 1 reply; 4+ messages in thread
From: suvayu ali @ 2010-12-10 11:39 UTC (permalink / raw)
  To: org-mode mailing list

Hi everyone,

I am having some trouble writing capture templates with newlines from
the customise buffer. From all the examples I see in the manual and
Worg, it seems simply putting \n within the template string should
work. But entering a "\n" in the template escapes the "\n" when saving
to file and the saved template ends up looking like this,

"** %^{prompt|TODO|WInP} %? %^G\\n%^t"

Entering a newline pressing [RET] works. But then in my init.el it is
stored as a carriage return rather than "\n", making it ugly. Is there
a way to enter newlines in the customise buffer which is saved as
"\n"?

Thanks for any thoughts.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: newlines in capture templates from the customize buffer
  2010-12-10 11:39 newlines in capture templates from the customize buffer suvayu ali
@ 2010-12-10 12:18 ` Giovanni Ridolfi
  2010-12-10 14:24   ` suvayu ali
  0 siblings, 1 reply; 4+ messages in thread
From: Giovanni Ridolfi @ 2010-12-10 12:18 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi everyone,
>
> I am having some trouble writing capture templates with newlines from
> the customise buffer. 
> From all the examples I see in the manual and
> Worg, it seems simply putting \n within the template string should
> work. 
No. You see the variable edited by hand, not what you get from the 
customize buffer.

> But entering a "\n" in the template escapes the "\n" when saving
> to file and the saved template ends up looking like this,
>
> "** %^{prompt|TODO|WInP} %? %^G\\n%^t"
>
> Entering a newline pressing [RET] works. But then in my init.el it is
> stored as a carriage return rather than "\n", making it ugly. 

If you don't like the <RET>
you can edit your init.el file and substitute <RET> with \n
by hand:

M-% C-q C-j \n


> Is there
> a way to enter newlines in the customise buffer which is saved as
> "\n"?
I don't think so.

cheers
Giovanni

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

* Re: newlines in capture templates from the customize buffer
  2010-12-10 12:18 ` Giovanni Ridolfi
@ 2010-12-10 14:24   ` suvayu ali
  2010-12-10 19:03     ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: suvayu ali @ 2010-12-10 14:24 UTC (permalink / raw)
  To: Giovanni Ridolfi; +Cc: org-mode mailing list

Hi Giovanni,

On Fri, Dec 10, 2010 at 1:18 PM, Giovanni Ridolfi
<giovanni.ridolfi@yahoo.it> wrote:
> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>> Entering a newline pressing [RET] works. But then in my init.el it is
>> stored as a carriage return rather than "\n", making it ugly.
>
> If you don't like the <RET>
> you can edit your init.el file and substitute <RET> with \n
> by hand:
>
> M-% C-q C-j \n
>

I tried that, but changing some other variable or adding a new
template reverts it back to [RET].

>
>> Is there
>> a way to enter newlines in the customise buffer which is saved as
>> "\n"?
> I don't think so.
>

Thanks a lot Giovanni for confirming. I think I'll stop using
customize for this.

> cheers
> Giovanni
>


-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: newlines in capture templates from the customize buffer
  2010-12-10 14:24   ` suvayu ali
@ 2010-12-10 19:03     ` Bernt Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2010-12-10 19:03 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Giovanni,
>
> On Fri, Dec 10, 2010 at 1:18 PM, Giovanni Ridolfi
> <giovanni.ridolfi@yahoo.it> wrote:
>> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>>> Entering a newline pressing [RET] works. But then in my init.el it is
>>> stored as a carriage return rather than "\n", making it ugly.
>>
>> If you don't like the <RET>
>> you can edit your init.el file and substitute <RET> with \n
>> by hand:
>>
>> M-% C-q C-j \n
>>
>
> I tried that, but changing some other variable or adding a new
> template reverts it back to [RET].

I just enter it in the capture buffer as C-j to get a new line in
the template.

-Bernt

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

end of thread, other threads:[~2010-12-10 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 11:39 newlines in capture templates from the customize buffer suvayu ali
2010-12-10 12:18 ` Giovanni Ridolfi
2010-12-10 14:24   ` suvayu ali
2010-12-10 19:03     ` Bernt Hansen

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).