[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newline or no newline at end of capture: expected behavior
From: |
Samuel Wales |
Subject: |
Re: newline or no newline at end of capture: expected behavior |
Date: |
Sun, 27 Sep 2020 00:42:00 -0700 |
hi richard,
thank you. when i can, i will try explicitly setting all three to 0
to see if that prevents the unwanted newlines, in the buffer with
newline on last line, and empty buffer, cases.
the docstring says empty-lines defaults to 0, which is what i want.
it does not say what the default for after and before are.
it /sounds/ like capture is supposed to produce the desired number
[and position] of empty lines regardless of whether the buffer is
empty or there is or is not a trailing newline on the final line of
hte buffer. is this more or less correct?
On 9/27/20, Richard Lawrence <wyley.r@gmail.com> wrote:
> Hi Samuel,
>
>> On 9/23/20, Samuel Wales <samologist@gmail.com> wrote:
>>> i have the same question for headline-only capture
>>> buffers. i.e. what is the expected result with and without trailing
>>> newline.
>
> Just to clarify: are you aware of the :empty-lines, :empty-lines-before
> and :empty-lines-after keys that you can set in org-capture-templates?
> Are your questions about the default values of these keys?
>
> I just tried a simple setup in emacs -Q with Org 9.4, namely:
>
> (setq org-capture-templates
> '(("s" "simple" entry (file+headline "~/org/notes.org" "Foo")
> "* %?" :empty-lines 1)))
>
> and Org seems to correctly respect the value of these keys when they are
> specified explicitly. That is, with :empty-lines 0, no newlines are
> added; with :empty-lines 1, a blank line appears on each side of the
> captured entry; with :empty-lines-after 1, a blank line appears after,
> but not before, the new entry; and so on.
>
> Can you use these keys to get the behavior you are looking for? Or is
> your question about something else?
>
> --
> Best,
> Richard
>
--
The Kafka Pandemic
Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
- newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/20
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/20
- Re: newline or no newline at end of capture: expected behavior, Bastien, 2020/09/23
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/23
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/27
- Re: newline or no newline at end of capture: expected behavior, Richard Lawrence, 2020/09/27
- Re: newline or no newline at end of capture: expected behavior,
Samuel Wales <=
- Re: newline or no newline at end of capture: expected behavior, Nicolas Goaziou, 2020/09/27
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/27
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/27
- Re: newline or no newline at end of capture: expected behavior, Samuel Wales, 2020/09/27