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: Sat, 01 Apr 2017 09:43:59 -0400 Message-ID: <87k2741bvk.fsf@users.sourceforge.net> References: <87fw8bt721.fsf@mail.jurta.org> <87vaqz2umz.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1491054200 18982 195.159.176.226 (1 Apr 2017 13:43:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Apr 2017 13:43:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: Mark Oteiza , 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 Sat Apr 01 15:43:10 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 1cuJJ5-0003jD-Gt for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Apr 2017 15:43:07 +0200 Original-Received: from localhost ([::1]:51378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuJJB-0006t4-Dt for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Apr 2017 09:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuJJ5-0006sn-Aa for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 09:43:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuJJ2-0004x8-4V for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 09:43:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuJJ0-0004wZ-RX for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 09:43:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cuJJ0-0007jb-E4 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2017 09:43: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: Sat, 01 Apr 2017 13:43:02 +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: fixed patch Original-Received: via spool by 6106-submit@debbugs.gnu.org id=B6106.149105416429705 (code B ref 6106); Sat, 01 Apr 2017 13:43:02 +0000 Original-Received: (at 6106) by debbugs.gnu.org; 1 Apr 2017 13:42:44 +0000 Original-Received: from localhost ([127.0.0.1]:55185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuJIi-0007j3-2W for submit@debbugs.gnu.org; Sat, 01 Apr 2017 09:42:44 -0400 Original-Received: from mail-io0-f180.google.com ([209.85.223.180]:34924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuJIh-0007ir-2p for 6106@debbugs.gnu.org; Sat, 01 Apr 2017 09:42:43 -0400 Original-Received: by mail-io0-f180.google.com with SMTP id z13so54263868iof.2 for <6106@debbugs.gnu.org>; Sat, 01 Apr 2017 06:42:43 -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=RxtANvzUWHfknVf8hHaPL2ijlpLVfBH115GGZSH9vJk=; b=SOJ9oMQcbDtkR/PawGeXuvyY1V9iOtEaf6DdXQET3pmouA6TWdDJb5h/i66ivxPQcR HP96lQCJdhee8iYcoGc+NoBLHJ9gr5YlJ4xB63Re30qlKV/4eGJUN5klvvGSAsKLJbne BwPtxgn8vvvfPfXT6uZEdnNXMJ/v3PuozkeTlwcKwDNXwFtJEP4SAx7Z7tgdF9yemoP3 1Iei08Xt6Lsr5JUgaWZFcn0yNHIo0G3wTPRjUMnZ1KHsR4pAq4rTZTeYo02bRJht4QAp 8zNjX6o7P+leLlzkPC3zb6xoftImsgrPlqi0UqxJW484HoRNQpQIleIO4WzsFWITWyyn nEJA== 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=RxtANvzUWHfknVf8hHaPL2ijlpLVfBH115GGZSH9vJk=; b=EzFyh5LJWaNzf1izYe/nXmR6W/je5Ab4/Xuj8RlMySks9Fc3W70S7rp8pRtjqYp6Cy 2esUe+T4yOw5WB9l1Gm3ptXr5yBcerYF0+H/hMO/ciR2pebmlFtxofvpTuT5l6v0JzeM S/lFy+tsWjGtUa+6HiRHJZ0rZhV9k/Kc+FL4qu3ldwTTnZOTXRzXJP5ZiiDSOXCvF4C4 a6II6uAISbW5KPjw6ttLKsx9BUgk/5Vx3SCbxiqeHfYqe06KyaPA17MMq0YNiMqTviSK dK3WwV71+QhESLeXAnMjlS6wI8yi4CrNqlZKnP8UAaLqp8GqtIfHTJD1avIojnTLbaeI K0dg== X-Gm-Message-State: AFeK/H19jPEwjZN3L4qPIvF5THb388lnnCqaYB6ryepS2gnAieSiQ8dFF8iVqFTqh5j9nw== X-Received: by 10.107.189.68 with SMTP id n65mr8588422iof.154.1491054157419; Sat, 01 Apr 2017 06:42:37 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 78sm2948659ity.7.2017.04.01.06.42.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Apr 2017 06:42:36 -0700 (PDT) In-Reply-To: <87vaqz2umz.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Thu, 23 Mar 2017 23:58:28 -0400") 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:131171 Archived-At: --=-=-= Content-Type: text/plain npostavs@users.sourceforge.net writes: > (Info-select-node, Info-search): Replace (signal 'search-failed ...) > with (user-error "Search failed: "...). Turns out this breaks isearch over multiple nodes, as noted by Mark Oteiza in [1]. I believe this is fixed by the patch below. [1]: http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00869.html --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Throw-a-search-failed-derived-error-in-Info-searc.patch Content-Description: patch >From 2cb893febdf06282c1183b3e4f4de8728bbe44b9 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 1 Apr 2017 09:34:04 -0400 Subject: [PATCH v1] Throw a `search-failed' derived error in Info search The original fix for Bug#6106 switched from signalling `search-failed' to `user-error'. However, this breaks incremental searching over multiple nodes because the isearch code doesn't expect a `user-error'. * src/search.c (syms_of_search): New error, `user-search-failed', with `user-error' and `search-failed' as parents. * lisp/info.el (Info-search): Use it instead of `user-error' so that isearch will handle failed searches correctly. --- lisp/info.el | 12 ++++++------ src/search.c | 9 +++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index a6bab290a7..81e5d29f82 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1998,20 +1998,20 @@ Info-search Info-isearch-initial-node bound (and found (> found opoint-min) (< found opoint-max))) - (user-error "Search failed: `%s' (end of node)" regexp)) + (signal 'user-search-failed (list regexp "(end of node)"))) ;; If no subfiles, give error now. (unless (or found Info-current-subfile) (if isearch-mode - (user-error "Search failed: `%s' (end of manual)" regexp) + (signal 'user-search-failed (list regexp "end of manual")) (let ((search-spaces-regexp Info-search-whitespace-regexp)) (unless (if backward (re-search-backward regexp nil t) (re-search-forward regexp nil t)) - (user-error "Search failed: `%s'" regexp))))) + (signal 'user-seach-failed (list regexp)))))) (if (and bound (not found)) - (user-error "Search failed: `%s'" regexp)) + (signal 'user-search-failed (list regexp))) (unless (or found bound) (unwind-protect @@ -2055,8 +2055,8 @@ Info-search (setq list nil))) (if found (message "") - (user-error "Search failed: `%s'%s" - regexp (if isearch-mode " (end of manual)" "")))) + (signal 'user-search-failed + `(,regexp ,@(if isearch-mode '("end of manual")))))) (if (not found) (progn (Info-read-subfile osubfile) (goto-char opoint) diff --git a/src/search.c b/src/search.c index 33cb02aa7a..48caea2f51 100644 --- a/src/search.c +++ b/src/search.c @@ -3389,6 +3389,10 @@ syms_of_search (void) /* Error condition used for failing searches. */ DEFSYM (Qsearch_failed, "search-failed"); + /* Error condition used for failing searches started by user, i.e., + where failure should not invoke the debugger. */ + DEFSYM (Quser_search_failed, "search-failed"); + /* Error condition signaled when regexp compile_pattern fails. */ DEFSYM (Qinvalid_regexp, "invalid-regexp"); @@ -3397,6 +3401,11 @@ syms_of_search (void) Fput (Qsearch_failed, Qerror_message, build_pure_c_string ("Search failed")); + Fput (Quser_search_failed, Qerror_conditions, + listn (CONSTYPE_PURE, 2, Qsearch_failed, Quser_error)); + Fput (Quser_search_failed, Qerror_message, + build_pure_c_string ("Search failed")); + Fput (Qinvalid_regexp, Qerror_conditions, listn (CONSTYPE_PURE, 2, Qinvalid_regexp, Qerror)); Fput (Qinvalid_regexp, Qerror_message, -- 2.11.1 --=-=-=--