all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Stephen Berman <stephen.berman@gmx.net>,
	23038@debbugs.gnu.org,
	Artur Malabarba <bruce.connor.am@gmail.com>
Subject: bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
Date: Sun, 20 Mar 2016 22:41:22 -0400	[thread overview]
Message-ID: <CAFyQvY1inpUiZ7kUQfxRA1G99BnpJCeTqO+F2-69VAYU0gwYow@mail.gmail.com> (raw)
In-Reply-To: <871t744qrq.fsf@web.de>


[-- 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


  reply	other threads:[~2016-03-21  2:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-03-22  0:14                             ` Michael Heerdegen
2016-03-22  0:38                               ` Kaushal Modi
2016-03-21 10:03                         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY1inpUiZ7kUQfxRA1G99BnpJCeTqO+F2-69VAYU0gwYow@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=23038@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=michael_heerdegen@web.de \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.