unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Mistakes in TUTORIAL.fr
@ 2004-04-07 14:36 Stephen J. Turnbull
  2004-04-08  0:54 ` Kenichi Handa
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen J. Turnbull @ 2004-04-07 14:36 UTC (permalink / raw)


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

This user reports a problem with the TUTORIAL.fr.  I can't access
savannah at the moment, but the fault is also present in my 2003-07-08
checkout of GNU Emacs.

Regards,


[-- Attachment #2: Type: message/rfc822, Size: 4473 bytes --]

From: <jlr_0@yahoo.com>
To: xemacs-beta@xemacs.org
Subject: Mistakes in TUTORIAL.fr
Date: Wed, 7 Apr 2004 10:58:10 +0200
Message-ID: <16499.49826.745365.301288@gargle.gargle.HOWL>

Command "M-e" moves forward to the end of a sentence.  In
order to be recognized as the end of a sentence, the ending
period, question mark, or exclamation point must be followed
by two spaces.

Unfortunately, in the french tutorial no ending period is
followed by two spaces.  This makes the command "M-e"
impossible to test although the french reader is invited to
do so:

>> Tapez quelques C-a et quelques C-e.
   Puis tapez quelques M-a et quelques M-e.

Could it be that the tutorial's translator did not even test
the tutorial himself?

----------------------------------------------------------------
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/papadopoulos-response.html


[-- Attachment #3: Type: text/plain, Size: 293 bytes --]



-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

[-- Attachment #4: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-07 14:36 Mistakes in TUTORIAL.fr Stephen J. Turnbull
@ 2004-04-08  0:54 ` Kenichi Handa
  2004-04-08  4:16   ` Juri Linkov
                     ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Kenichi Handa @ 2004-04-08  0:54 UTC (permalink / raw)
  Cc: jlr_0, jaco, emacs-devel

In article <87zn9netxj.fsf@tleepslib.sk.tsukuba.ac.jp>, "Stephen J. Turnbull" <stephen@xemacs.org> writes:

> [1  <text/plain (7bit)>]
> This user reports a problem with the TUTORIAL.fr.  I can't access
> savannah at the moment, but the fault is also present in my 2003-07-08
> checkout of GNU Emacs.

[...]
> Unfortunately, in the french tutorial no ending period is
> followed by two spaces.  This makes the command "M-e"
> impossible to test although the french reader is invited to
> do so:

>>>  Tapez quelques C-a et quelques C-e.
>    Puis tapez quelques M-a et quelques M-e.

Thank you for finding this problem.  We should fix it.  But
how?

Putting one more space after periods in TUTORIAL.fr is easy.

But, if double spaces after a period looks very ugly or
intolerable typing method for French people (I don't know
anything about French typesetting), we may have to change
sentence-end in the TUTORIAL.fr buffer.

Éric, your name is listed as a translator of TUTORIAL.fr.
What do you think?

---
Ken'ichi HANDA
handa@m17n.org

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  0:54 ` Kenichi Handa
@ 2004-04-08  4:16   ` Juri Linkov
  2004-04-09 22:46     ` Richard Stallman
  2004-04-10 22:45     ` Juri Linkov
  2004-04-08  8:24   ` Eric Jacoboni
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Juri Linkov @ 2004-04-08  4:16 UTC (permalink / raw)
  Cc: stephen, virach, emacs-devel, jaco, jlr_0

Kenichi Handa <handa@m17n.org> writes:
>> Unfortunately, in the french tutorial no ending period is
>> followed by two spaces.  This makes the command "M-e"
>> impossible to test although the french reader is invited to
>> do so:
>
>>>>  Tapez quelques C-a et quelques C-e.
>>    Puis tapez quelques M-a et quelques M-e.
>
> Thank you for finding this problem.  We should fix it.  But
> how?
>
> Putting one more space after periods in TUTORIAL.fr is easy.
>
> But, if double spaces after a period looks very ugly or
> intolerable typing method for French people (I don't know
> anything about French typesetting),

I guess that if the translation has a single space after a period
it was made according to typesetting rules of that language.

> we may have to change sentence-end in the TUTORIAL.fr buffer.

