[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 19:31:16 -0700 |
well, fwiw, i am still getting empty lines for capture buffers with a
final newline and empty capture buffers. idk if htat helps by
iutself. recent maint [new org version] emacs 25.
On 9/27/20, Samuel Wales <samologist@gmail.com> wrote:
> ... but i want to know what is expected. it sopunds like org is
> intended to produce the desired result regardless. so i will messa
> aroud more with my settings.
>
> i am limited in comput3er use so it might take a while for me to
> produce anything liek an mwe. but i will check a few things.
>
> On 9/27/20, Samuel Wales <samologist@gmail.com> wrote:
>> hi nicolas,
>>
>> thanks, that helps to know that org adds a newline. this prevents the
>> failure mode of corrupted headers.
>>
>> just to confirm, do you mean capture /templates/ [potentially
>> verifiable by org] vs. /finalized buffers/?
>>
>> it sounds like you mean templates, because otherwise org just does
>> whatever is necessary to create desired lines?
>>
>> the user can mess with the buffer, so might leave a trailing newline
>> or not. might copy from a file that ensures trailing newline, or one
>> that does not, etc.
>>
>> thus finalized buffers can contain anything. or nothing.
>>
>> at present, possibly due to my own errors, without the options
>> specified explicitly, i get blank lines below the header if i finalize
>> the buffer with a trailing newline, and blank lines below the target
>> header if i capture with an empty buffer. in maint.
>>
>>
>> On 9/27/20, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>>> Hello,
>>>
>>> Samuel Wales <samologist@gmail.com> writes:
>>>
>>>> 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?
>>>
>>> I didn't read the whole thread, but a final newline is mandatory in all
>>> capture templates, independently on the number of desired blank lines.
>>> If such final newline is not provided, the capture mechanism will add
>>> one.
>>>
>>> The only exception is about empty capture templates, which are left
>>> as-is, i.e. a "final newline" is not added in that case.
>>>
>>> I don't know if that answers your question, but HTH.
>>>
>>> Regards,
>>> --
>>> Nicolas Goaziou
>>>
>>
>>
>> --
>> The Kafka Pandemic
>>
>> Please learn what misopathy is.
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
--
The Kafka Pandemic
Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
- Re: newline or no newline at end of capture: expected behavior, (continued)
- 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, 2020/09/27
- 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 <=