all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Two improvements
@ 2003-01-15 23:24 Chitale, Sandip V
  0 siblings, 0 replies; only message in thread
From: Chitale, Sandip V @ 2003-01-15 23:24 UTC (permalink / raw)


1. A function to dump the data matched by isearch-* family of functions.
This may be added to lisp/isearch.el.

(defun dump-match-data ()
  "Dump match data"
  (interactive)
  (with-output-to-temp-buffer "*match-data*"
    (dotimes (index (/ (length (match-data)) 2))
      (princ (format "[%d] = %s\n" index (match-string index)))
      )
    )
  )

2. A variant of the above to complement the re-builder functionality.
This may be added to lisp/emacs-lisp/re-builder.el.

(define-key reb-mode-map "\C-cm"    'reb-dump-match-data)

(defun reb-dump-match-data ()
  "Dump match data in buffer *match-data*"
  (interactive)
  (with-output-to-temp-buffer "*match-data*"
    (dotimes (index (/ (length (match-data)) 2))
      (princ (format 
	      "[%d]\t%s\n"
	      index
	      (match-string index
                            ;; prepend with a space to get around a bug
			    (concat " "
				    (with-current-buffer
reb-target-buffer (buffer-string))))))
      )
    )
  )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-15 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-15 23:24 Two improvements Chitale, Sandip V

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.