There is a better variable to do this: `sentence-end-double-space'.
It could be set to nil in local variables.

There are also other translations that have a single space:
TUTORIAL.pl TUTORIAL.ru TUTORIAL.sl TUTORIAL.sv TUTORIAL.th.
Perhaps we should add this local variable for them as well.

It seems strange that the Thai translation has a period and a single
space at the end of sentences.  There is a special variable
`sentence-end-without-period' with docstring telling that a sentence
in Thai text ends with double space, but without a period.  Probably
at the time when the translation was done this variable was not
available in Emacs yet.  Shouldn't a period and space in the Thai file
be replaced by double space?

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  0:54 ` Kenichi Handa
  2004-04-08  4:16   ` Juri Linkov
@ 2004-04-08  8:24   ` Eric Jacoboni
  2004-04-08 13:00   ` Robert J. Chassell
  2004-04-08 14:57   ` Richard Stallman
  3 siblings, 0 replies; 11+ messages in thread
From: Eric Jacoboni @ 2004-04-08  8:24 UTC (permalink / raw)
  Cc: emacs-devel

Kenichi Handa wrote:

> Putting one more space after periods in TUTORIAL.fr is easy.
> 
> But, if double spaces after a period looks very ugly or
> intolerable typing method for French people (I don't know
> anything about French typesetting), we may have to change
> sentence-end in the TUTORIAL.fr buffer.

I think the later is the best solution as french typesetting rules say 
to put one space after low punctuation, and one before and one after 
high punctuation.

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  0:54 ` Kenichi Handa
  2004-04-08  4:16   ` Juri Linkov
  2004-04-08  8:24   ` Eric Jacoboni
@ 2004-04-08 13:00   ` Robert J. Chassell
  2004-04-08 14:23     ` David Kastrup
  2004-04-08 14:57   ` Richard Stallman
  3 siblings, 1 reply; 11+ messages in thread
From: Robert J. Chassell @ 2004-04-08 13:00 UTC (permalink / raw)


   But, if double spaces after a period looks very ugly or
   intolerable typing method for French people (I don't know
   anything about French typesetting), we may have to change
   sentence-end in the TUTORIAL.fr buffer.

Hmm...  I don't know anything about French typing conventions.
However, some Web browsers display text with only one space at the
ends of sentences, even if they are created with two spaces at the
ends of sentences.  GNU Emacs W3M mode converts pages created with two
spaces to pages with one space.

This is a bother.  Do we want to create a mode of some sort that sets
`sentence-end' and `sentence-end-double-space' to the appropriate
values for Emacs?

Then the top of TUTORIAL.fr could include   -*-fr-text*-   
or even better something like   -*-single-space-text-*-
that would work with Web pages, too.

On the other hand, I strongly favor the `two spaces at the ends of
sentences' convention since it does make editing and reading easier.
Also, a typesetting program such as TeX does insert more space between
sentences than letters, at least for my English language writings.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    As I slowly update it,                     bob@rattlesnake.com
        I rewrite a "What's New" segment for   http://www.rattlesnake.com

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08 13:00   ` Robert J. Chassell
@ 2004-04-08 14:23     ` David Kastrup
  0 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2004-04-08 14:23 UTC (permalink / raw)
  Cc: emacs-devel

"Robert J. Chassell" <bob@rattlesnake.com> writes:

> On the other hand, I strongly favor the `two spaces at the ends of
> sentences' convention since it does make editing and reading easier.
> Also, a typesetting program such as TeX does insert more space
> between sentences than letters, at least for my English language
> writings.

Not if you use \frenchspacing.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  0:54 ` Kenichi Handa
                     ` (2 preceding siblings ...)
  2004-04-08 13:00   ` Robert J. Chassell
@ 2004-04-08 14:57   ` Richard Stallman
  3 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2004-04-08 14:57 UTC (permalink / raw)
  Cc: stephen, emacs-devel, jaco, jlr_0

We could set sentence-end-double-space to nil for TUTORIAL.fr
and edit it appropriately.

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  4:16   ` Juri Linkov
@ 2004-04-09 22:46     ` Richard Stallman
  2004-04-10  0:37       ` Virach Sornlertlamvanich
  2004-04-10 22:45     ` Juri Linkov
  1 sibling, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2004-04-09 22:46 UTC (permalink / raw)
  Cc: jlr_0, handa, jaco, emacs-devel, virach, stephen

    There is a better variable to do this: `sentence-end-double-space'.
    It could be set to nil in local variables.

    There are also other translations that have a single space:
    TUTORIAL.pl TUTORIAL.ru TUTORIAL.sl TUTORIAL.sv TUTORIAL.th.
    Perhaps we should add this local variable for them as well.

Would you like to do this?

    It seems strange that the Thai translation has a period and a single
    space at the end of sentences.  There is a special variable
    `sentence-end-without-period' with docstring telling that a sentence
    in Thai text ends with double space, but without a period.  Probably
    at the time when the translation was done this variable was not
    available in Emacs yet.  Shouldn't a period and space in the Thai file
    be replaced by double space?

