From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick.r.chiang@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#44048: 27.1; [PATCH] ffap-gopher-at-point infinite loop Date: Sat, 17 Oct 2020 17:23:38 -0400 Message-ID: <87wnzoh7hh.fsf@dick> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24225"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: 44048@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 17 23:24:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTtgZ-0006Dv-GR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 23:24:19 +0200 Original-Received: from localhost ([::1]:34242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTtgY-0006TE-FD for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 17:24:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTtgK-0006RO-Lm for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 17:24:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTtgI-0001eW-CW for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 17:24:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTtgI-0007Cz-8u for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 17:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dick.r.chiang@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Oct 2020 21:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44048 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160296982927685 (code B ref -1); Sat, 17 Oct 2020 21:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Oct 2020 21:23:49 +0000 Original-Received: from localhost ([127.0.0.1]:35671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTtg4-0007CS-F4 for submit@debbugs.gnu.org; Sat, 17 Oct 2020 17:23:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTtg2-0007CK-If for submit@debbugs.gnu.org; Sat, 17 Oct 2020 17:23:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTtg1-0006Gn-4g for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 17:23:46 -0400 Original-Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]:41177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTtfy-0001cL-K2 for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 17:23:44 -0400 Original-Received: by mail-il1-x12e.google.com with SMTP id w17so6524705ilg.8 for ; Sat, 17 Oct 2020 14:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=C3aclyMIGq12Fjv38q7gk5UXYjq6NQ34deaMUpxhLGg=; b=RcHNGgPTmHEX0SpxTXXMt5aUvtC9+quCQfrFDIj40+9wORskTXDRUc0QgIHuZ1avoj Ara1vyYo0V65jpmgxuIEwTnD9xXBeHgrpM+VOJq5Mpf54Vp0HVP7WPr04YnY9Aogw2UD VIKh1WDbcsNC6x28voWKyjaH7HkWEC0dR9bsrHuB2T/313/6Ovk2aZAZb/yttyoGyYcI XycT1EB6mtaEiAlc6I+bjL+REeyz3Ut0ImBcTb0l3GAHepmOVeyy1xJILrNnNw1utdh4 X1WJSo7ckZ+mMtjopPS9x0o9F74NAvi9mbMo/ux/+QXBhQ0U+enhYeO9BgGKigwcC9W5 dWWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=C3aclyMIGq12Fjv38q7gk5UXYjq6NQ34deaMUpxhLGg=; b=fGg919VPAG6riOvN7zwLJya26bNEX0KNlgzwOls0/ijhyGvVE6uhwgbXW4LAt8JB3e fkA9XR0MaLc8RWMqY0A+QO3GJUW9Ztyj7k44v57TukpydBeNKHFSue2CUV69RTgfGLkO XO/Pfq2QHSbF/q9n8V0SCyTHmmbqEsDDaGnghalHZliRAfkGKodUyV2sooese7v7UNA5 y/n/tuoSuTyQbQV2FRDdxo7PAHpBcmU6lhbp+0aZajBpIz9iQ255IXdtuSdALIiSZC8o jJoFOJDY2Yf4Epo1504HP6V8E51Y9Hnw+JVBRVBTC68aS+SuAZuHOV4MlvDj5Zt+fLIL GYmA== X-Gm-Message-State: AOAM531kSNYIR03mfhet239lUIg72QX5K83Jj1hgE6FDhuSVo7X6qiwS s1Bf5Xe1Iidi5ghhFTPEusjoSXhFM1M= X-Google-Smtp-Source: ABdhPJxjcCckUSpDp0rEAg6xcIE46luZl2kTDmScy/nmoHa4uLGyVwVpy+t+TwyCfwS5QdBip1Vwqw== X-Received: by 2002:a92:9a04:: with SMTP id t4mr7020925ili.268.1602969820115; Sat, 17 Oct 2020 14:23:40 -0700 (PDT) Original-Received: from localhost (pool-108-30-234-29.nycmny.fios.verizon.net. [108.30.234.29]) by smtp.gmail.com with ESMTPSA id 18sm5621707ilg.3.2020.10.17.14.23.38 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Oct 2020 14:23:39 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::12e; envelope-from=dick.r.chiang@gmail.com; helo=mail-il1-x12e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190839 Archived-At: --=-=-= Content-Type: text/plain emacs -Q --batch -l ffap --eval "(with-temp-buffer (save-excursion (insert \"type=\")) (ffap-guess-file-name-at-point))" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ffap-gopher-at-point-interminable-without-newlines.patch >From 3fb3caa6a8633a4e36a3af094bce0b07c3e9aac1 Mon Sep 17 00:00:00 2001 From: dickmao Date: Sat, 17 Oct 2020 17:19:04 -0400 Subject: [PATCH] `ffap-gopher-at-point` interminable without newlines * lisp/ffap.el (ffap-gopher-at-point): Check for eobp. * test/lisp/ffap-tests.el (ffap-test-no-newlines): Ensure termination for corner case. --- lisp/ffap.el | 3 ++- test/lisp/ffap-tests.el | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ffap.el b/lisp/ffap.el index ccba291144..2c1d3d5bd9 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1383,7 +1383,8 @@ ffap-gopher-at-point (point))) (bookmark (cl-loop for keyval = (ffap--gopher-var-on-line) while keyval collect keyval - do (forward-line 1)))) + do (forward-line 1) + until (eobp)))) (when bookmark (setq ffap-string-at-point-region (list beg (point))) (let-alist (nconc bookmark '((type . "1") (port . "70"))) diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el index e8c12669c1..ca8c10831f 100644 --- a/test/lisp/ffap-tests.el +++ b/test/lisp/ffap-tests.el @@ -117,6 +117,12 @@ ffap-test-with-spaces t "C:\\temp\\program.log on Windows or /var/log/program.log on Unix.") "\\temp\\program.log"))) +(ert-deftest ffap-test-no-newlines () + (should-not + (with-temp-buffer + (save-excursion (insert "type=")) + (ffap-guess-file-name-at-point)))) + (provide 'ffap-tests) ;;; ffap-tests.el ends here -- 2.26.2 --=-=-= Content-Type: text/plain In GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2020-09-20 built on dick Repository revision: dff02e85245dfbbeea7d57dc1a753a9ba24616d5 Repository branch: gnus-dev-27 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.4 LTS Recent messages: 20201017T172001.512> nnhackernews-request-group: 211 22898 1 22898 news 20201017T172001.513> Fetching headers for nnhackernews:news... 20201017T172002.226> Fetching headers for nnhackernews:news...done 20201017T172002.248> Scoring... 20201017T172002.303> Scoring...done 20201017T172002.311> Generating summary... 20201017T172002.628> Generating summary...done 20201017T172002.629> Processing kill file /home/dick/News/nnhackernews:news.KILL... 20201017T172002.664> Processing kill file /home/dick/News/nnhackernews:news.KILL...done 20201017T172002.682> Retrieving newsgroup: nnhackernews:news...done Configured using: 'configure --prefix=/home/dick/.local --with-rsvg=yes --with-xml2=yes PKG_CONFIG_PATH=/home/dick/.local/lib/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: nntwitter-group-mode: t nnreddit-group-mode: t gnus-topic-mode: t gnus-undo-mode: t show-paren-mode: t global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t flx-ido-mode: t projectile-mode: t ido-everywhere: t override-global-mode: t shell-dirtrack-mode: t beacon-mode: t global-hl-line-mode: t winner-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-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 buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/dick/ESS/lisp/obsolete/ess-swv hides /home/dick/ESS/lisp/ess-swv /home/dick/ESS/lisp/obsolete/ess-rutils hides /home/dick/ESS/lisp/ess-rutils /home/dick/ESS/lisp/obsolete/ess-noweb hides /home/dick/ESS/lisp/ess-noweb /home/dick/ESS/lisp/obsolete/mouseme hides /home/dick/ESS/lisp/mouseme /home/dick/ESS/lisp/obsolete/ess-mouse hides /home/dick/ESS/lisp/ess-mouse /home/dick/ESS/lisp/obsolete/ess-noweb-mode hides /home/dick/ESS/lisp/ess-noweb-mode /home/dick/ESS/lisp/obsolete/make-regexp hides /home/dick/ESS/lisp/make-regexp /home/dick/ESS/lisp/obsolete/ess-r-a hides /home/dick/ESS/lisp/ess-r-a /home/dick/ESS/lisp/obsolete/ess-noweb-font-lock-mode hides /home/dick/ESS/lisp/ess-noweb-font-lock-mode /home/dick/gomacro-mode/gomacro-mode hides /home/dick/.emacs.d/elpa/gomacro-mode-20200326.1103/gomacro-mode /home/dick/ESS/lisp/julia-mode-latexsubs hides /home/dick/.emacs.d/elpa/julia-mode-20200717.1915/julia-mode-latexsubs /home/dick/ESS/lisp/julia-mode hides /home/dick/.emacs.d/elpa/julia-mode-20200717.1915/julia-mode /home/dick/.emacs.d/elpa/hydra-20170924.2259/lv hides /home/dick/.emacs.d/elpa/lv-20191106.1238/lv /home/dick/melpa-stats/melpa-stats hides /home/dick/.emacs.d/elpa/melpa-stats-20190720.1833/melpa-stats /home/dick/.emacs.d/elpa/async-20200113.1745/async-autoloads hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-autoloads /home/dick/.emacs.d/elpa/async-20200113.1745/async-bytecomp hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-bytecomp /home/dick/.emacs.d/elpa/async-20200113.1745/smtpmail-async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/smtpmail-async /home/dick/.emacs.d/elpa/async-20200113.1745/dired-async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/dired-async /home/dick/.emacs.d/elpa/async-20200113.1745/async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async /home/dick/.emacs.d/elpa/async-20200113.1745/async-pkg hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-pkg /home/dick/.emacs.d/lisp/json hides /home/dick/.local/share/emacs/27.1/lisp/json /home/dick/.emacs.d/elpa/map-2.1/map hides /home/dick/.local/share/emacs/27.1/lisp/emacs-lisp/map Features: (shadow emacsbug eieio-opt speedbar sb-image ezimage dframe help-fns radix-tree cl-print debug backtrace find-func misearch multi-isearch supercite regi canlock bbdb-message sendmail flyspell ispell footnote gravatar jka-compr shr-color color eww flow-fill url-queue mule-util sort smiley mail-extr qp gnus-notifications gnus-fun notifications dbus gnus-kill gnus-async gnus-dup gnus-ml disp-table utf-7 mm-archive network-stream url-cache nnrss nndiscourse rbenv nnhackernews nntwitter nntwitter-api nnreddit gnus-topic url-http url-auth url-gw nsm request virtualenvwrapper gud s mm-url json-rpc python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp gnus-bcklg gnus-cite nnfolder bbdb-gnus nnnil nnir gnus-demon nnmairix nnml bbdb-mua bbdb-com bbdb bbdb-site timezone gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr svg dom nndraft nnmh gnus-group gnus-undo use-package use-package-delight use-package-diminish gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win paredit-ext paredit dired-x inf-ruby ruby-mode smie melpa-stats ht dash-functional anaphora a pp sx key-combo company haskell-interactive-mode haskell-presentation-mode haskell-process haskell-session haskell-compile haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme rx haskell-align-imports haskell-complete-module haskell-ghc-support etags fileloop generator dabbrev haskell-customize hydra lv use-package-ensure paren magit-patch-changelog magit-patch magit-submodule magit-obsolete magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rmc dired dired-loaddefs rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async pcase server dash flx-ido flx solarized-theme solarized-definitions projectile ibuf-ext ibuffer ibuffer-loaddefs grep gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr google-translate-default-ui google-translate-core-ui ido google-translate-core google-translate-tk google-translate-backend use-package-bind-key bind-key auto-complete popup cus-edit cus-start cus-load wid-edit ess-r-mode ess-r-flymake flymake-proc flymake warnings thingatpt ess-r-xref xref ess-trns ess-r-package shell pcomplete ess-r-completion ess-roxy ess-r-syntax ess-rd noutline outline easy-mmode hideshow ess-s-lang ess-help ess-mode ess-inf project format-spec ess-tracebug ess ess-utils ess-custom compile comint ansi-color emms-player-mplayer emms-player-simple emms emms-compat twittering-mode epa derived epg epg-config tls gnutls puny url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap advice xml cl fzf cl-extra help-mode use-package-core beacon hl-line winner ring finder-inf howdoyou-autoloads json-reformat-autoloads json-snatcher-autoloads edmacro kmacro sml-mode-autoloads tornado-template-mode-autoloads info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded 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 threads dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 2543991 286262) (symbols 48 45425 414) (strings 32 396958 83666) (string-bytes 1 22047944) (vectors 16 81124) (vector-slots 8 2636593 288038) (floats 8 3674 5680) (intervals 56 246857 19916) (buffers 1000 273)) --=-=-=--