Hello,

Yasushi SHOJI <yasushi.sh...@gmail.com> writes:

> What if _I_, for my own project, want to customize the formatter and like to
> call fill-paragraph, can I still do this?

No need to tweak the formatter. You can post-process its output to your
liking, e.g., with `org-fill-paragraph' called on the whole buffer.

> I don't know how `fill-paragraph` works and the second point you listed
> above worries me.
>
> With my ignorance, I thought just call org-fill-paragraph. Or, do you
> mean that "`org-mode' will be initialized" in `org-fill-paragraph`?

The formatter produces strings, concatened together. At each produced
string, we would need to create a temporary buffer, activate Org mode,
insert the string and fill the whole buffer, with `org-fill-paragraph'.

> BTW, while reading `org-fill-paragraph`, I found a bug.
>
> #+begin_src emacs-lisp
>   (add-to-list 'load-path "~/path/to/orgdir/lisp")
> #+end_src
>
> activate the region for the src block above, and do `M-x org-fill-paragraph`.
> It will inf-loop because `M-q` moves the cursor back to the beginning of
> the middle line.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

Reply via email to