GNU bug report logs - #25391
24.5; ffap-guesser "stack overflow in regexp matcher" error may crash emacs.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Sun, 8 Jan 2017 07:32:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.5

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

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 25391 in the body.
You can then email your comments to 25391 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#25391; Package emacs. (Sun, 08 Jan 2017 07:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thierry Volpiatto <thierry.volpiatto <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Jan 2017 07:32:01 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; ffap-guesser "stack overflow in regexp matcher" error may crash
 emacs.
Date: Sun, 08 Jan 2017 08:31:30 +0100
Reproduce from emacs -Q:

1) require ffap.
2) Open a file of about 560k containing only one line, e.g
"~/emacs.d/elpa/archives/archive-contents"
3) M-: (ffap-guesser)

Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size")
  looking-at("^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$")
  ffap-gopher-at-point()
  ffap-guesser()
  eval((ffap-guesser) nil)
  eval-expression((ffap-guesser) nil)
  funcall-interactively(eval-expression (ffap-guesser) nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

This is reproductible from emacs-26 as well.



In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2016-11-09 on dell-14z
Windowing system distributor `The X.Org Foundation', version 11.0.11701000
System Description:	Linux Mint 17.3 Rosa

Configured using:
 `configure CFLAGS=-O3'

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-disable-mouse-mode: t
  global-git-gutter-mode: t
  eldoc-in-minibuffer-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  psession-mode: t
  dired-async-mode: t
  display-time-mode: t
  winner-mode: t
  auto-image-file-mode: t
  savehist-mode: t
  show-paren-mode: t
  helm-descbinds-mode: t
  helm-top-poll-mode: t
  helm-push-mark-mode: t
  eldoc-mode: t
  helm-mode: t
  shell-dirtrack-mode: t
  helm-adaptive-mode: t
  helm-popup-tip-mode: t
  async-bytecomp-package-mode: t
  minibuffer-depth-indicate-mode: t
  override-global-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-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 messages:
uncompressing window.el.gz...done
Setting up indent for shell type bash
Indentation variables are now local.
Indentation setup for shell type bash
uncompressing reposition.el.gz...done
Restoring buffers...77%
Configuring package slime...done
Restoring buffers...82%
uncompressing imenu.el.gz...done
Restoring buffers...done

Load-path shadows:
/home/thierry/.emacs.d/elpa/org-20161224/ob-keys hides /usr/local/share/emacs/24.5/lisp/org/ob-keys
/home/thierry/.emacs.d/elpa/org-20161224/ob-ref hides /usr/local/share/emacs/24.5/lisp/org/ob-ref
/home/thierry/.emacs.d/elpa/org-20161224/ox-org hides /usr/local/share/emacs/24.5/lisp/org/ox-org
/home/thierry/.emacs.d/elpa/org-20161224/ob-sass hides /usr/local/share/emacs/24.5/lisp/org/ob-sass
/home/thierry/.emacs.d/elpa/org-20161224/org-bbdb hides /usr/local/share/emacs/24.5/lisp/org/org-bbdb
/home/thierry/.emacs.d/elpa/org-20161224/ox-latex hides /usr/local/share/emacs/24.5/lisp/org/ox-latex
/home/thierry/.emacs.d/elpa/org-20161224/ox-beamer hides /usr/local/share/emacs/24.5/lisp/org/ox-beamer
/home/thierry/.emacs.d/elpa/org-20161224/org-crypt hides /usr/local/share/emacs/24.5/lisp/org/org-crypt
/home/thierry/.emacs.d/elpa/org-20161224/ob-maxima hides /usr/local/share/emacs/24.5/lisp/org/ob-maxima
/home/thierry/.emacs.d/elpa/org-20161224/ob-R hides /usr/local/share/emacs/24.5/lisp/org/ob-R
/home/thierry/.emacs.d/elpa/org-20161224/ob-eval hides /usr/local/share/emacs/24.5/lisp/org/ob-eval
/home/thierry/.emacs.d/elpa/org-20161224/org-datetree hides /usr/local/share/emacs/24.5/lisp/org/org-datetree
/home/thierry/.emacs.d/elpa/org-20161224/org-element hides /usr/local/share/emacs/24.5/lisp/org/org-element
/home/thierry/.emacs.d/elpa/org-20161224/ob-core hides /usr/local/share/emacs/24.5/lisp/org/ob-core
/home/thierry/.emacs.d/elpa/org-20161224/ox-md hides /usr/local/share/emacs/24.5/lisp/org/ox-md
/home/thierry/.emacs.d/elpa/org-20161224/org-indent hides /usr/local/share/emacs/24.5/lisp/org/org-indent
/home/thierry/.emacs.d/elpa/org-20161224/ox hides /usr/local/share/emacs/24.5/lisp/org/ox
/home/thierry/.emacs.d/elpa/org-20161224/ob-fortran hides /usr/local/share/emacs/24.5/lisp/org/ob-fortran
/home/thierry/.emacs.d/elpa/org-20161224/ob-matlab hides /usr/local/share/emacs/24.5/lisp/org/ob-matlab
/home/thierry/.emacs.d/elpa/org-20161224/org-macro hides /usr/local/share/emacs/24.5/lisp/org/org-macro
/home/thierry/.emacs.d/elpa/org-20161224/ox-texinfo hides /usr/local/share/emacs/24.5/lisp/org/ox-texinfo
/home/thierry/.emacs.d/elpa/org-20161224/ob-sqlite hides /usr/local/share/emacs/24.5/lisp/org/ob-sqlite
/home/thierry/.emacs.d/elpa/org-20161224/org-faces hides /usr/local/share/emacs/24.5/lisp/org/org-faces
/home/thierry/.emacs.d/elpa/org-20161224/org-pcomplete hides /usr/local/share/emacs/24.5/lisp/org/org-pcomplete
/home/thierry/.emacs.d/elpa/org-20161224/org-mouse hides /usr/local/share/emacs/24.5/lisp/org/org-mouse
/home/thierry/.emacs.d/elpa/org-20161224/ob-emacs-lisp hides /usr/local/share/emacs/24.5/lisp/org/ob-emacs-lisp
/home/thierry/.emacs.d/elpa/org-20161224/org-archive hides /usr/local/share/emacs/24.5/lisp/org/org-archive
/home/thierry/.emacs.d/elpa/org-20161224/org-capture hides /usr/local/share/emacs/24.5/lisp/org/org-capture
/home/thierry/.emacs.d/elpa/org-20161224/ob-awk hides /usr/local/share/emacs/24.5/lisp/org/ob-awk
/home/thierry/.emacs.d/elpa/org-20161224/ob-octave hides /usr/local/share/emacs/24.5/lisp/org/ob-octave
/home/thierry/.emacs.d/elpa/org-20161224/org-timer hides /usr/local/share/emacs/24.5/lisp/org/org-timer
/home/thierry/.emacs.d/elpa/org-20161224/ob-sql hides /usr/local/share/emacs/24.5/lisp/org/ob-sql
/home/thierry/.emacs.d/elpa/org-20161224/ob-latex hides /usr/local/share/emacs/24.5/lisp/org/ob-latex
/home/thierry/.emacs.d/elpa/org-20161224/org-macs hides /usr/local/share/emacs/24.5/lisp/org/org-macs
/home/thierry/.emacs.d/elpa/org-20161224/org-rmail hides /usr/local/share/emacs/24.5/lisp/org/org-rmail
/home/thierry/.emacs.d/elpa/org-20161224/org-w3m hides /usr/local/share/emacs/24.5/lisp/org/org-w3m
/home/thierry/.emacs.d/elpa/org-20161224/ob-io hides /usr/local/share/emacs/24.5/lisp/org/ob-io
/home/thierry/.emacs.d/elpa/org-20161224/ob hides /usr/local/share/emacs/24.5/lisp/org/ob
/home/thierry/.emacs.d/elpa/org-20161224/ob-perl hides /usr/local/share/emacs/24.5/lisp/org/ob-perl
/home/thierry/.emacs.d/elpa/org-20161224/ob-mscgen hides /usr/local/share/emacs/24.5/lisp/org/ob-mscgen
/home/thierry/.emacs.d/elpa/org-20161224/ob-lilypond hides /usr/local/share/emacs/24.5/lisp/org/ob-lilypond
/home/thierry/.emacs.d/elpa/org-20161224/org-footnote hides /usr/local/share/emacs/24.5/lisp/org/org-footnote
/home/thierry/.emacs.d/elpa/org-20161224/ob-java hides /usr/local/share/emacs/24.5/lisp/org/ob-java
/home/thierry/.emacs.d/elpa/org-20161224/ox-html hides /usr/local/share/emacs/24.5/lisp/org/ox-html
/home/thierry/.emacs.d/elpa/org-20161224/ob-haskell hides /usr/local/share/emacs/24.5/lisp/org/ob-haskell
/home/thierry/.emacs.d/elpa/org-20161224/org-docview hides /usr/local/share/emacs/24.5/lisp/org/org-docview
/home/thierry/.emacs.d/elpa/org-20161224/ob-comint hides /usr/local/share/emacs/24.5/lisp/org/ob-comint
/home/thierry/.emacs.d/elpa/org-20161224/ob-css hides /usr/local/share/emacs/24.5/lisp/org/ob-css
/home/thierry/.emacs.d/elpa/org-20161224/ob-ditaa hides /usr/local/share/emacs/24.5/lisp/org/ob-ditaa
/home/thierry/.emacs.d/elpa/org-20161224/ob-scala hides /usr/local/share/emacs/24.5/lisp/org/ob-scala
/home/thierry/.emacs.d/elpa/org-20161224/org hides /usr/local/share/emacs/24.5/lisp/org/org
/home/thierry/.emacs.d/elpa/org-20161224/org-mobile hides /usr/local/share/emacs/24.5/lisp/org/org-mobile
/home/thierry/.emacs.d/elpa/org-20161224/ob-lisp hides /usr/local/share/emacs/24.5/lisp/org/ob-lisp
/home/thierry/.emacs.d/elpa/org-20161224/ob-gnuplot hides /usr/local/share/emacs/24.5/lisp/org/ob-gnuplot
/home/thierry/.emacs.d/elpa/org-20161224/org-src hides /usr/local/share/emacs/24.5/lisp/org/org-src
/home/thierry/.emacs.d/elpa/org-20161224/ox-ascii hides /usr/local/share/emacs/24.5/lisp/org/ox-ascii
/home/thierry/.emacs.d/elpa/org-20161224/ob-calc hides /usr/local/share/emacs/24.5/lisp/org/ob-calc
/home/thierry/.emacs.d/elpa/org-20161224/org-irc hides /usr/local/share/emacs/24.5/lisp/org/org-irc
/home/thierry/.emacs.d/elpa/org-20161224/org-loaddefs hides /usr/local/share/emacs/24.5/lisp/org/org-loaddefs
/home/thierry/.emacs.d/elpa/org-20161224/org-install hides /usr/local/share/emacs/24.5/lisp/org/org-install
/home/thierry/.emacs.d/elpa/org-20161224/org-info hides /usr/local/share/emacs/24.5/lisp/org/org-info
/home/thierry/.emacs.d/elpa/org-20161224/ob-plantuml hides /usr/local/share/emacs/24.5/lisp/org/ob-plantuml
/home/thierry/.emacs.d/elpa/org-20161224/org-feed hides /usr/local/share/emacs/24.5/lisp/org/org-feed
/home/thierry/.emacs.d/elpa/org-20161224/org-version hides /usr/local/share/emacs/24.5/lisp/org/org-version
/home/thierry/.emacs.d/elpa/org-20161224/ob-makefile hides /usr/local/share/emacs/24.5/lisp/org/ob-makefile
/home/thierry/.emacs.d/elpa/org-20161224/org-entities hides /usr/local/share/emacs/24.5/lisp/org/org-entities
/home/thierry/.emacs.d/elpa/org-20161224/ob-python hides /usr/local/share/emacs/24.5/lisp/org/ob-python
/home/thierry/.emacs.d/elpa/org-20161224/ob-ledger hides /usr/local/share/emacs/24.5/lisp/org/ob-ledger
/home/thierry/.emacs.d/elpa/org-20161224/ox-man hides /usr/local/share/emacs/24.5/lisp/org/ox-man
/home/thierry/.emacs.d/elpa/org-20161224/ob-shen hides /usr/local/share/emacs/24.5/lisp/org/ob-shen
/home/thierry/.emacs.d/elpa/org-20161224/org-inlinetask hides /usr/local/share/emacs/24.5/lisp/org/org-inlinetask
/home/thierry/.emacs.d/elpa/org-20161224/org-list hides /usr/local/share/emacs/24.5/lisp/org/org-list
/home/thierry/.emacs.d/elpa/org-20161224/ox-publish hides /usr/local/share/emacs/24.5/lisp/org/ox-publish
/home/thierry/.emacs.d/elpa/org-20161224/org-gnus hides /usr/local/share/emacs/24.5/lisp/org/org-gnus
/home/thierry/.emacs.d/elpa/org-20161224/org-agenda hides /usr/local/share/emacs/24.5/lisp/org/org-agenda
/home/thierry/.emacs.d/elpa/org-20161224/org-id hides /usr/local/share/emacs/24.5/lisp/org/org-id
/home/thierry/.emacs.d/elpa/org-20161224/org-plot hides /usr/local/share/emacs/24.5/lisp/org/org-plot
/home/thierry/.emacs.d/elpa/org-20161224/ob-C hides /usr/local/share/emacs/24.5/lisp/org/ob-C
/home/thierry/.emacs.d/elpa/org-20161224/org-clock hides /usr/local/share/emacs/24.5/lisp/org/org-clock
/home/thierry/.emacs.d/elpa/org-20161224/org-attach hides /usr/local/share/emacs/24.5/lisp/org/org-attach
/home/thierry/.emacs.d/elpa/org-20161224/ob-ruby hides /usr/local/share/emacs/24.5/lisp/org/ob-ruby
/home/thierry/.emacs.d/elpa/org-20161224/org-habit hides /usr/local/share/emacs/24.5/lisp/org/org-habit
/home/thierry/.emacs.d/elpa/org-20161224/org-eshell hides /usr/local/share/emacs/24.5/lisp/org/org-eshell
/home/thierry/.emacs.d/elpa/org-20161224/ob-ocaml hides /usr/local/share/emacs/24.5/lisp/org/ob-ocaml
/home/thierry/.emacs.d/elpa/org-20161224/ox-odt hides /usr/local/share/emacs/24.5/lisp/org/ox-odt
/home/thierry/.emacs.d/elpa/org-20161224/ob-exp hides /usr/local/share/emacs/24.5/lisp/org/ob-exp
/home/thierry/.emacs.d/elpa/org-20161224/ob-dot hides /usr/local/share/emacs/24.5/lisp/org/ob-dot
/home/thierry/.emacs.d/elpa/org-20161224/ob-scheme hides /usr/local/share/emacs/24.5/lisp/org/ob-scheme
/home/thierry/.emacs.d/elpa/org-20161224/ob-org hides /usr/local/share/emacs/24.5/lisp/org/ob-org
/home/thierry/.emacs.d/elpa/org-20161224/org-bibtex hides /usr/local/share/emacs/24.5/lisp/org/org-bibtex
/home/thierry/.emacs.d/elpa/org-20161224/org-compat hides /usr/local/share/emacs/24.5/lisp/org/org-compat
/home/thierry/.emacs.d/elpa/org-20161224/ox-icalendar hides /usr/local/share/emacs/24.5/lisp/org/ox-icalendar
/home/thierry/.emacs.d/elpa/org-20161224/org-colview hides /usr/local/share/emacs/24.5/lisp/org/org-colview
/home/thierry/.emacs.d/elpa/org-20161224/ob-picolisp hides /usr/local/share/emacs/24.5/lisp/org/ob-picolisp
/home/thierry/.emacs.d/elpa/org-20161224/org-mhe hides /usr/local/share/emacs/24.5/lisp/org/org-mhe
/home/thierry/.emacs.d/elpa/org-20161224/org-table hides /usr/local/share/emacs/24.5/lisp/org/org-table
/home/thierry/.emacs.d/elpa/org-20161224/ob-clojure hides /usr/local/share/emacs/24.5/lisp/org/ob-clojure
/home/thierry/.emacs.d/elpa/org-20161224/ob-tangle hides /usr/local/share/emacs/24.5/lisp/org/ob-tangle
/home/thierry/.emacs.d/elpa/org-20161224/ob-table hides /usr/local/share/emacs/24.5/lisp/org/ob-table
/home/thierry/.emacs.d/elpa/org-20161224/ob-asymptote hides /usr/local/share/emacs/24.5/lisp/org/ob-asymptote
/home/thierry/.emacs.d/elpa/org-20161224/org-ctags hides /usr/local/share/emacs/24.5/lisp/org/org-ctags
/home/thierry/.emacs.d/elpa/org-20161224/ob-screen hides /usr/local/share/emacs/24.5/lisp/org/ob-screen
/home/thierry/.emacs.d/elpa/org-20161224/org-protocol hides /usr/local/share/emacs/24.5/lisp/org/org-protocol
/home/thierry/.emacs.d/elpa/org-20161224/ob-js hides /usr/local/share/emacs/24.5/lisp/org/ob-js
/home/thierry/.emacs.d/elpa/org-20161224/ob-lob hides /usr/local/share/emacs/24.5/lisp/org/ob-lob
/home/thierry/.emacs.d/elpa/soap-client-3.1.1/soap-client hides /usr/local/share/emacs/24.5/lisp/net/soap-client
/home/thierry/.emacs.d/elpa/soap-client-3.1.1/soap-inspect hides /usr/local/share/emacs/24.5/lisp/net/soap-inspect

Features:
(shadow epa-mail face-remap emacsbug helm-command js imenu
slime-xref-browser tree-widget slime-banner slime-tramp slime-asdf
slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu
slime-references slime-compiler-notes-tree slime-scratch
slime-presentations bridge slime-macrostep slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-repl slime-parse slime etags arc-mode archive-mode hyperspec
make-mode cc-awk conf-mode macrostep-c subr-x cmacexp macrostep cc-langs
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs vc-rcs ledger-config ledger vc-git naquadah-theme view
mule-util solar cal-dst holidays hol-loaddefs em-unix em-term term
disp-table ehelp em-script em-prompt em-ls em-hist em-pred em-glob
em-dirs em-cmpl em-basic em-banner em-alias tv-utils gh gh-users
gh-issues gh-pulls gh-repos gh-comments gh-gist gh-oauth gh-api logito
gh-cache pcache eieio-base gh-auth gh-url url-http tls url-auth url-gw
disable-mouse powerline powerline-separators color powerline-themes
windmove benchmark-init toc-org ert ewoc debug elp cl-indent esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell
esh-module esh-mode esh-util markdown-mode addressbook-bookmark
mu4e-config org-mu4e helm-mu mu4e-contrib mu4e desktop frameset
mu4e-speedbar speedbar sb-image ezimage dframe mu4e-main mu4e-context
mu4e-view epa derived epg mu4e-headers mu4e-compose mu4e-draft
mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark mu4e-message
html2text mu4e-proc mu4e-utils mu4e-lists mu4e-vars hl-line cl mu4e-meta
config-w3m w3m-search w3m doc-view jka-compr image-mode timezone
w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util git-gutter cus-edit wid-edit appt diary-lib
diary-loaddefs ange-ftp xdvi-search eldoc-eval undo-tree diff
magit-obsolete magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-branch
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
magit-autorevert autorevert filenotify magit-process magit-margin
magit-mode help-mode magit-git crm magit-section magit-popup git-commit
magit-utils log-edit message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
mail-utils gmm-utils mailheader pcvs-util add-log with-editor tramp-sh
server pcomplete-extension pcmpl-unix pcmpl-gnu psession iterator iedit
iedit-lib dired-extension org-config-thierry ob-sh org-crypt org-element
avl-tree org-location-google-maps org-agenda google-maps
google-maps-static google-maps-geocode google-maps-base org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs dired-async
net-utils time winner w3m-wget wget wget-sysdep cmake-mode autotest-mode
autoconf-mode sh-script smie executable ps-print ps-def lpr rst
image-file savehist paren woman man ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff init-helm-thierry
helm-descbinds helm-sys popup helm-ring helm-elisp helm-eval edebug
eldoc helm-mode helm-files image-dired tramp tramp-compat tramp-loaddefs
trampver shell pcomplete format-spec dired-x dired-aux ffap thingatpt
helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive
helm-info bookmark pp helm-locate helm-grep wgrep-helm wgrep grep
helm-regexp helm-external helm-net browse-url xml url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap helm-utils compile comint ansi-color ring helm-help
helm-types helm helm-source helm-multi-match helm-lib dired
helm-extensions-autoloads helm-config helm-autoloads helm-easymenu
cl-macs gv async-bytecomp advice async mb-depth edmacro kmacro
use-package diminish bind-key easy-mmode tex-site gh-common gh-profile
url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars rx s ucs-normalize marshal ht json dash eieio
byte-opt bytecomp byte-compile cl-extra cconv eieio-core slime-autoloads
info easymenu package epg-config time-date avoid cus-start cus-load
cl-loaddefs cl-lib tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd 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 dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 785234 224980)
 (symbols 48 66492 2)
 (miscs 40 369 2735)
 (strings 32 189134 114480)
 (string-bytes 1 5580098)
 (vectors 16 88824)
 (vector-slots 8 1295163 62942)
 (floats 8 2470 841)
 (intervals 56 2763 783)
 (buffers 960 162)
 (heap 1024 88807 14786))

