all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [NonGNU Elpa] New package: electric-french
@ 2023-06-04 14:15 Ruijie Yu via Emacs development discussions.
  2023-06-04 19:31 ` Matthias Meulien
  2023-06-05  8:34 ` Philip Kaludercic
  0 siblings, 2 replies; 7+ messages in thread
From: Ruijie Yu via Emacs development discussions. @ 2023-06-04 14:15 UTC (permalink / raw)
  To: emacs-devel

Hello,

I am proposing a new package called electric-french [1].  This stemmed
from a discussion on emacs-humanities [2], where Jean-Christophe
("l@tlo") outlined a few common practices on nonbreak spaces in the
French language.  See near the end of the message for the commentary
section.

First of all, I want to know if any other French speakers are interested
in using this package -- in particular, whether this is beneficial in
general, more than only l@tlo.

Secondly, if people are indeed interested, I hope this can ultimately go
to GNU elpa, but since I am still trying to get an employer disclaimer
(without which I am very reluctant to making any FSF open source
contributions), I don't want to propose its inclusion into elpa.git at
this very moment, hence this proposal into nongnu.git as a "temporary
workaround".

Alternatively, we can also pretend it were proposed for elpa.git, and
postpone the actual inclusion until everything settles on my end -- of
course, only if enough people are interested in this package.

I welcome any type of comments.  Anything, including the package name,
can change with a valid reason.  Though fluent in English, I am not a
native speaker, so there may be occasional errors on wording.  Nor am I
so much a French speaker, and most information present in the package
were either provided by l@tlo or obtained via some quick [search
engine]'ing around, so any correction on that is welcome.  Thanks.

(And I know I need to add the part-of/not-part-of Emacs paragraph to the
header.  I'll add it when I know which elpa we are looking at.)

--8<---------------cut here---------------start------------->8---
;;; Commentary:

;; This library facilitates adhering to various spacing
;; requirements of French literature.  It provides a minor mode,
;; where when enabled, inserts nonbreak spaces before or after a
;; character whenever required.  By default, this includes all
;; "two-part" punctuations (such as ?, !, etc.) and all quotation
;; punctuations.

;; There are three customizable options at the moment:

;; - `electric-french-nonbreak-space': the space character /
;;   string to use for the nonbreak space.  Apparently, different
;;   locales use differenc space characters.  See details at
;;   <msgid:5FB8702E-0499-4231-AD2C-55906C27B60F@traduction-libre.org>
;;   on emacs-humanities@gnu.org.

;; - `electric-french-prepend-space-puncts' and
;;   `electric-french-append-space-puncts': which characters
;;   should have nonbreak spaces prepended, or appended, to them,
;;   respectively.
--8<---------------cut here---------------end--------------->8---

[1]: https://git.sr.ht/~ruijieyu/electric-french
[2]: https://lists.gnu.org/archive/html/emacs-humanities/2023-05/msg00000.html

-- 
Best,


RY



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-04 14:15 [NonGNU Elpa] New package: electric-french Ruijie Yu via Emacs development discussions.
@ 2023-06-04 19:31 ` Matthias Meulien
  2023-06-05 11:03   ` Eli Zaretskii
  2023-06-05  8:34 ` Philip Kaludercic
  1 sibling, 1 reply; 7+ messages in thread
From: Matthias Meulien @ 2023-06-04 19:31 UTC (permalink / raw)
  To: Ruijie Yu; +Cc: emacs-devel

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

Thanks!

I am a native french speaker and I would expect such a feature to replace
the previous space with a non breaking space or insert a non breaking
space. This is the behaviour implemented in Libre Office Writer
AutoCorrection feature, Microsoft Word, etc. People are used to this and
for a good reason: It doesn't interfere with their habit to enter space
before most punctuation.

Also I would be interested in such a feature if it was available out of the
box: I don't have the motivation to remember package name, minor mode
names, etc. to install packages for such small features.

FYI at present time I am pressing "alt gr"+shift+space before punctuation
chars when necessary.

When writing HTML, there're mixed usage of punctuation characters (by CSS,
Javascript and the content language) and I am not convinced that such
libraries help...

Le dim. 4 juin 2023 à 16:57, Ruijie Yu via Emacs development discussions. <
emacs-devel@gnu.org> a écrit :

