;;Copyright 2008 Timothy Hobbs, tim.thelion@gmail.com ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;; ;; Use Drew Adam's unaccent.el to unaccent all the files in a directory. ;; ;; Prerequisites ;; ;; unaccent.el - http://www.emacswiki.org/cgi-bin/wiki/unaccent.el ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; New functionality defined here: ;; ;; `unaccent-dir' ;; (require 'unaccent) (defun unaccent-dir (dir) "Move all of the files in dir to unaccented names." (interactive "DAccented directory:") (let ((file1 "")) (dolist (file (cddr (directory-files dir))) (with-temp-buffer (insert file) (unaccent-region (point-min)(point-max) nil) (beginning-of-buffer) (replace-string "?" "") (setq file1 (buffer-string)) (message file1)) (shell-command (concat "mv \""dir "/" file "\" \""dir"/" file1 "\""))))) (provide 'unaccent-dir)