unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23038: 25.0.92; M-% from isearch broken  (error in isearch--describe-regexp-mode)
@ 2016-03-17 14:07 Michael Heerdegen
  2016-03-17 14:25 ` Kaushal Modi
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-17 14:07 UTC (permalink / raw)
  To: 23038; +Cc: Kaushal Modi


Hi,

at the beginning of scratch in emacs -Q, for example

C-s C-w M-%
  ==>

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("\\(.*\\) \\'" " \\1" nil)
  isearch--describe-regexp-mode(nil t)
  isearch-query-replace(nil)
  funcall-interactively(isearch-query-replace nil)
  call-interactively(isearch-query-replace nil nil)
  command-execute(isearch-query-replace)

Maybe related to the fix of bug#22991?


Thanks,

Michael.




In GNU Emacs 25.0.92.6 (x86_64-pc-linux-gnu, GTK+ Version 3.18.8)
 of 2016-03-17 built on drachen
Repository revision: 9ab03f27fad7b1ae68dda7a2effd075658dcf184
Windowing system distributor 'The X.Org Foundation', version 11.0.11801000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix






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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-17 14:07 bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode) Michael Heerdegen
@ 2016-03-17 14:25 ` Kaushal Modi
  2016-03-18  3:53   ` Artur Malabarba
  0 siblings, 1 reply; 23+ messages in thread
From: Kaushal Modi @ 2016-03-17 14:25 UTC (permalink / raw)
  To: Michael Heerdegen, 23038, Eli Zaretskii, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]

Hi Michael,

I believe that the bug was already there but I can try fixing it (below
patch is my first attempt).

This bug got revealed because when you do "C-s C-w M-%", the space-before
argument is set to t for the isearch--describe-regexp-mode.

The let-bound var description value was staying nil as both
search-default-mode and regexp-function are nil. The bug probably did not
reveal earlier because we had search-default-mode set to a non-nil value by
default.

The error simply tells that

(replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)

is seeing description as a non-string value (nil).

Below patch sets the default case for the cond (which we should technically
anyways be doing). By default the description var is set to an empty string
"" instead of nil. As description is anyways supposed to be a string, I
think that this patch should not hurt.

I would let you and others evaluate this proposed fix.

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 988503e..9b8a0f0 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2594,7 +2594,8 @@ isearch--describe-regexp-mode
           (isearch-regexp "regexp ")
           ;; 4. And finally, if we're in literal mode (and if the
           ;;    default mode is also not literal), describe it.
-               ((functionp search-default-mode) "literal "))))
+          ((functionp search-default-mode) "literal ")
+          (t ""))))
     (if space-before
         ;; Move space from the end to the beginning.
         (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)

[-- Attachment #2: Type: text/html, Size: 2832 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-17 14:25 ` Kaushal Modi
@ 2016-03-18  3:53   ` Artur Malabarba
  2016-03-18 14:58     ` Kaushal Modi
  0 siblings, 1 reply; 23+ messages in thread
From: Artur Malabarba @ 2016-03-18  3:53 UTC (permalink / raw)
  To: Kaushal; +Cc: Michael Heerdegen, 23038

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

