GNU bug report logs - #77889
[PATCH] Clarify insert-char when called from Lisp

Previous Next

Package: emacs;

Reported by: Lactose ‎ <lactose <at> allthingslinux.org>

Date: Fri, 18 Apr 2025 04:51:18 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#77889: closed ([PATCH] Clarify insert-char when called from Lisp)
Date: Fri, 18 Apr 2025 11:13:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 18 Apr 2025 14:11:58 +0300
with message-id <86ikn1bu69.fsf <at> gnu.org>
and subject line Re: bug#77889: [PATCH] Clarify insert-char when called from Lisp
has caused the debbugs.gnu.org bug report #77889,
regarding [PATCH] Clarify insert-char when called from Lisp
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
77889: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77889
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Lactose ‎ <lactose <at> allthingslinux.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Clarify insert-char when called from Lisp
Date: Thu, 17 Apr 2025 18:39:30 -0700
[Message part 3 (text/plain, inline)]
The doc for `insert-char' is unclear what values are valid for CHARACTER
when called from Lisp. This clarifies that only code points can be
passed when called from Lisp instead of interactively.

> Interactively, prompt for CHARACTER using `read-char-by-name'.
> You can specify CHARACTER in one of these ways:

This reads to me as two separate, unrelated statements. Somemone could
interpret the latter as applying when called from Lisp, when in fact it's
only true when called interactively.

> Interactively, prompt for CHARACTER using `read-char-by-name'.
> When prompted, you can specify CHARACTER in one of these ways:

This is much better as it is now clear it only applies when
called interactively.

In addition, I added details on how to call `insert-char' from Lisp.

> When called from Lisp, you can only pass CHARACTER as a code point.
> See `char-from-name' for retrieving a code point from a Unicode character name.
[insert-char-doc.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Lactose ‎ <lactose <at> allthingslinux.org>
Cc: 77889-done <at> debbugs.gnu.org
Subject: Re: bug#77889: [PATCH] Clarify insert-char when called from Lisp
Date: Fri, 18 Apr 2025 14:11:58 +0300
> From: Lactose ‎ <lactose <at> allthingslinux.org>
> Date: Thu, 17 Apr 2025 18:39:30 -0700
> 
> The doc for `insert-char' is unclear what values are valid for CHARACTER
> when called from Lisp. This clarifies that only code points can be
> passed when called from Lisp instead of interactively.
> 
> > Interactively, prompt for CHARACTER using `read-char-by-name'.
> > You can specify CHARACTER in one of these ways:
> 
> This reads to me as two separate, unrelated statements. Somemone could
> interpret the latter as applying when called from Lisp, when in fact it's
> only true when called interactively.
> 
> > Interactively, prompt for CHARACTER using `read-char-by-name'.
> > When prompted, you can specify CHARACTER in one of these ways:
> 
> This is much better as it is now clear it only applies when
> called interactively.
> 
> In addition, I added details on how to call `insert-char' from Lisp.
> 
> > When called from Lisp, you can only pass CHARACTER as a code point.
> > See `char-from-name' for retrieving a code point from a Unicode character name.

Thanks, I used these ideas and suggestions to fix the doc string in a
slightly different way.  Done on the emacs-30 branch, and closing the
bug.


This bug report was last modified 33 days ago.

Previous Next


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