Aquamacsバージョン3.3(emacs 25.1.1)にアップグレードした後、re-replace-region
(下記に定義)の実行時にタイトルに記載されているエラーが発生しました。ある領域(例えば "99"または "999")の9文字列を0に変更しようとしています。以前のバージョンのAquamacs(または一般的にはemacs)でこの問題が起きたことは一度もありませんでした。emacs環境や一般的なマシン環境(Mac OS 10.9.5)で考えられることはありません。問題。"re-replace-region:バッファ変更フックで噛み合ったデータとのマッチング"
実際、同じマシンにemacs実行可能ファイル(バージョン22.1.1)があり、同じ環境(たとえば〜/ .emacsなど)で起動すると、re-replace-region
が正常に動作します。
私が提供できる唯一の手がかりは、3つの9(999)がある領域でre-replace-regionを実行し、9を0に変更しようとすると、最初の9がエラー条件育った。
;;; RE-REPLACE-REGION replaces OLD (a regular expression) with NEW
;;; throughout the region indicated by BEGIN and END.
;;; For example, to insert a prefix ">" at the beginning of each line
;;; in the region:
;;; M-x re-replace-regionRET^RET>RET
;;; I don't know who wrote this function!
(defun re-replace-region (begin end old new)
"Replace occurrences of REGEXP with TO-STRING in region."
(interactive "*r\nsReplace string: \nswith: ")
(save-excursion
(save-restriction
(narrow-to-region begin end)
(goto-char (point-min))
(while (re-search-forward old (point-max) t)
(replace-match new nil nil)))))
'emacs -Q'(initファイルなし)から始めて、問題を再現するためのステップバイステップのレシピを提供してください。あなたが何か間違ったことをしていないことをあなたや他の人が知ることができたら、Aquamacsの管理者やMx report-emacs-bugを使ってバグとして報告することを検討してください。あなたはそれがAquamacsを伴わないと思います。 – Drew