-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sun, 08 Jan 2017 15:08:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Sun, 08 Jan 2017 10:08:50 -0500
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Reproduce from emacs -Q:
>
> 1) require ffap.
> 2) Open a file of about 560k containing only one line, e.g
> "~/emacs.d/elpa/archives/archive-contents"
> 3) M-: (ffap-guesser)
>
> Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size")
>   looking-at("^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$")
[...]
>
> This is reproductible from emacs-26 as well.

The max-specpdl-size error looks like #24751 (I was planning to push the
patch for that today), but as far as I know, that's only in emacs-26.
emacs-25 and earlier correctly throw "stack overflow in regexp matcher".
Unless you have REL_ALLOC enabled (which is the default for GNU/Linux
distributions with the latest glibc), in which case any buffer search
may crash emacs instead.  That's #24358, occurs in 25.1 (and probably
earlier), but it's already fixed in the emacs-25 branch.  Also fixable
by configuring with REL_ALLOC=no.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sun, 08 Jan 2017 17:29:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: npostavs <at> users.sourceforge.net
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Sun, 08 Jan 2017 18:28:40 +0100
npostavs <at> users.sourceforge.net writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> Reproduce from emacs -Q:
>>
>> 1) require ffap.
>> 2) Open a file of about 560k containing only one line, e.g
>> "~/emacs.d/elpa/archives/archive-contents"
>> 3) M-: (ffap-guesser)
>>
>> Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size")
>>   looking-at("^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$")
> [...]
>>
>> This is reproductible from emacs-26 as well.
>
> The max-specpdl-size error looks like #24751 (I was planning to push the
> patch for that today), but as far as I know, that's only in emacs-26.
> emacs-25 and earlier correctly throw "stack overflow in regexp matcher".
> Unless you have REL_ALLOC enabled (which is the default for GNU/Linux
> distributions with the latest glibc), in which case any buffer search
> may crash emacs instead.  That's #24358, occurs in 25.1 (and probably
> earlier), but it's already fixed in the emacs-25 branch.  Also fixable
> by configuring with REL_ALLOC=no.

