From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Glyph Newsgroups: gmane.emacs.bugs Subject: bug#21840: 24.5; semantic analysis of python files is broken by strings that end in backslash Date: Thu, 3 Dec 2020 10:48:50 -0800 Message-ID: References: <875z5jupzl.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 21840@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 03 19:50:28 2020 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 1kktgR-0006hM-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 19:50:28 +0100 Original-Received: from localhost ([::1]:36858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kktgQ-0007xU-Mx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 13:50:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kktg2-0007wj-PH for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 13:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kktg2-000789-H4 for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 13:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kktg2-0003MX-ED for bug-gnu-emacs@gnu.org; Thu, 03 Dec 2020 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glyph Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Dec 2020 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 21840-submit@debbugs.gnu.org id=B21840.160702135212867 (code B ref 21840); Thu, 03 Dec 2020 18:50:02 +0000 Original-Received: (at 21840) by debbugs.gnu.org; 3 Dec 2020 18:49:12 +0000 Original-Received: from localhost ([127.0.0.1]:41790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kktfE-0003LT-F1 for submit@debbugs.gnu.org; Thu, 03 Dec 2020 13:49:12 -0500 Original-Received: from so254-45.mailgun.net ([198.61.254.45]:39382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kktfA-0003LB-7y for 21840@debbugs.gnu.org; Thu, 03 Dec 2020 13:49:11 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=twistedmatrix.com; q=dns/txt; s=smtp; t=1607021350; h=To: References: Message-Id: Content-Transfer-Encoding: Cc: Date: In-Reply-To: From: Subject: Mime-Version: Content-Type: Sender; bh=eUxp5Y1LS+yarGs6MRqRBq/Nrd/oRThQcXrcg0IZceg=; b=KR/iajFLJxZFACOSzWOCCKY7XAA1zBVfm6YDqepImktObSSaFDDl09RQyDUdtpokIYZlYx6l kSAC4SP7oEeCfOKx52e502hBRDpm8j+X+ydaVxE8KYLv0p87CNsbqUQ0IBn6XgLvq1vblt5L yrCM41mCukQ6lPb95cx9Lq99iK0= X-Mailgun-Sending-Ip: 198.61.254.45 X-Mailgun-Sid: WyI3NDE1MCIsICIyMTg0MEBkZWJidWdzLmdudS5vcmciLCAiOWY1YTIiXQ== Original-Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) by smtp-out-n08.prod.us-west-2.postgun.com with SMTP id 5fc93315ca03b1496587c42f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Dec 2020 18:48:53 GMT Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id D206727C0054; Thu, 3 Dec 2020 13:48:52 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 03 Dec 2020 13:48:52 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeiiedguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefilhih phhhuceoghhlhihphhesthifihhsthgvughmrghtrhhigidrtghomheqnecuggftrfgrth htvghrnhepkeetueduhfffffdvvdfhvdetgeevfeevgfeikeeukeefteffgfdvudduvefg ueeunecuffhomhgrihhnpehinhhgvggsrhhighhtshgvnhdrnhhonecukfhppeejiedrvd dviedrudeifedrvdeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehglhihphhhodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqd efjeegtddufeejjedqudegleeliedvkeelqdhglhihphhhpeepthifihhsthgvughmrght rhhigidrtghomhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Original-Received: from elara.lan.glyph.im (76-226-163-233.lightspeed.sntcca.sbcglobal.net [76.226.163.233]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A98524005B; Thu, 3 Dec 2020 13:48:52 -0500 (EST) In-Reply-To: <875z5jupzl.fsf@gnus.org> X-Mailer: Apple Mail (2.3654.20.0.2.21) 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:194921 Archived-At: I don't know how to force semantic to fully reparse a file, I just = observe its behavior in response to idle times. Here's a test file you can use though, if you know how to do that: def a(v): "test" def x(): "test" a(b"\\") def y(): "test" def z(): "test" Comment and uncomment the 'a(b"\\")' line and let semantic get around to = reparsing the buffer, however it decides to do that, and (mapcar 'car = (semantic-fetch-tags)) will return ("a" "x") rather than the expected = ("a" "x" "y" "z"). However, it seems like there's tons of cache state = somewhere that I can't easily clear out because it randomly seems to = fluctuate between doing what I expect, returning "nil", and returning a = stale copy of the symbols (including stuff added and then removed = entirely from the bottom of the buffer). Sadly, given that I don't use semantic any more (specifically because of = this type of inscrutable unreliability) I don't have any more time for = debugging this. Thanks for following up and good luck! -g > On Dec 3, 2020, at 2:46 AM, Lars Ingebrigtsen wrote: >=20 > Glyph Lefkowitz writes: >=20 >> Python string literals that end in a backslash cause Semantic's = parser >> to halt and not recognize anything further in the buffer. I = personally >> ran across this because I frequently use helm-semantic-or-imenu, but = can >> be demonstrated equally well by semantic-complete-jump-local or = anything >> else that makes use of the buffer's symbol list. >>=20 >> The trivial way to reproduce this is to put the string literal "\\" = at >> the top of a Python buffer and then invoke semantic in one of the = ways >> just mentioned and notice that nothing is picked up. You can move = the >> backslash literal down in the file and see every symbol up to the = point >> where it is placed. >=20 > (This bug report unfortunately got no response at the time.) >=20 > Do you have a step-by-step recipe to reproduce this bug, starting from > "emacs -Q"? >=20 > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no