Please do this too if you feel like it.

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-09 22:46     ` Richard Stallman
@ 2004-04-10  0:37       ` Virach Sornlertlamvanich
  0 siblings, 0 replies; 11+ messages in thread
From: Virach Sornlertlamvanich @ 2004-04-10  0:37 UTC (permalink / raw)
  Cc: handa, jlr_0, jaco, emacs-devel, Juri Linkov, virach, stephen

Richard Stallman said:
>     There is a better variable to do this: `sentence-end-double-space'.
>     It could be set to nil in local variables.
>
>     There are also other translations that have a single space:
>     TUTORIAL.pl TUTORIAL.ru TUTORIAL.sl TUTORIAL.sv TUTORIAL.th.
>     Perhaps we should add this local variable for them as well.

Both single-space and double-space at sentence-end are conventionally used.
Single-space at sentence-end is used by most because Thais are not so
sensible about sentence-end.

> Would you like to do this?
>
>     It seems strange that the Thai translation has a period and a single
>     space at the end of sentences.  There is a special variable
>     `sentence-end-without-period' with docstring telling that a sentence
>     in Thai text ends with double space, but without a period.  Probably
>     at the time when the translation was done this variable was not
>     available in Emacs yet.  Shouldn't a period and space in the Thai file
>     be replaced by double space?

Though no punctuation-mark (comma, period, question-mark, ...) is required
at all, there is a convention of using punctuation-mark proposed by some
academic institutes. Current situation of sentence-end appearance:-
1. Major Thai texts are single-space at sentence-end without period
2. Some Thai texts are double-space at sentence-end without period
3. Few Thai texts are single-space at sentence-end with period

I am choosing 3. especially for writing technical article. It is
recommended for reducing the ambiguities that may occur in case of the
understanding the range modification.
Some of us are promoting 3. for modern use.

> Please do this too if you feel like it.

Above 3 alternatives are preferred. The Thai TUTORIAL text for should keep
the convention number 3.

Virach

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-08  4:16   ` Juri Linkov
  2004-04-09 22:46     ` Richard Stallman
@ 2004-04-10 22:45     ` Juri Linkov
  2004-04-14 18:02       ` Richard Stallman
  1 sibling, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2004-04-10 22:45 UTC (permalink / raw)


Juri Linkov <juri@jurta.org> writes:
> Kenichi Handa <handa@m17n.org> writes:
>> we may have to change sentence-end in the TUTORIAL.fr buffer.
>
> There is a better variable to do this: `sentence-end-double-space'.
> It could be set to nil in local variables.

In the previous post I mistakenly suggested to use
`sentence-end-double-space' instead of `sentence-end'.

Really, changing `sentence-end-double-space' does not affect the value
of `sentence-end' at all.  This is very confusing and inconvenient!

Why not to construct the value of `sentence-end' dynamically?

I propose the following patch:

Index: emacs/lisp/textmodes/paragraphs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/paragraphs.el,v
retrieving revision 1.69
diff -u -r1.69 paragraphs.el
--- emacs/lisp/textmodes/paragraphs.el	16 Feb 2004 19:34:25 -0000	1.69
+++ emacs/lisp/textmodes/paragraphs.el	10 Apr 2004 22:04:57 -0000
@@ -140,16 +140,17 @@
   :group 'paragraphs
   :type 'string)
 
-(defcustom sentence-end
-  (purecopy
-   ;; This is a bit stupid since it's not auto-updated when the
-   ;; other variables are changes, but it's still useful info.
-   (concat (if sentence-end-without-period "\\w  \\|")
-	   "\\([.?!][]\"')}]*"
-	   (if sentence-end-double-space
-	       "\\($\\| $\\|\t\\|  \\)" "\\($\\|[\t ]\\)")
-	   "\\|[" sentence-end-without-space "]+\\)"
-	   "[ \t\n]*"))
+(defun sentence-end ()
+  (if (and sentence-end (not (equal sentence-end "")))
+      sentence-end
+    (concat (if sentence-end-without-period "\\w  \\|")
+            "\\([.?!][]\"')}]*"
+            (if sentence-end-double-space
+                "\\($\\| $\\|\t\\|  \\)" "\\($\\|[\t ]\\)")
+            "\\|[" sentence-end-without-space "]+\\)"
+            "[ \t\n]*")))
+
+(defcustom sentence-end ""
   "*Regexp describing the end of a sentence.
 The value includes the whitespace following the sentence.
 All paragraph boundaries also end sentences, regardless.
@@ -411,7 +412,8 @@
 sentences.  Also, every paragraph boundary terminates sentences as well."
   (interactive "p")
   (or arg (setq arg 1))
-  (let ((opoint (point)))
+  (let ((opoint (point))
+        (sentence-end (sentence-end)))
     (while (< arg 0)
       (let ((pos (point))
 	    (par-beg (save-excursion (start-of-paragraph-text) (point))))
Index: emacs/lisp/textmodes/fill.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/fill.el,v
retrieving revision 1.171
diff -u -r1.171 fill.el
--- emacs/lisp/textmodes/fill.el	4 Apr 2004 20:18:44 -0000	1.171
+++ emacs/lisp/textmodes/fill.el	11 Apr 2004 02:04:59 -0000
@@ -155,7 +155,7 @@
 and `sentence-end-without-period').
 Remove indentation from each line."
   (interactive "*r")
