Subject: 24.3.50; ffap too lax in C++ mode

From: Ivan Andrus <[email-masked]>
Date: Wed, 18 Sep 2013 17:30:45 -0600

I have mapped `find-file-at-point' to C-x C-f, but in `c++-mode' it
thinks that things with double colons (like std::map) are files (or urls
actually).  Except that of course they aren't and so I have to delete
the incorrect starting input.  It's not hard to delete it, but it is
annoying.

The problem seems to be that `ffap-url-at-point' passes `t' for the
`lax' parameter of `thing-at-point-url-at-point'.  I'm not sure what the
ramifications of changing that parameter would be.

-Ivan

In GNU Emacs 24.3.50.1 (i386-apple-darwin12.5.0, NS apple-appkit-1187.39)
of 2013-09-16 on ivanandres-MacBookPro
Bzr revision: 114309 [email-masked]
Windowing system distributor `Apple', version 10.3.1187
Configured using:
`configure --with-ns --with-xml2'

Important settings:
 locale-coding-system: nil
 default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
 diff-auto-refine-mode: t
 eldoc-mode: t
 highlight-parentheses-mode: t
 hl-sexp-mode: t
 highlight-symbol-mode: t
 which-function-mode: t
 show-paren-mode: t
 msb-mode: t
 minibuffer-depth-indicate-mode: t
 global-hl-line-mode: t
 delete-selection-mode: t
 auto-image-file-mode: t
 auto-insert-mode: t
 yas-global-mode: t
 shell-dirtrack-mode: t
 ido-everywhere: t
 global-visible-mark-mode: t
 visible-mark-mode: t
 gvol-mode: t
 recentf-mode: t
 desktop-save-mode: t
 drag-stuff-global-mode: t
 drag-stuff-mode: t
 tooltip-mode: t
 mouse-wheel-mode: t
 tool-bar-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
 column-number-mode: t
 line-number-mode: t
 transient-mark-mode: t

Recent input:
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-e C-u C-u M-r C-k C-k C-k C-k C-k C-k C-k C-k
TAB C-j M-s <C-tab> <C-tab> <C-tab> TAB TAB M-x c u
s t C-s <return> f i n <tab> f i <tab> - a <tab> <backspace>
<tab> <tab> <backspace> <backspace> <backspace> <backspace>
<C-backspace> <C-backspace> f f a p <tab> <return>
<help-echo> <down-mouse-1> <mouse-1> C-x C-r <help-echo>
C-s u C-g C-a <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
C-r u r l C-r C-r C-r C-r C-r C-r C-a <up> <up> <up>
<up> <left> <left> <return> <return> <down> <down>
<down> C-x C-r <return> <return> <down> <down> <down>
<return> <return> <down> <down> <down> <return> <return>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> C-x C-r <down> <down>
<down> <return> <down> <down> <up> <up> <return> <down>
<down> <down> <down> <down> <down> <return> <return>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <return> <return> <down> <down> <down> <return>
<down> <down> C-e <left> <left> <right> <right> <right>
<left> <left> <return> <down> <down> <down> <right>
<right> <return> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <down> <return> M-w C-M-j C-M-j
C-M-j C-M-j C-M-j C-M-j C-M-j C-M-l C-M-j C-M-l C-M-j
C-M-l C-M-j C-M-l C-M-j C-M-l C-M-j C-M-l C-M-j C-k
C-M-l C-M-l C-M-l C-M-l <C-tab> M-w M-w M-: , , t h
i n <tab> - <backspace> SPC ' u r l <return> <C-tab>
<C-tab> C-M-u C-M-u C-M-u C-M-u C-o C-o C-M-j C-M-k
C-/ <C-tab> M-: , , C-y <return> M-: <up> C-e <left>
SPC t <return> <C-tab> <C-tab> C-a C-M-k C-M-k M-w
C-x C-s M-x g r e <backspace> <backspace> <backspace>
b <backspace> r e p o <return>

Recent messages:
nil
lax: t
allowed-chars: "--:=&?$+@-Z_[:alpha:]~#,%;*()!'"
skip-before: "^[0-9a-zA-Z]"
skip-after: ":;.,!?"
pt: 5
beg: 1
end: 9
(1 . 9)
(No changes need to be saved)

