[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the «inverse» function of join-lines
From: |
Uwe Brauer |
Subject: |
Re: the «inverse» function of join-lines |
Date: |
Tue, 24 Oct 2023 16:43:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "NK" == Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:
> Incidentally I have a somewhat related question I've been wondering
> about recently.
> So I have a massive txt ebook that I've been slowly reediting into an
> org file, for the purposes of easier navigation and textual analysis.
> It is also fill-paragraphed. I've been considering the idea of
> removing all superfluous line breaks.
> Now, mechanically it's quite doable - you check for sentence end
> punctuation signs at line endings and if there isn't one you remove
> the line break. There would of course be some false positives...
> This task seems like a somewhat common editing task, so I've been
> wondering if someone has a working code for it already, maybe there
> are some gotchas there, that I haven't though about.
I usually run first unfill-paragraph-or-region (found in
org-mode-map), which is an interactive compiled Lisp function in
‘next-longline.el’.
And then use either
1. Virtual-auto-fill-mode on
2. Or auto-fill-on, and run fill-paragraph and friends
But of course as you said, false positives. Etc but as a first approach it is
quite good.
--
Warning: Content may be disturbing to some audiences
I strongly condemn Hamas bestialic terroristic attack on Israel, especially the
despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
smime.p7s
Description: S/MIME cryptographic signature