all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
To: 20806@debbugs.gnu.org
Subject: bug#20806: 25.0.50;  `string-match' is confused???
Date: Sat, 13 Jun 2015 15:03:29 +0530	[thread overview]
Message-ID: <557BF8E9.9040007@gmail.com> (raw)


Is an empty string a prefix of all strings or not? `string-match'
should settle this matter first.

Here is an eshell transaction.

----------------------------------------------------------------

Welcome to the Emacs shell

/tmp $ (string-match "\\(.*\\)" "")
0
/tmp $ (string-match "foo" "")
/tmp $

----------------------------------------------------------------

Here is how I ended up with this bug.

Debugger entered--Lisp error: (error "Regexp cannot match an empty string")
  signal(error ("Regexp cannot match an empty string"))
  error("Regexp cannot match an empty string")
  hi-lock-regexp-okay("\\(.*\\)")
  byte-code("\300\301\302\303\"!\304 D\207" [hi-lock-regexp-okay
read-regexp "Regexp to highlight" regexp-history-last
hi-lock-read-face-name] 4)
  call-interactively(highlight-regexp nil nil)
  command-execute(highlight-regexp)





             reply	other threads:[~2015-06-13  9:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-13  9:33 Vaidheeswaran C [this message]
2015-06-13 18:59 ` bug#20806: 25.0.50; `string-match' is confused??? Vaidheeswaran C
2015-06-14 20:18   ` Stefan Monnier
2015-06-13 19:21 ` Andreas Schwab
2015-06-13 22:58 ` Michael Heerdegen
2015-06-14 13:40 ` Stefan Monnier

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=557BF8E9.9040007@gmail.com \
    --to=vaidheeswaran.chinnaraju@gmail.com \
    --cc=20806@debbugs.gnu.org \
    /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.