unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How to format paragraph and not to lose spaces between 2 characters?
Date: Wed, 6 Oct 2021 15:00:28 +0200	[thread overview]
Message-ID: <20211006130028.GB32757@tuxteam.de> (raw)
In-Reply-To: <87h7duwiwi.fsf@zoho.eu>

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

On Wed, Oct 06, 2021 at 12:24:13PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> Jean Louis wrote:
> 
> >> The ‘fill-nobreak-predicate’ hook lets you avoid line
> >> breaks at certain places. For example if you’re French, you
> >> might be used to typing a space in front of colons,
> >> question marks, exclamation marks, etc. This might lead to
> >> the following problem:
> >
> > If I have ❰    ❱ then what should I add to
> > `fill-nobreak-predicate' variable?
> 
> If you have NO-BREAK SPACE it shouldn't brake anyway (that's
> the purpose) so then you can just fill as you
> would, transparently.
> 
> If you want it to be 100% transparent so you can use normal
> spaces (but why?) I'd start at something like this
> 
>   (looking-at "\s\\{2,\\}")
                 ^^

Alternatively you could say "\\s-..." instead, which would catch
everything with the syntax property "space", which non-breaking
spaces usually have (it'll depend on your current syntax table,
though, which can be seen as a plus or as a minus).

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-10-06 13:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06  5:41 How to format paragraph and not to lose spaces between 2 characters? Jean Louis
2021-10-06  6:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-06  6:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-06 10:02   ` Jean Louis
2021-10-06 10:24     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-06 13:00       ` tomas [this message]
2021-10-06 10:18   ` [solved] " Jean Louis
2021-10-06 14:35     ` Emanuel Berg via Users list for the GNU Emacs text editor

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20211006130028.GB32757@tuxteam.de \
    --to=tomas@tuxteam.de \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).