On 17 Mar 2016 11:26 am, "Kaushal Modi" <kaushal.modi@gmail.com> wrote:
>
> I would let you and others evaluate this proposed fix.
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index 988503e..9b8a0f0 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -2594,7 +2594,8 @@ isearch--describe-regexp-mode
>            (isearch-regexp "regexp ")
>            ;; 4. And finally, if we're in literal mode (and if the
>            ;;    default mode is also not literal), describe it.
> -               ((functionp search-default-mode) "literal "))))
> +          ((functionp search-default-mode) "literal ")
> +          (t ""))))
>      (if space-before
>          ;; Move space from the end to the beginning.
>          (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)

Thanks Kaushal! It looks good to me.

[-- Attachment #2: Type: text/html, Size: 1189 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18  3:53   ` Artur Malabarba
@ 2016-03-18 14:58     ` Kaushal Modi
  2016-03-18 15:08       ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Kaushal Modi @ 2016-03-18 14:58 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: Michael Heerdegen, 23038

[-- Attachment #1: Type: text/plain, Size: 2782 bytes --]

On Thu, Mar 17, 2016 at 11:53 PM, Artur Malabarba <bruce.connor.am@gmail.com
> wrote:

> Thanks Kaushal! It looks good to me.


Thanks! Here's a formatted patch (with indentation fixes too).
By mistake I created my last patch with an alias that did git format-patch
ignoring whitespace diffs. Below patch fixes this bug plus those
indentation changes.

From c06557b30dd8b81362c3970b5b9b54154dfabac9 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Fri, 18 Mar 2016 10:41:04 -0400
Subject: [PATCH] Fix an Isearch var to be a string (bug 23038)

* isearch.el (isearch--describe-regexp-mode): The `description' var needs
  to always be a string. Added the missing default case for the cond
  form that ensures that.

Before this bug fix, for the events when `regexp-function' and
`search-default-mode' both were nil, `description' also stayed nil.
So when `space-before' was non-nil, the "non-string" `description'
(with a value of nil) got passed as an argument to
`replace-regexp-in-string' (where a string was expected). That caused
the error described in debbugs # 23038.
---
 lisp/isearch.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 988503e..48354d3 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2585,16 +2585,19 @@ isearch--describe-regexp-mode
                     (eq search-default-mode isearch-regexp))) "")
           ;; 2. Use the `isearch-message-prefix' set for
           ;;    `regexp-function' if available.
-               (regexp-function
-                (and (symbolp regexp-function)
-                     (or (get regexp-function 'isearch-message-prefix)
-                         "")))
+          (regexp-function
+           (and (symbolp regexp-function)
+                (or (get regexp-function 'isearch-message-prefix)
+                    "")))
           ;; 3. Else if `isearch-regexp' is non-nil, set description
           ;;    to "regexp ".
-               (isearch-regexp "regexp ")
-          ;; 4. And finally, if we're in literal mode (and if the
-          ;;    default mode is also not literal), describe it.
-               ((functionp search-default-mode) "literal "))))
+          (isearch-regexp "regexp ")
+          ;; 4. Else if we're in literal mode (and if the default
+          ;;    mode is also not literal), describe it.
+          ((functionp search-default-mode) "literal ")
+          ;; 5. And finally, if none of the above is true, set the
+          ;;    description to an empty string.
+          (t ""))))
     (if space-before
         ;; Move space from the end to the beginning.
         (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
-- 
2.6.0.rc0.24.gec371ff



--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 5410 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 14:58     ` Kaushal Modi
@ 2016-03-18 15:08       ` Michael Heerdegen
  2016-03-18 15:14         ` Kaushal Modi
  2016-03-18 16:07         ` Stephen Berman
  0 siblings, 2 replies; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-18 15:08 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> By mistake I created my last patch with an alias that did git
> format-patch ignoring whitespace diffs. Below patch fixes this bug
> plus those indentation changes.

Dumb question: why does your diff contain so many additional line
breaks?  This is how it appears for me in Gnus:


> lisp/isearch.el | 19 +++++++++++--------
>
>
> 1 file changed, 11 insertions(+), 8 deletions(-)
>
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
>
>
> index 988503e..48354d3 100644
>
>
> --- a/lisp/isearch.el
>
>
> +++ b/lisp/isearch.el
>
>
> @@ -2585,16 +2585,19 @@ isearch--describe-regexp-mode
>
>
> (eq search-default-mode isearch-regexp))) "")
>
>
> ;; 2. Use the `isearch-message-prefix' set for
>
>
> ;; `regexp-function' if available.
>
>
> - (regexp-function
>
>
> - (and (symbolp regexp-function)
> [...]


Regards,

Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 15:08       ` Michael Heerdegen
@ 2016-03-18 15:14         ` Kaushal Modi
  2016-03-18 16:07         ` Stephen Berman
  1 sibling, 0 replies; 23+ messages in thread
From: Kaushal Modi @ 2016-03-18 15:14 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 23038, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

Sorry I didn't realize it showed up in that inconvenient format in Gnus.
Could it be some config in Gnus?

It looks like this on gmane:
http://thread.gmane.org/gmane.emacs.bugs/114994/focus=115029
and like this on Gmail: http://i.imgur.com/hHBpyWh.png

[-- Attachment #2: Type: text/html, Size: 525 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 15:08       ` Michael Heerdegen
  2016-03-18 15:14         ` Kaushal Modi
@ 2016-03-18 16:07         ` Stephen Berman
  2016-03-18 16:15           ` Kaushal Modi
  1 sibling, 1 reply; 23+ messages in thread
From: Stephen Berman @ 2016-03-18 16:07 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 23038, Artur Malabarba, Kaushal Modi

On Fri, 18 Mar 2016 16:08:27 +0100 Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Kaushal Modi <kaushal.modi@gmail.com> writes:
>
>> By mistake I created my last patch with an alias that did git
>> format-patch ignoring whitespace diffs. Below patch fixes this bug
>> plus those indentation changes.
>
> Dumb question: why does your diff contain so many additional line
> breaks?  This is how it appears for me in Gnus:
>
>
>> lisp/isearch.el | 19 +++++++++++--------
>>
>>
>> 1 file changed, 11 insertions(+), 8 deletions(-)
>>
>>
>> diff --git a/lisp/isearch.el b/lisp/isearch.el
>>
>>
>> index 988503e..48354d3 100644
[...]

I see this with many (perhaps all) posts from gmail.com addresses
displayed in Gnus as HTML; if I switch (by typing `b') to the non-HTML
alternative, the display is fine.  The HTML contains lots of div tags
with class attributes with values like "gmail_extra" that I guess shr
doesn't grok.  I only started noticing this odd display fairly recently
(I can't say more precisely, could be several weeks or longer); I don't
know if something changed in shr, in gmail or elsewhere.

Steve Berman





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:07         ` Stephen Berman
@ 2016-03-18 16:15           ` Kaushal Modi
  2016-03-18 16:29             ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Kaushal Modi @ 2016-03-18 16:15 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Michael Heerdegen, 23038, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

On Fri, Mar 18, 2016 at 12:07 PM, Stephen Berman <stephen.berman@gmx.net>
wrote:

> I don't
> know if something changed in shr, in gmail or elsewhere.
>

Is this related?:
-
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=9781dc4da35934839bf848b576829786962655b4
- http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19587



--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1174 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:15           ` Kaushal Modi
@ 2016-03-18 16:29             ` Michael Heerdegen
  2016-03-18 16:36               ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-18 16:29 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Fri, Mar 18, 2016 at 12:07 PM, Stephen Berman <stephen.berman@gmx.net>
> wrote:
>
>
>  I don't
>  know if something changed in shr, in gmail or elsewhere.
>
>
> Is this related?:
> -
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=9781dc4da35934839bf848b576829786962655b4

Yes, reverting that fixes the problem.


Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:29             ` Michael Heerdegen
@ 2016-03-18 16:36               ` Michael Heerdegen
  2016-03-18 16:39                 ` Kaushal Modi
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-18 16:36 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Michael Heerdegen <michael_heerdegen@web.de> writes:

> >  I don't
> >  know if something changed in shr, in gmail or elsewhere.

> > Is this related?:
> > -
> > http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=9781dc4da35934839bf848b576829786962655b4
>
> Yes, reverting that fixes the problem.

Could someone having more insight than me about that stuff please take
care of this problem (bug report, or fix) -- Kaushal - Stephen?


Many thanks,

Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:36               ` Michael Heerdegen
@ 2016-03-18 16:39                 ` Kaushal Modi
  2016-03-18 21:15                   ` Stephen Berman
  2016-03-20 15:38                   ` Michael Heerdegen
  0 siblings, 2 replies; 23+ messages in thread
From: Kaushal Modi @ 2016-03-18 16:39 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Stephen Berman, 23038, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

I think Lars would be the best person to help you fix this.
A new bug report addressing this specific problem and how you can "fix" it
would also help.
I say "fix" because reverting that commit would bring back bug 19587
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19587>.

[-- Attachment #2: Type: text/html, Size: 462 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:39                 ` Kaushal Modi
@ 2016-03-18 21:15                   ` Stephen Berman
  2016-03-18 21:21                     ` Michael Heerdegen
  2016-03-20 15:38                   ` Michael Heerdegen
  1 sibling, 1 reply; 23+ messages in thread
From: Stephen Berman @ 2016-03-18 21:15 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Michael Heerdegen, 23038, Artur Malabarba

On Fri, 18 Mar 2016 12:39:05 -0400 Kaushal Modi <kaushal.modi@gmail.com> wrote:

> I think Lars would be the best person to help you fix this.
> A new bug report addressing this specific problem and how you can "fix" it
> would also help.

Done in bug#23057.

> I say "fix" because reverting that commit would bring back bug 19587
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19587>.

I suggested a possible fix in the bug report, but I cannot judge whether
it's adequate.

Steve Berman





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 21:15                   ` Stephen Berman
@ 2016-03-18 21:21                     ` Michael Heerdegen
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-18 21:21 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 23038, Artur Malabarba, Kaushal Modi

Stephen Berman <stephen.berman@gmx.net> writes:

> Done in bug#23057.

Thanks!





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-18 16:39                 ` Kaushal Modi
  2016-03-18 21:15                   ` Stephen Berman
@ 2016-03-20 15:38                   ` Michael Heerdegen
  2016-03-20 15:42                     ` Kaushal Modi
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-20 15:38 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> I think Lars would be the best person to help you fix this.  A new bug
> report addressing this specific problem and how you can "fix" it would
> also help.  I say "fix" because reverting that commit would bring back
> bug 19587.

Lars has fixed this now.


Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-20 15:38                   ` Michael Heerdegen
@ 2016-03-20 15:42                     ` Kaushal Modi
  2016-03-20 23:47                       ` Michael Heerdegen
  0 siblings, 1 reply; 23+ messages in thread
From: Kaushal Modi @ 2016-03-20 15:42 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Stephen Berman, 23038, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

Cool!

About this bug 23038, did the patch solve the bug for you?

If so, please commit it so that we close one of the blocking bugs for 25.1
:)

--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 233 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-20 15:42                     ` Kaushal Modi
@ 2016-03-20 23:47                       ` Michael Heerdegen
  2016-03-21  0:09                         ` Michael Heerdegen
  2016-03-21 10:03                         ` Andreas Schwab
  0 siblings, 2 replies; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-20 23:47 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> Cool! 
>
> About this bug 23038, did the patch solve the bug for you?

Yes!  (I still have problems with viewing the patch from within Gnus: it
removed the indentation, so the copied patch was not applicable.  I did
without Gnus.  Works well!)

> If so, please commit it so that we close one of the blocking bugs for
> 25.1 :)

Ok, ASAP.

Thanks for fixing!


Regards,

Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-20 23:47                       ` Michael Heerdegen
@ 2016-03-21  0:09                         ` Michael Heerdegen
  2016-03-21  0:25                           ` Kaushal Modi
  2016-03-21 10:03                         ` Andreas Schwab
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-21  0:09 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Ok, ASAP.
>
> Thanks for fixing!

I have had a look at what you have done.  It seems good to me.

The bug seems have to be introduced accidentally in

  6b5fdca71696a513a9dcd24a12f9de96788a523a
  Author:     Artur Malabarba <bruce.connor.am@gmail.com>
  AuthorDate: Mon Oct 26 00:51:02 2015 +0000
  Commit:     Artur Malabarba <bruce.connor.am@gmail.com>
  CommitDate: Mon Oct 26 00:51:02 2015 +0000
  
  Parent:     207f235 * test/automated/simple-test.el: New file
  Containing: emacs-25 master
  Follows:    emacs-24.5-rc3-fixed (6337)
  
  * lisp/isearch.el: No visual feedback for default search mode


@Kaushal: could you please just install your patch (yourself)?  You are
the author, and I want to avoid copy and paste errors after the
last...experiences, and also first have to refresh my memory about
commit message rules...


Thanks again,

Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-21  0:09                         ` Michael Heerdegen
@ 2016-03-21  0:25                           ` Kaushal Modi
  2016-03-21  0:29                             ` Michael Heerdegen
  2016-03-22  0:14                             ` Michael Heerdegen
  0 siblings, 2 replies; 23+ messages in thread
From: Kaushal Modi @ 2016-03-21  0:25 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Stephen Berman, 23038, Artur Malabarba

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

Thanks Michael.

I have the full commit message included in my patch.

I don't have commit rights. So you or someone else on this thread would
have to commit it for me.

--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 262 bytes --]

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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-21  0:25                           ` Kaushal Modi
@ 2016-03-21  0:29                             ` Michael Heerdegen
  2016-03-21  2:41                               ` Kaushal Modi
  2016-03-22  0:14                             ` Michael Heerdegen
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-21  0:29 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> Thanks Michael. 
>
> I have the full commit message included in my patch. 
>
> I don't have commit rights. So you or someone else on this thread
> would have to commit it for me.

