From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#54131: 29.0.50; Flyspell incorrectly reports first word in Python f-string Date: Wed, 23 Feb 2022 21:27:04 +0100 Message-ID: References: <877d9l5ok8.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16749"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54131@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 23 21:28:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMyFI-00044V-NK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 21:28:20 +0100 Original-Received: from localhost ([::1]:39732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMyFH-0000k0-80 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 15:28:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMyF0-0000jd-Bx for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 15:28:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMyF0-0006qm-2d for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 15:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMyEz-0003Br-UI for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 15:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 20:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54131 X-GNU-PR-Package: emacs Original-Received: via spool by 54131-submit@debbugs.gnu.org id=B54131.164564804312215 (code B ref 54131); Wed, 23 Feb 2022 20:28:01 +0000 Original-Received: (at 54131) by debbugs.gnu.org; 23 Feb 2022 20:27:23 +0000 Original-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 Original-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 Original-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) In-Reply-To: <877d9l5ok8.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227541 Archived-At: 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.