emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Moving "manual.org" into core


From: Nicolas Goaziou
Subject: Re: [O] [RFC] Moving "manual.org" into core
Date: Mon, 29 Jan 2018 15:41:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Yasushi SHOJI <address@hidden> writes:

> Do you see this on your env?  Or, is it just me?

I don't see anything like this.

> I'd like to have the formatter and `fill-paragraph` work in a coherent way.
> But, if you, who know org much better than me, don't know, I don't think
> I can help.  Though, just in case, can you elaborate a bit?

The formatter doesn't call `fill-paragraph' at all. No wonder both do
not work in a way you would expect. 

The newline characters introduced in the output of the formatter were
present already in the original text. However, some objects ignore white
spaces on purpose. For example, [[foo bar]] and [[foo bar]] and [[foo\n
bar]] are equivalent, so the parser does not retain the distinction
between them. Hence links are always formatted on a single line.

Now, I'm not sure the formatter should call `fill-paragraph', for some
reasons:

- the original document could be using `visual-line-mode' so there's
  could be nothing to fill without Org knowing about it;

- Calling `fill-paragraph' requires full fontification, so `org-mode'
  would be initialised at every paragraph to fill;

- `fill-paragraph' depends heavily on user's configuration (custom link
  types, `org-fontify-emphasized-text', `org-hide-emphasis-markers',
  `org-pretty-entities'...) whereas the formatter is expected to be more
  neutral.

We could however, un-fill everything. But the output would be very
different. So, TRTD is not obvious.

> Since you fixed the big ones, I can see another issue.  This is also 
> indentation
> issue, but with a macro replacement .  Somehow, macro replacement
> gets extra indentation.  Like this:

>       a numeric prefix, check that many days.  For example, {{{kbd(C-1
> -     C-c / d)}}} shows all deadlines due tomorrow.
> +          C-c / d)}}} shows all deadlines due tomorrow.

This is related to the explanation above. Macros did the opposite of
links. The parser didn't remove meaningless spaces upon parsing macros.
So those would be inserted twice. I fixed this. Now macros show the same
behaviour as links: even multi-lines macros are inserted as a single
line.

Regards,

-- 
Nicolas Goaziou



reply via email to

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