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


Message #28 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Daniel Martín via "Bug reports for GNU Emacs, the
 Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 52605 <at> debbugs.gnu.org,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#52605: [PATCH] Add isearch-emoji-by-name
Date: Mon, 10 Jan 2022 10:07:58 +0200
> Also, I forgot to ask in my original message: Is there a plan to add an
> Emoji input method to Emacs? If so, the input method could be used
> during an isearch and this patch won't be necessary, right? Another
> benefit of the input method is that it will work in other situations as
> well, like in a query-replace.

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




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.