From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 8667-close@debbugs.gnu.org
Subject: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment'
Date: Thu, 19 May 2011 10:12:22 -0700 [thread overview]
Message-ID: <660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com> (raw)
In-Reply-To: <jwvsjsi4jp7.fsf-monnier+emacs@gnu.org>
> 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.
next prev parent reply other threads:[~2011-05-19 17:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 0:46 bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment' Drew Adams
2011-05-13 3:00 ` Drew Adams
2011-05-13 5:56 ` Kevin Rodgers
2011-05-13 14:24 ` bug#8670: OT: " Drew Adams
2011-05-13 14:11 ` Stefan Monnier
2011-05-13 15:49 ` Drew Adams
2011-05-13 16:11 ` Drew Adams
2011-05-13 17:05 ` Stefan Monnier
2011-05-19 17:12 ` Drew Adams [this message]
2011-05-20 2:12 ` Stefan Monnier
2011-05-21 14:52 ` Drew Adams
2011-05-21 15:06 ` Eli Zaretskii
2011-05-21 15:15 ` Drew Adams
2011-05-21 15:52 ` Eli Zaretskii
2011-05-21 18:18 ` Drew Adams
2011-05-19 18:24 ` Drew Adams
2011-05-20 2:18 ` Stefan Monnier
2011-05-21 14:51 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=660E1260C0464A0D94CF792C0BBAEF92@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=8667-close@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).