all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Michael.Cadilhac-@t-lrde.epita.fr: iswitchb and regexps.]
@ 2005-06-12 19:57 Richard Stallman
  2005-06-14  2:30 ` Daniel Brockman
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2005-06-12 19:57 UTC (permalink / raw)


Stephen Eglen isn't responding; could someone please work on this bug?
Please ack to me if you fix it.

------- Start of forwarded message -------
To: emacs-pretest-bug@gnu.org
From: Michael Cadilhac <Michael.Cadilhac-@t-lrde.epita.fr>
Organization: LRDE
Date: Sun, 22 May 2005 02:47:21 +0200
Subject: iswitchb and regexps.
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63

- --===============0452551540==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

- --=-=-=
Content-Transfer-Encoding: quoted-printable

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

With iswitchb-mode, C-x b, then hit C-t to enable regexp mode, and then `['.

This gives me the following error message:
Error in post-command-hook: (invalid-regexp Unmatched [ or [^)
then makes buffer switching completely unusable until C-g.


In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, X toolkit)
 of 2005-05-22 on mahaena
Distributor `Gentoo (The X.Org Foundation 6.8.2, revision r1-0.1.2)', versi=
on 11.0.60802000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  display-time-mode: t
  show-paren-mode: t
  partial-completion-mode: t
  iswitchb-mode: t
  mouse-wheel-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  column-number-mode: t
  line-number-mode: t
  next-error-follow-minor-mode:  Fol

Recent input:
<return> C-n C-x b e <backspace> j a <return> C-x b=20
<return> M-x v e r s i o n <return> C-n M-x i s w <tab>=20
C-g C-x b C-t [ C-g C-n C-x b C-g L C-r d e C-v C-n=20
C-n <return> 1 <return> / o <return> M-> C-r i s w=20
C-n q C-t C-t <return> <return> M-> C-r i s w i C-n=20
q C-n C-n <return> 1 <return> a n C-c C-k q M-x r e=20
p <tab> o <tab> r <tab> <return>

Recent messages:
Loading footnote...done
Loading quail...done
Loading quail/latin-pre...done
Loading flyspell...done
Starting new Ispell process...
Sign message? (y or n)=20
Exiting summary buffer and applying spam rules
Marking spam as expired without moving it
No more unread newsgroups
Loading emacsbug...done


=2D-=20
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 01.46.70.90.75 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

- --=-=-=
Content-Type: application/pgp-signature

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCj9acZYNf4qobZ7kRAgIeAJ4qPoOYci0dch+gab5wtumCXlVAzQCgrv+g
F9J+7sanHH2Xj+GbmkgdduU=
=HyuT
- -----END PGP SIGNATURE-----
- --=-=-=--



- --===============0452551540==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

- --===============0452551540==--
------- End of forwarded message -------

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

* Re: [Michael.Cadilhac-@t-lrde.epita.fr: iswitchb and regexps.]
  2005-06-12 19:57 [Michael.Cadilhac-@t-lrde.epita.fr: iswitchb and regexps.] Richard Stallman
@ 2005-06-14  2:30 ` Daniel Brockman
  2005-06-14  4:36   ` Daniel Brockman
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Brockman @ 2005-06-14  2:30 UTC (permalink / raw)
  Cc: Michael Cadilhac

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

I believe the following patch fixes the problem.

I haven't signed copyright papers yet, but I have sent a request
for them.  So I guess you can't install this just yet.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2882 bytes --]

*** iswitchb.el	22 Aug 2004 12:58:16 +0200	1.55
--- iswitchb.el	14 Jun 2005 04:24:33 +0200	
***************
*** 889,910 ****
           (do-string         (stringp (car list)))
           name
           ret)
!     (mapcar
!      (lambda (x)
! 
!        (if do-string
! 	   (setq name x)               ;We already have the name
! 	 (setq name (buffer-name x)))
! 
!        (cond
! 	((and (or (and string-format (string-match regexp name))
! 		  (and (null string-format)
! 		       (string-match (regexp-quote regexp) name)))
! 
! 	      (not (iswitchb-ignore-buffername-p name)))
! 	 (setq ret (cons name ret))
!           )))
!      list)
      ret))
  
  (defun iswitchb-ignore-buffername-p (bufname)
--- 889,908 ----
           (do-string         (stringp (car list)))
           name
           ret)
!     (condition-case nil
!         (mapcar
!          (lambda (x)
!            (if do-string
!                (setq name x)               ; We already have the name
!              (setq name (buffer-name x)))
!            (cond
!             ((and (or (and string-format (string-match regexp name))
!                       (and (null string-format)
!                            (string-match (regexp-quote regexp) name)))
!                   (not (iswitchb-ignore-buffername-p name)))
!              (setq ret (cons name ret)))))
!          list)
!         (invalid-regexp nil))
      ret))
  
  (defun iswitchb-ignore-buffername-p (bufname)
***************
*** 1243,1248 ****
--- 1241,1259 ----
         (setq most-is-exact t))
      (substring com most-len)))
  
+ (defun iswitchb-regexp-valid-p (regexp)
+   "Non-nil if REGEXP is syntactically valid."
+   (condition-case nil
+       (progn (string-match regexp "") t)
+     (invalid-regexp nil)))
+ 
+ (defun iswitchb-text-valid-p ()
+   "Non-nil if `iswitchb-text' is syntactically valid.
+ This fails only when `iswitchb-regexp' is non-nil and `iswitchb-text'
+ is an invalid regexp."
+   (or (not iswitchb-regexp)
+       (iswitchb-regexp-valid-p iswitchb-text)))
+ 
  (defun iswitchb-completions (name require-match)
    "Return the string that is displayed after the user's text.
  Modified from `icomplete-completions'."
***************
*** 1296,1304 ****
  			       (car comp))
  	    (setq comp (cdr comp))))))
  
!     (cond ((null comps) (format " %sNo match%s"
! 				open-bracket-determined
! 				close-bracket-determined))
  
  	  ((null (cdr comps))		;one match
  	   (concat (if (and (> (length (car comps))
--- 1307,1317 ----
  			       (car comp))
  	    (setq comp (cdr comp))))))
  
!     (cond ((null comps)
!            (format (if (iswitchb-text-valid-p)
!                        " %sNo match%s" " %sInvalid regexp%s")
!                    open-bracket-determined
!                    close-bracket-determined))
  
  	  ((null (cdr comps))		;one match
  	   (concat (if (and (> (length (car comps))

[-- Attachment #3: Type: text/plain, Size: 42 bytes --]


-- 
Daniel Brockman <daniel@brockman.se>

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: [Michael.Cadilhac-@t-lrde.epita.fr: iswitchb and regexps.]
  2005-06-14  2:30 ` Daniel Brockman
@ 2005-06-14  4:36   ` Daniel Brockman
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Brockman @ 2005-06-14  4:36 UTC (permalink / raw)


I just noticed that Matt Hodges already installed a fix for this.

-- 
Daniel Brockman <daniel@brockman.se>

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

end of thread, other threads:[~2005-06-14  4:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-12 19:57 [Michael.Cadilhac-@t-lrde.epita.fr: iswitchb and regexps.] Richard Stallman
2005-06-14  2:30 ` Daniel Brockman
2005-06-14  4:36   ` Daniel Brockman

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.