Good to know thanks.

However, this handle the problem with "Stack overflow in regexp matcher"
generally, but perhaps regexps such as `ffap-gopher-regexp` could be
avoided when possible in emacs source code.

IIUC regexps like "^.*\\(this\\|that etc...\\)" create an incredible
number of travels between bol and eol (which may sometimes be eob) and
lead to a stack overflow inevitably on long lines (perhaps not so long
in this case).

Thanks.

-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sun, 08 Jan 2017 23:29:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Sun, 08 Jan 2017 18:29:08 -0500
[Message part 1 (text/plain, inline)]
tags 25391 patch
quit

Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
> However, this handle the problem with "Stack overflow in regexp matcher"
> generally, but perhaps regexps such as `ffap-gopher-regexp` could be
> avoided when possible in emacs source code.

Ah, so by "crash" you meant throw an error.

>
> IIUC regexps like "^.*\\(this\\|that etc...\\)" create an incredible
> number of travels between bol and eol (which may sometimes be eob) and
> lead to a stack overflow inevitably on long lines (perhaps not so long
> in this case).

Right, and ffap-gopher-at-point is also using `set' on local variables,
icky.  Here's a patch:

[v1-0001-Improve-ffap-gopher-at-point-handling-of-long-lin.patch (text/plain, attachment)]

Added tag(s) patch. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 08 Jan 2017 23:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Mon, 09 Jan 2017 07:01:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: npostavs <at> users.sourceforge.net
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Mon, 09 Jan 2017 08:00:35 +0100
npostavs <at> users.sourceforge.net writes:

> tags 25391 patch
> quit
>
> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>>
>> However, this handle the problem with "Stack overflow in regexp matcher"
>> generally, but perhaps regexps such as `ffap-gopher-regexp` could be
>> avoided when possible in emacs source code.
>
> Ah, so by "crash" you meant throw an error.

I had the both, a crash on emacs-26, emacs taking all memory and finally
crashing and on emacs-24.5 "Stack overflow in regexp matcher".


> Right, and ffap-gopher-at-point is also using `set' on local variables,
> icky.  Here's a patch:

