Daniel 'NebuchadnezzaR' Dehennin <[EMAIL PROTECTED]> writes:
> Hello,
Hello

>
> Any idée ?


This totally untested function might do what you expect. Just copy it in
your .emacs, and be sure to put it after any require regarding EMMS, so
that it overrides the one defined in emms-tageditor.el

(defun emms-tageditor-replace-tags (&optional field regexp replace-with)
  "Replace REGEXP with REPLACE-WITH in the widgets matching FIELD."
  (interactive)
  (setq field (or field (intern (completing-read
                               "Select which tags to replace in: "
                               '(("all" . all) ("title" . title)
                                 ("artist" . artist) ("album" . album)
                                 ("note" . note))
                               nil t "title"))))
  (setq regexp (or regexp (read-from-minibuffer "Regexp to replace: ")))
  (setq replace-with (or replace-with (read-from-minibuffer (concat "Replace 
regexp " regexp " with: "))))
  (setq replace-with (if (string= replace-with "'downcase") 'downcase 
replace-with))
  ;; Having all input, let's continue to act on it.
  (when (and field regexp replace-with)
    ;; two cases, 'all or something else
    (if (equal field 'all)
        (progn
          ;; We need a sweep-search of all tag-fields
          (let ((tags '(title artist album note)))
            (while tags
              (emms-tageditor-replace-tag (car tags) regexp replace-with)
              (setq tags (cdr tags)))))
      ;; only search the field called field
      (emms-tageditor-replace-tag field regexp replace-with))
    ;; we've probably changed some widget values, so we need to make
    ;; them count.
    (widget-setup)))


Hope this helps

-- 
Lucas



_______________________________________________
Emms-help mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to