emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* parsing fixed with section
@ 2011-08-11  8:41 Steven Haryanto
  2011-08-11  9:54 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Haryanto @ 2011-08-11  8:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

Dear all,

As I understand it, a fixed width section (BTW, is "fixed width section" the
official term for this?) is defined as a line which is started by zero or
more spaces, and then a colon, *and then a space*, and then zero or more
characters.

:<spc>line1
:<spc>
:<spc>line3

But many editors (Emacs including) likes to trim trailing spaces, so when
the file is saved, the second line loses its space:

:<spc>line1
:
:<spc>line3

Should the second line be parsed as a fixed width section too or not?

--
sh

[-- Attachment #2: Type: text/html, Size: 774 bytes --]

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

* Re: parsing fixed with section
  2011-08-11  8:41 parsing fixed with section Steven Haryanto
@ 2011-08-11  9:54 ` Nicolas Goaziou
  2011-08-11 11:22   ` Steven Haryanto
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2011-08-11  9:54 UTC (permalink / raw)
  To: Steven Haryanto; +Cc: emacs-orgmode

Hello,

Steven Haryanto <stevenharyanto@gmail.com> writes:

> As I understand it, a fixed width section (BTW, is "fixed width section" the
> official term for this?)

Yes.

> is defined as a line which is started by zero or more spaces, and then
> a colon, *and then a space*, and then zero or more characters.
>
> :<spc>line1
> :<spc>
> :<spc>line3
>
> But many editors (Emacs including) likes to trim trailing spaces,

As far as I know, this doesn't happen in Emacs, unless you specify it
explicitly (i.e. in some hook).

>  so when the file is saved, the second line loses its space:
>
> :<spc>line1
> :
> :<spc>line3
>
> Should the second line be parsed as a fixed width section too or not?

I'd say yes.

You may have noticed that exporters already treat that line as
fixed-width section anyway. But this is inconsistent with fontification
(and indentation) in the buffer.

I've pushed a commit to fix this inconsistency in master.

Thanks for pointing this out.


Regards,

-- 
Nicolas Goaziou

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

* Re: parsing fixed with section
  2011-08-11  9:54 ` Nicolas Goaziou
@ 2011-08-11 11:22   ` Steven Haryanto
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Haryanto @ 2011-08-11 11:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On Thu, Aug 11, 2011 at 4:54 PM, Nicolas Goaziou <n.goaziou@gmail.com>wrote:

> Hello,
>
> Steven Haryanto <stevenharyanto@gmail.com> writes:
>
> > As I understand it, a fixed width section (BTW, is "fixed width section"
> the
> > official term for this?)
>
> Yes.
>
> > is defined as a line which is started by zero or more spaces, and then
> > a colon, *and then a space*, and then zero or more characters.
> >
> > :<spc>line1
> > :<spc>
> > :<spc>line3
> >
> > But many editors (Emacs including) likes to trim trailing spaces,
>
> As far as I know, this doesn't happen in Emacs, unless you specify it
> explicitly (i.e. in some hook).
>
> >  so when the file is saved, the second line loses its space:
> >
> > :<spc>line1
> > :
> > :<spc>line3
> >
> > Should the second line be parsed as a fixed width section too or not?
>
> I'd say yes.
>
> You may have noticed that exporters already treat that line as
> fixed-width section anyway. But this is inconsistent with fontification
> (and indentation) in the buffer.
>
> I've pushed a commit to fix this inconsistency in master.
>
> Thanks for pointing this out.
>
>
Thanks for clearing this up, I've also updated the Org::Parser Perl module.

--
sh

[-- Attachment #2: Type: text/html, Size: 1829 bytes --]

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

end of thread, other threads:[~2011-08-11 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-11  8:41 parsing fixed with section Steven Haryanto
2011-08-11  9:54 ` Nicolas Goaziou
2011-08-11 11:22   ` Steven Haryanto

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