From unknown Sat Jun 14 14:25:55 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#54131 <54131@debbugs.gnu.org>
To: bug#54131 <54131@debbugs.gnu.org>
Subject: Status: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
Reply-To: bug#54131 <54131@debbugs.gnu.org>
Date: Sat, 14 Jun 2025 21:25:55 +0000
retitle 54131 29.0.50; Flyspell incorrectly reports first word in Python f-=
string
reassign 54131 emacs
submitter 54131 Philipp Stephani
severity 54131 normal
thanks
From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 23 13:16:31 2022
Received: (at submit) by debbugs.gnu.org; 23 Feb 2022 18:16:31 +0000
Received: from localhost ([127.0.0.1]:46452 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nMwBi-00060X-NR
for submit@debbugs.gnu.org; Wed, 23 Feb 2022 13:16:31 -0500
Received: from lists.gnu.org ([209.51.188.17]:58650)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nMwBh-00060O-EY
for submit@debbugs.gnu.org; Wed, 23 Feb 2022 13:16:29 -0500
Received: from eggs.gnu.org ([209.51.188.92]:36094)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nMwBh-0005Ti-7q
for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 13:16:29 -0500
Received: from [2a00:1450:4864:20::531] (port=41877
helo=mail-ed1-x531.google.com)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1nMwBf-0003f2-Dq
for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 13:16:28 -0500
Received: by mail-ed1-x531.google.com with SMTP id w3so45572633edu.8
for ; Wed, 23 Feb 2022 10:16:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=p5wVDynlASKtsl6mf09jm45kNAJ+1kHrNLjkniEaCxg=;
b=NTz8UQKen61DJtwx7S4ZgNiKubgR9A7//AMdMcD4aFa/RqJ5Q64PS/9of07bu5+i7n
mEMVun1bpWW1xa3dZPUFaHan2kZrnoTS4yeU8Dql8IS/5gYwpKDFkD1pgaZAajt9lQlS
auJkdX2kn+szXCGW+3ulDsDaBL2tb1bW+F8BtdljNET/r9CPO9JfmQaqR5kyf/Ox9wSn
9OPnBZOOUEyhMPhGk6AjpsFARozcAW578PMeITCezBW4nU2yKjiAb0YBbCH5/7EfDhGf
NzcsMnP6K6JrMgLlJzSk/Xlo9rza70soOVjWMAuPDI/2Alz8ItX/hc4WBZyBG50ILfbN
v9nQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=p5wVDynlASKtsl6mf09jm45kNAJ+1kHrNLjkniEaCxg=;
b=NRqFEqxjGlq3zEeflcoPoYbZA8P3M7QgI67CrwEAdZZ98Rp1vnBGZ7GXKJzaWO2SBP
rPy4ZtrAnKJqEY4bp216iZygiLXJMCvuP0ven0qqbDojFFCeL+0GULfX/DPGqW2BYS0i
qZfA0K2Kn8ksLLfLD3KNNoI/cgspkx6RtqYGwW2hIKrLknsI2osJKJoVOPXo2ghQmzbo
rjMjQzr44BB7Mqd/4uBnNruTkVwxCpyzOMUWnUT+74BZpGg+4DhytknHaVGvOgUdQ9vE
QBN3bLn/q7BzEatnH8aU4VpLQJ+3zJyOq9VxZjVk8nc58IipOfcjLMGZRVMG30FTyQ29
u34g==
X-Gm-Message-State: AOAM532A/Yf3zC/+9MXpqBccqEnPq399mAISWABmVSznPgoqeN6KCDdw
n9RaV4YCX4YJ0pU+btsmlOErbWNfuUM=
X-Google-Smtp-Source: ABdhPJxroRIvIonBk75zbGRx5nsVy0eJARruEB9B0lm7qOT62AD74JbIqcSxU7MxgG28Cc6DA8VZvA==
X-Received: by 2002:a50:c30a:0:b0:413:2ddb:b75 with SMTP id
a10-20020a50c30a000000b004132ddb0b75mr674445edb.19.1645640174256;
Wed, 23 Feb 2022 10:16:14 -0800 (PST)
Received: from phst ([2a02:2455:2a4:dc00:67ca:6079:de4a:5041])
by smtp.gmail.com with ESMTPSA id 18sm173518ejj.31.2022.02.23.10.16.13
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 23 Feb 2022 10:16:13 -0800 (PST)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 29.0.50; Flyspell incorrectly reports first word in Python f-string
Date: Wed, 23 Feb 2022 19:16:11 +0100
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::531
(failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::531;
envelope-from=p.stephani2@gmail.com; helo=mail-ed1-x531.google.com
X-Spam_score_int: -3
X-Spam_score: -0.4
X-Spam_bar: /
X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659,
RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Given this Python file: $ cat /tmp/a.py print(f'hello world')
Visit it and enable Flyspell:
Content analysis details: (1.2 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (p.stephani2[at]gmail.com)
1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (p.stephani2[at]gmail.com)
0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5)
[209.51.188.17 listed in wl.mailspike.net]
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/,
medium trust [209.51.188.17 listed in list.dnswl.org]
0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
-0.0 T_SCC_BODY_TEXT_LINE No description available.
1.5 SPOOFED_FREEMAIL No description available.
0.8 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be...
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -2.1 (--)
Given this Python file:
$ cat /tmp/a.py=20
print(f'hello world')
Visit it and enable Flyspell:
$ emacs -Q /tmp/a.py -f flyspell-prog-mode
Flyspell then marks the string "f'hello" as incorrect, thinking it's a
misspelling of "hello". But it shouldn't cross the string boundary.
In GNU Emacs 29.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, =
cairo version 1.16.0)
of 2022-02-23
Repository revision: 85ad8616007e286c237bb2906d1928bb551462e7
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Debian GNU/Linux rodete
Configured using:
'configure --enable-gcc-warnings=3Dwarn-only
--enable-gtk-deprecation-warnings --without-pop --with-mailutils
--enable-checking=3Dall --enable-check-lisp-object-type --with-modules
'CFLAGS=3D-O0 -ggdb3''
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP
SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB
Important settings:
value of $LC_TIME: en_DK.utf8
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=3Dibus
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail phst skeleton pcase ffap
thingatpt url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs json map url-vars rx message mailcap
yank-media rmc dired dired-loaddefs rfc822 mml mml-sec password-cache
epa derived epg rfc6068 epg-config gnus-util time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader gnutls
puny elp dbus xml seq gv subr-x byte-opt bytecomp byte-compile cconv
compile text-property-search comint ansi-color ring cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 67449 9159)
(symbols 48 8204 1)
(strings 32 23683 2078)
(string-bytes 1 760952)
(vectors 16 15596)
(vector-slots 8 208549 49248)
(floats 8 28 30)
(intervals 56 230 0)
(buffers 992 11))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhal=
ten haben
sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6sche=
n Sie
alle Kopien und Anh=C3=A4nge davon und lassen Sie mich bitte wissen, dass d=
ie E-Mail
an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake,
please don=E2=80=99t forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.
From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 23 15:13:40 2022
Received: (at 54131) by debbugs.gnu.org; 23 Feb 2022 20:13:40 +0000
Received: from localhost ([127.0.0.1]:46623 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nMy15-0000Zu-JR
for submit@debbugs.gnu.org; Wed, 23 Feb 2022 15:13:39 -0500
Received: from quimby.gnus.org ([95.216.78.240]:37924)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nMy13-0000Ze-7k
for 54131@debbugs.gnu.org; Wed, 23 Feb 2022 15:13:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=NI4d6Qgzap3nDmFMoNOGXYD74CU2JApa4DsjJHor9GM=; b=N+YuHL0ULNg5HK2pj9+rcrnwYS
FjBf4FXNH6PKs8defx5mMTYpL6Y8hYrvpX2kpKtGwrj00bD4zQlLpRi4rSvHVbWmZfZfwAto+4Ooe
2USRYNwqqPDeKlo+oI1BkqvYtpUHUikhXeJO06mbXgLW44K4w5g3YrUgTKv/4oWKQUwc=;
Received: from [84.212.220.105] (helo=giant)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from )
id 1nMy0u-0005Cz-0e; Wed, 23 Feb 2022 21:13:30 +0100
From: Lars Ingebrigtsen
To: Philipp Stephani
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
References:
X-Now-Playing: Richard And Linda Thompson's _Pour Down Like Silver_: "Dark
End of the Street"
Date: Wed, 23 Feb 2022 21:13:27 +0100
In-Reply-To: (Philipp Stephani's message of "Wed,
23 Feb 2022 19:16:11 +0100")
Message-ID: <877d9l5ok8.fsf@gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Philipp Stephani writes: > Given this
Python file: > > $ cat /tmp/a.py > print(f'hello world') > > Visit it and
enable Flyspell: > > $ emacs -Q /tmp/a.py -f flyspell-prog-mode > > Flyspell
then marks the string "f'hello" as i [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
Philipp Stephani writes:
> Given this Python file:
>
> $ cat /tmp/a.py
> print(f'hello world')
>
> Visit it and enable Flyspell:
>
> $ emacs -Q /tmp/a.py -f flyspell-prog-mode
>
> Flyspell then marks the string "f'hello" as incorrect, thinking it's a
> misspelling of "hello". But it shouldn't cross the string boundary.
Hm, yes. In this case, the mode knows that f isn't part of the
expression, but I guess we have no way of communicating that to ispell?
Skimming ispell-get-word, it looks like it uses a regexp to determine
what the word at point is, so we'd need to make some sort of framework
to allow modes to say where a string begins and ends? Or if we want to
just do something hackish, we could make that function check
the face for font-lock-string-face and then limit based on that. (Which
sounds simple enough.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 23 15:27:22 2022
Received: (at 54131) by debbugs.gnu.org; 23 Feb 2022 20:27:23 +0000
Received: from localhost ([127.0.0.1]:46657 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nMyEM-0003Aw-Ls
for submit@debbugs.gnu.org; Wed, 23 Feb 2022 15:27:22 -0500
Received: from mail-ot1-f43.google.com ([209.85.210.43]:46743)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nMyEK-0003Aj-RN
for 54131@debbugs.gnu.org; Wed, 23 Feb 2022 15:27:21 -0500
Received: by mail-ot1-f43.google.com with SMTP id
p12-20020a05683019cc00b005af1442c9e9so8952108otp.13
for <54131@debbugs.gnu.org>; Wed, 23 Feb 2022 12:27:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=+UwogRr2yz/LeVjG7bKh2L5mR1iErCv7O4E+xYlaLyg=;
b=WCQpnVbEtS6xRJipCWwW06cMMY07PA0+zE0vdQOUhNE2CIoBwBC7xksu5mvu6m58TZ
4dTtTKZBGccakBGE/+jDLOoDUug7EdN7Fn0tUeGbJ4vhypZOm8QcwqVcPA4aLsiD0rfi
D5uR0IREWhuBa6MWqa83p+Vin5x27pBLjq34gsTp7CIEM8KQZC4RPhPx75/vx359V9lP
USJouch404N1OFYEw2Ey46/lQNrQTsYjcYFxCq4MHSmpGftGCoYd3mre10pW8vxfknMN
7DYv6VjMF5L4yYRVgRsFHjmpRQz//xKSvUpfypai8P2ogQmo21wh7jg0+rCvU2UKUs3k
Yt8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=+UwogRr2yz/LeVjG7bKh2L5mR1iErCv7O4E+xYlaLyg=;
b=TnThs8zQExRbegSKiCnlPDyiDnU0HyMEzAEOx+s3tHf3u3CuPsCPcT9iuHncynONmM
PI3axWrUug8POfDMDUGFU6F+XP2TnNL1hnCGaxMxd5HdNXenaejSV19YPUH0vsE4u1rN
M1bUquq3Bf0Pv+20y9iodidtqsWRJS4yJmVD6H38Dg3RapkUWYfafORiLrRXxp68nR/S
HUt2mMA5Nc6b6/uNlZV/JiC5fecDSHPAIsbRhzAfNR/3KRCVePUQl4PDTkqJl5LaoGk0
uez6bgD4qPFaPY+b/X3rdlsljuV/MQeaydjKXjQmKCbAxsAXMHjNquVmBT9AJHJUzMjH
gIhg==
X-Gm-Message-State: AOAM5311df2SN7/NFPLEGPGtKcSQpccToXzIuHE8gPUNpTWozNbj+hzJ
WnyZxsrZr7zfU+bzQYfG9QXx+iRxWbdCEJnmT69WLjo4
X-Google-Smtp-Source: ABdhPJy+uC4RlibVZ33sttEK1iJphu1wts05d+/V4XoN/F8jFLNRWNUKdwiinYzM3tbmxzGP/pUXDMfcVx1dWo33Q04=
X-Received: by 2002:a9d:7697:0:b0:5a4:c444:b85e with SMTP id
j23-20020a9d7697000000b005a4c444b85emr523078otl.224.1645648035088; Wed, 23
Feb 2022 12:27:15 -0800 (PST)
MIME-Version: 1.0
References: <877d9l5ok8.fsf@gnus.org>
In-Reply-To: <877d9l5ok8.fsf@gnus.org>
From: Philipp Stephani
Date: Wed, 23 Feb 2022 21:27:04 +0100
Message-ID:
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
To: Lars Ingebrigtsen
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 54131
Cc: 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.8 (/)
Am Mi., 23. Feb. 2022 um 21:13 Uhr schrieb Lars Ingebrigtsen :
>
> Philipp Stephani writes:
>
> > Given this Python file:
> >
> > $ cat /tmp/a.py
> > print(f'hello world')
> >
> > Visit it and enable Flyspell:
> >
> > $ emacs -Q /tmp/a.py -f flyspell-prog-mode
> >
> > Flyspell then marks the string "f'hello" as incorrect, thinking it's a
> > misspelling of "hello". But it shouldn't cross the string boundary.
>
> Hm, yes. In this case, the mode knows that f isn't part of the
> expression, but I guess we have no way of communicating that to ispell?
>
> Skimming ispell-get-word, it looks like it uses a regexp to determine
> what the word at point is, so we'd need to make some sort of framework
> to allow modes to say where a string begins and ends?
Like the syntax table? (nth 8 (syntax-ppss)) gives you the beginning
of the string, and that seems to give correct results even for
f-strings.
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 01:27:45 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 06:27:45 +0000
Received: from localhost ([127.0.0.1]:47275 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nN7bN-0002uE-Af
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 01:27:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42824)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nN7bL-0002u1-LZ
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 01:27:43 -0500
Received: from [2001:470:142:3::e] (port=35404 helo=fencepost.gnu.org)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nN7bG-0003n7-B3; Thu, 24 Feb 2022 01:27:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=KimGEbHz1bdcO8ppVkcdzGboXUPMLX6TH9E7Ap3W5BQ=; b=TS4XEyK/d533
KGhabSFp1OiTgODzn+xzmpJuDYwb2M/0UM4bTiG4faFD+OgdMU2MXe7jltyPaXvKzSsc9Ie2sGrIj
sXkNdQJym+UBkD5XKK9d4XVzmaLv/excesDgxDyX+6ni97Qu8jiCYmuZrP9f7F7o6FPTOid1F8zH5
A0umiSgrm/rVBYsZY1sqL1wDlfV80SqfA90XdfKrxAu0wOhIEPGQtSwdAnW4QnP/pCf5q1jbj/Mbw
4e1eVne0QCPWS0f9ererv0McWqsOwV4hwe1zTbXWleUSdkwHguU20MeKpp8jzjJ/9qR/bNEcqRgov
TdQXvsKNzLv0NRoSvXLeJw==;
Received: from [87.69.77.57] (port=1316 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nN7bF-0006Hr-9o; Thu, 24 Feb 2022 01:27:38 -0500
Date: Thu, 24 Feb 2022 08:27:49 +0200
Message-Id: <83o82wsrru.fsf@gnu.org>
From: Eli Zaretskii
To: Lars Ingebrigtsen
In-Reply-To: <877d9l5ok8.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed,
23 Feb 2022 21:13:27 +0100)
Subject: Re: bug#54131: 29.0.50;
Flyspell incorrectly reports first word in Python f-string
References: <877d9l5ok8.fsf@gnus.org>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> From: Lars Ingebrigtsen
> Date: Wed, 23 Feb 2022 21:13:27 +0100
> Cc: 54131@debbugs.gnu.org
>
> Skimming ispell-get-word, it looks like it uses a regexp to determine
> what the word at point is, so we'd need to make some sort of framework
> to allow modes to say where a string begins and ends? Or if we want to
> just do something hackish, we could make that function check
> the face for font-lock-string-face and then limit based on that. (Which
> sounds simple enough.)
Our spell-checking modes aren't supposed to work on code, so they
don't pay any attention to the buffer's syntax table, and instead use
regular expressions specific to the proof-reading language to know
what can and cannot be in a word.
For program sources, flyspell-prog-mode relies on font-lock faces to
tell it where strings and comments are, so perhaps this part doesn't
work for some reason (and perhaps the root cause is in font-lock of
python-mode, not in flyspell.el per se).
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 01:33:21 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 06:33:21 +0000
Received: from localhost ([127.0.0.1]:47316 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nN7gn-0003AS-1O
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 01:33:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43824)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nN7gl-0003AC-8X
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 01:33:19 -0500
Received: from [2001:470:142:3::e] (port=35498 helo=fencepost.gnu.org)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nN7gf-0004b5-Us; Thu, 24 Feb 2022 01:33:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=6e5K+tLEIBaJ4Dd56tBCGFeqZ9BlgF5YBJkPtbDHwh8=; b=f7NlblMwU0N/
pb7SwUnNjkMylUdXXE5QjkeJFo3UirQSpsf4CRHXr8KPpOaaTsnRLICg4plJ+BJrgryp3yMK+PnDp
CwgYZCkbVjecoTc9qF9SabmOkec+jen/Bslo6pWg5WUexRwEF2wCj9Ewyr8lMfORKe9YR7cOge+oI
hEpbCP04UF5yUPXDZ+vMtjLgAi4drH/2e6r+hv6iHH2F3nuN8wzEOJjM1wpJOoB7K1+zlBkiiNFBW
BMhA+awGzegsZ3U7lFtEccWV01OhO8J2sBXgIMFp3y3YmVec9GJoYjkaGsQHlZyDL3BbXGPtiwdiB
xE9YbyRLDcCCpUsnF4Zykw==;
Received: from [87.69.77.57] (port=1658 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nN7ge-00055n-Mh; Thu, 24 Feb 2022 01:33:13 -0500
Date: Thu, 24 Feb 2022 08:33:24 +0200
Message-Id: <83mtigsrij.fsf@gnu.org>
From: Eli Zaretskii
To: Philipp Stephani
In-Reply-To:
(message from Philipp Stephani on Wed, 23 Feb 2022 21:27:04 +0100)
Subject: Re: bug#54131: 29.0.50;
Flyspell incorrectly reports first word in Python f-string
References: <877d9l5ok8.fsf@gnus.org>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: larsi@gnus.org, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> Resent-From: Philipp Stephani
> Original-Sender: "Debbugs-submit"
> Resent-CC: bug-gnu-emacs@gnu.org
> Resent-Sender: help-debbugs@gnu.org
> From: Philipp Stephani
> Date: Wed, 23 Feb 2022 21:27:04 +0100
> Cc: 54131@debbugs.gnu.org
>
> Am Mi., 23. Feb. 2022 um 21:13 Uhr schrieb Lars Ingebrigtsen :
> >
> > Philipp Stephani writes:
> >
> > > Given this Python file:
> > >
> > > $ cat /tmp/a.py
> > > print(f'hello world')
> > >
> > > Visit it and enable Flyspell:
> > >
> > > $ emacs -Q /tmp/a.py -f flyspell-prog-mode
> > >
> > > Flyspell then marks the string "f'hello" as incorrect, thinking it's a
> > > misspelling of "hello". But it shouldn't cross the string boundary.
> >
> > Hm, yes. In this case, the mode knows that f isn't part of the
> > expression, but I guess we have no way of communicating that to ispell?
> >
> > Skimming ispell-get-word, it looks like it uses a regexp to determine
> > what the word at point is, so we'd need to make some sort of framework
> > to allow modes to say where a string begins and ends?
>
> Like the syntax table? (nth 8 (syntax-ppss)) gives you the beginning
> of the string, and that seems to give correct results even for
> f-strings.
That's not how flyspell-prog-mode works, see my other message. I
guess it doesn't want to run syntax analysis functions on the fly, as
that could be too slow (flyspell being on post-command-hook), but
instead relies on font lock that is run by the display engine anyway.
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 04:13:18 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 09:13:18 +0000
Received: from localhost ([127.0.0.1]:47498 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nNABZ-0000zX-RX
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 04:13:18 -0500
Received: from quimby.gnus.org ([95.216.78.240]:43382)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nNABW-0000zG-Kg
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 04:13:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=Klbe2GaY7NTcsCgIlfh9upTG13SIsa2adYOMrfIXoU0=; b=ujdV2RQqdQ3AXxZnQOJ7BygWjL
mlFsGz1XglsEK+AUIIOBwml+23DtLUlniZgMcdsYQnSp7wsDeaJcOv0Bm1RT8El2BtF2An0Cmurbo
xtMqHLC4ZeNyOe74HBGAfcK0Xhbe/yRp+IYM7KZnabAC5OdkPL7Chkl9RE9tVtENa8qQ=;
Received: from [84.212.220.105] (helo=giant)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from )
id 1nNABI-0003lq-IJ; Thu, 24 Feb 2022 10:13:07 +0100
From: Lars Ingebrigtsen
To: Eli Zaretskii
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
References: <877d9l5ok8.fsf@gnus.org>
<83o82wsrru.fsf@gnu.org>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWJgHTa2NZIQTr/
///FtiXEAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YCGAg1E8s4rP8AAAF7SURBVCjPfdDBThsxEAbg
2Sitqj1FUYxETyQHlPopXJQg2NMW7aCyp4AaKexTOFWMopx6SDivo1KZ/yk7dlALF+b2ee3Z+YcU
/y9KmDJPuGLqeznxhqQEoTzuDAVdOeztzf3H4SJ+UdTzk6fT7BYI+Y767eTkzs2w9xEI2X65EDQR
yEbLBnjWggDq+DvBhZL/jC38TBpI6z5aq/1cAwlBMD17AdbwfJ6uHVlS0zdTv4Xpfn/GTmDUWDX2
PggG/KM3ck220BF+/mu0NHQS8RhmYxoWCBBsoT9ZAQ4o1lYVOk/INOyuGFYH5HrzVDiG5NnaPja+
HrCW2Ns95RtfXnOTO3pA0PDfrrhOkPKXzFWpaGXp3+TkXkc4oByk9bopV8QlZC8CkrdcBrRBxWuy
AgF6CV+Z68/487iLkM4XV1h1IyrxZY3VwEX4Od+c4bd2MkGHMjZUtxDIaGs2WY0E6RoKmye00Btb
x9kFEgdfBD/tB3LWmPcivIaEkZf4C95g2gEFswnBAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTAy
LTI0VDA4OjUzOjE5KzAwOjAwzyT0ogAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wMi0yNFQwODo1
MzoxOSswMDowML55TB4AAAAASUVORK5CYII=
X-Now-Playing: Bobbie Gentry's _The Girl From Chickasaw County (6): Fancy_:
"Rainmaker"
Date: Thu, 24 Feb 2022 10:12:58 +0100
In-Reply-To: <83o82wsrru.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Feb
2022 08:27:49 +0200")
Message-ID: <87fso84oh1.fsf@gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Eli Zaretskii writes: > For program sources,
flyspell-prog-mode relies on font-lock faces to > tell it where strings and
comments are, so perhaps this part doesn't > work for some reason (and perhaps
the root cause is in f [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
Eli Zaretskii writes:
> For program sources, flyspell-prog-mode relies on font-lock faces to
> tell it where strings and comments are, so perhaps this part doesn't
> work for some reason (and perhaps the root cause is in font-lock of
> python-mode, not in flyspell.el per se).
I didn't know about flyspell-prog-mode, but it does indeed do the right
thing here. (I've now mentioned the mode in the flyspell-mode doc
string.)
But `M-$' does not do the right thing -- if you `M-$' on f'hello, it
tries to correct the whole thing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 04:26:39 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 09:26:39 +0000
Received: from localhost ([127.0.0.1]:47537 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nNAOV-0001La-Af
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 04:26:39 -0500
Received: from mout.gmx.net ([212.227.17.22]:57235)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nNAOT-0001LN-FW
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 04:26:38 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
s=badeba3b8450; t=1645694791;
bh=CgoYUgQv5ghSLozQpqhBwH/O/0SHdMtvZl2BiojvXys=;
h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To;
b=Ou0XBCNqSqnm8rQhfEeyEXNDuAzDComYfqSElWvIDpVW+s/46/4PyLGAil31JdDpz
1AsIzRl1k25UHvQHIjLXWIylOT1rHegmpIVfeDKCjByk5pR8Rojy8r8+CsRZBGpVCg
3GNHgWqo0Y983BygTNCuxo+655Qnb9zDopMpNkbI=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.45]) by mail.gmx.net (mrgmx104
[212.227.17.168]) with ESMTPSA (Nemesis) id 1Mk0JM-1o7Wm63Rge-00kMst; Thu, 24
Feb 2022 10:26:30 +0100
Message-ID:
Date: Thu, 24 Feb 2022 10:26:29 +0100
MIME-Version: 1.0
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
Content-Language: en-US
To: Lars Ingebrigtsen , Eli Zaretskii
References: <877d9l5ok8.fsf@gnus.org>
<83o82wsrru.fsf@gnu.org> <87fso84oh1.fsf@gnus.org>
From: martin rudalics
In-Reply-To: <87fso84oh1.fsf@gnus.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:jqd9k6sCnJ/tNC5SFfRmFRsThyzvcd/JdTssek0TXZiBJjTW0l8
8n4Qi7g83hw89A/Pjg522tCjUWd/RQDyA/W8fBaSHJYUq4lBGdacsxnjNV+oZEJXNfgElLE
7JRXqai+XOVgId6HZSAQEerJy9mszSrbiFOxZrsZmpUE6UCvnIt66Pgiki2VFbIQT5ku4kY
/wZrYURQ95fMqAYKYkoug==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:88QcJ/YfNxI=:Wf+m+F86o/dw4Mcl2qxtba
9wOMmnRz8b+nRBb5FMCG51xeJXohTeGji43a5pViO61272G1Xqneq9reSuZeNtuF7yGdShzi+
sSDLSAOR6PYmoms6szkz1gzCJNlRKy8jj2IWGgcwxc6mm0Gy7KCDqZ5XdP4gnpndXQqn4vBi9
plV8+PNB91typxMELkuRSb/kmRbRxHMg30RdHOJIm2Z6xJCBDoIi4U0bgodXq2BadpPxtEtRT
NKi8ZruItV/lwvrPF9xU2jmgDQYVy4U/5iCtrUKARDlZNsdmca37Hxz/HhzDrzdMWoL/f0K01
5fHItlQN5fxEMn9MU1Deb4MkyhCodsuFtFN9E86KexgmV4N8XjMpWE0bUyTdtq5H/Z8Sy27Vt
RcSxB7IlH0RqcIBsNNPlvir3s+od1HYuZXj9vd2ncPe+J5ymIUHf34p95mUrQxn6VHPd1IWyT
iiTm8b3xjOCgWI3oGm/TR0vixUDCz9Fs6645vZUPkBDJr0J2r7EHj3xDlpGcGIu9AnUg+Axg4
MRmJMHQyySlB4llsabZCO3DN12O26FCxxDh9FkWl+AZYdtQv5CAGO6hHsyoLQNjbU8kFz+KAA
UYNFcaFPgE0CiIwYI4NIs5PdCgT2dUYwXqOkizT/oLCud1tp3ChFLnbEX3TAfBeXs3inP+RdJ
wNXEcnVMyUtppvXxLaOjbye8zEOzO3nklYJUlWcljot6/+ryJIt16rb5QBGJse0w32S4wgQj+
s+xubIsip1ScKjp4zpWZYURHXHw8ZZRmYBVjj+JXE1LbGjgZ3GX3Ou7yjP2E1EtlrwJZ0PFUE
t0XhZM25nHiPtK1KUYQcqS9zA6KhutYv3woQREqYautg1OOykRP3JhwdUX/3uJCoRdBn/2fSz
KFQjsA2O1DvioEDAQlWRSQscGT+Xb7iG8yCUU1gCBMPP0GxCnKWfhfyV+2T0KiusGiErGzm+E
/xDYITn+hmZ4cDpFqfFm/j/+hPh15lKNKxL7eD/flxzE3QsM+GM8aD3icf2a194L2GKDlN7jC
MrqkGqaK48nRxzekG66+wdaPtyE38GEzG1bPBtBkak8ulPQsmk+OirXAyUVfwrJyKviC9EE2x
pTYukc6wIu3p10=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 54131
Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.7 (-)
> But `M-$' does not do the right thing -- if you `M-$' on f'hello, it
> tries to correct the whole thing.
Try with 'ispell-comment-or-string-at-point'.
martin
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 05:19:54 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 10:19:54 +0000
Received: from localhost ([127.0.0.1]:47649 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nNBE2-0004tz-AJ
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 05:19:54 -0500
Received: from eggs.gnu.org ([209.51.188.92]:40284)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nNBE0-0004tl-PD
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 05:19:53 -0500
Received: from [2001:470:142:3::e] (port=38020 helo=fencepost.gnu.org)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nNBDv-0000X2-Ef; Thu, 24 Feb 2022 05:19:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=xt63jWv7mPaqyCHtsn1khTaE0oPO3p9zNkk8aq3293o=; b=My5I4VEt5Lwi
T+0GglMzSxyZJpMEPV3q+7rPwfsRRVyDME+jL5cESWciMFCdTpbPmOJAjd18Z3ogE5m0rbYW/vIMw
D/bpJfvZ84iic03rMdLNt9xq4EhVdPnk/5phg8mPtrzjV3Evzagvm4dfF7PQVdxE548UMXNL7TKlJ
eygk05uvPiGm5QbsQ8Nu+9EdldGhxXzXVs3BwiV/9nm1GIQMrJr4MHRHIOQbjYtcevg4eTiEavsiO
54JR4eUKD3/UIHwLc7+yl3dol5Sv04CHHszE+ZjGtzy9bRETh3iorIhqSjkWLmoh3LL2jUCycAkiR
cLEVGKaw2IeeDETsN4G6+A==;
Received: from [87.69.77.57] (port=3723 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1nNBDu-0008KW-RD; Thu, 24 Feb 2022 05:19:47 -0500
Date: Thu, 24 Feb 2022 12:19:59 +0200
Message-Id: <837d9ksh0w.fsf@gnu.org>
From: Eli Zaretskii
To: Lars Ingebrigtsen
In-Reply-To: <87fso84oh1.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu,
24 Feb 2022 10:12:58 +0100)
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
References: <877d9l5ok8.fsf@gnus.org>
<83o82wsrru.fsf@gnu.org> <87fso84oh1.fsf@gnus.org>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> From: Lars Ingebrigtsen
> Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
> Date: Thu, 24 Feb 2022 10:12:58 +0100
>
> Eli Zaretskii writes:
>
> > For program sources, flyspell-prog-mode relies on font-lock faces to
> > tell it where strings and comments are, so perhaps this part doesn't
> > work for some reason (and perhaps the root cause is in font-lock of
> > python-mode, not in flyspell.el per se).
>
> I didn't know about flyspell-prog-mode, but it does indeed do the right
> thing here. (I've now mentioned the mode in the flyspell-mode doc
> string.)
That's strange, because the OP explicitly invoked flyspell-prog-mode,
so how come it didn't work for Philipp, but did for you?
> But `M-$' does not do the right thing -- if you `M-$' on f'hello, it
> tries to correct the whole thing.
Maybe we should have a key binding for
ispell-comment-or-string-at-point, and/or maybe
ispell-comments-and-strings and flyspell-prog-mode should rebind M-$
to ispell-comment-or-string-at-point.
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 06:24:15 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 11:24:15 +0000
Received: from localhost ([127.0.0.1]:47751 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nNCEI-0006Ve-Rw
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 06:24:15 -0500
Received: from mail-pj1-f66.google.com ([209.85.216.66]:53142)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nNCEH-0006VS-89
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 06:24:13 -0500
Received: by mail-pj1-f66.google.com with SMTP id v4so1723211pjh.2
for <54131@debbugs.gnu.org>; Thu, 24 Feb 2022 03:24:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=from:to:cc:subject:references:date:in-reply-to:message-id
:user-agent:mime-version:content-transfer-encoding;
bh=wsH+xErei56Yc6fWPETQPb5OmLRCtcV81ZO3rgwSOGw=;
b=Uogid4MqKQE2oXqQ4TmEVqEo+5I0GBlBHSbNrVFAxUDBier0rVL5Ao7ysDokSpsSJp
KKCGVqbSFJ1XXHuP3l4HZoiBhEN+wh3IXuE6TKmQ50W0EITaKVBCBFj1FssE0LpCzSCG
aXA0yMWkXsBKXHuR4ixWuD681it7XPAbe2k8xUmXVFAYZUEyceRx6sugkiTX6kJdsM66
ZqjRlPZYLfFlM1upmPYR6lfjrEE0iZx9Sda6c6Ysh14oviDGUoIxIplVQnR7G6fGG4BD
aN/GRWaXYnjePoOu3KYQ/Umd1QsA8/+OgjMLyTMTkFzUweyBBwBgHoL99kJN0uf0/TZ2
z5Jg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
:message-id:user-agent:mime-version:content-transfer-encoding;
bh=wsH+xErei56Yc6fWPETQPb5OmLRCtcV81ZO3rgwSOGw=;
b=i1lAgF91+KKSh/7H8YwTdCXXbCXUeJ9dgNaF6Q9v4LUqFKVWWLmjwgh4cEUhKPch2q
H6oacs04sTVJa5474xjd8xC6T+rba8Wt1cVqRX86ho+fk2aL5XwygCJ7vRRw+9fy3Gqh
rJZToGQBXRKmFN08iGT2sRp3el5Omsj+No+jyrsaZzvAZKRbYn2lVlnsIKgKdlbp30no
i23E0toDdIdNgt6O7fBjqSyox2750KUR7YCvtkbUtxIIlGchuDv+3eI2KHYHpmOpRtmq
Ful0LFewtfDEUqWP5BdAIz/RWDSmcQobMqvSg5oCEFBfxflG3MaNneE9BFyYt9IZYeNj
CeVw==
X-Gm-Message-State: AOAM531WtW7IqyIpX0yHHAJy3iOwvhK8Sm7Cs49nDrpx5vTuZDEwNXeP
rdF07DWFr6oWxl1vi5d+uDQ=
X-Google-Smtp-Source: ABdhPJzqaQA1EHOrTeSwwOORn3zy/xOmlcj7ds5zyd2ATwcN31DVvE4FnBCPIVQK0cZiAqY72tnm0Q==
X-Received: by 2002:a17:902:ed83:b0:14f:c969:7669 with SMTP id
e3-20020a170902ed8300b0014fc9697669mr2373983plj.96.1645701847478;
Thu, 24 Feb 2022 03:24:07 -0800 (PST)
Received: from localhost ([14.139.216.98])
by smtp.gmail.com with ESMTPSA id o7sm2727116pfw.114.2022.02.24.03.24.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 24 Feb 2022 03:24:07 -0800 (PST)
From: Visuwesh
To: Eli Zaretskii
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
References: <877d9l5ok8.fsf@gnus.org>
<83o82wsrru.fsf@gnu.org> <87fso84oh1.fsf@gnus.org>
<837d9ksh0w.fsf@gnu.org>
Date: Thu, 24 Feb 2022 16:53:48 +0530
In-Reply-To: <837d9ksh0w.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Feb
2022 12:19:59 +0200")
Message-ID: <87wnhkjynv.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 54131
Cc: Lars Ingebrigtsen , p.stephani2@gmail.com,
54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
[=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D, =E0=AE=AA=
=E0=AE=BF=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B5=E0=AE=B0=E0=AE=BF 24 2022] El=
i Zaretskii wrote:
>> From: Lars Ingebrigtsen
>> Cc: p.stephani2@gmail.com, 54131@debbugs.gnu.org
>> Date: Thu, 24 Feb 2022 10:12:58 +0100
>>=20
>> Eli Zaretskii writes:
>>=20
>> > For program sources, flyspell-prog-mode relies on font-lock faces to
>> > tell it where strings and comments are, so perhaps this part doesn't
>> > work for some reason (and perhaps the root cause is in font-lock of
>> > python-mode, not in flyspell.el per se).
>>=20
>> I didn't know about flyspell-prog-mode, but it does indeed do the right
>> thing here. (I've now mentioned the mode in the flyspell-mode doc
>> string.)
>
> That's strange, because the OP explicitly invoked flyspell-prog-mode,
> so how come it didn't work for Philipp, but did for you?
>
>> But `M-$' does not do the right thing -- if you `M-$' on f'hello, it
>> tries to correct the whole thing.
>
> Maybe we should have a key binding for
> ispell-comment-or-string-at-point, and/or maybe
> ispell-comments-and-strings and flyspell-prog-mode should rebind M-$
> to ispell-comment-or-string-at-point.
I misspell parts of a symbol quite often so rebinding M-$ to a command
that NOOPs when the point is not over a comment/string would end up
annoying, IMO. I am not sure how common this usecase is though.
From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 24 09:37:00 2022
Received: (at 54131) by debbugs.gnu.org; 24 Feb 2022 14:37:00 +0000
Received: from localhost ([127.0.0.1]:47984 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1nNFEp-0005F1-P7
for submit@debbugs.gnu.org; Thu, 24 Feb 2022 09:36:59 -0500
Received: from quimby.gnus.org ([95.216.78.240]:46188)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1nNFEo-0005Eo-Mi
for 54131@debbugs.gnu.org; Thu, 24 Feb 2022 09:36:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=PxFO2PgY27NeTfTR2g0FAGhPMcXRHE4oYy6K9kXfzDo=; b=tuj5EzLNVt0lXGz5hAUoHg3feR
FfbnfWq3ULMpaVW++XAslFXRCPAE0mbFwxyYXsRG/Q3WeUZVOghYQrp7jBkh6nhGhurR3KPwpCL4f
+94Oi52sIetATkfQCvdZKanFDQ/iZ6jlCqLwyunvni/PsyuPcLbqVmPdxcTD+XN7RYXk=;
Received: from [84.212.220.105] (helo=giant)
by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92) (envelope-from )
id 1nNFEf-00076y-6n; Thu, 24 Feb 2022 15:36:52 +0100
From: Lars Ingebrigtsen
To: Visuwesh
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
Python f-string
References: <877d9l5ok8.fsf@gnus.org>
<83o82wsrru.fsf@gnu.org> <87fso84oh1.fsf@gnus.org>
<837d9ksh0w.fsf@gnu.org> <87wnhkjynv.fsf@gmail.com>
X-Now-Playing: Mice Parade's _Nights Wave EP_: "Milton Road"
Date: Thu, 24 Feb 2022 15:36:46 +0100
In-Reply-To: <87wnhkjynv.fsf@gmail.com> (Visuwesh's message of "Thu, 24 Feb
2022 16:53:48 +0530")
Message-ID: <87czjc2uwx.fsf@gnus.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
@@CONTACT_ADDRESS@@ for details.
Content preview: Visuwesh writes: > I misspell parts
of a symbol quite often so rebinding M-$ to a command > that NOOPs when the
point is not over a comment/string would end up > annoying, IMO. I am not
sure how common this usecase is [...]
Content analysis details: (-2.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54131
Cc: Eli Zaretskii , p.stephani2@gmail.com, 54131@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
Visuwesh writes:
> I misspell parts of a symbol quite often so rebinding M-$ to a command
> that NOOPs when the point is not over a comment/string would end up
> annoying, IMO. I am not sure how common this usecase is though.
I think it's pretty common. I think a new command that does what
ispell-comment-or-string-at-point does if we're in a comment/string and
what ispell-word does otherwise might be nice.
And flyspell-prog-mode could rebind `M-$', as Eli suggests, but to that
new command.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no