From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#6106: 24.0.50; info.el adds 'search-failed to debug-ignored-errors Date: Thu, 23 Mar 2017 23:58:28 -0400 Message-ID: <87vaqz2umz.fsf@users.sourceforge.net> References: <87fw8bt721.fsf@mail.jurta.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1490327899 27105 195.159.176.226 (24 Mar 2017 03:58:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Mar 2017 03:58:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 6106@debbugs.gnu.org, Helmut Eller To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 24 04:58:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crGMZ-0005p2-K9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Mar 2017 04:58:07 +0100 Original-Received: from localhost ([::1]:59742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crGMf-0003dr-HM for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 23:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crGMX-0003cU-K6 for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 23:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crGMU-0000p5-Br for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 23:58:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crGMU-0000p1-81 for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 23:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1crGMU-0006VE-0c for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 23:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Mar 2017 03:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6106 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6106-submit@debbugs.gnu.org id=B6106.149032783424937 (code B ref 6106); Fri, 24 Mar 2017 03:58:01 +0000 Original-Received: (at 6106) by debbugs.gnu.org; 24 Mar 2017 03:57:14 +0000 Original-Received: from localhost ([127.0.0.1]:41620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crGLi-0006U3-4P for submit@debbugs.gnu.org; Thu, 23 Mar 2017 23:57:14 -0400 Original-Received: from mail-it0-f54.google.com ([209.85.214.54]:36593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crGLf-0006Ti-Co; Thu, 23 Mar 2017 23:57:11 -0400 Original-Received: by mail-it0-f54.google.com with SMTP id w124so3183393itb.1; Thu, 23 Mar 2017 20:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7WI5zXZnp9Ggmq0CAxxIbiM4ZF9N/x/eibPFshN6yBg=; b=m27XEanehEBlwwmE5XJnVAkb2wItzNXCPXTVsGG4d/+G+fdovtXny+BC3FTOAT0g29 E/VnrqNHl1qnQh86no46T4HHcO95RtHXdaxlez7zlSowL+mMriFBAabegzCI05Qpbzcw D7MrofiTTK5LnEaOZcwMpV332Pg8BI2ywzfEMvpYUpAxo6aDdn6+bFJM+Dui3wkdf4q+ rKEzYPIgsJrFLAkRs08OaDH4uEUgw/N74KzYv5DNGIfCUW8gcz8umhVoyR5Ag534cDTz HumBu+5qhgoSbzqovAmbtVs/skQD5Cvq7dRXC7sSPb4Cl9P8ER5bfR7tk/Rxe3f1/DDN qJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=7WI5zXZnp9Ggmq0CAxxIbiM4ZF9N/x/eibPFshN6yBg=; b=YsWIi4ssl986o1VB8P4jvBaobQj10W6j44yov73FV50IuxAo2kvbG/bbSMM1Z5ZrfD uEhyTu5B5wdl99hQifRq5EFEDaX821L5LaVAc4xurm77ha7vXy7+dmPcsKNgvE+E2ZXk 3voJB7+6YpyPP2iS1utBaWCRXwUppZE/EVJ2hJTnQNkEqO57sJcE9q//7rg5Mjo0W3Kp nwlPqcDD2YLOyMdSar7CgOszv/zI7EQmvq4fvFW9N9lsFdbvPUbWrsBI7F5lUMxcSEIS DkUdxjYJkox8m72ihgxjnkVLcng37SQzWestjKSxILEdxmANJvm89WQarB6B1qDQqqmy CXew== X-Gm-Message-State: AFeK/H3JQIdTpgnQDAbGHQ/T7PGT0rtl+lbPNXSuKrBUOjpANrLFliLDEGQyo4uKTKOq6A== X-Received: by 10.36.43.194 with SMTP id h185mr1140758ita.121.1490327825784; Thu, 23 Mar 2017 20:57:05 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p191sm435065itc.4.2017.03.23.20.57.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Mar 2017 20:57:05 -0700 (PDT) In-Reply-To: <87fw8bt721.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 29 Jul 2012 09:32:22 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130863 Archived-At: --=-=-= Content-Type: text/plain tags 6106 patch quit Juri Linkov writes: > `search-failed' is added to `debug-ignored-errors' in info.el > to not enter the debugger when a normal search stops with no results. > > But this error is raised by `xsignal1 (Qsearch_failed, string)' > in `re-search-forward' (called from `Info-search'), > so I see no way to replace it with a call to the new function > `user-error' (or the same function with any other name). Use the NOERROR parameter? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Don-t-add-search-failed-to-ignored-errors-in-info.patch Content-Description: patch >From f0b7b943368e9856dda49c3bdb862c1940266189 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 23 Mar 2017 23:54:58 -0400 Subject: [PATCH v1] Don't add `search-failed' to ignored errors in info.el (Bug#6106) * lisp/info.el: Stop adding `search-failed' to `debug-ignored-errors'. (Info-select-node, Info-search): Replace (signal 'search-failed ...) with (user-error "Search failed: "...). --- lisp/info.el | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 8dc85f48a4..a06c868fb3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1672,7 +1672,7 @@ Info-select-node (forward-line 2) (if (looking-at "\^_") (forward-line 1) - (signal 'search-failed (list "\n\^_")))) + (user-error "Search failed: `\n\^_'"))) ;; Get nodename spelled as it is in the node. (re-search-forward "Node:[ \t]*") (setq Info-current-node @@ -1998,19 +1998,20 @@ Info-search Info-isearch-initial-node bound (and found (> found opoint-min) (< found opoint-max))) - (signal 'search-failed (list regexp "end of node"))) + (user-error "Search failed: `%s' (end of node)" regexp)) ;; If no subfiles, give error now. (unless (or found Info-current-subfile) (if isearch-mode - (signal 'search-failed (list regexp "end of manual")) + (user-error "Search failed: `%s' (end of manual)" regexp) (let ((search-spaces-regexp Info-search-whitespace-regexp)) - (if backward - (re-search-backward regexp) - (re-search-forward regexp))))) + (unless (if backward + (re-search-backward regexp nil t) + (re-search-forward regexp nil t)) + (user-error "Search failed: `%s'" regexp))))) (if (and bound (not found)) - (signal 'search-failed (list regexp))) + (user-error "Search failed: `%s'" regexp)) (unless (or found bound) (unwind-protect @@ -2054,9 +2055,8 @@ Info-search (setq list nil))) (if found (message "") - (signal 'search-failed (if isearch-mode - (list regexp "end of manual") - (list regexp))))) + (user-error "Search failed: `%s'%s" + regexp (if isearch-mode " (end of manual)" "")))) (if (not found) (progn (Info-read-subfile osubfile) (goto-char opoint) @@ -5237,9 +5237,6 @@ Info-speedbar-buttons (erase-buffer)) (Info-speedbar-hierarchy-buttons nil 0)) -;; FIXME: Really? Why here? -(add-to-list 'debug-ignored-errors 'search-failed) - ;;;; Desktop support (defun Info-desktop-buffer-misc-data (_desktop-dirname) -- 2.11.1 --=-=-=--