From unknown Sat Aug 16 10:50:01 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#8667 <8667@debbugs.gnu.org> To: bug#8667 <8667@debbugs.gnu.org> Subject: Status: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Reply-To: bug#8667 <8667@debbugs.gnu.org> Date: Sat, 16 Aug 2025 17:50:01 +0000 retitle 8667 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comme= nt' reassign 8667 emacs submitter 8667 "Drew Adams" severity 8667 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 20:46:52 2011 Received: (at submit) by debbugs.gnu.org; 13 May 2011 00:46:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKgWq-0002tO-Bm for submit@debbugs.gnu.org; Thu, 12 May 2011 20:46:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKgWn-0002t8-Ld for submit@debbugs.gnu.org; Thu, 12 May 2011 20:46:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKgWh-0006MA-LT for submit@debbugs.gnu.org; Thu, 12 May 2011 20:46:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKgWh-0006M6-K9 for submit@debbugs.gnu.org; Thu, 12 May 2011 20:46:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKgWg-0002Pg-L3 for bug-gnu-emacs@gnu.org; Thu, 12 May 2011 20:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKgWf-0006Le-Fg for bug-gnu-emacs@gnu.org; Thu, 12 May 2011 20:46:42 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:24750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKgWf-0006LV-94 for bug-gnu-emacs@gnu.org; Thu, 12 May 2011 20:46:41 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4D0kcbS010228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 May 2011 00:46:40 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4D0kbtD028183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 May 2011 00:46:37 GMT Received: from abhmt003.oracle.com (abhmt003.oracle.com [141.146.116.12]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4D0kWd7027845 for ; Thu, 12 May 2011 19:46:32 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 May 2011 17:46:31 -0700 From: "Drew Adams" To: Subject: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Thu, 12 May 2011 17:46:33 -0700 Message-ID: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRBzTGFN+OJvRwQ7e0FsXqpu3eKw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4DCC7F70.0054:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) emacs -Q Put point at position 3061 in file thingatpt.el (i.e., just before the `a' of `condition-case'). M-: (bounds-of-thing-at-point 'comment) returns (3061 . 3061), which represents an empty thing, "". This happens at most positions, probably all positions outside a comment. The code should handle this kind of case correctly (in other respects it seems to work OK for comments). The problem is that there is no `beginning-op' or `end-op' and all of the calls to `forward-thing' (with 1 and -1) do not move point at all, and return nil. So the code falls through to the end: (let ((end (point)) (real-beg (progn (funcall (or (get thing 'beginning-op) (lambda () (forward-thing thing -1)))) (point)))) ;; real-beg = end = (point). Result is (cons 3061 . 3061). (if (and real-beg end (<= real-beg orig) (<= orig end)) (cons real-beg end))) `bounds-of-thing-at-point' should foresee such a case (that `forward-THING' does nothing). IOW, it should of course be fixed for this problem. But it sounds like `forward-comment' should also be fixed so that it acts like other `forward-THING' functions, and not just be a no-op when outside a comment. In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-05-10 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.5) --no-opt --cflags -Ic:/build/include' From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 23:01:10 2011 Received: (at 8667) by debbugs.gnu.org; 13 May 2011 03:01:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKico-0005rm-34 for submit@debbugs.gnu.org; Thu, 12 May 2011 23:01:10 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKicl-0005rI-5X for 8667@debbugs.gnu.org; Thu, 12 May 2011 23:01:07 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4D30xZu026066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <8667@debbugs.gnu.org>; Fri, 13 May 2011 03:01:01 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4D30wCF017878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <8667@debbugs.gnu.org>; Fri, 13 May 2011 03:00:59 GMT Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4D30qbC008792 for <8667@debbugs.gnu.org>; Thu, 12 May 2011 22:00:52 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 May 2011 20:00:52 -0700 From: "Drew Adams" To: <8667@debbugs.gnu.org> References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Thu, 12 May 2011 20:00:50 -0700 Message-ID: <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRBzTGFN+OJvRwQ7e0FsXqpu3eKwADFs5g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090201.4DCC9EED.00AA:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > The problem is that there is no `beginning-op' or `end-op' and all of > the calls to `forward-thing' (with 1 and -1) do not move point at all, > and return nil. So the code falls through to the end: > > (let ((end (point)) > (real-beg > (progn > (funcall > (or (get thing 'beginning-op) > (lambda () (forward-thing thing -1)))) > (point)))) > ;; real-beg = end = (point). Result is (cons 3061 . 3061). > (if (and real-beg end (<= real-beg orig) (<= orig end)) > (cons real-beg end))) > > `bounds-of-thing-at-point' should foresee such a case (that > `forward-THING' does nothing). IOW, it should of course be > fixed for this problem. This should be all that's needed, if it wasn't obvious: - (if (and beg real-end (<= beg orig) (<= orig real-end)) - (cons beg real-end)) + (and beg real-end (<= beg orig) (<= orig real-end) + (/= beg read-end) + (cons beg real-end)) and - (if (and real-beg end (<= real-beg orig) (<= orig end)) - (cons real-beg end))) + (and real-beg end (<= real-beg orig) (<= orig end) + (/= real-beg end) + (cons real-beg end)) (Dunno why some people insist on using `(if (and...) singleton)'. It gets in the way of readability and just represents extra noise. Binary `if' is generally an impediment to readability and communicating intention.) > But it sounds like `forward-comment' should also be fixed so > that it acts like other `forward-THING' functions, and not > just be a no-op when outside a comment. And it seems that `forward-comment' is otherwise buggy, in that it moves only over whitespace when point is within a comment. E.g.: ;; Some comment with some whitespace somewhere. Put point before any of the whitespace and (forward-comment 1) moves to the end of the whitespace. Put point after any of the whitespace and (forward-comment -1) moves to the beginning of that whitespace. And in these cases swapping 1 and -1 produces a no-op. The only time `forward-comment' actually moves over a whole (Lisp) comment is when point is before `;'. And even then, if point is between the two `;' above, then (forward-comment -1) is a no-op. `forward-comment' should behave the way other `forward-THING' functions behave. It should do what we expect of a `forward-*' function. Yes, I have read the `forward-comment' doc string. If it really needs to behave this way then it should have a different name. That is, after fixing the bugged behavior, if we still need a function that does what `forward-comment' does now, then it needs a different name. No, it's not too late to change, even if renaming would be bothersome. The way it is now breaks `thing-at-point' functions, and they should work regardless of the `forward-*' functions. Thing-at-point depends on this naming convention. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 01:56:06 2011 Received: (at submit) by debbugs.gnu.org; 13 May 2011 05:56:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKlM5-0001Cg-Oy for submit@debbugs.gnu.org; Fri, 13 May 2011 01:56:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKlM3-0001CB-4w for submit@debbugs.gnu.org; Fri, 13 May 2011 01:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKlLx-0001sp-4s for submit@debbugs.gnu.org; Fri, 13 May 2011 01:55:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:41602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKlLx-0001sl-3R for submit@debbugs.gnu.org; Fri, 13 May 2011 01:55:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKlLw-0001vj-4O for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 01:55:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKlLv-0001sW-6O for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 01:55:56 -0400 Received: from lo.gmane.org ([80.91.229.12]:35367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKlLv-0001sK-0B for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 01:55:55 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QKlLt-00076n-BA for bug-gnu-emacs@gnu.org; Fri, 13 May 2011 07:55:53 +0200 Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2011 07:55:53 +0200 Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 May 2011 07:55:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Thu, 12 May 2011 23:56:09 -0600 Lines: 31 Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) On 5/12/11 9:00 PM, Drew Adams wrote: > - (if (and beg real-end (<= beg orig) (<= orig real-end)) > - (cons beg real-end)) > > + (and beg real-end (<= beg orig) (<= orig real-end) > + (/= beg read-end) > + (cons beg real-end)) > > and > > - (if (and real-beg end (<= real-beg orig) (<= orig end)) > - (cons real-beg end))) > > + (and real-beg end (<= real-beg orig) (<= orig end) > + (/= real-beg end) > + (cons real-beg end)) > > (Dunno why some people insist on using `(if (and...) singleton)'. It gets in > the way of readability and just represents extra noise. Binary `if' is > generally an impediment to readability and communicating intention.) Readability is in the eye of the beholder, intention is in the mind of the author. Personally, I think (if (and...) result) communicates the intent more clearly than (and ... result) -- Kevin Rodgers Denver, Colorado, USA From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 10:11:19 2011 Received: (at 8667) by debbugs.gnu.org; 13 May 2011 14:11:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKt5L-0004ZE-AG for submit@debbugs.gnu.org; Fri, 13 May 2011 10:11:19 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKt5I-0004Z3-Qb for 8667@debbugs.gnu.org; Fri, 13 May 2011 10:11:17 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:60648 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QKt5C-0001D2-Pm; Fri, 13 May 2011 10:11:11 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 9D1D366239; Fri, 13 May 2011 11:11:07 -0300 (ART) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Date: Fri, 13 May 2011 11:11:07 -0300 In-Reply-To: <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> (Drew Adams's message of "Thu, 12 May 2011 20:00:50 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > (Dunno why some people insist on using `(if (and...) singleton)'. Probably because those people find it better communicates the intent. > And it seems that `forward-comment' is otherwise buggy, in that it moves only > over whitespace when point is within a comment. Not only over whitespace: also over a nested comment. What would you want it to do instead? Jump to the end of the comment? Kind of like an `up-comment'? The forward- functions all share the following property AFAIK: when called with a positive argument with point *before* some , they will skip over that many and when called with a negative argument with point *after* some they will skip over that many . E.g. just like forward-comment, forward-sexp from within a sexp will not skip to the end of that sexp. And just like forward-sexp, forward-comment called in front of a nested comment will jump over that nested comment. All calls with point elsewhere than before/after a behave in somewhat arbitrary ways which mostly depend on how the function is implemented and what kind of structure have (e.g. can they nest? Can we easily tell when we're in the middle of a ?). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 11:49:50 2011 Received: (at 8667) by debbugs.gnu.org; 13 May 2011 15:49:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKucg-0006mq-AY for submit@debbugs.gnu.org; Fri, 13 May 2011 11:49:50 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKuca-0006mU-6k for 8667@debbugs.gnu.org; Fri, 13 May 2011 11:49:48 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4DFnaG6011693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 May 2011 15:49:38 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4DFnZiX004184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 15:49:36 GMT Received: from abhmt012.oracle.com (abhmt012.oracle.com [141.146.116.21]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4DFnUxL007989; Fri, 13 May 2011 10:49:30 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 May 2011 08:49:30 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Fri, 13 May 2011 08:49:27 -0700 Message-ID: <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRd6HJv2A24lJdRIWUxCkIM8ix7AACsfXg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4DCD5312.00BC:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > And it seems that `forward-comment' is otherwise buggy, in > > that it moves only over whitespace when point is within a comment. > > Not only over whitespace: also over a nested comment. > What would you want it to do instead? Jump to the end of the comment? > Kind of like an `up-comment'? > > The forward- functions all share the following property AFAIK: > when called with a positive argument with point *before* some > , they will skip over that many and when called > with a negative argument with point *after* some they will > skip over that many . > > E.g. just like forward-comment, forward-sexp from within a > sexp will not skip to the end of that sexp. And just like forward-sexp, > forward-comment called in front of a nested comment will jump > over that nested comment. > > All calls with point elsewhere than before/after a behave in > somewhat arbitrary ways which mostly depend on how the function is > implemented and what kind of structure have (e.g. can they > nest? Can we easily tell when we're in the middle of a ?). You're right, and I was aware of that. While dealing with the `bounds-of-thing-at-point' bug I mistakenly got the impression that `forward-char' was also misbehaving. Let's please fix `bounds-of-thing-at-point', though. The fix is trivial. It's OK for `b-o-t-a-p' to return a purely whitespace thing (`whitespace' is even a proper thing), but it's not OK for it to return an empty thing (""), IMO. -- BTW (do I need to create a separate bug report for this?), I think `forward-whitespace' is incorrect: \n should be \n+, like this: (defun forward-whitespace (arg) (interactive "p") (if (natnump arg) (re-search-forward "[ \t]+\\|\n+" nil 'move arg) (while (< arg 0) (if (re-search-backward "[ \t]+\\|\n+" nil 'move) (or (eq (char-after (match-beginning 0)) 10) (skip-chars-backward " \t"))) (setq arg (1+ arg))))) Try `(bounds-of-thing-at-point 'whitespace)' at various places, in particular at the end of a line followed by an empty line. The current definition does not consider contiguous whitespace from newlines to be part of the same whitespace thing - it treats \n as separating whitespace things. Dunno whether that was the intention (why?). Without any indication of the reason/intention (no doc string), I'd say that any sequence of contiguous whitespace, including newlines, should form a single whitespace thing. Can we also please add doc strings to functions such as `forward-whitespace'? They are missing, generally, in thingatpt.el. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 12:11:26 2011 Received: (at 8667) by debbugs.gnu.org; 13 May 2011 16:11:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKuxa-00085E-4d for submit@debbugs.gnu.org; Fri, 13 May 2011 12:11:26 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKuxY-00084y-96 for 8667@debbugs.gnu.org; Fri, 13 May 2011 12:11:24 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4DGBG9b018741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 May 2011 16:11:18 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4DGBFZf010093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 16:11:16 GMT Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4DGBApY001179; Fri, 13 May 2011 11:11:10 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 May 2011 09:11:09 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Fri, 13 May 2011 09:11:07 -0700 Message-ID: <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRd6HJv2A24lJdRIWUxCkIM8ix7AACsfXgAAFaEXA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4DCD5826.00F8:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > I think `forward-whitespace' is incorrect: \n should be \n+, like this: > > (defun forward-whitespace (arg) > (interactive "p") > (if (natnump arg) > (re-search-forward "[ \t]+\\|\n+" nil 'move arg) > (while (< arg 0) > (if (re-search-backward "[ \t]+\\|\n+" nil 'move) > (or (eq (char-after (match-beginning 0)) 10) > (skip-chars-backward " \t"))) > (setq arg (1+ arg))))) Note too that `forward-whitespace' is not currently used anywhere in the Emacs source files. Can we please make this change, so that it always moves over all contiguous whitespace and so takes point up to a non-whitespace char (or eob)? From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 12:46:18 2011 Received: (at control) by debbugs.gnu.org; 13 May 2011 16:46:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvVK-0000RA-D0 for submit@debbugs.gnu.org; Fri, 13 May 2011 12:46:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvVJ-0000R0-4A for control@debbugs.gnu.org; Fri, 13 May 2011 12:46:17 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QKvVD-0004MI-GO for control@debbugs.gnu.org; Fri, 13 May 2011 12:46:11 -0400 Date: Fri, 13 May 2011 12:46:11 -0400 Message-Id: Subject: control message for bug 8667 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) merge 8670 8667 From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 13:05:18 2011 Received: (at 8667-close) by debbugs.gnu.org; 13 May 2011 17:05:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvnh-0001eB-Q5 for submit@debbugs.gnu.org; Fri, 13 May 2011 13:05:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKvng-0001dy-CI for 8667-close@debbugs.gnu.org; Fri, 13 May 2011 13:05:17 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:55113 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QKvna-0005Nu-3t; Fri, 13 May 2011 13:05:10 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8706B66152; Fri, 13 May 2011 14:05:06 -0300 (ART) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> Date: Fri, 13 May 2011 14:05:06 -0300 In-Reply-To: <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> (Drew Adams's message of "Fri, 13 May 2011 09:11:07 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) Installed a patch along the lines of what you suggested. >> I think `forward-whitespace' is incorrect: \n should be \n+, like this: >> >> (defun forward-whitespace (arg) >> (interactive "p") >> (if (natnump arg) >> (re-search-forward "[ \t]+\\|\n+" nil 'move arg) >> (while (< arg 0) >> (if (re-search-backward "[ \t]+\\|\n+" nil 'move) >> (or (eq (char-after (match-beginning 0)) 10) >> (skip-chars-backward " \t"))) >> (setq arg (1+ arg))))) The current behavior is clearly intentional (the (skip-chars-backward " \t") shows that the function wants to treat newlines as not-just-whitespace). So I'd rather not change it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 13:19:42 2011 Received: (at 8667-close) by debbugs.gnu.org; 13 May 2011 17:19:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKw1e-0001y7-5U for submit@debbugs.gnu.org; Fri, 13 May 2011 13:19:42 -0400 Received: from acsinet11.oracle.com ([141.146.126.233]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKw1c-0001xu-0s for 8667-close@debbugs.gnu.org; Fri, 13 May 2011 13:19:40 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4DHIugL024851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 May 2011 17:19:02 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4DHItRp029267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 17:18:55 GMT Received: from abhmt010.oracle.com (abhmt010.oracle.com [141.146.116.19]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4DHInrg019777; Fri, 13 May 2011 12:18:49 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 May 2011 10:18:48 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com><08CF598C172E4666AC252C93A5D1F869@us.oracle.com><4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Fri, 13 May 2011 10:18:47 -0700 Message-ID: <35F5E674FD294F49913A529F81BA69BF@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRj/GzjPyMuAKbQN6Vh7Jty6kacwAAL+kA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.4DCD6825.012D:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > >> I think `forward-whitespace' is incorrect > > The current behavior is clearly intentional (the > (skip-chars-backward " \t") shows that the function wants > to treat newlines as not-just-whitespace). > So I'd rather not change it. OK, but the name is not suggestive of what it does, and there is no doc to tell users what it does. Also, who really cares what the original intention was in this case (what "the funciton wants" to do), since it is not even used (in the Emacs sources)? There has been plenty of incomplete, incorrect, and bad-intentioned or badly designed code in thingatpt.el, since the beginning. I don't see this particular original intention as holy. But I'm OK with leaving it as is, as long as the behavior is documented. You're right that to correct it to skip over all contiguous whitespace, we would need to include \n in the skip-chars-backward part. I think that is what should be done, but so be it. It's easy enough to define a `forward-whitespace-&-newlines' that DTRT. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 14:23:06 2011 Received: (at 8667-close) by debbugs.gnu.org; 13 May 2011 18:23:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKx0z-0003O8-Ud for submit@debbugs.gnu.org; Fri, 13 May 2011 14:23:06 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKx0w-0003Nd-W9 for 8667-close@debbugs.gnu.org; Fri, 13 May 2011 14:23:03 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:54520 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QKx0r-00013w-H1; Fri, 13 May 2011 14:22:57 -0400 Received: by ceviche.home (Postfix, from userid 20848) id A3DC566152; Fri, 13 May 2011 15:22:55 -0300 (ART) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <35F5E674FD294F49913A529F81BA69BF@us.oracle.com> Date: Fri, 13 May 2011 15:22:55 -0300 In-Reply-To: <35F5E674FD294F49913A529F81BA69BF@us.oracle.com> (Drew Adams's message of "Fri, 13 May 2011 10:18:47 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > Also, who really cares what the original intention was in this case > (what "the funciton wants" to do), since it is not even used (in the > Emacs sources)? Agreed. To my eyes, the best fix is to throw it away. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 14:28:42 2011 Received: (at 8667-close) by debbugs.gnu.org; 13 May 2011 18:28:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKx6Q-0003Vp-D9 for submit@debbugs.gnu.org; Fri, 13 May 2011 14:28:42 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QKx6O-0003Ve-21 for 8667-close@debbugs.gnu.org; Fri, 13 May 2011 14:28:40 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4DISWWn005879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 May 2011 18:28:34 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4DISVn8011419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 May 2011 18:28:32 GMT Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4DISQpK008083; Fri, 13 May 2011 13:28:26 -0500 Received: from dradamslap1 (/10.159.43.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 May 2011 11:28:25 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com><08CF598C172E4666AC252C93A5D1F869@us.oracle.com><4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com><35F5E674FD294F49913A529F81BA69BF@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Fri, 13 May 2011 11:28:25 -0700 Message-ID: <16845A56BDE74670B788A88D4D35F1D0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwRms9zBZpVwqazQ/yKhV9gazpHygAAGWsQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 In-Reply-To: X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.4DCD7852.00AC:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > Also, who really cares what the original intention was in this case > > (what "the funciton wants" to do), since it is not even used (in the > > Emacs sources)? > > Agreed. To my eyes, the best fix is to throw it away. I disagree, but don't really care (someone can always add it to external code). For thing-at-point (bounds-of*, in particular) it can be useful. From unknown Sat Aug 16 10:50:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Thu, 19 May 2011 17:10:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 13:12:40 2011 Received: (at 8667-close) by debbugs.gnu.org; 19 May 2011 17:12:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN6m7-0002iq-MM for submit@debbugs.gnu.org; Thu, 19 May 2011 13:12:39 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN6m6-0002ie-7P for 8667-close@debbugs.gnu.org; Thu, 19 May 2011 13:12:38 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4JHCU1o032667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 May 2011 17:12:32 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4JHCShu025857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 May 2011 17:12:29 GMT Received: from abhmt008.oracle.com (abhmt008.oracle.com [141.146.116.17]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4JHCN6i000322; Thu, 19 May 2011 12:12:23 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 May 2011 10:12:22 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com><08CF598C172E4666AC252C93A5D1F869@us.oracle.com><4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Thu, 19 May 2011 10:12:22 -0700 Message-ID: <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwRj/GzjPyMuAKbQN6Vh7Jty6kacwEtaRpA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090206.4DD54F80.00F0:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > Installed a patch along the lines of what you suggested. No, I don't think you did. I just downloaded the latest thingatpt.el. There is no fix AFAICT. There are still the two problems reported for `bounds-of-thing-at-point' in this bug report: (1) it can return a cons with equal car and cdr (representing an empty thing), (2) it can return a cons representing only whitespace, instead of returning nil when there is no comment at point. 1. You did not filter out the case where (= beg real-end) or (= real-beg end), so `bounds-of-thing-at-point' can still return a cons with equal car and cdr. You need to add these conditions to the tests: (and beg real-end (<= beg orig) (<= orig real-end) (/= beg real-end) ; <===== NEEDED (cons beg real-end)) ... (and real-beg end (<= real-beg orig) (<= orig end) (/= real-beg end) ; <===== NEEDED (cons real-beg end)) 2. It is still the case that (bounds-of-thing-at-point 'comment) can return a cons representing only whitespace, when called outside a comment. Put point here, for instance: (defun bounds-of-thing-at-point... ^ It should always return nil, never return a cons, when there is no comment at point. This is a `b-o-t-a-p' bug (not a `forward-comment' bug). In turn, this bug causes (thing-at-point 'comment) to return " " at such a location. From unknown Sat Aug 16 10:50:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Thu, 19 May 2011 17:20:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 14:25:07 2011 Received: (at 8667) by debbugs.gnu.org; 19 May 2011 18:25:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN7uE-0005sA-Cq for submit@debbugs.gnu.org; Thu, 19 May 2011 14:25:06 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QN7uC-0005re-2Z for 8667@debbugs.gnu.org; Thu, 19 May 2011 14:25:04 -0400 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4JIOtbN004430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 May 2011 18:24:58 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4JIOsZ5004346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 May 2011 18:24:55 GMT Received: from abhmt014.oracle.com (abhmt014.oracle.com [141.146.116.23]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4JIOkIa006066; Thu, 19 May 2011 13:24:49 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 May 2011 11:24:46 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Thu, 19 May 2011 11:24:46 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwRd6HJv2A24lJdRIWUxCkIM8ix7AE1oe6Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090202.4DD5607A.0094:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > All calls with point elsewhere than before/after a behave in > somewhat arbitrary ways which mostly depend on how the function is > implemented and what kind of structure have (e.g. can they > nest? Can we easily tell when we're in the middle of a ?). That's clearly no good for thing-at-point, in general. `thing-at-point' uses `bounds-of-thing-at-point', and that uses `forward-THING' in both directions (1, -1). `forward-comment' moves point even when there is no comment at point (before or after). And that causes (thing-at-point 'comment) to return a non-comment string of text (e.g. only whitespace), instead of nil, when point is not on a comment. `thing-at-point' should always return nil or a comment, when THING is `comment'. It is up to the `forward-THING' functions to each DTRT, or else they break `thing-at-point'. The alternative is to prevent `b-o-t-a-p' from relying on `forward-comment'. IOW, either (a) we need to fix `forward-comment' to DTRT in this case, (b) we need to add a function `bounds-of-comment-at-point' and then (put 'comment 'bounds-of-thing-at-point 'bounds-of-comment-at-point), or (c) we need to define adequate `beginning-op' and `end-op' functions for type `comment'. (b) and (c) are the only ways that `bounds-of-thing-at-point' will avoid (mis)using a `forward-THING' that does not DTRT for thing-at-point. From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 22:12:52 2011 Received: (at 8667-close) by debbugs.gnu.org; 20 May 2011 02:12:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNFCu-0000mU-5K for submit@debbugs.gnu.org; Thu, 19 May 2011 22:12:52 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNFCr-0000mJ-Cj for 8667-close@debbugs.gnu.org; Thu, 19 May 2011 22:12:50 -0400 Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:2633 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QNFCl-00045L-KY; Thu, 19 May 2011 22:12:43 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2DF3C66230; Thu, 19 May 2011 23:12:40 -0300 (ART) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> Date: Thu, 19 May 2011 23:12:40 -0300 In-Reply-To: <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> (Drew Adams's message of "Thu, 19 May 2011 10:12:22 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > No, I don't think you did. I just downloaded the latest thingatpt.el. > There is no fix AFAICT. >From which branch? > You need to add these conditions to the tests: > (and beg real-end (<= beg orig) (<= orig real-end) > (/= beg real-end) ; <===== NEEDED > (cons beg real-end)) > ... > (and real-beg end (<= real-beg orig) (<= orig end) > (/= real-beg end) ; <===== NEEDED > (cons real-beg end)) The code you show here is not on the trunk any more (e.g. I removed the non-null test of real-beg and end because they were redundant). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu May 19 22:18:21 2011 Received: (at 8667) by debbugs.gnu.org; 20 May 2011 02:18:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNFID-0000uz-I3 for submit@debbugs.gnu.org; Thu, 19 May 2011 22:18:21 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNFIC-0000un-1w for 8667@debbugs.gnu.org; Thu, 19 May 2011 22:18:20 -0400 Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:2635 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QNFI6-0004Pf-FX; Thu, 19 May 2011 22:18:14 -0400 Received: by ceviche.home (Postfix, from userid 20848) id CBDA366230; Thu, 19 May 2011 23:18:11 -0300 (ART) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Message-ID: References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Date: Thu, 19 May 2011 23:18:11 -0300 In-Reply-To: (Drew Adams's message of "Thu, 19 May 2011 11:24:46 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > That's clearly no good for thing-at-point, in general. Guess where I think the problem lies? Stefan From unknown Sat Aug 16 10:50:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Sat, 21 May 2011 14:48:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 10:51:49 2011 Received: (at 8667) by debbugs.gnu.org; 21 May 2011 14:51:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnWv-0001SQ-1P for submit@debbugs.gnu.org; Sat, 21 May 2011 10:51:49 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnWt-0001SE-9S for 8667@debbugs.gnu.org; Sat, 21 May 2011 10:51:47 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4LEpdtV026824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 May 2011 14:51:41 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4LEpchE005897 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 May 2011 14:51:39 GMT Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4LEpWgQ026428; Sat, 21 May 2011 09:51:33 -0500 Received: from dradamslap1 (/10.159.41.30) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 May 2011 07:51:32 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Sat, 21 May 2011 07:51:26 -0700 Message-ID: <7A1BDF35BAB94E988E3303BB5BDB4898@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Thread-Index: AcwWlDGZkx5aX2vuSzeTGKKjzaEKBQBMU7bw X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090209.4DD7D17D.0088:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > That's clearly no good for thing-at-point, in general. > > Guess where I think the problem lies? Good, so you recognize there is a problem. The bug is that `thing-at-point' and `bounds-of-thing-at-point' can return non-nil for type `comment' when there is no comment at point. The former returns a purely whitespace string; the latter returns its bounds as a cons. You seem to suggest that the problem, and the proper fix, involves thingatpt.el, not `forward-comment'. That sounds fine to me. One way or the other, however, this needs to be fixed. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 10:53:22 2011 Received: (at 8667-close) by debbugs.gnu.org; 21 May 2011 14:53:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnYP-0001Up-Rr for submit@debbugs.gnu.org; Sat, 21 May 2011 10:53:22 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnYM-0001Ue-OV for 8667-close@debbugs.gnu.org; Sat, 21 May 2011 10:53:19 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4LErBI6028110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 May 2011 14:53:13 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4LErApc009625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 May 2011 14:53:11 GMT Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4LEr5Cm015519; Sat, 21 May 2011 09:53:05 -0500 Received: from dradamslap1 (/10.159.41.30) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 May 2011 07:53:05 -0700 From: "Drew Adams" To: "'Stefan Monnier'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com><5328177EA0C84361A654BB5EEB201D1C@us.oracle.com><08CF598C172E4666AC252C93A5D1F869@us.oracle.com><4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com><660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Sat, 21 May 2011 07:52:58 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Thread-Index: AcwWk2znRf2Lk5SrQxWi2zdTrdSNUgBLMHDw X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4DD7D1D9.006F:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667-close Cc: 8667-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > No, I don't think you did. I just downloaded the latest > > thingatpt.el. There is no fix AFAICT. > > From which branch? >From here: http://repo.or.cz/w/emacs.git/tree/HEAD:/lisp In the past that has always given the trunk AFAIK. And in the past it has been the _only_ HTTP access that has been reliable (works). But apparently it is no longer kept up-to-date. I just now tried http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files/head%3A/lisp/ and got this, which is typically the case: Please try again Sorry, there was a problem connecting to the Launchpad server. Try reloading this page in a minute or two. If the problem persists, let us know in the #launchpad IRC channel on Freenode. Thanks for your patience. It used to be easy to access Emacs source code via HTTP (back when you used CVS, IIRC). Now it is difficult, even if occasionally still possible. After repeatedly trying that second URL, I was finally able to get your fixed file. The first part of this bug report does seem to be fixed: no empty thing returned. The second part is not fixed. `bounds-of-thing-at-point' can still return a cons when it should return nil. It can easily return a cons that represents a purely whitespace, non-comment for thing-type `comment'. This in turn means that `thing-at-point' returns a whitespace, non-comment for thing-type `comment'. This is a bug in `thingatpt.el'. It is either a bug in `bounds-of-thing-at-point', if we expect that general function to DTRT in this case, or it is a bug in that there is a missing function `bounds-of-comment-at-point' and consequent (put 'comment 'bounds-of-thing-at-point 'bounds-of-comment-at-point). Or some such fix. I already gave the recipe to reproduce the bug. I can repeat it if necessary. `b-o-t-a-p' depends for its generic effect on functions such as `forward-THING'. Sometimes that is enough to make `b-o-t-a-p' DTRT; sometimes it is not enough. When it is not, as in this case, other measures need to be taken, such as defining a THING-specific `bounds-of-THING-at-point' function and putting that on the THING symbol as property `bounds-of-thing-at-point'. One way or the other, and there are several alternatives, this needs to be fixed. It is a bug for `b-o-t-a-p' to return non-nil when there is no comment at point, and thus for `thing-at-point' to return a non-nil, non-comment value. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 11:06:11 2011 Received: (at 8667) by debbugs.gnu.org; 21 May 2011 15:06:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnkp-0002Zi-Iu for submit@debbugs.gnu.org; Sat, 21 May 2011 11:06:11 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnkm-0002ZJ-E5 for 8667@debbugs.gnu.org; Sat, 21 May 2011 11:06:09 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LLJ00L00WFJWQ00@a-mtaout23.012.net.il> for 8667@debbugs.gnu.org; Sat, 21 May 2011 18:06:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.254.13]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LLJ00L6RWM0P180@a-mtaout23.012.net.il>; Sat, 21 May 2011 18:06:01 +0300 (IDT) Date: Sat, 21 May 2011 18:06:05 +0300 From: Eli Zaretskii Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83y620drfm.fsf@gnu.org> References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) > From: "Drew Adams" > Date: Sat, 21 May 2011 07:52:58 -0700 > Cc: 8667-close@debbugs.gnu.org > > > From which branch? > > >From here: > http://repo.or.cz/w/emacs.git/tree/HEAD:/lisp > > In the past that has always given the trunk AFAIK. And in the past it has been > the _only_ HTTP access that has been reliable (works). But apparently it is no > longer kept up-to-date. > > I just now tried > http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files/head%3A/lisp/ > and got this, which is typically the case: > > Please try again > Sorry, there was a problem connecting to the Launchpad server. That URL is obsolete. This one is correct and working: http://bzr.savannah.gnu.org/lh/emacs/trunk/files I'm quite sure I posted a message about that to emacs-devel... let me see... yep, on Apr 10, Re: Development sources can be viewed in bzr with a Web browser. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 11:15:29 2011 Received: (at 8667) by debbugs.gnu.org; 21 May 2011 15:15:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNnto-0002mW-Ru for submit@debbugs.gnu.org; Sat, 21 May 2011 11:15:29 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNntn-0002mK-Mi for 8667@debbugs.gnu.org; Sat, 21 May 2011 11:15:28 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4LFFJBM011668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 May 2011 15:15:21 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4LFFI7p020733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 May 2011 15:15:19 GMT Received: from abhmt021.oracle.com (abhmt021.oracle.com [141.146.116.30]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4LFFDSm017201; Sat, 21 May 2011 10:15:13 -0500 Received: from dradamslap1 (/10.159.41.30) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 May 2011 08:15:12 -0700 From: "Drew Adams" To: "'Eli Zaretskii'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> <83y620drfm.fsf@gnu.org> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Sat, 21 May 2011 08:15:06 -0700 Message-ID: <2674D1FCD02C45C88B40EF58E5E9B39D@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <83y620drfm.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Thread-Index: AcwXyJ4VArpGN2djQ1Kw0ehqe716qgAAEflQ X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4DD7D709.008C:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > That URL is obsolete. This one is correct and working: > http://bzr.savannah.gnu.org/lh/emacs/trunk/files > I'm quite sure I posted a message about that to emacs-devel... let me > see... yep, on Apr 10, Re: Development sources can be viewed in bzr > with a Web browser. OK, thanks; must have missed that mail. FYI, the "obsolete" one still works, apparently (when it works ;-)). BTW - Why not have a more or less permanent URL that you guys can redirect to wherever, as needed? Why so many changes to the user-end URL? No need to answer - just food for thought. Ideally, users should not need to juggle bookmarks to keep up with dev changes. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 11:52:38 2011 Received: (at 8667) by debbugs.gnu.org; 21 May 2011 15:52:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNoTm-0003Ze-6m for submit@debbugs.gnu.org; Sat, 21 May 2011 11:52:38 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNoTj-0003ZQ-I6 for 8667@debbugs.gnu.org; Sat, 21 May 2011 11:52:36 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LLJ00B00YQZWT00@a-mtaout22.012.net.il> for 8667@debbugs.gnu.org; Sat, 21 May 2011 18:52:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.254.13]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LLJ00BEIYRGCZ70@a-mtaout22.012.net.il>; Sat, 21 May 2011 18:52:29 +0300 (IDT) Date: Sat, 21 May 2011 18:52:33 +0300 From: Eli Zaretskii Subject: Re: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' In-reply-to: <2674D1FCD02C45C88B40EF58E5E9B39D@us.oracle.com> X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83vcx4dpa6.fsf@gnu.org> References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> <83y620drfm.fsf@gnu.org> <2674D1FCD02C45C88B40EF58E5E9B39D@us.oracle.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: "Drew Adams" > Cc: <8667@debbugs.gnu.org> > Date: Sat, 21 May 2011 08:15:06 -0700 > > BTW - Why not have a more or less permanent URL that you guys can redirect to > wherever, as needed? Why so many changes to the user-end URL? I have no idea why it changed, but the one I mentioned should stay put. From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 14:18:52 2011 Received: (at 8667) by debbugs.gnu.org; 21 May 2011 18:18:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNqlI-0006gr-Jp for submit@debbugs.gnu.org; Sat, 21 May 2011 14:18:52 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNqlG-0006gd-BT for 8667@debbugs.gnu.org; Sat, 21 May 2011 14:18:50 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4LIIfIg010245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 May 2011 18:18:43 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4LIIeWi002935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 May 2011 18:18:41 GMT Received: from abhmt019.oracle.com (abhmt019.oracle.com [141.146.116.28]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4LIIZ6J002948; Sat, 21 May 2011 13:18:35 -0500 Received: from dradamslap1 (/10.159.41.30) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 May 2011 11:18:35 -0700 From: "Drew Adams" To: "'Eli Zaretskii'" References: <1273A111E1924DE9BAB49AFE6257D462@us.oracle.com> <5328177EA0C84361A654BB5EEB201D1C@us.oracle.com> <08CF598C172E4666AC252C93A5D1F869@us.oracle.com> <4D39E49D942C4B0680CE3A8A426F35EC@us.oracle.com> <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> <83y620drfm.fsf@gnu.org> <2674D1FCD02C45C88B40EF58E5E9B39D@us.oracle.com> <83vcx4dpa6.fsf@gnu.org> Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Date: Sat, 21 May 2011 11:18:29 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <83vcx4dpa6.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Thread-Index: AcwXzxvcPbrkGJfYQcSdKUhl1ua1fAAFEvgQ X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090207.4DD80204.0039:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8667 Cc: 8667@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > BTW - Why not have a more or less permanent URL that you > > guys can redirect to wherever, as needed? Why so many > > changes to the user-end URL? > > I have no idea why it changed, but the one I mentioned > should stay put. Good to hear. Thanks again. From unknown Sat Aug 16 10:50:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 Jun 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator