GNU bug report logs - #52605
[PATCH] Add isearch-emoji-by-name

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Sat, 18 Dec 2021 18:56:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Juri Linkov <juri <at> linkov.net>
Cc: larsi <at> gnus.org, 52605 <at> debbugs.gnu.org
Subject: bug#52605: [PATCH] Add isearch-emoji-by-name
Date: Mon, 10 Jan 2022 23:44:46 +0100
Juri Linkov <juri <at> linkov.net> writes:

>
> I agree the input method is more general solution than a new isearch command.
>
> #+begin_src emacs-lisp
> ;;; emoji.el --- Quail package for emoji character composition -*- lexical-binding: t -*-
>
> ;; Quail package `emoji' is based on emoji.el package.
> ;; This input method supports the same key sequences as the names
> ;; defined by the `C-x 8 e s' completions in emoji.el.
>
> (quail-define-package
>  "emoji" "UTF-8" "😀" t
>  "Use the same key sequences as in `C-x 8 e s' completions defined in emoji.el."
>  '(("\t" . quail-completion))
>  t nil nil nil nil nil nil nil nil t)
>
> (eval-when-compile
>   (require 'emoji)
>   (emoji--init)
>   (defmacro emoji--define-rules ()
>     `(quail-define-rules
>       ,@(let ((rules nil))
>           (maphash (lambda (from to)
>                      (push (list from (if (stringp to)
>                                           (vector to)
>                                         to))
>                            rules))
>                    emoji--all-bases)
>           rules))))
>
> (emoji--define-rules)
>
> (provide 'emoji)
> ;;; emoji.el ends here
> #+end_src

Thanks for the patch, I'm not super familiar with input methods, but it
seems to work well.  I wish a refined/polished version of this code +
documentation could be part of the main Emacs distribution.  It fits
well in the overall design of Emacs.




This bug report was last modified 3 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.