Load-path shadows:
~/vcs/emacs-clang-complete-async/auto-complete-clang-async hides /Users/ivanandres/.emacs.d/elpa/auto-complete-clang-async-20130526.2314/auto-complete-clang-async
/Users/ivanandres/.emacs.d/elpa/confluence-20130814.735/confluence-edit hides /Users/ivanandres/.emacs.d/elpa/confluence-edit-20130804.2241/confluence-edit
/Users/ivanandres/vcs/sage-mode/emacs/.dir-locals hides /Users/ivanandres/.emacs.d/elpa/highlight-parentheses-20130523.1752/.dir-locals
/Users/ivanandres/vcs/sage-mode/emacs/.dir-locals hides /Users/ivanandres/.emacs.d/elpa/highlight-symbol-20130628.1552/.dir-locals
/Users/ivanandres/.emacs.d/elpa/php+-mode-20121129.1452/string-utils hides /Users/ivanandres/.emacs.d/elpa/string-utils-20121108.1917/string-utils
/Users/ivanandres/.emacs.d/elpa/jira-20091012.2123/jira hides ~/.emacs.d/local/jira
/Users/ivanandres/vcs/sage-mode/emacs/.dir-locals hides /Users/ivanandres/vcs/emacs/local/nextstep/Emacs.app/Contents/Resources/lisp/gnus/.dir-locals

Features:
(shadow emacsbug sendmail cus-edit hi-lock semantic/decorate/mode
semantic/decorate pulse auto-complete popup edmacro kmacro ibuf-macs
gnutls jira xml-rpc timezone tramp-cmds tramp-cache tramp-sh
semantic/wisent/python semantic/dep semantic/wisent/python-wy
semantic/wisent semantic/wisent/wisent hideshow python git-commit-mode
qp parse-time smiley gnus-cite flow-fill gnus-async gnus-bcklg
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nndoc
gnus-cache gnus-sum nnoo url-handlers gnus-group gnus-undo nnmail
mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win gnus
gnus-ems nnheader mm-archive message rfc822 mml mml-sec mailabbrev
gmm-utils mailheader mail-utils network-stream starttls url-cache crm
debbugs-gnu debbugs soap-client mm-decode mm-bodies mm-encode url-http
tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw
warnings artist picture reporter rect debug vc-bzr org-table epa-file
epa derived skeleton repeat ediff-merg ediff-wind ediff-diff ediff-mult
ediff-help ediff-init ediff-util ediff yaml-mode json-mode js
etags-select etags sql view org-colview epg epg-config org-element
log-view vc-annotate find-file browse-url sort goto-last-change
mail-extr wgrep-ack wgrep ack-and-a-half grep cperl-mode conf-mode
goto-addr man dabbrev misearch multi-isearch ffap smerge-mode vc-svn
vc-cvs vc-dir ewoc git-rebase-mode diff-mode superword subword dired+
dired-x dired-aux dired nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph
nxml-enc xmltok ibuf-ext ibuffer sh-script smie executable restclient
json-reformat json disp-table whitespace make-mode greedy-delete
gvol-light-theme tabify cal-iso org-mobile vc-hg reveal org-mouse
org-irc org-habit org-jsinfo org-infojs org-html org-info org-gnus
org-docview org-ctags org-bibtex bibtex org-bbdb org-archive org-id
org-crypt ob-python org-clock org-exp ob-exp org-exp-blocks org-agenda
org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint
ob-keys org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs
elide-head ede/cpp-root ede/generic ede/shell eieio-opt find-func
ede/speedbar ede/files ede ede/base ede/auto ede/source eieio-speedbar
speedbar sb-image dframe eieio-custom semantic/db eieio-base vc-git
c-eldoc eldoc highlight-parentheses tempo url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse url-vars mailcap xml-parse doxymacs hl-sexp highlight-symbol
thingatpt cc-langs info-look cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs time uniquify saveplace
semantic/idle semantic/format ezimage semantic/tag-ls semantic/find
semantic/ctxt which-func imenu paren semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet msb
mb-depth icomplete hl-line delsel image-file cus-start cus-load
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs autoinsert
yasnippet help-mode tramp tramp-compat auth-source eieio byte-opt
bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr
password-cache tramp-loaddefs trampver shell pcomplete format-spec smex
ido visible-mark parenface fold commit-patch-buffer log-edit pcvs-util
add-log vc vc-dispatcher sage sage-load jka-compr recentf tree-widget
wid-edit rx xml flymake compile comint ansi-color ring tex-site desktop
frameset drag-stuff browse-kill-ring backtr command-frequency uptimes pp
server easy-mmode assoc advice windmove ac-math-autoloads
auto-complete-clang-autoloads command-frequency-autoloads
etags-select-autoloads gap-mode-autoloads goto-last-change-autoloads
hl-sexp-autoloads json-mode-autoloads mainline-autoloads
mark-multiple-autoloads php+-mode-autoloads php-eldoc-autoloads info
easymenu help-fns cl-macs gv cl cl-loaddefs cl-lib
visible-mark-autoloads yaml-mode-autoloads package time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel ns-win 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 ns
multi-tty emacs)