GNU bug report logs - #73499
31.0.50; sql-interactive-mode problem with package caps-lock-mode

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 26 Sep 2024 12:45:01 UTC

Severity: normal

Found in version 31.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73499 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>, monnier <at> iro.umontreal.ca, stefankangas <at> gmail.com
Subject: bug#73499: 31.0.50; sql-interactive-mode problem with package caps-lock-mode
Date: Sat, 05 Oct 2024 22:03:59 +0200
[Message part 1 (text/plain, inline)]
On Sat, 05 Oct 2024 13:22:02 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Andrea Corallo <acorallo <at> gnu.org>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Stephen Berman <stephen.berman <at> gmx.net>,
>>   Stefan Kangas <stefankangas <at> gmail.com>,  73499 <at> debbugs.gnu.org
>> Date: Tue, 01 Oct 2024 14:44:13 -0400
>>
>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>
>> >> Stefan, Andrea, Stefan: any opinions on which way is better?
>> >
>> > My vote is clearly for `post-self-insert-hook`.
>>
>> Same
>
> OK, so Stephen, please do it that way, and thanks.

Sure; however, my testing of the patch before posting it was inadequate,
and the patch needs to be amended.  As is it now, if you customize
sql-electric-stuff to use sql-magic-go and then type "go" at the prompt
in a comint-derived mode other than sql-interactive-mode, that wrongly
calls comint-send-input.  E.g. in shell-mode, this results in the shell
output "bash: go: command not found".  And in an arbitary buffer not
derived from comint-mode, typing "go" at BOB causes a ding and shows the
message "Current buffer has no process".  These problems are because the
patch adds sql-magic-go to post-self-insert-hook globally; since this is
done when customizing sql-electric-stuff, the current buffer need not
(and probably won't) be in sql-interactive-mode, so the hook can't be
added locally.  AFAICS the simplest fix is to check (eq major-mode
'sql-interactive-mode) in sql-magic-go, as in the attached patch.  If
there's no objection to this, then I'll go ahead and commit the amended
patch to master.

Steve Berman

[Message part 2 (text/x-patch, attachment)]

This bug report was last modified 272 days ago.

Previous Next


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