all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: David Kastrup <dak@gnu.org>
Cc: Martin Blais <blais@furius.ca>,
	handa@m17n.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Composition of Quail IMs (was: smartquotes.el -- Insertion of unicode quotes in text documents)
Date: Mon, 27 Aug 2007 17:16:23 -0400	[thread overview]
Message-ID: <jwvejhosnqa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <853ay5bm43.fsf@lola.goethe.zz> (David Kastrup's message of "Mon\, 27 Aug 2007 07\:08\:28 +0200")

>> I can see why it is useful, but we already have a similar facility:
>> Quail.  What about using Quail for this?

> Can Quail support multiple input methods at once?  Because it would be
> inconvenient to be able to use such a feature only when no other input
> method is used.

Indeed, it currently cannot.  And it's a good reason not to use quail for
this package.  The problem showed up a few years ago already (probably when
discussing something around C-x 8 which should really be a combination of
quail's latin-1postfix and latin-1-prefix, shifted to the C-x 8 prefix) and
I wrote a naive proof of concept:

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

but I don't know and understand enough of Quail's facilities to be able to
make this work reliably even for complex input methods.

I think compositionality of Quail input methods would be a great
improvement, but I don't think I'm up to doing it,


        Stefan

      reply	other threads:[~2007-08-27 21:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1b151690708252221j7177cea1xe8916c52a1110190@mail.gmail.com>
2007-08-26 22:47 ` smartquotes.el -- Insertion of unicode quotes in text documents Richard Stallman
2007-08-27  4:46   ` Martin Blais
     [not found]     ` <E1IPj9g-0003Zm-8v@fencepost.gnu.org>
2007-08-27 18:53       ` David Kastrup
     [not found]         ` <E1IQ3Hl-0008FI-LE@fencepost.gnu.org>
2007-08-30  8:12           ` Kenichi Handa
2007-08-30  8:29             ` David Kastrup
2007-08-30 11:46               ` Kenichi Handa
2007-08-30 12:32                 ` David Kastrup
2007-08-31  7:36                 ` Richard Stallman
2007-08-31  7:35             ` Richard Stallman
2007-09-04  6:48               ` Kenichi Handa
2007-08-27  5:08   ` David Kastrup
2007-08-27 21:16     ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvejhosnqa.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=blais@furius.ca \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.