> Hello,
>
> I am proposing a new package called electric-french [1].  This stemmed
> from a discussion on emacs-humanities [2], where Jean-Christophe
> ("l@tlo") outlined a few common practices on nonbreak spaces in the
> French language.  See near the end of the message for the commentary
> section.
>
> First of all, I want to know if any other French speakers are interested
> in using this package -- in particular, whether this is beneficial in
> general, more than only l@tlo.
>
> Secondly, if people are indeed interested, I hope this can ultimately go
> to GNU elpa, but since I am still trying to get an employer disclaimer
> (without which I am very reluctant to making any FSF open source
> contributions), I don't want to propose its inclusion into elpa.git at
> this very moment, hence this proposal into nongnu.git as a "temporary
> workaround".
>
> Alternatively, we can also pretend it were proposed for elpa.git, and
> postpone the actual inclusion until everything settles on my end -- of
> course, only if enough people are interested in this package.
>
> I welcome any type of comments.  Anything, including the package name,
> can change with a valid reason.  Though fluent in English, I am not a
> native speaker, so there may be occasional errors on wording.  Nor am I
> so much a French speaker, and most information present in the package
> were either provided by l@tlo or obtained via some quick [search
> engine]'ing around, so any correction on that is welcome.  Thanks.
>
> (And I know I need to add the part-of/not-part-of Emacs paragraph to the
> header.  I'll add it when I know which elpa we are looking at.)
>
> --8<---------------cut here---------------start------------->8---
> ;;; Commentary:
>
> ;; This library facilitates adhering to various spacing
> ;; requirements of French literature.  It provides a minor mode,
> ;; where when enabled, inserts nonbreak spaces before or after a
> ;; character whenever required.  By default, this includes all
> ;; "two-part" punctuations (such as ?, !, etc.) and all quotation
> ;; punctuations.
>
> ;; There are three customizable options at the moment:
>
> ;; - `electric-french-nonbreak-space': the space character /
> ;;   string to use for the nonbreak space.  Apparently, different
> ;;   locales use differenc space characters.  See details at
> ;;   <msgid:5FB8702E-0499-4231-AD2C-55906C27B60F@traduction-libre.org>
> ;;   on emacs-humanities@gnu.org.
>
> ;; - `electric-french-prepend-space-puncts' and
> ;;   `electric-french-append-space-puncts': which characters
> ;;   should have nonbreak spaces prepended, or appended, to them,
> ;;   respectively.
> --8<---------------cut here---------------end--------------->8---
>
> [1]: https://git.sr.ht/~ruijieyu/electric-french
> [2]:
> https://lists.gnu.org/archive/html/emacs-humanities/2023-05/msg00000.html
>
> --
> Best,
>
>
> RY
>
>

-- 
Matthias

[-- Attachment #2: Type: text/html, Size: 5070 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-04 14:15 [NonGNU Elpa] New package: electric-french Ruijie Yu via Emacs development discussions.
  2023-06-04 19:31 ` Matthias Meulien
@ 2023-06-05  8:34 ` Philip Kaludercic
  1 sibling, 0 replies; 7+ messages in thread
From: Philip Kaludercic @ 2023-06-05  8:34 UTC (permalink / raw)
  To: Ruijie Yu via Emacs development discussions.; +Cc: Ruijie Yu

Ruijie Yu via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Hello,
>
> I am proposing a new package called electric-french [1].  This stemmed
> from a discussion on emacs-humanities [2], where Jean-Christophe
> ("l@tlo") outlined a few common practices on nonbreak spaces in the
> French language.  See near the end of the message for the commentary
> section.

Perhaps just a general point, there is already a package on GNU ELPA
called "ef-themes", and it could be confusing if you use the "ef-"
prefix, since it is might make it appear to be a more
general/super-feature.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-04 19:31 ` Matthias Meulien
@ 2023-06-05 11:03   ` Eli Zaretskii
  2023-06-05 18:20     ` Matthias Meulien
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2023-06-05 11:03 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: ruijie, emacs-devel

> From: Matthias Meulien <orontee@gmail.com>
> Date: Sun, 4 Jun 2023 21:31:42 +0200
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
> I am a native french speaker and I would expect such a feature to replace the previous space with a
> non breaking space or insert a non breaking space. This is the behaviour implemented in Libre Office
> Writer AutoCorrection feature, Microsoft Word, etc. People are used to this and for a good reason: It
> doesn't interfere with their habit to enter space before most punctuation.

Is this to avoid breaking lines where they shouldn't be?  If so, we
already have fill-french-nobreak-p; see fill.el.

If this is for some other purpose, i.e. if typing French text needs to
insert no-break-space character for a purpose other than filling the
text correctly, then would someone please explain the needs, before
presenting solutions?

Thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-05 11:03   ` Eli Zaretskii
@ 2023-06-05 18:20     ` Matthias Meulien
  2023-06-05 18:55       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Matthias Meulien @ 2023-06-05 18:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ruijie, emacs-devel

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

> Is this to avoid breaking lines where they shouldn't be?  If so, we
> already have fill-french-nobreak-p; see fill.el.
>

Thanks, I didn't know that.


> If this is for some other purpose, i.e. if typing French text needs to
> insert no-break-space character for a purpose other than filling the
> text correctly, then would someone please explain the needs, before
> presenting solutions?
>

French text typed in Emacs is not necessary rendered in Emacs only: An HTML
page written in Emacs but rendered in Firefox will have it's line breaks at
different places and non-breaking spaces will apply for Firefox as well as
Emacs.

Other example: I use to type text in Emacs and later copy-paste in word
processing applications; I am happy to have non-breaking spaces already in
place.
-- 
Matthias

[-- Attachment #2: Type: text/html, Size: 1356 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-05 18:20     ` Matthias Meulien
@ 2023-06-05 18:55       ` Eli Zaretskii
  2023-06-05 21:22         ` Matthias Meulien
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2023-06-05 18:55 UTC (permalink / raw)
  To: Matthias Meulien; +Cc: ruijie, emacs-devel

> From: Matthias Meulien <orontee@gmail.com>
> Date: Mon, 5 Jun 2023 20:20:34 +0200
> Cc: ruijie@netyu.xyz, emacs-devel@gnu.org
> 
> French text typed in Emacs is not necessary rendered in Emacs only: An HTML page written in Emacs
> but rendered in Firefox will have it's line breaks at different places and non-breaking spaces will apply
> for Firefox as well as Emacs.

Isn't it the job of a Web browser to display French text correctly,
breaking lines only where a French reader would expect?  I didn't know
browsers needed help in that by inserting NBSP.  Do they?

> Other example: I use to type text in Emacs and later copy-paste in word processing applications; I am
> happy to have non-breaking spaces already in place.

Same here: isn't it the job of the word processor to break lines
correctly for French?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [NonGNU Elpa] New package: electric-french
  2023-06-05 18:55       ` Eli Zaretskii
@ 2023-06-05 21:22         ` Matthias Meulien
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Meulien @ 2023-06-05 21:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ruijie, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1224 bytes --]

>
> > French text typed in Emacs is not necessary rendered in Emacs only: An
> HTML page written in Emacs
> > but rendered in Firefox will have it's line breaks at different places
> and non-breaking spaces will apply
> > for Firefox as well as Emacs.
>
> Isn't it the job of a Web browser to display French text correctly,
> breaking lines only where a French reader would expect?  I didn't know
> browsers needed help in that by inserting NBSP.  Do they?
>

I am not an HTML expert but I played with "lang=en" and "lang=fr"
attributes on "html", "body" and "p" elements, and in all three cases
Firefox, Chrome and EWW broke lines at strange places from my point of
view, unrelated to the lang attribute:

[image: Capture d’écran du 2023-06-05 23-03-03.png]


> > Other example: I use to type text in Emacs and later copy-paste in word
> processing applications; I am
> > happy to have non-breaking spaces already in place.
>
> Same here: isn't it the job of the word processor to break lines
> correctly for French?
>

AFAIU they do by inserting non-breaking spaces when the punctuation
characters are inserted; This doesn't apply when copy-pasting...
[image: image.png]

-- 
Matthias

[-- Attachment #1.2: Type: text/html, Size: 1954 bytes --]

[-- Attachment #2: Capture d’écran du 2023-06-05 23-03-03.png --]
[-- Type: image/png, Size: 525174 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 116975 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-05 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 14:15 [NonGNU Elpa] New package: electric-french Ruijie Yu via Emacs development discussions.
2023-06-04 19:31 ` Matthias Meulien
2023-06-05 11:03   ` Eli Zaretskii
2023-06-05 18:20     ` Matthias Meulien
2023-06-05 18:55       ` Eli Zaretskii
2023-06-05 21:22         ` Matthias Meulien
2023-06-05  8:34 ` Philip Kaludercic

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.