GNU bug report logs - #23381
24.5; browse-url-at-point inserts http prefix

Previous Next

Package: emacs;

Reported by: David cooper <dtcooper83 <at> hotmail.com>

Date: Tue, 26 Apr 2016 21:30:02 UTC

Severity: minor

Tags: notabug

Found in version 24.5

Done: David cooper <dtcooper83 <at> hotmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23381 in the body.
You can then email your comments to 23381 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23381; Package emacs. (Tue, 26 Apr 2016 21:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David cooper <dtcooper83 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 26 Apr 2016 21:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David cooper <dtcooper83 <at> hotmail.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.5; browse-url-at-point inserts http prefix
Date: Tue, 26 Apr 2016 19:58:32 +0100
[Message part 1 (text/plain, inline)]
 

I'm trying to work out how to get org mode to open (as clickable links) URLs
which link to another piece of software called ConnectedText. ConnectedText
allows other applications to link to its files via URLs that look like the
following: `ct://Welcome/Welcome`

 

If I invoke browse-url via `M-x browse-url`, and then paste one of these
links, then the links open as they should do. But if I add them as clickable
links in org mode they don't work (I get the 'no match- create this as a new
heading?' dialogue).

 

According to the org-mode manual, clickable links are handled by the
browse-url-at-point function. When I try to use browse-url-at-point to open
one of these URLs (via `M-x browse-url-at-point`), it also doesn't work, and
instead tries to open the link in my web browser. 

 

So I'm trying to figure why browse-url-at-point doesn't behave in the same
way as browse-url in relation to these URLs.

 

Browse-url, if invoked when the point is on one of these URLs, defaults to
the URL (as per the documentation; "If point is located near a plausible
URL, that URL is used as the default.") However, when it does this, it
inserts `http://` so the resulting URL looks like the following:
`http://ct://Welcome/Welcome`. I assume this is the reason things aren't
working.

 

Is this a bug (someone has suggested to me that it may be)? Or is there

a setting I haven't found out about to get `browse-url-at-point` to not
insert this `http://` prefix?

 

Thanks!

David

 

 

 

In GNU Emacs 24.5.1 (i686-pc-mingw32)

of 2015-04-11 on LEG570

Windowing system distributor `Microsoft Corp.', version 6.3.9600

Configured using:

`configure --prefix=/c/usr --host=i686-pc-mingw32'

 

Important settings:

  value of $LANG: ENG

  locale-coding-system: cp1252

 

Major mode: Org

 

Minor modes in effect:

  ido-everywhere: t

  delete-selection-mode: t

  cua-mode: t

  tooltip-mode: t

  electric-indent-mode: t

  mouse-wheel-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  blink-cursor-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  global-visual-line-mode: t

  visual-line-mode: t

  transient-mark-mode: t

 

Recent messages:

Loading cua-base...done

Failed to enable theme: sanityinc-solarized-light

For information about GNU Emacs and the GNU system, type C-h C-a.

 

Load-path shadows:

None found.

 

Features:

(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode

mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader

sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils

org-clock deft wid-edit cl-macs cl gv info package epg-config ido ox-md

ox-latex ox-icalendar ox-html ox-ascii ox-publish ox org-element

org-rmail org-mhe org-irc org-info org-gnus gnus-util org-docview

doc-view jka-compr image-mode dired org-bibtex bibtex org-bbdb org-w3m

edmacro kmacro cl-loaddefs cl-lib server delsel cua-base cus-start

cus-load advice help-fns org org-macro org-footnote org-pcomplete

pcomplete org-list org-faces org-entities noutline outline easy-mmode

org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp

org-src ob-keys ob-comint comint ansi-color ring ob-core ob-eval

org-compat org-macs org-loaddefs format-spec find-func cal-menu easymenu

calendar cal-loaddefs time-date tooltip electric uniquify ediff-hook

vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns

disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe

tabulated-list newcomment lisp-mode prog-mode register page menu-bar

rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax

facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese

tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak

czech european ethiopic indian cyrillic chinese case-table epa-hook

jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button

faces cus-face macroexp files text-properties overlay sha1 md5 base64

format env code-pages mule custom widget hashtable-print-readable

backquote make-network-process w32notify w32 multi-tty emacs)

 

Memory information:

((conses 8 226732 18788)

(symbols 32 32729 0)

(miscs 32 134 288)

(strings 16 63621 24075)

(string-bytes 1 1803958)

(vectors 8 24433)

(vector-slots 4 546513 5480)

(floats 8 125 170)

(intervals 28 422 1)

(buffers 508 12))

*** E-Mail body has been placed on clipboard, please paste it here! ***

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23381; Package emacs. (Tue, 26 Apr 2016 21:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 23381 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: David cooper <dtcooper83 <at> hotmail.com>
Cc: 23381 <at> debbugs.gnu.org
Subject: Re: bug#23381: 24.5; browse-url-at-point inserts http prefix
Date: Tue, 26 Apr 2016 17:57:12 -0400
A minimal example starting from emacs -Q that shows the issue is worth a
thousand words.

Anyway, I'm going to guess that adding "ct://" to
thing-at-point-uri-schemes solves your issue.

(require 'thingatpt)
(push "ct://" thing-at-point-uri-schemes)




Reply sent to David cooper <dtcooper83 <at> hotmail.com>:
You have taken responsibility. (Wed, 27 Apr 2016 21:08:02 GMT) Full text and rfc822 format available.

Notification sent to David cooper <dtcooper83 <at> hotmail.com>:
bug acknowledged by developer. (Wed, 27 Apr 2016 21:08:02 GMT) Full text and rfc822 format available.

Message #13 received at 23381-done <at> debbugs.gnu.org (full text, mbox):

From: David cooper <dtcooper83 <at> hotmail.com>
To: "'Glenn Morris'" <rgm <at> gnu.org>
Subject: RE: bug#23381: 24.5; browse-url-at-point inserts http prefix
Date: Tue, 26 Apr 2016 23:03:00 +0100
Solved, many thanks Glenn.

-----Original Message-----
From: Glenn Morris [mailto:rgm <at> gnu.org] 
Sent: 26 April 2016 22:57
To: David cooper <dtcooper83 <at> hotmail.com>
Cc: 23381 <at> debbugs.gnu.org
Subject: Re: bug#23381: 24.5; browse-url-at-point inserts http prefix


A minimal example starting from emacs -Q that shows the issue is worth a
thousand words.

Anyway, I'm going to guess that adding "ct://" to thing-at-point-uri-schemes
solves your issue.

(require 'thingatpt)
(push "ct://" thing-at-point-uri-schemes)




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 21:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.