From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Aug 2016 23:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24172@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.147052612926732 (code B ref -1); Sat, 06 Aug 2016 23:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Aug 2016 23:28:49 +0000 Received: from localhost ([127.0.0.1]:58219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWB1N-0006x5-AP for submit@debbugs.gnu.org; Sat, 06 Aug 2016 19:28:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWB1L-0006wt-VX for submit@debbugs.gnu.org; Sat, 06 Aug 2016 19:28:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWB1G-0006y5-0m for submit@debbugs.gnu.org; Sat, 06 Aug 2016 19:28:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWB1F-0006y1-U2 for submit@debbugs.gnu.org; Sat, 06 Aug 2016 19:28:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWB1D-0006oQ-IV for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 19:28:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWB17-0006xl-Kq for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 19:28:38 -0400 Received: from mout.web.de ([212.227.15.14]:61668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWB17-0006wt-9o for bug-gnu-emacs@gnu.org; Sat, 06 Aug 2016 19:28:33 -0400 Received: from drachen.dragon ([88.67.73.210]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MhDRB-1bsMjG2VG5-00MNZS for ; Sun, 07 Aug 2016 01:28:31 +0200 From: Michael Heerdegen Date: Sun, 07 Aug 2016 01:28:30 +0200 Message-ID: <874m6xqxy9.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:auT+Dh+cEgPsFSIVGWeRtrOQgFvUgsEO86JvHaqGsacQyM1Hdx6 qGd3Yjd4XJfhwoFrgCcRdGBdXszejFXu5kE6LeixA4ZVJ4SxdVLHg9m7WfUzt7SQESlqTwL DgAf2lRBp4AOPV9apEzsgpZ1ffRh/9Fc27hS+gBIcQdO3UdvygWL0ODbFeghGFuPceiBdvk gVO7fkVl1jE/gDtSfeqag== X-UI-Out-Filterresults: notjunk:1;V01:K0:4dmLQlkSHRk=:dEOu9qtjSZDNjZwsTPXggQ 9szmNz7DQBST9Dt8fmWL4RJ2PPj2EjwFACGSgOH6/RLfcimKJJJZfzRZZ2HXbTlFqe5+0QIPZ PG3bn5QlQYPXZ9DjKpa2FlRtRbVVboF0A6EpeSgBsw0AK/yt/oQrLqsWtBcZsJogSnkalAIBs jkVOMc/x3FiYDbLwOMP+DeiVg1vYBndGbPohRgM/lnhzgXZgKuiu7R++DMx7jNFxnAe7ezeZH y/WY+E3VbZrdELguEHdE8ZRxYQZaw8pcD4lRkQMFWXlZUrFrlrj0GjGpmD0Jn+7dC8JfH38Zl 2/QR5Hxf0ojHiuBCxEdE9+3KmRQI/KFyiWPHW318cOSRne2E62cpPd8kYokgPF/SQwe8+2Fwn 3pf4D2XlfMzTr9zaNY0Dc02qOqDMVfH7ugA0syFKjqVfaBvSgDtpGwrPWAL/bYMlqu8j/iW5o azJIjtrUYTgn0e+sKIq7Msc7yWGVMAgEDDrXO6TePDqc5hQCNZpg1NqEy37UtjA1izrQbDXCW 2MRdFv4IAiE6/iowut6g2l/IzN5JN+IPMvZ2zxOgN038HTT+ptnkOaGv/GBHOoJxVo3nnKGs9 emCB3jzATYQhKDC+bmhoSnimME3jZXSX8+/c5JdwiAHeYImtyfRKzAIS5JxFAdF75DWXbY724 J75oZ/Rf5DCc49Z1mtU+Et7FxoCDr2HxgTNij6jEOj4Bowg0nCt22/V4mLADMyLnEo0yipmdz nHvh8uYctRTMlYamaq1bp1fnHzNlJUZjDsNAj+n6jk6w9YHBktjD2EGRheXs0hF7sZBky+OsI DPXN1q0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) 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: -4.1 (----) Hello, in the docstring of `parse-sexp-ignore-comments' (or at least in the manual), I miss a description about what a value of nil exactly means: How are comments treated then? Are they treated as separate units that can then be parsed as well, but separately from code, or are they treated as indistinguishable from code? For example, if parsing starts from within a comment, and parsing finds the end of the comment and is not yet finished, is parsing just continued inside the following code, or does it fail? Thanks in advance, Michael. In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 2016-08-04 built on drachen Repository revision: 72221f51439d666d54f5d147f00ecdbb3778ab1b Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Debian GNU/Linux testing (stretch) Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2019 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Heerdegen Cc: 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.156424091024182 (code B ref 24172); Sat, 27 Jul 2019 15:22:02 +0000 Received: (at 24172) by debbugs.gnu.org; 27 Jul 2019 15:21:50 +0000 Received: from localhost ([127.0.0.1]:45202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrOW5-0006Hy-R0 for submit@debbugs.gnu.org; Sat, 27 Jul 2019 11:21:50 -0400 Received: from quimby.gnus.org ([80.91.231.51]:40494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrOW4-0006Hp-4w for 24172@debbugs.gnu.org; Sat, 27 Jul 2019 11:21:48 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrOVy-000246-Ph; Sat, 27 Jul 2019 17:21:45 +0200 From: Lars Ingebrigtsen References: <874m6xqxy9.fsf@web.de> Date: Sat, 27 Jul 2019 17:21:42 +0200 In-Reply-To: <874m6xqxy9.fsf@web.de> (Michael Heerdegen's message of "Sun, 07 Aug 2016 01:28:30 +0200") Message-ID: <874l37fqpl.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: Michael Heerdegen writes: > in the docstring of `parse-sexp-ignore-comments' (or at least in the > manual), I miss a description about what a value of nil exactly means: > How are comments treated then? Are they treated as sep [...] 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: 0.0 (/) 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 (-) Michael Heerdegen writes: > in the docstring of `parse-sexp-ignore-comments' (or at least in the > manual), I miss a description about what a value of nil exactly means: > How are comments treated then? Are they treated as separate units that > can then be parsed as well, but separately from code, or are they treated > as indistinguishable from code? > > For example, if parsing starts from within a comment, and parsing finds > the end of the comment and is not yet finished, is parsing just > continued inside the following code, or does it fail? After doing some testing, it seems that if it's nil, the commands affected by the setting just treat the commented-out text as if it wasn't commented out. So the answer to your last question seems to be "yes". ;; (foo (bar zot)) However, pretty much the same thing happens with a non-nil value, too -- with point before (foo C-M-f will advance past zot)). So it doesn't treat comments as whitespace, really -- it only does that if point is outside (before, at the end of a line, etc) the comment to begin with. Seems like you could write an essay about it, but perhaps it's not worth listing the eccentricities here which I guess could change. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2019 10:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Michael Heerdegen , 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.156430868421029 (code B ref 24172); Sun, 28 Jul 2019 10:12:02 +0000 Received: (at 24172) by debbugs.gnu.org; 28 Jul 2019 10:11:24 +0000 Received: from localhost ([127.0.0.1]:45788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrg9D-0005T6-Pj for submit@debbugs.gnu.org; Sun, 28 Jul 2019 06:11:24 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrg9B-0005Su-3w for 24172@debbugs.gnu.org; Sun, 28 Jul 2019 06:11:22 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrg96-0002xX-Iq; Sun, 28 Jul 2019 12:11:19 +0200 From: Lars Ingebrigtsen References: <20190728082012.19960.qmail@mail.muc.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEX+//z7+vb///z+//v/ ///lCgnb0s7Wjor9//VzIZgmAAACXElEQVQ4jWWUv3ObMBTHCdeLZ+NgOponBXcWOdtjoug6l/rk rEYUeS3mcOfUC3923xMIJ1ctwPvo+34KBYtc5Pn12r/3uK59n9MCPg8iuC18Z/h4Ukq9BnM52Vny p8KHDBHI4Mo5fqxCsmutUaQAgQqE25whI7suGOfKKQawFcA6Am8AHnAMItYRpNoB3PgBQGY8gAFg jJDA2gDTN1eSACUF5MrFKDCPUcG+oCSO4FQTaEWaqVu66SmHaq1dHaIcwF8sCDIrUpOh/RBtlr9G hUJPadFkggqpqkvJPUCybpLlJq31wdjSqAkAPNr5ZdnUui2TrSDFiwqeqMDHeWuTk347JqKEUeFA LCyUVhcmO5kJoCeoRVaZWhuzssIDV0cdgY1qLQx98A8gRgvrDqGlFk6Agp8RYJ++RxKkj0FnYL0H lum9AcNHO9VBvTqEkGE/wIzT8K6gEzCjWaCCe1fu+MQt3GttcJCTK5oXwP0hxNEWmJX0WQ2AddUK m3uMhu0PrnICsD2IGOfnQ08KlDQW5/QZUMKw0W2i38LPQEkJi+ScIuCfAOaOvTPJf0C9IHo5x7oB 2vT84IMrUmz3W91wiv58U7gp7rMZHumpJfTkpOh+LqE7+nH44FKuunMJsz2fJji4Uop1vw1kBVcc /GGg6JImG8Gs8DHk4IpArKu77scNOAX15ESH/TgOiiOA8Udv8f+4hOB+WjTRYXBrUzXzBV0MBF4l uCvjr2DslF2GHVwFij+rIAf4dhW7ZWlb8MSlm+e7Xd+/W7tY5BORdxDgZfS1H9auX9Id5a4g9g8B NQrPQLHE7QAAAABJRU5ErkJggg== Date: Sun, 28 Jul 2019 12:11:16 +0200 In-Reply-To: <20190728082012.19960.qmail@mail.muc.de> (Alan Mackenzie's message of "28 Jul 2019 08:20:12 -0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: (Looks like the debbugs address in the Cc was mangled, so I'm just resending the entire email to have it end up in the bug tracker.) Alan Mackenzie writes: > Hello, Lars. > > In article you wrote: >> Michael Heerdegen writes: > >>> in the docstring of `parse-sexp-ignore-comme [...] 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: 0.0 (/) 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 (-) (Looks like the debbugs address in the Cc was mangled, so I'm just resending the entire email to have it end up in the bug tracker.) Alan Mackenzie writes: > Hello, Lars. > > In article you wrote: >> Michael Heerdegen writes: > >>> in the docstring of `parse-sexp-ignore-comments' (or at least in the >>> manual), I miss a description about what a value of nil exactly means: >>> How are comments treated then? Are they treated as separate units that >>> can then be parsed as well, but separately from code, or are they treated >>> as indistinguishable from code? >>> >>> For example, if parsing starts from within a comment, and parsing finds >>> the end of the comment and is not yet finished, is parsing just >>> continued inside the following code, or does it fail? > >> After doing some testing, it seems that if it's nil, the commands >> affected by the setting just treat the commented-out text as if it >> wasn't commented out. > >> So the answer to your last question seems to be "yes". > >> ;; (foo > >> (bar zot)) > >> However, pretty much the same thing happens with a non-nil value, too -- >> with point before (foo C-M-f will advance past zot)). > >> So it doesn't treat comments as whitespace, really -- it only does that >> if point is outside (before, at the end of a line, etc) the comment to >> begin with. Seems like you could write an essay about it, but perhaps >> it's not worth listing the eccentricities here which I guess could change. > > parse-sexp-ignore-comments (or, rather, parse_sexp_ignore_comments) is > tested, and acted upon, by precisely one C function, scan_lists in > syntax.c. scan_lists is used by just two primitives, scan-lists and > scan-sexps. These, in turn, are called by forward-list, etc. > > When this variable is nil, scan_lists fails to recognise comment > delimiters - it just goes past them as though they were random > punctuation characters. By contrast, when parse-sexp-ignore-comments is > t, scan_lists calls a comment scanning function when it encounters a > comment delimiter. > > Noteworthy is that parse-partial-sexp doesn't respect the setting of > parse-sexp-ignore-comments. This might be considered a bug. > > All in all, this variable seems not to be a good idea. It is not tested > consistently by the syntax routines (see above), must be set explicitly > to t by any major mode with comments, the nil value is rarely used, and > it is not clear whether this nil value is actually ever useful. > > It would seem that if a major mode does not want comments to be > recognised, it would be better not to give any character comment syntax > in its syntax table. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? References: <874m6xqxy9.fsf@web.de> In-Reply-To: <874m6xqxy9.fsf@web.de> Resent-From: Alan McKenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2019 15:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.15643285726955 (code B ref 24172); Sun, 28 Jul 2019 15:43:01 +0000 Received: (at 24172) by debbugs.gnu.org; 28 Jul 2019 15:42:52 +0000 Received: from localhost ([127.0.0.1]:47032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrlJz-0001o6-SS for submit@debbugs.gnu.org; Sun, 28 Jul 2019 11:42:52 -0400 Received: from colin.muc.de ([193.149.48.1]:65001 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hrfM9-0001yx-3F for 24172@debbugs.gnu.org; Sun, 28 Jul 2019 05:20:42 -0400 Received: (qmail 22490 invoked by uid 3782); 28 Jul 2019 08:28:09 -0000 Received: from acm.muc.de (p2E5D5404.dip0.t-ipconnect.de [46.93.84.4]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 28 Jul 2019 10:28:08 +0200 Received: (qmail 5188 invoked by uid 1000); 28 Jul 2019 09:20:38 -0000 Date: Sun, 28 Jul 2019 09:20:38 +0000 Message-ID: <20190728092038.GC5072@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Delivered-To: acm@localhost Received: (qmail 5176 invoked from network); 28 Jul 2019 09:16:29 -0000 Received: from unknown (HELO acm) (::1) by ACM with ESMTP; 28 Jul 2019 09:16:29 -0000 Delivered-To: acm@muc.de Received: from mail.muc.de [193.149.48.3] by acm with IMAP (fetchmail-6.3.26) for (single-drop); Sun, 28 Jul 2019 09:16:29 +0000 (UTC) Received: (qmail 19986 invoked for bounce); 28 Jul 2019 08:20:16 -0000 User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan McKenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sun, 28 Jul 2019 11:42:50 -0400 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 (-) Hello, Lars. In article you wrote: > Michael Heerdegen writes: >> in the docstring of `parse-sexp-ignore-comments' (or at least in the >> manual), I miss a description about what a value of nil exactly means: >> How are comments treated then? Are they treated as separate units that >> can then be parsed as well, but separately from code, or are they treated >> as indistinguishable from code? >> For example, if parsing starts from within a comment, and parsing finds >> the end of the comment and is not yet finished, is parsing just >> continued inside the following code, or does it fail? > After doing some testing, it seems that if it's nil, the commands > affected by the setting just treat the commented-out text as if it > wasn't commented out. > So the answer to your last question seems to be "yes". > ;; (foo > (bar zot)) > However, pretty much the same thing happens with a non-nil value, too -- > with point before (foo C-M-f will advance past zot)). > So it doesn't treat comments as whitespace, really -- it only does that > if point is outside (before, at the end of a line, etc) the comment to > begin with. Seems like you could write an essay about it, but perhaps > it's not worth listing the eccentricities here which I guess could change. parse-sexp-ignore-comments (or, rather, parse_sexp_ignore_comments) is tested, and acted upon, by precisely one C function, scan_lists in syntax.c. scan_lists is used by just two primitives, scan-lists and scan-sexps. These, in turn, are called by forward-list, etc. When this variable is nil, scan_lists fails to recognise comment delimiters - it just goes past them as though they were random punctuation characters. By contrast, when parse-sexp-ignore-comments is t, scan_lists calls a comment scanning function when it encounters a comment delimiter. Noteworthy is that parse-partial-sexp doesn't respect the setting of parse-sexp-ignore-comments. This might be considered a bug. All in all, this variable seems not to be a good idea. It is not tested consistently by the syntax routines (see above), must be set explicitly to t by any major mode with comments, the nil value is rarely used, and it is not clear whether this nil value is actually ever useful. It would seem that if a major mode does not want comments to be recognised, it would be better not to give any character comment syntax in its syntax table. > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jul 2019 02:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan McKenzie Cc: 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.156436675117672 (code B ref 24172); Mon, 29 Jul 2019 02:20:02 +0000 Received: (at 24172) by debbugs.gnu.org; 29 Jul 2019 02:19:11 +0000 Received: from localhost ([127.0.0.1]:47439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrvFm-0004ax-Cl for submit@debbugs.gnu.org; Sun, 28 Jul 2019 22:19:11 -0400 Received: from mout.web.de ([212.227.15.14]:47337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrvFj-0004aU-OC for 24172@debbugs.gnu.org; Sun, 28 Jul 2019 22:19:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1564366738; bh=tXY/Q9D905zyUWJp0OFUUMeAvvS/NBE4gnrEjETjY9Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=fieWegmfq2Z1c5c85s+t4QYQpUQRMTEzdE8Q33gZIPyoJVgCyKmtRAuZasw/Funp5 7ELsj+NjQxb65+/opFfkqWjoSrAMuXuY0T6lNi+Ka3aXReJrAGUR/6L/kcCz4RVbsY kXixR45wfHzdPap+LToWaOhnp9Ic+hyXcGWAwbO8= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([92.208.178.242]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M8zRF-1hg8UR2klZ-00COPI; Mon, 29 Jul 2019 04:18:58 +0200 From: Michael Heerdegen References: <874m6xqxy9.fsf@web.de> <20190728092038.GC5072@ACM> Date: Mon, 29 Jul 2019 04:18:56 +0200 In-Reply-To: <20190728092038.GC5072@ACM> (Alan McKenzie's message of "Sun, 28 Jul 2019 09:20:38 +0000") Message-ID: <87pnlt4m7j.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:V7mGwAYikIWkCwTaoW2lfz7E02cmvBaci83JoJXOUtrQdlqjAaR fCT930M1LDiuaj6B9sBOP31ka3oQWMaErl2H/p809iWObH4LUvVaTwRzBljDb4zS9whVYDq dPcYhSq+VBWb1LiHt1TQc5fk0vqiEm4Hs8uQZknAeugcdCV2bMr7PpSKcWLmO2rTcIeCK0a nZFUbaVk3W6sFJS8IBUPQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RTXHLA6DAaM=:bairGud7IG4T92osqBUIbU 9N78G3SIwpyKZicTvEnyJ2ruCo56RifFWqS0rE4cPBu3Yc3sdkuVZMKF90ARx2wO8EqL5szMQ dT0ntTYHFBk51nPzsiuc2wuprpvMVL2108LEyXMwDbpVBS1HFqDY3KBl5K8QsJvLxeh4871wS kfa5a/2JoYHiogWunNAR5DUugBFDhmsmY8gLh3uj9pCWHgv1c5TsKZ6yKV5UsnNErmyGyJ/iN QMEt4dq03iEn7mrtgk0nd1YMGdBSgBm/7XMTMKiDhdnDdAnnFc6WedIG2Phf41kFdvNbLCYjl zdgl3Wd03gpqOnhAZFMcSrv73s3JGqyUFB2RvqaleoiJbvtyhHpsyVIUs/zZ+KYr+069NE/yu 5IDhYdeQ/rPlHAO7AMLuBkgl5/RIbXGci4Os+SHZym6X5eVV+C8TwUEvBKPvm3P5Ijl6X5CH/ tXDi6S+bRbxsfBKnGarqTEvq/7qUdrVa0SAQ2NxXyhBdg3dN5bnDJBBeupweeJ7/T+6uDfLFO VP1hfgPkp3+gKVYweF4XcilIZVC8N2HqvO5zMDBEfiU5gDXlK9IqWwjyt8sm142WFtwYq97GQ IpZzxONIhWxf/x0RsrkMbsxxkavvk76Cf4czjQbd0mswY19uDPRQwlrWi61TpVCDwPwKJhwtY 5ORQPsOp+t8dqKkiFPHZAuFAngMXDZpyEjN4DzNdmyq1MOM0QuSxCqhh+FMdxx+N99IoR57nG 26cgoMQrrVFsw0wBcHZ5wLMds0+LoCsihnFcgwVCFlHpGBe8l1takK/xeP4cejtauZw/dxbh0 ZLerckhFa/tWhGKWDzHGBFbijl5ejERhVjgZv/3smsUvbcpbaGjOhb6l/2WQaSumORrOxON7C kgIBW+uwNCHyj20VlQ9bICwHItO0+TBPhmuOLTJfabEdxXodvSuviiVZsiFV26pGzGe2e0FCB ocjyezp7p7xlMuJ8iEVhpHHs/d6VhIK1bFwNcucdukXK29eR435dThpXFyXt5n/0oNAby2FNe Fk/fOGJs+eHS6riXyOJDq/DI9NYBfliMctC1FGLPmH6129J/7dX8W6yDAFxt8e5K5qrGn5CTg cQF+3Q8HtEZOuKMqoKd0TS9PJrhRj5a/225 X-Spam-Score: 0.0 (/) 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 (-) Alan McKenzie writes: > All in all, this variable seems not to be a good idea. It is not > tested consistently by the syntax routines (see above), must be set > explicitly to t by any major mode with comments, the nil value is > rarely used, and it is not clear whether this nil value is actually > ever useful. My question mainly arised from pondering whether this variable could be useful for el-search, a package for searching Elisp code (with patterns). It could be of minor use if it allowed to search commented code. But I can also implement this in other ways. Apart from that, I have no use cases, so I wrote the bug report only because of the unclear documentation. But the variable seems to be used. I have 75 matches in my load-path. Michael. From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Michael Heerdegen , 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.16350103678926 (code B ref 24172); Sat, 23 Oct 2021 17:33:02 +0000 Received: (at 24172) by debbugs.gnu.org; 23 Oct 2021 17:32:47 +0000 Received: from localhost ([127.0.0.1]:37090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meKsx-0002Jt-9n for submit@debbugs.gnu.org; Sat, 23 Oct 2021 13:32:47 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:52107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meKsu-0002JW-Rn for 24172@debbugs.gnu.org; Sat, 23 Oct 2021 13:32:46 -0400 Received: by mail-pj1-f54.google.com with SMTP id u12so1081851pjy.1 for <24172@debbugs.gnu.org>; Sat, 23 Oct 2021 10:32:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=upMHg7dMEQWiOs6iYcZRhEUJeQ/mRZttcqMZwmOclaQ=; b=Z8sxQne71kjOb7GfNjTFCNeTdQyhJm6xZ+jQqjSxvqazcb3BAmV3LMvJ8asmAaSPFI HdQGXSK4zWIZ6YtsY/cDXYnWhaofMH/SXNTIJuyJK/J7GUIjumNCTLAE5swTqSXjYHqe hkS6vuTv54e6LG4CIN4Bm2oYua5g7IPOExgs2VKDXRvm1JME17218bKkJC1rGD7xPpYU nKJpAgF5K1X1Z79Fm178rLnr/Il1EfvMH95aE+EA6NrGKmMSv6QcnZOaqDI8C/C9WQQ8 3b5hJ/JotEWGxNTFcPglquahLFSjOR6LdtRMaHnkpQfZ5n7IqYv1g7P8Eyy0dbZSweeZ x0hQ== X-Gm-Message-State: AOAM533gbmmt0EGgXwL0UW/PRo2IEY866aLxZJN7Uv+AD6lMtr+HNUU6 H6FoS/bOHcoKtT6gqUcIkTTBfxMFxGILtbRUGVg= X-Google-Smtp-Source: ABdhPJyHaSYnehE9u5A60EXGfAliJqbY+O3aCKy0m8bBdxocyijv+r51rO+TO5KyTWys280pwz21WzAiIifVS5WW/P4= X-Received: by 2002:a17:902:c7c3:b0:140:2033:662c with SMTP id r3-20020a170902c7c300b001402033662cmr6567638pla.32.1635010359234; Sat, 23 Oct 2021 10:32:39 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 23 Oct 2021 10:32:38 -0700 From: Stefan Kangas In-Reply-To: <874l37fqpl.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sat, 27 Jul 2019 17:21:42 +0200") References: <874m6xqxy9.fsf@web.de> <874l37fqpl.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 23 Oct 2021 10:32:38 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) 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.5 (/) Lars Ingebrigtsen writes: > Michael Heerdegen writes: > >> in the docstring of `parse-sexp-ignore-comments' (or at least in the >> manual), I miss a description about what a value of nil exactly means: >> How are comments treated then? Are they treated as separate units that >> can then be parsed as well, but separately from code, or are they treated >> as indistinguishable from code? >> >> For example, if parsing starts from within a comment, and parsing finds >> the end of the comment and is not yet finished, is parsing just >> continued inside the following code, or does it fail? > > After doing some testing, it seems that if it's nil, the commands > affected by the setting just treat the commented-out text as if it > wasn't commented out. > > So the answer to your last question seems to be "yes". > > ;; (foo > > (bar zot)) > > However, pretty much the same thing happens with a non-nil value, too -- > with point before (foo C-M-f will advance past zot)). > > So it doesn't treat comments as whitespace, really -- it only does that > if point is outside (before, at the end of a line, etc) the comment to > begin with. Seems like you could write an essay about it, but perhaps > it's not worth listing the eccentricities here which I guess could change. So is there anything more to do here, or could this be closed? I can't see anything actionable from reading this thread. From unknown Sat Aug 09 13:19:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24172: 25.1; Doc of parse-sexp-ignore-comments: what does a value of nil mean? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 13:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: Michael Heerdegen , 24172@debbugs.gnu.org Received: via spool by 24172-submit@debbugs.gnu.org id=B24172.163508107716271 (code B ref 24172); Sun, 24 Oct 2021 13:12:01 +0000 Received: (at 24172) by debbugs.gnu.org; 24 Oct 2021 13:11:17 +0000 Received: from localhost ([127.0.0.1]:38161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medHQ-0004EN-Lb for submit@debbugs.gnu.org; Sun, 24 Oct 2021 09:11:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medHP-0004E8-A6 for 24172@debbugs.gnu.org; Sun, 24 Oct 2021 09:11:15 -0400 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=pQYYJ0+M7h8lPucWAlmljqJKc4o4k9LqU3KxHT606dQ=; b=Ois5s2Nb+SRXyOnPSLtYXJjInv CwgOshYBsMZB0P9ApmRKgCF0QsYlUUlIDT93RgIYchrxReV+7eR6ZivYKV8q2HZCkSkHVET3n92Ob SE1fFSoWqndiaS/UezRsSYpF+2TYiaJxcYjyQwKfPo6cAI0z1mG3v8JYUrKiDWK+iscQ=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1medHF-0007Eh-NN; Sun, 24 Oct 2021 15:11:08 +0200 From: Lars Ingebrigtsen References: <874m6xqxy9.fsf@web.de> <874l37fqpl.fsf@mouse.gnus.org> Date: Sun, 24 Oct 2021 15:11:05 +0200 In-Reply-To: (Stefan Kangas's message of "Sat, 23 Oct 2021 10:32:38 -0700") Message-ID: <87pmrua7py.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: Stefan Kangas writes: > So is there anything more to do here, or could this be closed? I can't > see anything actionable from reading this thread. Yes, I tried adding some more to the doc string there, and it just ended up restating the first line, but negatively, which doesn't seem to help any: 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-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 (---) Stefan Kangas writes: > So is there anything more to do here, or could this be closed? I can't > see anything actionable from reading this thread. Yes, I tried adding some more to the doc string there, and it just ended up restating the first line, but negatively, which doesn't seem to help any: -- If nil, text that has been commented out is taken into consideration when doing commands like `forward-sexp'. -- So I'm closing this bug report without doing that. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 09:11:24 2021 Received: (at control) by debbugs.gnu.org; 24 Oct 2021 13:11:24 +0000 Received: from localhost ([127.0.0.1]:38164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medHX-0004Ei-V8 for submit@debbugs.gnu.org; Sun, 24 Oct 2021 09:11:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medHV-0004EM-EG for control@debbugs.gnu.org; Sun, 24 Oct 2021 09:11:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X3kuU4NHE8ZGBRSk1GXI4XmPr2EMbGxmdpqBWIY5cAc=; b=iFhSnimH6ApWFBy/t271W8j8In s0HOHuV4Km2o+bWss/cAFRZ6dwqoCwTQ+QlJc8+qduGW5dLCGGnpFSDZU+hIFaevQU1ZDkkZ3fbdP 0fl6x3y8V5qxqTCqK4TAAiO2SA0+U++KFN7lTVURWyJ3lwtqVxrGgzAFz+rrqBOkLcM8=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1medHN-0007Eq-FN for control@debbugs.gnu.org; Sun, 24 Oct 2021 15:11:15 +0200 Date: Sun, 24 Oct 2021 15:11:13 +0200 Message-Id: <87o87ea7pq.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24172 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: close 24172 quit 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: control 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 (---) close 24172 quit