help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to get all paragraphs in list?


From: Jean Louis
Subject: Re: How to get all paragraphs in list?
Date: Mon, 5 Sep 2022 19:40:19 +0300
User-agent: Mutt/+ () (2022-06-11)

* Alessandro Bertulli <alessandro.bertulli96@gmail.com> [2022-09-05 12:16]:
> 
> Jean Louis <bugs@gnu.support> writes:
> 
> > (defun join-lines ()
> >   "Joins lines of a paragraph of 100000 chars."
> >   (interactive)
> >   (let ((old fill-column))
> >     (setq fill-column 100000)
> >     (fill-paragraph nil)
> >     (setq fill-column old)))
> 
> Sorry I don't have an answer to your question, but I wondered: would it
> be better to have fill-column set to its maximum value? Which, as far as
> I found, is (point-max)? Here is a SE answer I found
> https://emacs.stackexchange.com/a/8181/29817

I am adopting the two ideas and now I have this:

(defun join-lines ()
  "Joins lines of a paragraph."
  (interactive)
  (let ((fill-column (point-max)))
    (fill-paragraph nil)))

That function could be used when iterating interactively or in
temporary buffer over paragraphs.

Other solution could be when I convert paragraphs to list and then
simply remove new lines.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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