GNU bug report logs -
#56312
28.1; URI discrepancy between `thing-at-point' and `org-open-at-point'
Previous Next
To reply to this bug, email your comments to 56312 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56312
; Package
emacs
.
(Thu, 30 Jun 2022 04:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Teika Kazura <teika <at> gmx.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 30 Jun 2022 04:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, Emacs world.
(An error reproduction code soon follows.)
When a cursor is on a url, (thing-at-point 'url) and (org-open-at-point) sometimes return different urls; more precisely, the delimiter sets of two seem to differ.
It's a corner case, and I don't think there exists a "correct" set of delimiters. But IMHO the behavior should be unified, by unifing the code. This makes Emacs' behavior more predictable / customizable, and code maintenance easier.
Since org-mode is now a part of Emacs, it possibly can rely on thing-at-point. (FYI: `browse-url-url-at-point' uses thing-at-point.)
How to reproduce it:
------------------------------------------------------------------------
#!/bin/bash
cat > /tmp/foo.txt << EOF
https://www.amazon.com/("false"-parethesis)Learning-Emacs-Third-Debra-Cameron/dp/0596006489/ref=sr_1_1?keywords=emacs+gnu&sr=8-1
EOF
cat > /tmp/foo.el <<EOF
(find-file "/tmp/foo.txt")
(set-buffer "foo.txt")
(require 'org)
(message "tap returns: *%s*" (thing-at-point 'url))
(org-open-at-point)
EOF
emacs -Q -l /tmp/foo.el
# Caution! rm -f will follow.
# rm -f /tmp/foo.txt /tmp/foo.el
-------------------------------------------------------------------------
In the above example, the url contains a special Japanese parenthesis U+ff08, not an ascii one. thing-at-point cuts before it, but (caution: your browser will be called) org-open-at-point opens the entire line.
As I said above, it's not likely that there is an absolutely "correct" delimiter set. In the above case, the Japanese parenthesis is a part of a valid URL [1]. But it also is a commonly used punctuation mark, so it's rational to treat it as a URL boundary.
(Sorry, I'm completely ignorant about the syntax table.)
[1] The above example is hypothetical, but there does exist such URLs in Japanese Amazon.
Thank you very much indeed for developing Emacs.
Best regards.
Teika
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56312
; Package
emacs
.
(Thu, 30 Jun 2022 10:26:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 56312 <at> debbugs.gnu.org (full text, mbox):
Teika Kazura <teika <at> gmx.com> writes:
> Since org-mode is now a part of Emacs, it possibly can rely on
> thing-at-point. (FYI: `browse-url-url-at-point' uses thing-at-point.)
I think this may be a duplicate of bug#42483.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug reassigned from package 'emacs' to 'org-mode'.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 30 Jun 2022 10:26:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as found in versions 28.1.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 30 Jun 2022 10:26:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
emacs-orgmode <at> gnu.org
:
bug#56312
; Package
org-mode
.
(Thu, 30 Jun 2022 11:53:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 56312 <at> debbugs.gnu.org (full text, mbox):
> I think this may be a duplicate of bug#42483.
Oops, sorry. Yet what I stated above reinforces the rationale; the current situation is somewhat random.
Thanks a lot Lars (BTW you helped at a recent bug report by me - https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55607), and thanks beforehand, the org team.
Regards.
This bug report was last modified 2 years and 353 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.