I don't know `let-alist`, but looks good, however keeping
`ffap-gopher-regexp` instead of hardcoding it and returning nil when the
regexp is nil would allow users to disable the feature.

Thanks.

-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Tue, 10 Jan 2017 04:37:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Mon, 09 Jan 2017 23:37:04 -0500
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

>>
>> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>>>
>>> However, this handle the problem with "Stack overflow in regexp matcher"
>>> generally, but perhaps regexps such as `ffap-gopher-regexp` could be
>>> avoided when possible in emacs source code.
>>
>> Ah, so by "crash" you meant throw an error.
>
> I had the both, a crash on emacs-26, emacs taking all memory and finally
> crashing and on emacs-24.5 "Stack overflow in regexp matcher".

Hmm, well I've meanwhile merged the fix for the regex stack limit, if
you can still crash emacs this way, open a new bug.

>
>
>> Right, and ffap-gopher-at-point is also using `set' on local variables,
>> icky.  Here's a patch:
>
> I don't know `let-alist`, but looks good, however keeping
> `ffap-gopher-regexp` instead of hardcoding it and returning nil when the
> regexp is nil would allow users to disable the feature.

Makes sense, here's an update:

[v2-0001-Improve-ffap-gopher-at-point-handling-of-long-lin.patch (text/x-diff, inline)]
From 93875e1d9dba4509ddd18ade9b09bf6b258d2174 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sun, 8 Jan 2017 18:19:32 -0500
Subject: [PATCH v2] Improve ffap-gopher-at-point handling of long lines

* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.
---
 lisp/ffap.el            | 61 +++++++++++++++++++++++++------------------------
 test/lisp/ffap-tests.el | 15 ++++++++++++
 2 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 8144d41..bcc8911 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1194,9 +1194,18 @@ ffap-url-at-point
           val))))
 
 (defvar ffap-gopher-regexp
-  "^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$"
-  "Regexp matching a line in a gopher bookmark (maybe indented).
-The two subexpressions are the KEY and VALUE.")
+  "\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *"
+  "Regexp matching a key in a gopher bookmark.")
+
+(defun ffap--gopher-var-on-line ()
+  "Return (KEY . VALUE) of gopher bookmark on current line."
+  (save-excursion
+    (let ((eol (progn (end-of-line) (skip-chars-backward " ") (point)))
+          (bol (progn (beginning-of-line) (point))))
+     (when (re-search-forward ffap-gopher-regexp eol t)
+       (let ((key (match-string 1))
+             (val (buffer-substring-no-properties (match-end 0) eol)))
+         (cons (intern (downcase key)) val))))))
 
 (defun ffap-gopher-at-point ()
   "If point is inside a gopher bookmark block, return its URL.
@@ -1204,33 +1213,25 @@ ffap-gopher-at-point
 Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any."
   ;; `gopher-parse-bookmark' from gopher.el is not so robust
   (save-excursion
-    (beginning-of-line)
-    (if (looking-at ffap-gopher-regexp)
-	(progn
-	  (while (and (looking-at ffap-gopher-regexp) (not (bobp)))
-	    (forward-line -1))
-	  (or (looking-at ffap-gopher-regexp) (forward-line 1))
-          (setq ffap-string-at-point-region (list (point) (point)))
-	  (let ((type "1") path host (port "70"))
-	    (while (looking-at ffap-gopher-regexp)
-	      (let ((var (intern
-			  (downcase
-			   (buffer-substring (match-beginning 1)
-					     (match-end 1)))))
-		    (val (buffer-substring (match-beginning 2)
-					   (match-end 2))))
-		(set var val)
-		(forward-line 1)))
-            (setcdr ffap-string-at-point-region (list (point)))
-	    (if (and path (string-match "^ftp:.*@" path))
-		(concat "ftp://"
-			(substring path 4 (1- (match-end 0)))
-			(substring path (match-end 0)))
-	      (and (= (length type) 1)
-		   host;; (ffap-machine-p host)
-		   (concat "gopher://" host
-			   (if (equal port "70") "" (concat ":" port))
-			   "/" type path))))))))
+    (let* ((beg (progn (beginning-of-line)
+                       (while (and (not (bobp)) (ffap--gopher-var-on-line))
+                         (forward-line -1))
+                       (point)))
+           (bookmark (cl-loop for keyval = (ffap--gopher-var-on-line)
+                              while keyval collect keyval
+                              do (forward-line 1))))
+      (when bookmark
+        (setq ffap-string-at-point-region (list beg (point)))
+        (let-alist (nconc bookmark '((type . "1") (port . "70")))
+          (if (and .path (string-match "\\`ftp:.*@" .path))
+              (concat "ftp://"
+                      (substring .path 4 (1- (match-end 0)))
+                      (substring .path (match-end 0)))
+            (and (= (length .type) 1)
+                 .host ;; (ffap-machine-p host)
+                 (concat "gopher://" .host
+                         (if (equal .port "70") "" (concat ":" .port))
+                         "/" .type .path))))))))
 
 (defvar ffap-ftp-sans-slash-regexp
   (and
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 1ba5f86..f3414ac 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -49,6 +49,21 @@
               (should (equal '(1 1) ffap-string-at-point-region)))))
       (and (file-exists-p file) (delete-file file)))))
 
+(ert-deftest ffap-gopher-at-point ()
+  (with-temp-buffer
+    (insert "\
+Type = 1
+Name = foo
+Path = /the/path
+Port = 7070
+Host = example.com\n")
+    (should-not (ffap-gopher-at-point))
+    (goto-char (point-min))
+    (should (equal (ffap-gopher-at-point)
+                   "gopher://example.com:7070/1/the/path"))
+    (should (equal ffap-string-at-point-region
+                   (list (point-min) (point-max))))))
+
 (provide 'ffap-tests)
 
 ;;; ffap-tests.el ends here
-- 
2.9.3


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Tue, 10 Jan 2017 07:18:01 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: npostavs <at> users.sourceforge.net
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Tue, 10 Jan 2017 08:17:27 +0100
npostavs <at> users.sourceforge.net writes:

> Hmm, well I've meanwhile merged the fix for the regex stack limit, if
> you can still crash emacs this way, open a new bug.

Ok.

>> I don't know `let-alist`, but looks good, however keeping
>> `ffap-gopher-regexp` instead of hardcoding it and returning nil when the
>> regexp is nil would allow users to disable the feature.
>
> Makes sense, here's an update:

Thanks, however AFAIU your patch, when `ffap-gopher-regexp` is nil,
`ffap-gopher-at-point` will return with an error but not nil isn't it ?


-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Tue, 10 Jan 2017 13:37:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Tue, 10 Jan 2017 08:37:20 -0500
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

>>> I don't know `let-alist`, but looks good, however keeping
>>> `ffap-gopher-regexp` instead of hardcoding it and returning nil when the
>>> regexp is nil would allow users to disable the feature.
>>
>> Makes sense, here's an update:
>
> Thanks, however AFAIU your patch, when `ffap-gopher-regexp` is nil,
> `ffap-gopher-at-point` will return with an error but not nil isn't it ?

Yes, although that's also true before my patch.  So `ffap-gopher-regexp'
never actually supported being changed.  I'm not sure if it's a good
idea to add support for that.

[v3-0001-Improve-ffap-gopher-at-point-handling-of-long-lin.patch (text/x-diff, inline)]
From ed145acaeb5446e004fc6a38ff6411967a6a2222 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sun, 8 Jan 2017 18:19:32 -0500
Subject: [PATCH v3] Improve ffap-gopher-at-point handling of long lines

* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.
---
 lisp/ffap.el            | 64 +++++++++++++++++++++++++------------------------
 test/lisp/ffap-tests.el | 17 +++++++++++++
 2 files changed, 50 insertions(+), 31 deletions(-)

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 8144d41..182694a 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1194,43 +1194,45 @@ ffap-url-at-point
           val))))
 
 (defvar ffap-gopher-regexp
-  "^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$"
-  "Regexp matching a line in a gopher bookmark (maybe indented).
-The two subexpressions are the KEY and VALUE.")
+  "\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *"
+  "Regexp matching a key in a gopher bookmark.")
+
+(defun ffap--gopher-var-on-line ()
+  "Return (KEY . VALUE) of gopher bookmark on current line."
+  (save-excursion
+    (let ((eol (progn (end-of-line) (skip-chars-backward " ") (point)))
+          (bol (progn (beginning-of-line) (point))))
+     (when (re-search-forward ffap-gopher-regexp eol t)
+       (let ((key (match-string 1))
+             (val (buffer-substring-no-properties (match-end 0) eol)))
+         (cons (intern (downcase key)) val))))))
 
 (defun ffap-gopher-at-point ()
   "If point is inside a gopher bookmark block, return its URL.
 
 Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any."
   ;; `gopher-parse-bookmark' from gopher.el is not so robust
-  (save-excursion
-    (beginning-of-line)
-    (if (looking-at ffap-gopher-regexp)
-	(progn
-	  (while (and (looking-at ffap-gopher-regexp) (not (bobp)))
-	    (forward-line -1))
-	  (or (looking-at ffap-gopher-regexp) (forward-line 1))
-          (setq ffap-string-at-point-region (list (point) (point)))
-	  (let ((type "1") path host (port "70"))
-	    (while (looking-at ffap-gopher-regexp)
-	      (let ((var (intern
-			  (downcase
-			   (buffer-substring (match-beginning 1)
-					     (match-end 1)))))
-		    (val (buffer-substring (match-beginning 2)
-					   (match-end 2))))
-		(set var val)
-		(forward-line 1)))
-            (setcdr ffap-string-at-point-region (list (point)))
-	    (if (and path (string-match "^ftp:.*@" path))
-		(concat "ftp://"
-			(substring path 4 (1- (match-end 0)))
-			(substring path (match-end 0)))
-	      (and (= (length type) 1)
-		   host;; (ffap-machine-p host)
-		   (concat "gopher://" host
-			   (if (equal port "70") "" (concat ":" port))
-			   "/" type path))))))))
+  (when (stringp ffap-gopher-regexp)
+    (save-excursion
+      (let* ((beg (progn (beginning-of-line)
+                         (while (and (not (bobp)) (ffap--gopher-var-on-line))
+                           (forward-line -1))
+                         (point)))
+             (bookmark (cl-loop for keyval = (ffap--gopher-var-on-line)
+                                while keyval collect keyval
+                                do (forward-line 1))))
+        (when bookmark
+          (setq ffap-string-at-point-region (list beg (point)))
+          (let-alist (nconc bookmark '((type . "1") (port . "70")))
+            (if (and .path (string-match "\\`ftp:.*@" .path))
+                (concat "ftp://"
+                        (substring .path 4 (1- (match-end 0)))
+                        (substring .path (match-end 0)))
+              (and (= (length .type) 1)
+                   .host ;; (ffap-machine-p host)
+                   (concat "gopher://" .host
+                           (if (equal .port "70") "" (concat ":" .port))
+                           "/" .type .path)))))))))
 
 (defvar ffap-ftp-sans-slash-regexp
   (and
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 1ba5f86..a3fe350 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -49,6 +49,23 @@
               (should (equal '(1 1) ffap-string-at-point-region)))))
       (and (file-exists-p file) (delete-file file)))))
 
+(ert-deftest ffap-gopher-at-point ()
+  (with-temp-buffer
+    (insert "\
+Type = 1
+Name = foo
+Path = /the/path
+Port = 7070
+Host = example.com\n")
+    (should-not (ffap-gopher-at-point))
+    (goto-char (point-min))
+    (should (equal (ffap-gopher-at-point)
+                   "gopher://example.com:7070/1/the/path"))
+    (should (equal ffap-string-at-point-region
+                   (list (point-min) (point-max))))
+    (let ((ffap-gopher-regexp nil))
+      (should-not (ffap-gopher-at-point)))))
+
 (provide 'ffap-tests)
 
 ;;; ffap-tests.el ends here
-- 
2.9.3


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Tue, 10 Jan 2017 14:43:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: npostavs <at> users.sourceforge.net
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Tue, 10 Jan 2017 15:42:22 +0100
npostavs <at> users.sourceforge.net writes:

> Yes, although that's also true before my patch.  So `ffap-gopher-regexp'
> never actually supported being changed.  I'm not sure if it's a good
> idea to add support for that.

I think it is, gopher is not widely used AFAIK, and allowing disabling
it would avoid needless search in most cases, thus it make it consistent
with other ffap* fns that can be disabled; I have a lot of complains at
helm with ffap annoyances and having more flexibility on this is interesting.
 
> +  (when (stringp ffap-gopher-regexp)

That's what I expected.

Thanks.

-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sat, 14 Jan 2017 02:25:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Fri, 13 Jan 2017 21:25:54 -0500
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> npostavs <at> users.sourceforge.net writes:
>
>> Yes, although that's also true before my patch.  So `ffap-gopher-regexp'
>> never actually supported being changed.  I'm not sure if it's a good
>> idea to add support for that.
>
> I think it is, gopher is not widely used AFAIK, and allowing disabling
> it would avoid needless search in most cases, thus it make it consistent
> with other ffap* fns that can be disabled; I have a lot of complains at
> helm with ffap annoyances and having more flexibility on this is interesting.

Oh, yes, if the other regexps can be disabled like that, we should make it
consistent.  I've added a note about it to the docstring and toplevel
comments; I'll push to master in a couple of days.

[v4-0001-Improve-ffap-gopher-at-point-handling-of-long-lin.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sat, 14 Jan 2017 06:57:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5;
 ffap-guesser "stack overflow in regexp matcher" error may crash emacs.
Date: Sat, 14 Jan 2017 01:57:40 -0500
[Message part 1 (text/plain, inline)]
npostavs <at> users.sourceforge.net writes:

>  (defvar ffap-gopher-regexp
> -  "^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$"
> -  "Regexp matching a line in a gopher bookmark (maybe indented).
> -The two subexpressions are the KEY and VALUE.")
> +  "\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *"
> +  "Regexp matching a key in a gopher bookmark.
> +Set to nil to disable matching gopher bookmarks."

Oops, lost a close paren.

[v5-0001-Improve-ffap-gopher-at-point-handling-of-long-lin.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sat, 14 Jan 2017 14:45:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5; ffap-guesser "stack overflow in regexp matcher"
 error may crash emacs.
Date: Sat, 14 Jan 2017 09:43:56 -0500
On Sat, Jan 14, 2017 at 3:29 AM, Thierry Volpiatto
<thierry.volpiatto <at> gmail.com> wrote:
>
> npostavs <at> users.sourceforge.net writes:
>
>> Oh, yes, if the other regexps can be disabled like that, we should make it
>> consistent.  I've added a note about it to the docstring and toplevel
>> comments; I'll push to master in a couple of days.
>
> Great thanks, perhaps you can notify also about ffap-alist==nil which
> helps too to disable ffap.

There is already this at the top of the file:

;; (setq ffap-alist nil)                ; faster, dumber prompting

Did you have something else in mind?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25391; Package emacs. (Sun, 15 Jan 2017 19:09:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 25391 <at> debbugs.gnu.org
Subject: Re: bug#25391: 24.5; ffap-guesser "stack overflow in regexp matcher"
 error may crash emacs.
Date: Sun, 15 Jan 2017 14:08:15 -0500
tag 25391 fixed
close 25391 26.1
quit

On Sat, Jan 14, 2017 at 12:05 PM, Thierry Volpiatto
<thierry.volpiatto <at> gmail.com> wrote:
>
>>>
>>> Great thanks, perhaps you can notify also about ffap-alist==nil which
>>> helps too to disable ffap.
>>
>> There is already this at the top of the file:
>>
>> ;; (setq ffap-alist nil)                ; faster, dumber prompting
>
> Ah, good sorry I mess it.
>
>> Did you have something else in mind?
>
> No, think it's good now.
>
> Thanks.
>
> --
> Thierry

I've pushed to master [1: fd6b829]

1: 2017-01-15 13:04:54 -0500 fd6b829d91da73a945643b5916ee6d79c992e030
  Improve ffap-gopher-at-point handling of long lines




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sun, 15 Jan 2017 19:09:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 25391 <at> debbugs.gnu.org and Thierry Volpiatto <thierry.volpiatto <at> gmail.com> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Sun, 15 Jan 2017 19:09:03 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. (Mon, 13 Feb 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 129 days ago.

Previous Next


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