how to reproduce the file-name-handler bug in [lx]emacs

jeff (jsparkes@bnr.ca)
Thu, 21 Jul 1994 14:44:00 -0400


I've specifically tested this with (emacs-version)
"GNU Emacs 19.11 XEmacs Lucid (beta3) of Wed Jul 20 1994 on bcars68a
(berkeley-unix)"

The following code demonstrates the problem with file-name-handlers
that efs-19 provokes in lemacs.  If you load it from xemacs -q, you
get a (bogus) warning about the file changing on disk.

Hopefully this will help others more knowledgable about internals to
figure out why the buffer modtime is not getting set correctly.

;; Exercise the file-name-handler bug that efs-1.9 runs into

(defun bogus-handler-fn (op &rest args)
  ;; Function to update dired buffers after I/O.
  (progn
      (let ((inhibit-file-name-handlers
	     (cons 'bogus-handler-fn
		   (and (eq inhibit-file-name-operation op)
			inhibit-file-name-handlers)))
	    (inhibit-file-name-operation op))
	(apply op args))))

(setq file-name-handler-alist '(("." . bogus-handler-fn)))

(find-file "/tmp/x")
(insert "xxxxx")
(save-buffer)
(insert "yyyy")
--
Jeff Sparkes
jsparkes@bnr.ca    Bell-Northern Research, Ottawa, Ontario, Canada