-  (let ((end-spc-re (concat "\\(" sentence-end "\\) *\\|  +")))
+  (let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\|  +")))
     (save-excursion
       (goto-char beg)
       ;; Nuke tabs; they get screwed up in a fill.
@@ -349,7 +349,7 @@
      (save-excursion
        (skip-chars-backward ". ")
        (and (looking-at "\\.")
-     	    (not (looking-at sentence-end))))
+     	    (not (looking-at (sentence-end)))))
      ;; Don't split a line if the rest would look like a new paragraph.
      (unless use-hard-newlines
        (save-excursion
@@ -424,10 +424,10 @@
   ;; loses on split abbrevs ("Mr.\nSmith")
   (let ((eol-double-space-re
 	 (cond
-	  ((not colon-double-space) (concat sentence-end "$"))
+	  ((not colon-double-space) (concat (sentence-end) "$"))
 	  ;; Try to add the : inside the `sentence-end' regexp.
-	  ((string-match "\\[[^][]*\\(\\.\\)[^][]*\\]" sentence-end)
-	   (concat (replace-match ".:" nil nil sentence-end 1) "$"))
+	  ((string-match "\\[[^][]*\\(\\.\\)[^][]*\\]" (sentence-end))
+	   (concat (replace-match ".:" nil nil (sentence-end) 1) "$"))
 	  ;; Can't find the right spot to insert the colon.
 	  (t "[.?!:][])}\"']*$")))
 	(sentence-end-without-space-list
Index: emacs/lisp/progmodes/cc-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-cmds.el,v
retrieving revision 1.35
diff -u -r1.35 cc-cmds.el
--- emacs/lisp/progmodes/cc-cmds.el	16 Nov 2003 16:55:07 -0000	1.35
+++ emacs/lisp/progmodes/cc-cmds.el	11 Apr 2004 02:05:00 -0000
@@ -1488,7 +1488,7 @@
 				     (save-excursion
 				       (beginning-of-line)
 				       (or (not (re-search-backward
-						 sentence-end
+						 (sentence-end)
 						 (c-point 'bopl)
 						 t))
 					   (< (match-end 0)

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Mistakes in TUTORIAL.fr
  2004-04-10 22:45     ` Juri Linkov
@ 2004-04-14 18:02       ` Richard Stallman
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2004-04-14 18:02 UTC (permalink / raw)
  Cc: emacs-devel

    Why not to construct the value of `sentence-end' dynamically?

It might be a good idea.  However, some people and some modes might
use values other than those two.

However, I don't see anything in Emacs that uses a different value.

Meanwhile, sgml-mode.el is kludgily doing this change for itself.  (It
is bad for individual major modes to do things that should be done
either by all of them or by none of them.)

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

end of thread, other threads:[~2004-04-14 18:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-07 14:36 Mistakes in TUTORIAL.fr Stephen J. Turnbull
2004-04-08  0:54 ` Kenichi Handa
2004-04-08  4:16   ` Juri Linkov
2004-04-09 22:46     ` Richard Stallman
2004-04-10  0:37       ` Virach Sornlertlamvanich
2004-04-10 22:45     ` Juri Linkov
2004-04-14 18:02       ` Richard Stallman
2004-04-08  8:24   ` Eric Jacoboni
2004-04-08 13:00   ` Robert J. Chassell
2004-04-08 14:23     ` David Kastrup
2004-04-08 14:57   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

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).