GNU bug report logs - #20871
25.0.50; fill-single-char-nobreak-p does not recognize a single-letter word when it is preceded by an open paren

Previous Next

Package: emacs;

Reported by: Marcin Borkowski <mbork <at> mbork.pl>

Date: Mon, 22 Jun 2015 10:21:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michał Nazarewicz <mina86 <at> mina86.com>
Cc: mattiase <at> acm.org, mbork <at> mbork.pl, 20871 <at> debbugs.gnu.org
Subject: bug#20871: 25.0.50; fill-single-char-nobreak-p does not recognize a single-letter word when it is preceded by an open paren
Date: Sat, 17 Aug 2019 09:57:13 +0300
> From: Michał Nazarewicz <mina86 <at> mina86.com>
> Date: Fri, 16 Aug 2019 16:30:55 +0100
> Cc: Mattias Engdegård <mattiase <at> acm.org>, mbork <at> mbork.pl, 
> 	20871 <at> debbugs.gnu.org
> 
> On Fri, 16 Aug 2019 at 13:53, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Michal says that the original fill-single-char-nobreak-p function
> > was supposed to handle the Polish case as well.  If that's true,
> > perhaps we should deprecate fill-polish-nobreak-p.
> 
> I’m in favour of deprecating one of the functions, yes.

OK, but see below.

> > However, I do wonder how can a general function handle these cases,
> > since in general there's no problem in breaking a line after
> > single-letter words.
> 
> We could try and look at `tildify-mode’ for inspiration and especially
> ‘tildify-space-pattern’¹ which is:
> 
>     "[,:;(][ \t]*[a]\\|\\<[AIKOSUVWZikosuvwz]"

My problem is conceptual rather than practical.  Since in , e.g.,
English it is okay to break a line after single-letter words, whereas
in Polish it is not, I wonder how can we have a single function
satisfy both requirements.  We would need some option, and then we
would need to decide what is the trigger for changing the value of
that option -- it could be the user, or the language environment, or
maybe something else.

tildify.el explicitly says that its defaults are for a specific
language, so I don't think it solves the problem that bothers me, as
described above.  This is why I originally suggested a separate
function -- having that is equivalent to having an option which
determines a behavior that depends on the language.

I'm also okay with extending tildify.el to support more than just
Czech rules, but that's a separate issue.




This bug report was last modified 5 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.