I see.  Ok, then I'll do it tomorrow (of course of you signed "the
papers", right?).


Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-21  0:29                             ` Michael Heerdegen
@ 2016-03-21  2:41                               ` Kaushal Modi
  0 siblings, 0 replies; 23+ messages in thread
From: Kaushal Modi @ 2016-03-21  2:41 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Stephen Berman, 23038, Artur Malabarba


[-- Attachment #1.1: Type: text/plain, Size: 336 bytes --]

On Sun, Mar 20, 2016 at 8:29 PM, Michael Heerdegen <michael_heerdegen@web.de
> wrote:

> Ok, then I'll do it tomorrow (of course of you signed "the
> papers", right?).
>

Thanks.

Yes, my FSF copyright assignment is on file.
I have also attached the earlier inline patch as an attachment in this
email for convenience.

--
Kaushal Modi

[-- Attachment #1.2: Type: text/html, Size: 877 bytes --]

[-- Attachment #2: 0001-Fix-an-Isearch-var-to-be-a-string-bug-23038.patch --]
[-- Type: application/octet-stream, Size: 2411 bytes --]

From c06557b30dd8b81362c3970b5b9b54154dfabac9 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Fri, 18 Mar 2016 10:41:04 -0400
Subject: [PATCH] Fix an Isearch var to be a string (bug 23038)

* isearch.el (isearch--describe-regexp-mode): The `description' var needs
  to always be a string. Added the missing default case for the cond
  form that ensures that.

Before this bug fix, for the events when `regexp-function' and
`search-default-mode' both were nil, `description' also stayed nil.
So when `space-before' was non-nil, the "non-string" `description'
(with a value of nil) got passed as an argument to
`replace-regexp-in-string' (where a string was expected). That caused
the error described in debbugs # 23038.
---
 lisp/isearch.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 988503e..48354d3 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2585,16 +2585,19 @@ isearch--describe-regexp-mode
                     (eq search-default-mode isearch-regexp))) "")
           ;; 2. Use the `isearch-message-prefix' set for
           ;;    `regexp-function' if available.
-               (regexp-function
-                (and (symbolp regexp-function)
-                     (or (get regexp-function 'isearch-message-prefix)
-                         "")))
+          (regexp-function
+           (and (symbolp regexp-function)
+                (or (get regexp-function 'isearch-message-prefix)
+                    "")))
           ;; 3. Else if `isearch-regexp' is non-nil, set description
           ;;    to "regexp ".
-               (isearch-regexp "regexp ")
-          ;; 4. And finally, if we're in literal mode (and if the
-          ;;    default mode is also not literal), describe it.
-               ((functionp search-default-mode) "literal "))))
+          (isearch-regexp "regexp ")
+          ;; 4. Else if we're in literal mode (and if the default
+          ;;    mode is also not literal), describe it.
+          ((functionp search-default-mode) "literal ")
+          ;; 5. And finally, if none of the above is true, set the
+          ;;    description to an empty string.
+          (t ""))))
     (if space-before
         ;; Move space from the end to the beginning.
         (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
-- 
2.6.0.rc0.24.gec371ff


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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-20 23:47                       ` Michael Heerdegen
  2016-03-21  0:09                         ` Michael Heerdegen
@ 2016-03-21 10:03                         ` Andreas Schwab
  1 sibling, 0 replies; 23+ messages in thread
From: Andreas Schwab @ 2016-03-21 10:03 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Stephen Berman, 23038, Artur Malabarba, Kaushal Modi

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Yes!  (I still have problems with viewing the patch from within Gnus: it
> removed the indentation, so the copied patch was not applicable.  I did
> without Gnus.  Works well!)

You can fix that by ignoring all text/html parts, as they are always
broken anyway.

(add-to-list 'mm-discouraged-alternatives "text/html")

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-21  0:25                           ` Kaushal Modi
  2016-03-21  0:29                             ` Michael Heerdegen
@ 2016-03-22  0:14                             ` Michael Heerdegen
  2016-03-22  0:38                               ` Kaushal Modi
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Heerdegen @ 2016-03-22  0:14 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Stephen Berman, 23038, Artur Malabarba

Kaushal Modi <kaushal.modi@gmail.com> writes:

> I have the full commit message included in my patch. 

I needed to fix some things in the commit message that were not standard
compliant I think: use present tense, line endings (two spaces after a
period, and the bug number formatting (I think this is a standard too).


> I don't have commit rights. So you or someone else on this thread
> would have to commit it for me.

Committed now to master.


Thanks to all, especially to Kaushal for creating the patch,

Michael.





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

* bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
  2016-03-22  0:14                             ` Michael Heerdegen
@ 2016-03-22  0:38                               ` Kaushal Modi
  0 siblings, 0 replies; 23+ messages in thread
From: Kaushal Modi @ 2016-03-22  0:38 UTC (permalink / raw)
  To: Michael Heerdegen, 23038-done; +Cc: Stephen Berman, Bruce Connor

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

On Mar 21, 2016 8:15 PM, "Michael Heerdegen" <michael_heerdegen@web.de>
wrote:
> I needed to fix some things in the commit message that were not standard
> compliant I think: use present tense, line endings (two spaces after a
> period, and the bug number formatting (I think this is a standard too).

Thanks Michael. I probably need to bind a space to do double spaces when in
a commit message buffer. I take care to follow the other rules too next
time.

[-- Attachment #2: Type: text/html, Size: 578 bytes --]

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

end of thread, other threads:[~2016-03-22  0:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 14:07 bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode) Michael Heerdegen
2016-03-17 14:25 ` Kaushal Modi
2016-03-18  3:53   ` Artur Malabarba
2016-03-18 14:58     ` Kaushal Modi
2016-03-18 15:08       ` Michael Heerdegen
2016-03-18 15:14         ` Kaushal Modi
2016-03-18 16:07         ` Stephen Berman
2016-03-18 16:15           ` Kaushal Modi
2016-03-18 16:29             ` Michael Heerdegen
2016-03-18 16:36               ` Michael Heerdegen
2016-03-18 16:39                 ` Kaushal Modi
2016-03-18 21:15                   ` Stephen Berman
2016-03-18 21:21                     ` Michael Heerdegen
2016-03-20 15:38                   ` Michael Heerdegen
2016-03-20 15:42                     ` Kaushal Modi
2016-03-20 23:47                       ` Michael Heerdegen
2016-03-21  0:09                         ` Michael Heerdegen
2016-03-21  0:25                           ` Kaushal Modi
2016-03-21  0:29                             ` Michael Heerdegen
2016-03-21  2:41                               ` Kaushal Modi
2016-03-22  0:14                             ` Michael Heerdegen
2016-03-22  0:38                               ` Kaushal Modi
2016-03-21 10:03                         ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).