all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
       [not found] ` <20170328002231.E5CCC220D2@vcs0.savannah.gnu.org>
@ 2017-03-28 13:55   ` Stefan Monnier
  2017-03-28 14:19     ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2017-03-28 13:55 UTC (permalink / raw)
  To: emacs-devel; +Cc: Noam Postavsky

>     Don't add `search-failed' to ignored errors in info.el (Bug#6106)

Good, thanks.

> -	  (signal 'search-failed (list "\n\^_"))))
> +	  (user-error "Search failed: `\n\^_'")))

This one doesn't look like a user-error: the \n\^_ sequence is internal
to Info files and mostly invisible to the user, so either we change the
text so as to report the message in user-understandable terms, or we
keep this as a (signal 'search-failed' ...).


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
  2017-03-28 13:55   ` [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106) Stefan Monnier
@ 2017-03-28 14:19     ` Noam Postavsky
  2017-03-28 14:54       ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2017-03-28 14:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Tue, Mar 28, 2017 at 9:55 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>
>> -       (signal 'search-failed (list "\n\^_"))))
>> +       (user-error "Search failed: `\n\^_'")))
>
> This one doesn't look like a user-error: the \n\^_ sequence is internal
> to Info files and mostly invisible to the user, so either we change the
> text so as to report the message in user-understandable terms, or we
> keep this as a (signal 'search-failed' ...).

Right. While I'm taking a second look at this, do you think the search
for "\n* Menu: " in Info-complete-menu-item should be a user error?

--- i/lisp/info.el
+++ w/lisp/info.el
@@ -2699,7 +2699,8 @@ Info-complete-menu-item
             (orignode Info-current-node)
             nextnode)
         (goto-char (point-min))
-        (search-forward "\n* Menu:")
+        (unless (search-forward "\n* Menu:" nil t)
+          (user-error "No menu in this node"))
         (cond
          ((eq (car-safe action) 'boundaries) nil)
          ((eq action 'lambda)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
  2017-03-28 14:19     ` Noam Postavsky
@ 2017-03-28 14:54       ` Stefan Monnier
  2017-03-29  1:26         ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2017-03-28 14:54 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

> -        (search-forward "\n* Menu:")
> +        (unless (search-forward "\n* Menu:" nil t)
> +          (user-error "No menu in this node"))

Looks good, thanks,


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
  2017-03-28 14:54       ` Stefan Monnier
@ 2017-03-29  1:26         ` Noam Postavsky
  2017-03-31  4:06           ` Mark Oteiza
  0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2017-03-29  1:26 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Tue, Mar 28, 2017 at 10:54 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> -        (search-forward "\n* Menu:")
>> +        (unless (search-forward "\n* Menu:" nil t)
>> +          (user-error "No menu in this node"))
>
> Looks good, thanks,

Pushed [1: d707ba8469]

1: 2017-03-28 21:25:17 -0400 d707ba846902128572f420241897cbb966363ede
  Adjust some search failure errors in info.el



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
  2017-03-29  1:26         ` Noam Postavsky
@ 2017-03-31  4:06           ` Mark Oteiza
  2017-03-31 14:17             ` Noam Postavsky
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Oteiza @ 2017-03-31  4:06 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Stefan Monnier, Emacs developers

Noam Postavsky <npostavs@gmail.com> writes:

> On Tue, Mar 28, 2017 at 10:54 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> -        (search-forward "\n* Menu:")
>>> +        (unless (search-forward "\n* Menu:" nil t)
>>> +          (user-error "No menu in this node"))
>>
>> Looks good, thanks,
>
> Pushed [1: d707ba8469]
>
> 1: 2017-03-28 21:25:17 -0400 d707ba846902128572f420241897cbb966363ede
>   Adjust some search failure errors in info.el

These changes break isearching through an info manual--in particular, an
incremental search can no longer cross nodes.

  I-search: cats [(user-error Search failed: `cats' (end of node))]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106)
  2017-03-31  4:06           ` Mark Oteiza
@ 2017-03-31 14:17             ` Noam Postavsky
  0 siblings, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2017-03-31 14:17 UTC (permalink / raw)
  To: Mark Oteiza; +Cc: Stefan Monnier, Emacs developers

On Fri, Mar 31, 2017 at 12:06 AM, Mark Oteiza <mvoteiza@udel.edu> wrote:
>
> These changes break isearching through an info manual--in particular, an
> incremental search can no longer cross nodes.
>
>   I-search: cats [(user-error Search failed: `cats' (end of node))]

Oops, indeed my fix is no good. I should have defined a new
`user-search-failed' with `user-error' and `search-failed' as parents
and signaled that instead of switching to plain `user-error'. I will
send a patch along those lines to Bug#6106 in a day or two.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-31 14:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170328002231.12647.93735@vcs0.savannah.gnu.org>
     [not found] ` <20170328002231.E5CCC220D2@vcs0.savannah.gnu.org>
2017-03-28 13:55   ` [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106) Stefan Monnier
2017-03-28 14:19     ` Noam Postavsky
2017-03-28 14:54       ` Stefan Monnier
2017-03-29  1:26         ` Noam Postavsky
2017-03-31  4:06           ` Mark Oteiza
2017-03-31 14:17             ` Noam Postavsky

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.