all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Possible change to startup.el
@ 2005-03-31 12:01 Thien-Thi Nguyen
  2005-03-31 12:59 ` Kim F. Storm
  2005-04-01  4:03 ` Juri Linkov
  0 siblings, 2 replies; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-31 12:01 UTC (permalink / raw)
  Cc: emacs-devel

   From: Juri Linkov <juri@jurta.org>
   Date: Thu, 31 Mar 2005 09:59:45 +0300

   The text "Emacs Tutorial" on the splash screen should not be replaced
   with a translation at all because it is the text of the menu item and
   menu items under the Help menu are not translated.

there are five elements on the tutorial line:

 TITLE -- "Emacs Tutorial" translated for the current language env
 EN-TITLE -- English text "Emacs Tutorial"
 EN-BLURB -- English text "Learn-by-doing tutorial ... efficiently."
 tab -- a tab character (0x9)
 LIST-OF-AVAILABLE-TUTORIALS -- list of locale suffixes

the pre-patch presentation format is:

 EN-TITLE tab EN-BLURB

the patched presentation format is:

 (if data-directory is not availble)
 EN-TITLE tab EN-BLURB

 (if filename resolved from consulting language env is "TUTORIAL")
 EN-TITLE tab LIST-OF-AVAILABLE-TUTORIALS

 (otherwise)
 TITLE tab (EN-TITLE) LIST-OF-AVAILABLE-TUTORIALS

what do you propose for the presentation format, based on these
conditions and elements?

thi

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Re: Possible change to startup.el
@ 2005-04-03 10:31 Thien-Thi Nguyen
  2005-04-07  6:55 ` Juri Linkov
  0 siblings, 1 reply; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-04-03 10:31 UTC (permalink / raw)
  Cc: emacs-devel

   From: Richard Stallman <rms@gnu.org>
   Date: Thu, 31 Mar 2005 23:11:17 -0500

   That needs to be done in order for this patch to be installed.

please find below a revised patch, including two files (lisp/startup.el
and etc/TUTORIAL.jp).  here is a suitable ChangeLog entry for the code:

	* startup.el (fancy-splash-text): Shorten default text of
	"Emacs Tutorial" line.  Also, if the current language env
	indicates an available tutorial file other than TUTORIAL,
	extract its title and append it to the line in parentheses.
	(fancy-splash-insert): If an arg is a thunk, funcall it.

i have completely dropped LIST-OF-AVAILABLE-TUTORIALS, and furthermore,
in consideration that all these are menu items, used the English text
"Emacs Tutorial" unconditionally since that is what is on the menu.  in
other words, the design has changed from substitutive to additive.

thi

___________________________________________________________
cvs -f diff -c lisp/startup.el etc/TUTORIAL*
Index: lisp/startup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/startup.el,v
retrieving revision 1.340
diff -c -r1.340 startup.el
*** lisp/startup.el	6 Mar 2005 00:48:45 -0000	1.340
--- lisp/startup.el	3 Apr 2005 10:15:25 -0000
***************
*** 1004,1011 ****
  using the mouse.\n\n"
  	   :face (variable-pitch :weight bold)
  	   "Important Help menu items:\n"
! 	   :face variable-pitch "\
! Emacs Tutorial\tLearn-by-doing tutorial for using Emacs efficiently
  Emacs FAQ\tFrequently asked questions and answers
  Read the Emacs Manual\tView the Emacs manual using Info
  \(Non)Warranty\tGNU Emacs comes with "
--- 1004,1030 ----
  using the mouse.\n\n"
  	   :face (variable-pitch :weight bold)
  	   "Important Help menu items:\n"
! 	   :face variable-pitch
!            (lambda ()
!              (let* ((en "TUTORIAL")
!                     (tut (or (get-language-info current-language-environment
!                                                 'tutorial)
!                              en))
!                     (title (with-temp-buffer
!                              (insert-file-contents
!                               (expand-file-name tut data-directory)
!                               nil 0 256)
!                              (search-forward ".")
!                              (buffer-substring (point-min) (1- (point))))))
!                ;; If there is a specific tutorial for the current language
!                ;; environment and it is not English, append its title.
!                (concat
!                 "Emacs Tutorial\tLearn how to use Emacs efficiently"
!                 (if (string= en tut)
!                     ""
!                   (concat " (" title ")"))
!                 "\n")))
!            :face variable-pitch "\
  Emacs FAQ\tFrequently asked questions and answers
  Read the Emacs Manual\tView the Emacs manual using Info
  \(Non)Warranty\tGNU Emacs comes with "
***************
*** 1069,1082 ****
  
  (defun fancy-splash-insert (&rest args)
    "Insert text into the current buffer, with faces.
! Arguments from ARGS should be either strings or pairs `:face FACE',
  where FACE is a valid face specification, as it can be used with
  `put-text-properties'."
    (let ((current-face nil))
      (while args
        (if (eq (car args) :face)
  	  (setq args (cdr args) current-face (car args))
! 	(insert (propertize (car args)
  			    'face current-face
  			    'help-echo fancy-splash-help-echo)))
        (setq args (cdr args)))))
--- 1088,1105 ----
  
  (defun fancy-splash-insert (&rest args)
    "Insert text into the current buffer, with faces.
! Arguments from ARGS should be either strings, functions called
! with no args that return a string, or pairs `:face FACE',
  where FACE is a valid face specification, as it can be used with
  `put-text-properties'."
    (let ((current-face nil))
      (while args
        (if (eq (car args) :face)
  	  (setq args (cdr args) current-face (car args))
! 	(insert (propertize (let ((it (car args)))
!                               (if (functionp it)
!                                   (funcall it)
!                                 it))
  			    'face current-face
  			    'help-echo fancy-splash-help-echo)))
        (setq args (cdr args)))))
Index: etc/TUTORIAL.ja
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TUTORIAL.ja,v
retrieving revision 1.11
diff -c -r1.11 TUTORIAL.ja
*** etc/TUTORIAL.ja	2 Apr 2005 18:29:00 -0000	1.11
--- etc/TUTORIAL.ja	3 Apr 2005 10:15:26 -0000
***************
*** 1,4 ****
! Emacs ^[$BF~Lg%,%$%I$G$9^[(B.
  Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
  
  Emacs ^[$B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K^[(B
--- 1,4 ----
! Emacs ^[$BF~Lg%,%$%I^[(B.
  Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
  
  Emacs ^[$B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K^[(B

Compilation exited abnormally with code 1 at Sun Apr  3 12:21:30

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Re: Possible change to startup.el
@ 2005-03-31 11:37 Thien-Thi Nguyen
  2005-03-31 12:05 ` Miles Bader
  0 siblings, 1 reply; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-31 11:37 UTC (permalink / raw)
  Cc: emacs-devel

   From: Miles Bader <snogglethorpe@gmail.com>
   Date: Thu, 31 Mar 2005 10:40:05 +0900

   So what exactly is that patch supposed to do?

