Giorgos Keramidas | 26 Sep 2009 09:52
Picon
Favicon
Gravatar

bug#4560: 23.1.50; (string-match "string" nil) error when typing `M-x help RET'

Something seems to have changed in the way string-match works with its
second argument is nil.  By typing `M-x help RET' I expected to see the
same prompt that is displayed by <f1>, but instead of that a snapshot of
Emacs built from the Git mirror of the repository throws me into the
debugger at:

    Debugger entered--Lisp error: (wrong-type-argument stringp nil)
      string-match("%THIS-KEY%" nil)
      help()
      call-interactively(help t nil)
      execute-extended-command(nil)
      call-interactively(execute-extended-command nil nil)

The last changeset I have in my local Git clone is:

    commit f6829d72c1b405d6c43caa554c2123f41917e358
    Author: Chong Yidong <cyd <at> stupidchicken.com>
    Date:   Fri Sep 25 22:04:07 2009 +0000

        * files.el (safe-local-eval-forms): Allow time-stamp in
        before-save-hook (Bug#4554).

I'm updating a local mirror of the CVS repository now to check if this
is an artifact of the Git mirror.  In the meantime, does this seem like
a bug in `M-x help' or like something we recently changed in the
behavior of `string-match'?

In GNU Emacs 23.1.50.1 (i386-unknown-freebsd9.0, GTK+ Version 2.16.6)
 of 2009-09-26 on kobe
configured using `configure  '--prefix=/opt/emacs' '--with-x' '--with-x-toolkit=gtk' '--with-xpm'
(Continue reading)

Stefan Monnier | 27 Sep 2009 02:28
Picon

bug#4560: 23.1.50; (string-match "string" nil) error when typing `M-x help RET'

> Something seems to have changed in the way string-match works with its
> second argument is nil.

Actually, the problem was in help.el's use of make-help-screen.
I've installed the patch below, which should fix it,

        Stefan

--- lisp/help.el	14 Sep 2009 23:28:43 -0000	1.348
+++ lisp/help.el	27 Sep 2009 00:27:00 -0000
 <at>  <at>  -203,7 +203,9  <at>  <at> 
 ;; It can't find this, but nobody will look.
 (make-help-screen help-for-help-internal
   (purecopy "Type a help option: [abcCdefFgiIkKlLmnprstvw.] C-[cdefmnoptw] or ?")
-  (purecopy
+  ;; Don't purecopy this one, because it's not evaluated (it's
+  ;; directly used as a docstring in a function definition, so it'll
+  ;; be moved to the DOC file anyway: no need for purecopying it).
   "You have typed %THIS-KEY%, the help character.  Type a Help option:
 \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.)

 <at>  <at>  -248,7 +250,7  <at>  <at> 
 C-o         Emacs ordering and distribution information.
 C-p         Info about known Emacs problems.
 C-t         Emacs TODO list.
-C-w         Information on absence of warranty for GNU Emacs.")
+C-w         Information on absence of warranty for GNU Emacs."
   help-map)

 
(Continue reading)

Emacs bug Tracking System | 27 Sep 2009 21:05

bug#4560: marked as done (23.1.50; (string-match "string" nil) error when typing `M-x help RET')

Your message dated Sun, 27 Sep 2009 14:56:12 -0400
with message-id <jwvske8b4k0.fsf-monnier+emacsbugreports <at> gnu.org>
and subject line Re: bug#4560: 23.1.50; (string-match "string" nil) error when typing `M-x help RET'
has caused the Emacs bug report #4560,
regarding 23.1.50; (string-match "string" nil) error when typing `M-x help RET'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner <at> emacsbugs.donarmstrong.com
immediately.)

--

-- 
4560: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4560
Emacs Bug Tracking System
Contact owner <at> emacsbugs.donarmstrong.com with problems
Picon Favicon Gravatar
From: Giorgos Keramidas <keramida <at> ceid.upatras.gr>
Subject: 23.1.50; (string-match "string" nil) error when typing `M-x help RET'
Date: 2009-09-26 07:52:29 GMT
(Continue reading)


Gmane