Hi,
I have a weird problem with Emacs, and it apparently started around the same time I started using Slime. I hadn't been coding for a few months and didn't notice that the simple filename.~N~ emacs backups had stopped working....sometimes.
After disabling various features in .emacs (or default.el), it doesn't seem to be slime related, but the time history matches up. After a week of guessing, I thought that maybe the emacs wizards here might have some better guesses.
Some facts:
With the root user, ~N~ backups are fine, regardless of the file ext. With the lisp user (I have one username exclusively for lisp work), ~N~ backups work on everything but .lisp files. So the version control settings would seem to be active, and testing in a *scratch* emacs buffer shows expected values.
.default.el:
; version control settings (setq backup-by-copying t backup-directory-alist '(("." . "~/.saves")) delete-old-versions t kept-new-versions 9 kept-old-versions 1 version-control t )
; SLIME (add-to-list 'load-path "/usr/share/emacs/site-lisp/slime") (require 'slime) (setq inferior-lisp-program "/usr/local/bin/lisp") (slime-setup :autodoc t) ;(add-hook 'slime-connected-hook 'slime-ensure-typeout-frame) (setq common-lisp-hyperspec-root "file:///usr/share/doc/HyperSpec/") (setq common-lisp-hyperspec-symbol-table "file:///usr/share/doc/HyperSpec/Data") (eval-after-load "hyperspec" '(load "hyperspec-addon"))
Root and lisp users have identical .emacs, except for username in email (setq-default mail-default-reply-to "spambait@clouddancer.com")
Grepping thru either .../slime/ or the emacs /lisp show that changing version-control is rarely done, and doesn't seem to be in slime at all.
This is GNU emacs 21.4, I tried dropping back to 21.3 with the same outcome.
Losing ~N~ backups is a problem, I'm used to being able to drop back to the code that had been working last hour, etc. Doing a lot of CVS submits just isn't a habit.
Any guesses?? Any replacement mechanisms?
GP lisper spambait@CloudDancer.com writes:
With the root user, ~N~ backups are fine, regardless of the file ext. With the lisp user (I have one username exclusively for lisp work), ~N~ backups work on everything but .lisp files. So the version control settings would seem to be active, and testing in a *scratch* emacs buffer shows expected values.
You mention CVS. Are you sure that the difference is between lisp files and all other files, or is it that the lisp files are under CVS and the others are not?
If emacs can detect that a file is under CVS it will not by default generate ~ or numbered backup files for it.
Emacs normally does not save backup files for source files that are maintained with version control. If you want to make backup files even for files that use version control, set the variable `vc-make-backup-files' to a non-`nil' value.
from the Info node '(emacs) General VC Options'. This is to my mind the kind of DWESRM crap that we're conditioned to expect from VC mode, but there you go.
-dan
On Tue, 24 May 2005 11:59:07 +0100, dan@telent.net wrote:
GP lisper spambait@CloudDancer.com writes:
With the root user, ~N~ backups are fine, regardless of the file ext. With the lisp user (I have one username exclusively for lisp work), ~N~ backups work on everything but .lisp files. So the version control settings would seem to be active, and testing in a *scratch* emacs buffer shows expected values.
You mention CVS. Are you sure that the difference is between lisp files and all other files, or is it that the lisp files are under CVS and the others are not?
Good question, as it seems a bit more complicated. The lisp user has a directory named 'lisp', where lisp source and various usenet posts are stored, under .lisp and .nfo. I had forgotten that the .nfo files are not backed up either. I don't know how something might have come under CVS control, it might have been something Gentoo did, but I would think that one of the emacs init files would need to have appropriate variables set. Neither .emacs or default.el have any emacs variables starting with vc- or otherwise sounding like version control. It would need to be default emacs behavior, and somehow include the .nfo files (perhaps via the directory name ??). There are no .cvs or .rcs directories in ~/lisp.
If emacs can detect that a file is under CVS it will not by default generate ~ or numbered backup files for it.
Emacs normally does not save backup files for source files that
are maintained with version control. If you want to make backup files even for files that use version control, set the variable `vc-make-backup-files' to a non-`nil' value.
from the Info node '(emacs) General VC Options'. This is to my mind the kind of DWESRM crap that we're conditioned to expect from VC mode, but there you go.
As usual with these sorts of posts, I did come across this information about 5 minutes after posting. I thought, 'Ah hah!'. I added:
; version control settings (setq backup-by-copying t backup-directory-alist '(("." . "~/.saves")) delete-old-versions t kept-new-versions 9 kept-old-versions 1 make-backup-files t vc-make-backup-files t version-control t )
NO change, backups still MIA. But vc-make-backup-files might be overridden, so here are the *Messages* from startup:
Loading tool-bar...done Loading image...done Loading tooltip...done Loading /usr/libexec/emacs/21.4/i686-pc-linux-gnu/fns-21.4.1.el (source)...done Loading time...done Loading cl-macs...done Loading cl-seq...done Loading regexp-opt...done Loading easy-mmode...done Loading edmacro...done Loading derived...done Loading byte-opt...done Loading cl-extra...done Loading hyperspec-addon (source)...done For information about the GNU Project and its goals, type C-h C-p.
A side effect is that I really appreciate the versioning filesystems idea now. Thanks for your post Dan.
TIA
On Tue, 24 May 2005 11:59:07 +0100, dan@telent.net wrote:
GP lisper spambait@CloudDancer.com writes:
With the root user, ~N~ backups are fine, regardless of the file ext. With the lisp user (I have one username exclusively for lisp work), ~N~ backups work on everything but .lisp files. So the version control settings would seem to be active, and testing in a *scratch* emacs buffer shows expected values.
You mention CVS. Are you sure that the difference is between lisp files and all other files, or is it that the lisp files are under CVS and the others are not?
OK, I'm going to assume that somehow I have triggered emacs version-control for the ~/lisp directory. Where that is recorded is a puzzle, but this is a plausible explanation, and I really need to get some other work done.
Thanks again Dan.