here is a suitable ChangeLog entry:

	* startup.el (fancy-splash-text): For tutorial line, consult
	language environment and display accordingly, in format:
	TITLE, tab, EN-PREFIX*, LIST-OF-AVAILABLE-TUTORIALS.
	(fancy-splash-insert): If arg is a thunk, call it for a string.

the asterisk after EN-PREFIX means that it may be omitted if there is no
need for it.  (arguably there is no need for it in any case.)

   I'm not sure it's a good idea to take the description `first sentence
   in the tutorial' literally; a sentence may not be the best unit to
   use, as something that sounds natural when inserted into the splash
   page may look odd as a standalone first sentence in the tutorial.

in this context, i interpret sentence as "text followed by period".
something like "Emacs Tutorial." (with period), in which case TITLE is
taken to be "Emacs Tutorial" (without the period).  thus, this is not a
"normal" sentence w/ verbs and other words.  the current standalone
first sentence is normal but will need to be changed (w/ the help of
translators) from:

BLAH BLAH BLAH.  ETC ETC

to the stylized:

TITLE.  BLAH BLAH BLAH.  ETC ETC.

translators are encouraged to reduce awkwardness (w/ the advent of
TITLE) in the BLAH part, perhaps by reworking or eliminating it
entirely.

   It seem better to do as I suggested earlier, and structure it more as
   a `title' in the actual tutorial file (that is, simply the words
   "Emacs Tutorial" or equivalent, on a line by themselves, possibly
   centered on the first line, followed by a blank line).

this is the same as rms' design, except that TITLE is delimited by first
newline instead of first period.  initially, i thought newline delim was
better since it could be added simply (w/o changing current text) and,
just as simply, be removed upon presentation.  however, i suppose that
violates the "one source for data" principle, so i can see value in
using period delim and reworking the BLAH part.

thi

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Re: Possible change to startup.el
@ 2005-03-30 22:47 Thien-Thi Nguyen
  2005-03-30 23:38 ` David Kastrup
                   ` (3 more replies)
  0 siblings, 4 replies; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-30 22:47 UTC (permalink / raw)
  Cc: emacs-devel

   From: Richard Stallman <rms@gnu.org>
   Date: Fri, 25 Mar 2005 01:43:07 -0500

   We could make that a general rule: every tutorial translation must
   start with a sentence that translates "Emacs tutorial".

