all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: help-gnu-emacs@gnu.org
Subject: Re: the «inverse» function of join-lines
Date: Tue, 24 Oct 2023 16:43:26 +0200	[thread overview]
Message-ID: <874jigozch.fsf@mat.ucm.es> (raw)
In-Reply-To: b2c4c63e-dcd4-4860-9e05-43c2dbc28f4a@gmail.com

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

>>> "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/

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2023-10-24 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  9:25 the «inverse» function of join-lines Uwe Brauer
2023-10-24  9:37 ` Emanuel Berg
2023-10-24  9:47 ` Yuri Khan
2023-10-24 10:12   ` Yuri Khan
2023-10-24 12:17   ` Uwe Brauer
2023-10-24 14:23     ` Yuri Khan
2023-10-24 10:10 ` Tim Landscheidt
2023-10-24 12:18   ` Uwe Brauer
2023-10-24 12:50   ` Nikolay Kudryavtsev
2023-10-24 14:43     ` Uwe Brauer [this message]
2023-11-23 15:50       ` Nikolay Kudryavtsev
2023-11-23 20:57         ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jigozch.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.