GNU bug report logs - #48246
[PATCH] Prevent unnecessary restarings of ispell program.

Previous Next

Package: emacs;

Reported by: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>

Date: Wed, 5 May 2021 21:54:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48246 in the body.
You can then email your comments to 48246 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Wed, 05 May 2021 21:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 05 May 2021 21:54:01 GMT) Full text and rfc822 format available.

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

From: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Dmitrii Kuragin <dkuragin <at> ya.ru>
Subject: [PATCH] Prevent unnecessary restarings of ispell program.
Date: Wed,  5 May 2021 13:29:45 -0700
From: Dmitrii Kuragin <dkuragin <at> ya.ru>

Fix bug when ispell always restarted when `ispell-program-name` has a
custom value. Function `eq` compares the object identity and not the
object values which causes `eq` always return `nil` for values with the
same value but different identity (address). `equal` compares actual
values.
---
 lisp/textmodes/ispell.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 932308ee59..4dbc7640bc 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1245,7 +1245,7 @@ ispell-initialize-spellchecker-hook
 
 (defun ispell-set-spellchecker-params ()
   "Initialize some spellchecker parameters when changed or first used."
-  (unless (eq ispell-last-program-name ispell-program-name)
+  (unless (equal ispell-last-program-name ispell-program-name)
     (ispell-kill-ispell t)
     (if (and (condition-case ()
 		 (progn
-- 
2.31.1.527.g47e6f16901-goog





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 04:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
Cc: dkuragin <at> ya.ru, 48246 <at> debbugs.gnu.org
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 06 May 2021 07:57:29 +0300
> From: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
> Date: Wed,  5 May 2021 13:29:45 -0700
> Cc: Dmitrii Kuragin <dkuragin <at> ya.ru>
> 
> From: Dmitrii Kuragin <dkuragin <at> ya.ru>
> 
> Fix bug when ispell always restarted when `ispell-program-name` has a
> custom value. Function `eq` compares the object identity and not the
> object values which causes `eq` always return `nil` for values with the
> same value but different identity (address). `equal` compares actual
> values.

Thanks, but if we want to be smart about this, why stop at 'equal'?
why not 'file-equal-p'?  The latter will succeed in more cases.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 07:13:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dkuragin <at> ya.ru, 48246 <at> debbugs.gnu.org,
 Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 06 May 2021 09:12:51 +0200
On Mai 06 2021, Eli Zaretskii wrote:

> why not 'file-equal-p'?

ispell-program-name isn't a file name.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 08:00:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: dkuragin <at> ya.ru, 48246 <at> debbugs.gnu.org, dmitriy.kuragin <at> gmail.com
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 06 May 2021 10:59:37 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>,  dkuragin <at> ya.ru,
>   48246 <at> debbugs.gnu.org
> Date: Thu, 06 May 2021 09:12:51 +0200
> 
> On Mai 06 2021, Eli Zaretskii wrote:
> 
> > why not 'file-equal-p'?
> 
> ispell-program-name isn't a file name.

It is, after we call executable-find on it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 08:21:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dkuragin <at> ya.ru, 48246 <at> debbugs.gnu.org, dmitriy.kuragin <at> gmail.com
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 06 May 2021 10:20:34 +0200
On Mai 06 2021, Eli Zaretskii wrote:

>> From: Andreas Schwab <schwab <at> linux-m68k.org>
>> Cc: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>,  dkuragin <at> ya.ru,
>>   48246 <at> debbugs.gnu.org
>> Date: Thu, 06 May 2021 09:12:51 +0200
>> 
>> On Mai 06 2021, Eli Zaretskii wrote:
>> 
>> > why not 'file-equal-p'?
>> 
>> ispell-program-name isn't a file name.
>
> It is, after we call executable-find on it.

If we do it.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 09:46:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
Cc: Dmitrii Kuragin <dkuragin <at> ya.ru>, 48246 <at> debbugs.gnu.org
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 06 May 2021 11:45:29 +0200
Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com> writes:

> Fix bug when ispell always restarted when `ispell-program-name` has a
> custom value. Function `eq` compares the object identity and not the
> object values which causes `eq` always return `nil` for values with the
> same value but different identity (address). `equal` compares actual
> values.

Thanks; applied to Emacs 28.

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 06 May 2021 09:46:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 48246 <at> debbugs.gnu.org and Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 06 May 2021 09:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Thu, 06 May 2021 16:01:02 GMT) Full text and rfc822 format available.

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

From: Dmitrii Kuragin <kuraginmail <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Dmitrii Kuragin <dkuragin <at> ya.ru>, 48246 <at> debbugs.gnu.org,
 Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Thu, 6 May 2021 08:48:04 -0700
[Message part 1 (text/plain, inline)]
Of course, I would. I will try to figure it out.

Thanks!

On Thu, May 6, 2021 at 2:46 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com> writes:
>
> > Fix bug when ispell always restarted when `ispell-program-name` has a
> > custom value. Function `eq` compares the object identity and not the
> > object values which causes `eq` always return `nil` for values with the
> > same value but different identity (address). `equal` compares actual
> > values.
>
> Thanks; applied to Emacs 28.
>
> This change was small enough to apply without assigning copyright to the
> FSF, but for future patches you want to submit, it might make sense to
> get the paperwork started now, so that subsequent patches can be applied
> speedily. Would you be willing to sign such paperwork?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48246; Package emacs. (Fri, 07 May 2021 08:42:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitrii Kuragin <kuraginmail <at> gmail.com>
Cc: Dmitrii Kuragin <dkuragin <at> ya.ru>, 48246 <at> debbugs.gnu.org,
 Dmitrii Kuragin <dmitriy.kuragin <at> gmail.com>
Subject: Re: bug#48246: [PATCH] Prevent unnecessary restarings of ispell
 program.
Date: Fri, 07 May 2021 10:41:33 +0200
Dmitrii Kuragin <kuraginmail <at> gmail.com> writes:

> Of course, I would. I will try to figure it out.

Great!  Here's the form to get started:


Please email the following information to assign <at> gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Jun 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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