sorry, i misunderstood this simple sentence and implemented the wrong
thing (gotta slow down sometimes and be more careful).  please find
below a revised patch that uses the first sentence of the file as the
text for the splash screen.  unfortunately, i prematurely committed
changes to the actual TUTORIAL files due to concerns that translators
might not see the proposed changes.  i think it's best that i stick w/
the code and let Marcelo and others handle updates to those files. :-(

thi


_____________________________________________
cvs -f diff -c startup.el
diff -c -r1.340 startup.el
*** startup.el	6 Mar 2005 00:48:45 -0000	1.340
--- startup.el	30 Mar 2005 22:33:59 -0000
***************
*** 1004,1012 ****
  using the mouse.\n\n"
  	   :face (variable-pitch :weight bold)
  	   "Important Help menu items:\n"
! 	   :face variable-pitch "\
! Emacs Tutorial\tLearn-by-doing tutorial for using Emacs efficiently
! Emacs FAQ\tFrequently asked questions and answers
  Read the Emacs Manual\tView the Emacs manual using Info
  \(Non)Warranty\tGNU Emacs comes with "
  	   :face (variable-pitch :slant oblique)
--- 1004,1046 ----
  using the mouse.\n\n"
  	   :face (variable-pitch :weight bold)
  	   "Important Help menu items:\n"
! 	   :face variable-pitch
!            (lambda ()
!              (concat
!               (let ((tut (expand-file-name
!                           (or (get-language-info current-language-environment
!                                                  'tutorial)
!                               "TUTORIAL")
!                           data-directory)))
!                 (with-temp-buffer
!                   (insert-file-contents tut nil 0 80)
!                   (search-forward ".")
!                   (buffer-substring (point-min) (point))))
!               "\t"))
!            :face (variable-pitch :weight bold)
!            (lambda ()
!              (if (not data-directory)
!                  "Learn-by-doing tutorial for using Emacs efficiently."
!                (let* ((tut (get-language-info current-language-environment
!                                               'tutorial))
!                       (en-prefix (if (or (not tut) (string= "TUTORIAL" tut))
!                                      ""
!                                    "(Emacs Tutorial) "))
!                       (break (- (length en-prefix)))
!                       langs s len)
!                  (dolist (filename (directory-files data-directory))
!                    (when (string-match "TUTORIAL.\\([a-z][a-z]\\(_[A-Z]+\\)*$\\)"
!                                        filename)
!                      (push (match-string 1 filename) langs)))
!                  (setq s (mapconcat 'identity (sort (cons "en" langs) 'string<)
!                                     ", ")
!                        len (length s))
!                  (while (and (< (setq break (+ 50 break)) len)
!                              (setq break (string-match ", " s break)))
!                    (aset s break ?\n)
!                    (aset s (1+ break) ?\t))
!                  (concat en-prefix s "\n"))))
!            :face variable-pitch "\
  Read the Emacs Manual\tView the Emacs manual using Info
  \(Non)Warranty\tGNU Emacs comes with "
  	   :face (variable-pitch :slant oblique)
***************
*** 1069,1082 ****
  
  (defun fancy-splash-insert (&rest args)
    "Insert text into the current buffer, with faces.
! Arguments from ARGS should be either strings or pairs `:face FACE',
  where FACE is a valid face specification, as it can be used with
  `put-text-properties'."
    (let ((current-face nil))
      (while args
        (if (eq (car args) :face)
  	  (setq args (cdr args) current-face (car args))
! 	(insert (propertize (car args)
  			    'face current-face
  			    'help-echo fancy-splash-help-echo)))
        (setq args (cdr args)))))
--- 1103,1120 ----
  
  (defun fancy-splash-insert (&rest args)
    "Insert text into the current buffer, with faces.
! Arguments from ARGS should be either strings, functions called
! with no args that return a string, or pairs `:face FACE',
  where FACE is a valid face specification, as it can be used with
  `put-text-properties'."
    (let ((current-face nil))
      (while args
        (if (eq (car args) :face)
  	  (setq args (cdr args) current-face (car args))
! 	(insert (propertize (let ((it (car args)))
!                               (if (functionp it)
!                                   (funcall it)
!                                 it))
  			    'face current-face
  			    'help-echo fancy-splash-help-echo)))
        (setq args (cdr args)))))

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Re: Possible change to startup.el
@ 2005-03-25 18:07 Thien-Thi Nguyen
  2005-03-27  3:52 ` Richard Stallman
  0 siblings, 1 reply; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-25 18:07 UTC (permalink / raw)
  Cc: emacs-devel

   From: Miles Bader <snogglethorpe@gmail.com>
   Date: Fri, 25 Mar 2005 04:05:30 +0900

   I'm confused as to why you don't like (a)...

i empathize w/ the authors of the tutorials who may not
wish to change their text.  there are enough rules and
regulations in the world (especially when you translate
your thoughts into software) that i am inclined to favor
approaches that extend the methods for collecting and
accessing metadata (i.e., learning to be more descriptive)
more than approaches that involve forcing conformity,
especially when it comes to codified thought other than
that which must be understood by the stupid computer.

whether or not the required change is a big deal in practice
is another matter entirely.  as is anything "in practice".
perhaps i'm weird (ok, i know i'm weird), but i would not
wish to put creative energy into a Work and then be told
post-facto that the effort must be redone due to limitations
in the audience.  i feel such a request shows disrespect.

thi

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Re: Possible change to startup.el
@ 2005-03-24 10:49 Thien-Thi Nguyen
  2005-03-24 19:05 ` Miles Bader
  2005-03-25  6:43 ` Richard Stallman
  0 siblings, 2 replies; 85+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-24 10:49 UTC (permalink / raw)
  Cc: emacs-devel

   From: Richard Stallman <rms@gnu.org>
   Date: Wed, 23 Mar 2005 15:25:54 -0500

   So how about adopting a convention [...]

three approaches come to mind:

(a) title on first line in file, ending w/ fullstop (period);

(b) a local variable "title-range" specifies the beginning and end
    character positions of the title in the text;

(c) separate file TUTORIAL.metainfo that maps locale to various
    things, such as the info in (b), coding system for read, a
    bug-report or support-group email address, etc.

of these, i favor (c), even though it has similar maintenance
requirement as the alist, because the file has the advantage of
being more efficient to access, and its format is extensible.
(we can also subsume TUTORIAL.translators into it.)

next, (b) is nice because the existing flow does not have to be
changed.  however, the full file needs to be read in, or at least
enough so that its title is present and its coding can be
established.

lastly, (a) is straightforward (less prone to botch-ups).  i do
not like it for esthetic reasons only.  same thinking applies for
any fixed-position approach.

thi

^ permalink raw reply	[flat|nested] 85+ messages in thread
* Possible change to startup.el
@ 2005-03-21 18:44 David Kastrup
  2005-03-21 20:50 ` Thien-Thi Nguyen
  2005-03-22 13:57 ` Richard Stallman
  0 siblings, 2 replies; 85+ messages in thread
From: David Kastrup @ 2005-03-21 18:44 UTC (permalink / raw)


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


After I had another run-in on a German-spoken Usenet group about how
hard it was trying to google around for finding out about using Emacs
and Emacs terminology, in particular if you were not a native speaker
and so on, and getting the usual "how should I have known something
like this exists" reactions after quoting the relevant German tutorial
section, I would like to propose something like the following:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: diffout --]
[-- Type: text/x-patch, Size: 925 bytes --]

*** /home/tmp/emacs/lisp/startup.el	2005-03-07 17:36:10.000000000 +0100
--- /usr/local/emacs-21/share/emacs/22.0.50/lisp/startup.el	2005-03-21 19:34:06.000000000 +0100
***************
*** 1298,1304 ****
  Recover Session		recover files you were editing before a crash
  
  Important Help menu items:
! Emacs Tutorial		Learn-by-doing tutorial for using Emacs efficiently.
  Emacs FAQ		Frequently asked questions and answers
  Read the Emacs Manual	View the Emacs manual using Info
  \(Non)Warranty		GNU Emacs comes with ABSOLUTELY NO WARRANTY
--- 1298,1305 ----
  Recover Session		recover files you were editing before a crash
  
  Important Help menu items:
! Emacs Tutorial		Learn-by-doing tutorial (in many languages)
! 			for using Emacs efficiently.
  Emacs FAQ		Frequently asked questions and answers
  Read the Emacs Manual	View the Emacs manual using Info
  \(Non)Warranty		GNU Emacs comes with ABSOLUTELY NO WARRANTY

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


I actually don't think that this will have any noticeable effect on
people whose eyes glaze over at the first English or technical word
(like "Help" in the menu bar), but it would give one a bigger clue bat
with which to whack them.

The disadvantage of the patch is that it makes the screen one line
longer.  I can't see a good way around it, except maybe dropping key
phrases like "efficiently" or "learn-by-doing".

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

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

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

end of thread, other threads:[~2005-04-17 19:51 UTC | newest]

Thread overview: 85+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-31 12:01 Possible change to startup.el Thien-Thi Nguyen
2005-03-31 12:59 ` Kim F. Storm
2005-03-31 13:43   ` David Kastrup
2005-03-31 22:19     ` Kim F. Storm
2005-04-01  4:10   ` Richard Stallman
2005-04-01  4:03 ` Juri Linkov
2005-04-03  5:20   ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-04-03 10:31 Thien-Thi Nguyen
2005-04-07  6:55 ` Juri Linkov
2005-04-08  3:22   ` Richard Stallman
2005-04-08  6:31     ` Marcelo Toledo
2005-04-08  7:27       ` Kenichi Handa
2005-04-08 18:32       ` Juri Linkov
2005-04-08 18:43         ` Marcelo Toledo
2005-04-10  1:54         ` Richard Stallman
2005-04-08 10:44     ` Eli Zaretskii
2005-04-08 18:32       ` Juri Linkov
2005-04-09  8:00         ` Eli Zaretskii
2005-04-13 23:58           ` David Kastrup
2005-04-14  4:02             ` Eli Zaretskii
2005-04-14  9:46               ` David Kastrup
2005-04-15  8:15                 ` Eli Zaretskii
2005-04-14 19:03             ` Richard Stallman
2005-04-14 23:40               ` David Kastrup
2005-04-17  1:49                 ` Richard Stallman
2005-04-17  9:31                   ` David Kastrup
2005-04-17 19:20                     ` Richard Stallman
2005-04-17 19:51                       ` David Kastrup
2005-04-10  1:54         ` Richard Stallman
2005-03-31 11:37 Thien-Thi Nguyen
2005-03-31 12:05 ` Miles Bader
2005-03-31 13:32   ` Thien-Thi Nguyen
2005-03-31 14:29     ` Miles Bader
2005-03-31 16:15       ` Thien-Thi Nguyen
2005-03-31 22:23         ` Miles Bader
2005-04-01  4:10   ` Richard Stallman
2005-03-30 22:47 Thien-Thi Nguyen
2005-03-30 23:38 ` David Kastrup
2005-04-01  4:11   ` Richard Stallman
2005-03-31  1:40 ` Miles Bader
2005-03-31  1:02   ` Marcelo Toledo
2005-03-31  3:20     ` Miles Bader
2005-03-31  2:21       ` Marcelo Toledo
2005-03-31  6:59 ` Juri Linkov
2005-04-01  4:11 ` Richard Stallman
2005-03-25 18:07 Thien-Thi Nguyen
2005-03-27  3:52 ` Richard Stallman
2005-03-27 23:15   ` Juri Linkov
2005-03-28 22:53     ` Richard Stallman
2005-03-29 20:19       ` Thien-Thi Nguyen
2005-03-30  4:08         ` Marcelo Toledo
2005-03-30  9:42           ` Thien-Thi Nguyen
2005-03-24 10:49 Thien-Thi Nguyen
2005-03-24 19:05 ` Miles Bader
2005-03-25  6:43 ` Richard Stallman
2005-03-21 18:44 David Kastrup
2005-03-21 20:50 ` Thien-Thi Nguyen
2005-03-21 21:10   ` David Kastrup
2005-03-21 21:25     ` Andreas Schwab
2005-03-21 22:14       ` David Kastrup
2005-03-22  0:03         ` Andreas Schwab
2005-03-22  1:38         ` David Hansen
2005-03-23 18:25         ` James Cloos
2005-03-27  3:53           ` Richard Stallman
2005-03-22  4:55   ` Eli Zaretskii
2005-03-22  6:24     ` Miles Bader
2005-03-22  8:15       ` Kenichi Handa
2005-03-22  8:27         ` Miles Bader
2005-03-22 10:40           ` David Kastrup
2005-03-22 12:44             ` Jason Rumney
2005-03-22 20:31             ` Werner LEMBERG
2005-03-22 11:23           ` Kenichi Handa
2005-03-22 12:33           ` Juri Linkov
2005-03-22 19:32       ` Eli Zaretskii
2005-03-22 10:18     ` David Kastrup
2005-03-22 19:34       ` Eli Zaretskii
2005-03-22 22:24         ` David Kastrup
2005-03-22 20:44   ` Richard Stallman
2005-03-22 22:32     ` Thien-Thi Nguyen
2005-03-23  6:21       ` Richard Stallman
2005-03-23 13:55         ` Juri Linkov
2005-03-23 18:01           ` Werner LEMBERG
2005-03-25 12:51             ` Kenichi Handa
2005-03-23 20:25           ` Richard Stallman
2005-03-22 13:57 ` Richard Stallman

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.