emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] SRC block with `-i' switch seems to solve the problem (was: comment


From: Van L
Subject: [O] SRC block with `-i' switch seems to solve the problem (was: comment alignment not lining up / C++//l OrgSrc Abbrev / Releasing Emacs 26.1)
Date: Fri, 18 May 2018 21:10:35 +1000

Hello Eli.

Thanks for solving the problem with chinese input method’s link reference which 
was broken due to an 18yo typo.

Separately, the following is a different bug.

I reported this bug which didn’t get acknowledged as far as I can tell.

I think the bug isn’t a bug now.

It isn’t a bug if instead of using EXAMPLE block I use SRC block with the `-i’ 
switch and the indenting will be preserved properly.

Perhaps the Org Mode documentation about the `-i’ switch for SRC block can 
demonstrate an example, for Python especially, to get the point across about 
preserving indentation and reduce the chance of misunderstanding or missing the 
point.

> Begin forwarded message:
> 
> From: Van L <address@hidden>
> Subject: comment alignment not lining up / C++//l OrgSrc Abbrev / Releasing 
> Emacs 26.1
> Date: 7 May 2018 at 23:24:00 AEST
> To: address@hidden
> 
> Hello.
> 
> Here is a recipe reproducing a bug described in the post which is forward 
> from.
> 
> — recipe begins
> 
>   - to reproduce faulty comment line up
> 
>     1) ~/2018/Applications/Emacs.app/Contents/MacOS/Emacs -Q     
> 
>     2) open file ~/Documents/x-reproduce-me
> 
>       (Fundamental) mode is on
> 
>     3) C-h C-a ; verify version is 26.1 rc-1
> 
>     4) enter the following into the file, place cursor at end of 43, save 
> file, M-x revert-buffer
> 
>        #+BEGIN_EXAMPLE
>        * Reading
> 
>        Chapters
> 
>        1)
>        2) Page        43
> 
> 
> 
>        Local variables:
>        mode: org
>        paragraph-separate: "[         ]*$"
>        coding: utf-8
>        end:
> 
>        #+END_EXAMPLE
> 
> 
>        (Org) mode is on ; show all ; place cursor at end of 43 ; type `M-j' ; 
> `<s' followed by TAB ; append cpp ; type (C-c ') without braces
> 
>        - see - http://emacs.scratch.space/public/org-mode-cpp-x-0.png
> 
>     5) Abbrev view opens in second pane
> 
>       type in the following
> 
>       #+BEGIN_EXAMPLE
>       void some_function() // function that doesn't return a value
>        {
>          double d = 2.2; // initialize floating-point number
>          int i = 7; // initialize integer
>          d = d+i; // assign sum to d
>          i = d*i; // assign product i (truncating the double to an int)
>        }
>        // To align, highlight the region then
>        // M-x align-regexp <RET> // <RET>
>       #+END_EXAMPLE
> 
>       highlight the region of four lines in the body of the function
> 
>       do, M-x align-regexp <RET> // <RET>
> 
>       - the four line's comment are lined up
> 
>       do, C-c '
> 
>     6) we are out of the abbrev view
> 
>       - the line with `int i = 7;' has comment alignment not lining up
> 
>        - see - http://emacs.scratch.space/public/org-mode-cpp-x-1.png
> 
>       highlight the region of four lines in the body of the function
> 
>       do, M-x align-regexp <RET> // <RET>
> 
>       - the four line's comment are lined up
> 
>        - see - http://emacs.scratch.space/public/org-mode-cpp-x-2.png
> 
>       do, C-c '
> 
>     7) we are in the abbrev view
> 
>        - again, the line with `int i = 7;' has comment alignment not lining up
> 
>       - see - http://emacs.scratch.space/public/org-mode-cpp-x-3.png
> 
> — recipe ends
> 
> 
>> Begin forwarded message:
>> 
>> From: Bastien <address@hidden>
>> Subject: Re: Releasing Emacs 26.1
>> Date: 7 May 2018 at 22:05:40 AEST
>> To: Van L <address@hidden>
>> Cc: Phil Sainty <address@hidden>, Eli Zaretskii <address@hidden>, John 
>> Wiegley <address@hidden>, Michael Albinus <address@hidden>, address@hidden
>> 
>> Hi,
>> 
>> Van L <address@hidden> writes:
>> 
>>>> On 7 May 2018, at 21:10, Phil Sainty <address@hidden> wrote:
>>>> 
>>>> If the bugs are in new functionality, I wouldn't see any issue with
>>>> leaving the improvements until the next release if necessary;
>>> 
>>> In org mode for Emacs 26.1 rc-1, I see comment alignment for cpp not
>>> lining up, see screenshot.
>> 
>> I cannot reproduce this bug with Emacs 26.1 rc-1 and Org 9.1.12.
>> 
>> Can you send it to address@hidden and provide a detailed recipe
>> on how to reproduce it with emacs -Q?
>> 
>> Thanks,
>> 
>> -- 
>> Bastien
> 
> Van L
> address@hidden
> 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]