GNU bug report logs - #60740
29.0.60; Broken isearch-emoji-by-name

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 11 Jan 2023 19:48:02 UTC

Severity: normal

Found in version 29.0.60

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jonas Bernoulli <jonas <at> bernoul.li>
Cc: 60740 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#60740: [PATCH 0/2] emoji changes
Date: Sun, 05 Feb 2023 18:53:59 +0200
> From: Jonas Bernoulli <jonas <at> bernoul.li>
> Cc: 60740 <at> debbugs.gnu.org, larsi <at> gnus.org
> Date: Sun, 05 Feb 2023 17:29:12 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > This apparently leads to
> 
> I looked at the log to prevent that, but I think I just redirected
> stdout and forgot about stderr.  Byte-compiler warnings go to stderr,
> right?

In batch mode, yes.

> >     ELC      ../lisp/isearch.elc
> >
> >   In end of data:
> >   isearch.el:2785:40: Warning: the function `emoji--read-emoji' is not
> >   known to be defined.
> 
> What's the usual way of dealing with this in Emacs itself?  I wasn't
> sure using an autoload would work here, and was going to use another
> approach if this resulted in a warning.  Unfortunately I missed the
> warning.  Should I use 'declare-function' instead and require 'emoji'
> inside 'isearch-emoji-by-name'?

The below is better, IMO.  I installed it.

diff --git a/lisp/isearch.el b/lisp/isearch.el
index bfa7175..62ac6f1 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2773,7 +2773,7 @@ isearch-char-by-name
 	       isearch-new-message (concat isearch-message
 					   (mapconcat 'isearch-text-char-description
 						      string ""))))))))

+(autoload 'emoji--read-emoji "emoji")
 (defun isearch-emoji-by-name (&optional count)
   "Read an Emoji name and add it to the search string COUNT times.
 COUNT (interactively, the prefix argument) defaults to 1.




This bug report was last modified 2 years and 131 days ago.

Previous Next


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