emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-(un)fill-buffer


From: Ihor Radchenko
Subject: Re: org-(un)fill-buffer
Date: Wed, 10 Jan 2024 12:34:30 +0000

Psionic K <psionik@positron.solutions> writes:

> I wrote up a small addition to the unfill package, which is very
> convenient for switching hard newlines out in favor of tools like
> visual-line-mode and adaptive-wrap.
>
> The command unfilled every list and paragraph in the entire buffer.  PR is 
> here:
> https://github.com/purcell/unfill/pull/11#pullrequestreview-1812645481

This PR introduces a function to "unfill" a region in Org mode buffer.

> Steve wants to consider it for the org package itself.  Questions from me:
> 1. will this be accepted?
> 2. where would it go?
> 3. because org is more general than unfill, I would instead name the
> command org-fill-buffer and we can recommend that users run in a hook:
> (setq-local fill-column most-positive-fixnum).  After that, every call
> to `org-fill-buffer` will just do what they mean, just like how
> `fill-paragraph` will respect fill-column.

You may instead just run
(let ((fill-column most-positive-fixnum)) (fill-region (point-min) (point-max)))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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