unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* a few MULE criticisms, cemacs, & current emacs segfaults by changes in GNU ld.
@ 2003-05-14 20:03 Hin-Tak Leung
  2003-05-14 20:55 ` Jason Rumney
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Hin-Tak Leung @ 2003-05-14 20:03 UTC (permalink / raw)
  Cc: Richard Stallman

This is not meant to be a flame - Mr Stallman asked me why I would rather
continue to use emacs 19.34 (and fixes its problems) in combination
with an old cemacs elisp script instead of using MULE, and I am writing
this in the hope that MULE will satisfy my editing needs one day. I
am native Chinese, and can also do a small amount of Japanese, so
my experience is probably quite representative.

(1) Associations: the ability to let the user choose the next possible
associated characters. In English, "Search" is often followed by "engine"
"for" or "through". In Chinese, When I type "Leung" (not in common sentence 
vocabulary, but it is a common surname), it is almost certain that I would
follow with the rest of my name. Another example in Chinese, the simplest
one character word "one", is often followed by a few specific characters
to make up small compound units which means "definitely", "a few",
"all", "generally", "once", "unified", "together", "one sided", etc. It
saves a lot of typing by a factor or 2 or 3 in Chinese - It is 3 letters
(for "Leung") then "1" (for choice), instead of the 3+5+4 for the
shortest method (ChangJie). The input of many common phrases which
would normally requires 10+ key strokes, can be shorten by associations.
The facility is available in localised version of MacOS, in English MacOS's
CJK add-on's (I have used the latter, and seen a Japanese friend using
the former), and available in 3rd party add-ons to English MS Windows
for many years. This would most certainly require extending MULE with
the ability of loading distionaries of commonly used phrases in
various languages. And will make the leim package a lot bigger.

(2) Hints: quite similiar to (1), e.g. sometimes I can't quite
remember the code for "Leung", but vaguely know it is "e*f" in
ChangJie. (it is actually 'eif'). On just about any other systems
(MacOS's CJK extensions, etc), the full list is displayed and it
narrows down as the user types, so the user can select the correct
one visually if he can't remember the exact code. On Cxterm,
one can do 'e?f' or 'e??f' to obtain a list of matches.

(3) new input methods, and per-user input methods: adding new input
mapping methods on a per-user basis and make that the default. I know
this is possible in MULE - but the procedure is not in the obvious places.
There are new methods coming out, e.g. new ones developed in view of
handhelds, which only requires the key-pad numeric keys. And there
are personal per-user needs e.g. I might like an enhanced ChangJie
method, which includes a special short-hand for my own name, to
over-ride the system one.

(4) The inability to process part of a file in one encoding and
save it as a binary stream: This might be possible in MULE, but
I can't work out how - MULE seems to insist that I save or
convert documents into its internal representation. e.g. I have a file,
part of which is in GB2312, part in JIS-euc, and part BIG5, separated
by clear ASCII markers. I would like to edit the different parts
individually, and without breaking the others, and without converting
to MULE's internal format or a common one like UTF-8. I don't think
it is difficult to implement, but it is more like the MULE developers
think they know my needs better than I do, and insist that I do
things their way.

As for the portability problem with the elisp script cemacs.el
(the origin of the whole thread) to current emacs versions, I have been
looking deeper into the documentation of current emacs and just
found my answer; starting current emacs with the --unibyte option
would do. I also looked a bit further - apparently the --unibyte option
was not available before emacs 20.3, so cemacs.el had indeed been
broken for about 3 years between 1995 and 1998. As a result, cemacs's
README contains a warning that it doesn't run under emacs 20+,
and a later fork+enhancement of it even contains codes for
version checking and abort under emacs 20+. I'll write
to the author of cemacs to rectify that.

And lastly, I don't need to keep on porting emacs 19.34 forward anymore -
However, the answer: adding LDFLAGS='-z nocombreloc', should be applied
to current version of emacs's configure to stop it from being broken
by recent change to default 'combreloc' in GNU ld.

I would like to thank everybody for the work on emacs and the other
works from FSF.

-------- Original Message --------
Subject: Re:  Re: emacs-19.34 segfauls when built with Xfree 4.3.0 (glibc 
2.3.x,gcc 3.2)
Date: Wed, 14 May 2003 09:48:09 -0400
From: Richard Stallman <rms@gnu.org>
Reply-To: rms@gnu.org

<snipped>
In contrast,, we might be interested in trying to fix this problem

     I want to use a elisp script called cemacs (for Chinese inputs)
     but unfortunately the inclusion the MULE (Multi-lingual Extension)
     since version 20 has broken it.

if you send a bug report with a precise complete test case.

We are certainly interested in improving MULE.  Could you write to
emacs-devel@gnu.org and tell us why specifically MULE is not as good
as cemacs for your usage?

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: a few MULE criticisms
@ 2003-05-18  5:23 Stefan Monnier
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Monnier @ 2003-05-18  5:23 UTC (permalink / raw)
  Cc: emacs-devel


Regarding the use of ? in input methods.
I've never looked at the code of quail before, so clearly
this is not working 100% (not even 90%, I'd say), but
maybe someone more knowledgeable can fix it ?

It maybe won't be a workable approach for dense quail
maps (like most are, I expect :-( ) but it works OK on
the TeX input method where I can say \righ?????? and get
a right arrow.

Generalizing to * is going to be even less workable, so I think
that a different approach is necessary.


	Stefan


--- quail.el.~1.128.~	Tue Apr 15 18:46:10 2003
+++ quail.el	Sun May 18 01:19:08 2003
@@ -1,6 +1,6 @@
 ;;; quail.el --- provides simple input method for multilingual text
 
-;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN.
+;; Copyright (C) 1995, 2000, 2003 Electrotechnical Laboratory, JAPAN.
 ;; Licensed to the Free Software Foundation.
 ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 
@@ -1218,6 +1216,28 @@
    (t
     (error "Invalid object in Quail map: %s" def))))
 
+(defun quail-merge-maps (map1 &rest maps)
+  (if (null maps) map1
+    (let* ((map2 (pop maps))
+	   (h1 (pop map1))
+	   (h2 (pop map2)))
+      (apply 'quail-merge-maps
+	     (cons
+	      (if (and h1 h2)
+		  (vconcat (if (vectorp h1) h1 (vector h1))
+			   (if (vectorp h2) h2 (vector h2)))
+		(or h1 h2))
+	      (let ((tail nil) conflict)
+		(dolist (entry map1)
+		  (setq conflict (assq (car entry) map2))
+		  (push (if (not conflict) entry
+			  (setq map2 (delq conflict map2))
+			  (cons (car entry)
+				(quail-merge-maps (cdr entry) (cdr conflict))))
+			tail))
+		(append map2 tail)))
+	     maps))))
+
 (defun quail-lookup-key (key &optional len)
   "Lookup KEY of length LEN in the current Quail map and return the definition.
 The returned value is a Quail map specific to KEY."
@@ -1236,7 +1256,9 @@
       (setq slot (assq ch (cdr map)))
       (if (and (cdr slot) (symbolp (cdr slot)))
 	  (setcdr slot (funcall (cdr slot) key idx)))
-      (setq map (cdr slot)))
+      (if (and (null slot) (eq ch ??))
+	  (setq map (apply 'quail-merge-maps (mapcar 'cdr (cdr map))))
+	(setq map (cdr slot))))
     (setq def (car map))
     (setq quail-current-translations nil)
     (if (and map (setq translation (quail-get-translation def key len)))

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

end of thread, other threads:[~2003-05-18  5:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-14 20:03 a few MULE criticisms, cemacs, & current emacs segfaults by changes in GNU ld Hin-Tak Leung
2003-05-14 20:55 ` Jason Rumney
2003-05-14 22:05   ` a few MULE criticisms Hin-Tak Leung
2003-05-14 21:55 ` a few MULE criticisms, cemacs, & current emacs segfaults by changes in GNU ld Stefan Monnier
2003-05-15  2:03   ` a few MULE criticisms Hin-Tak Leung
2003-05-15  6:55     ` Jason Rumney
2003-05-15  1:18 ` a few MULE criticisms, cemacs, & current emacs segfaults by changes in GNU ld Kenichi Handa
2003-05-15  1:39   ` Luc Teirlinck
2003-05-15  3:29   ` a few MULE criticisms Hin-Tak Leung
2003-05-15 10:06     ` Hin-Tak Leung
2003-05-15 15:51       ` Stephen J. Turnbull
2003-05-15 19:49         ` Hin-Tak Leung
2003-05-15 21:29           ` Kevin Rodgers
2003-05-16  7:09           ` Stephen J. Turnbull
2003-05-16 11:43             ` Hin-Tak Leung
2003-05-17  7:32               ` Stephen J. Turnbull
2003-05-17 19:40                 ` Hin-Tak Leung
2003-05-15  7:03 ` a few MULE criticisms, cemacs, & current emacs segfaults by changes in GNU ld Stephen J. Turnbull
  -- strict thread matches above, loose matches on Subject: below --
2003-05-18  5:23 a few MULE criticisms Stefan Monnier

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