unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
@ 2021-05-05 20:29 Dmitrii Kuragin
  2021-05-06  4:57 ` Eli Zaretskii
  2021-05-06  9:45 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Dmitrii Kuragin @ 2021-05-05 20:29 UTC (permalink / raw)
  To: 48246; +Cc: Dmitrii Kuragin

From: Dmitrii Kuragin <dkuragin@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






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-05 20:29 bug#48246: [PATCH] Prevent unnecessary restarings of ispell program Dmitrii Kuragin
@ 2021-05-06  4:57 ` Eli Zaretskii
  2021-05-06  7:12   ` Andreas Schwab
  2021-05-06  9:45 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-05-06  4:57 UTC (permalink / raw)
  To: Dmitrii Kuragin; +Cc: dkuragin, 48246

> From: Dmitrii Kuragin <dmitriy.kuragin@gmail.com>
> Date: Wed,  5 May 2021 13:29:45 -0700
> Cc: Dmitrii Kuragin <dkuragin@ya.ru>
> 
> From: Dmitrii Kuragin <dkuragin@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-06  4:57 ` Eli Zaretskii
@ 2021-05-06  7:12   ` Andreas Schwab
  2021-05-06  7:59     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2021-05-06  7:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dkuragin, 48246, Dmitrii Kuragin

On Mai 06 2021, Eli Zaretskii wrote:

> why not 'file-equal-p'?

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

Andreas.

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-06  7:12   ` Andreas Schwab
@ 2021-05-06  7:59     ` Eli Zaretskii
  2021-05-06  8:20       ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-05-06  7:59 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: dkuragin, 48246, dmitriy.kuragin

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Dmitrii Kuragin <dmitriy.kuragin@gmail.com>,  dkuragin@ya.ru,
>   48246@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-06  7:59     ` Eli Zaretskii
@ 2021-05-06  8:20       ` Andreas Schwab
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2021-05-06  8:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dkuragin, 48246, dmitriy.kuragin

On Mai 06 2021, Eli Zaretskii wrote:

>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Cc: Dmitrii Kuragin <dmitriy.kuragin@gmail.com>,  dkuragin@ya.ru,
>>   48246@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@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-05 20:29 bug#48246: [PATCH] Prevent unnecessary restarings of ispell program Dmitrii Kuragin
  2021-05-06  4:57 ` Eli Zaretskii
@ 2021-05-06  9:45 ` Lars Ingebrigtsen
  2021-05-06 15:48   ` Dmitrii Kuragin
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-06  9:45 UTC (permalink / raw)
  To: Dmitrii Kuragin; +Cc: Dmitrii Kuragin, 48246

Dmitrii Kuragin <dmitriy.kuragin@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-06  9:45 ` Lars Ingebrigtsen
@ 2021-05-06 15:48   ` Dmitrii Kuragin
  2021-05-07  8:41     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitrii Kuragin @ 2021-05-06 15:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Dmitrii Kuragin, 48246, Dmitrii Kuragin

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

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

Thanks!

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

> Dmitrii Kuragin <dmitriy.kuragin@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
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1534 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#48246: [PATCH] Prevent unnecessary restarings of ispell program.
  2021-05-06 15:48   ` Dmitrii Kuragin
@ 2021-05-07  8:41     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-07  8:41 UTC (permalink / raw)
  To: Dmitrii Kuragin; +Cc: Dmitrii Kuragin, 48246, Dmitrii Kuragin

Dmitrii Kuragin <kuraginmail@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@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?]






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-07  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 20:29 bug#48246: [PATCH] Prevent unnecessary restarings of ispell program Dmitrii Kuragin
2021-05-06  4:57 ` Eli Zaretskii
2021-05-06  7:12   ` Andreas Schwab
2021-05-06  7:59     ` Eli Zaretskii
2021-05-06  8:20       ` Andreas Schwab
2021-05-06  9:45 ` Lars Ingebrigtsen
2021-05-06 15:48   ` Dmitrii Kuragin
2021-05-07  8:41     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).