home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / emacs / help / 4739 < prev    next >
Encoding:
Text File  |  1992-11-09  |  5.9 KB  |  132 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!stanford.edu!agate!netsys!decwrl!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!src.bae.co.UK!moore
  3. From: moore@src.bae.co.UK (Chris Moore)
  4. Subject: backup file directory
  5. Message-ID: <9211092120.AA27386@sun19.src.bae.co.uk>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
  8. References: <1992Nov5.161450.16470@ee.eng.ohio-state.edu>
  9. Date: Mon, 9 Nov 1992 21:20:58 GMT
  10. Lines: 120
  11.  
  12.  
  13. jcours@kalman.eng.ohio-state.edu (Jeffrey Cours) said:
  14.  
  15. > 1) when does the FAQ come out and/or where could I FTP a copy?
  16.  
  17. From the FAQ:
  18.  
  19. -----cut-----8<-----here-----8<--------------8<--------------
  20. 22:  Where can I get the latest version of this document (the FAQ list)?
  21.   
  22.   The GNU Emacs FAQ is available in several ways:
  23.   
  24.   * [ section on finding it via USENET deleted, since it's long and you
  25.       probably tried that already ]
  26.  
  27.   * Via anonymous FTP.  You can fetch the FAQ articles via anonymous FTP
  28.     (rtfm.mit.edu:pub/usenet/news.answers/GNU-Emacs-FAQ/part?).
  29.   
  30.   * Via e-mail.  You can send the following magical incantation in the body
  31.     of a message to mail-server@rtfm.mit.edu:
  32.   
  33.       send usenet/news.answers/GNU-Emacs-FAQ/part0
  34.       send usenet/news.answers/GNU-Emacs-FAQ/part1
  35.       send usenet/news.answers/GNU-Emacs-FAQ/part2
  36.       send usenet/news.answers/GNU-Emacs-FAQ/part3
  37.       send usenet/news.answers/GNU-Emacs-FAQ/part4
  38.       send usenet/news.answers/GNU-Emacs-FAQ/part5
  39.   
  40.   * Via WAIS.  The GNU Emacs FAQ is available via WAIS indexed on a
  41.     per-question basis from the `faq' database on bigbird.bu.edu on the
  42.     non-standard IP port number of 2210.  This is probably the best way to
  43.     find out if there is something in the FAQ related to your question.  I
  44.     use this myself to answer questions I see posted on gnu.emacs.help.
  45.   
  46.     The articles of the GNU Emacs FAQ are also available from the `usenet'
  47.     database on rtfm.mit.edu (on the standard IP port: 210), along with a
  48.     lot of other FAQ articles.  However, these are all indexed at the whole
  49.     article level instead of at the question level.  This is a better place
  50.     to look if you want to fetch the entire FAQ.
  51.   
  52.   * In the GNU Emacs distribution.  Since GNU Emacs 18.56, the latest
  53.     available version of the FAQ at the time of release has been part of the
  54.     GNU Emacs distribution as file etc/FAQ.  18.58 is the latest version,
  55.     and it was released in February 1992.
  56.   
  57.   * As the very last resort, you can e-mail a request to                     !
  58.     gnu-emacs-faq-maintainers@bigbird.bu.edu.  Don't do this unless you have !
  59.     made a serious effort to obtain the FAQ list via one of the methods      !
  60.     listed above.                                                            !
  61. -----cut-----8<-----here-----8<--------------8<--------------
  62.  
  63. > 2) I'm just starting to move over to GNU emacs after spending many
  64. > years using vi. Unfortunately, I don't know which version of emacs
  65. > we're using on the Sun's here, or even how to find out the version
  66. > number from within the program, which may make the answer to this
  67. > question a little tricky.
  68.  
  69. M-x emacs-version gives the version.
  70.  
  71. > Nice as it is to have backups, having
  72. > all those backup files around tends to clutter up my directories. Is
  73. > there a relatively simple way to convince emacs to put the backup
  74. > files in a different directory than the source file, maybe something
  75. > like ~/backups ?  I'd like to keep getting backup files, but I just
  76. > don't want them getting in the way.  Conflicting file names
  77. > shouldn't be much of a problem since most of what I edit is my own
  78. > stuff. Is there a variable I could set that prefixes a path name onto
  79. > the name of any backup file emacs makes?
  80.  
  81. I hacked together some code a while ago which does a similar thing for me.
  82. I've only really used version 18.57 and I'm not too clear on the
  83. differences between the various emacs versions, so I can't say that this
  84. will necessarily work for you.  With my code installed, when it wants to
  85. create a backup file, emacs will first check the current directory to see
  86. if it contains a subdirectory called "TILDE" (or any other name, as set by
  87. the user).  If it does, the backups go there, otherwise they go in the
  88. current directory.  This avoids filename clashes, which quite easily result
  89. even if you only edit your own stuff, since you might have more than one
  90. file called Makefile, or README, or whatever.
  91.  
  92. The code works by altering the behaviour of the function
  93. find-backup-file-name.  I use the advise.el package to do this.  I don't
  94. remember where I found that package and it doesn't appear to be in the
  95. Emacs Lisp Archive - maybe somebody can post a pointer to it.  The first
  96. line of the file is:
  97.  
  98. ;;; $Header: /tmp_mnt/am/p7/utility/gmacs/f2/RCS/advise.el,v 1.2 89/03/25 14:00:55 kahle Exp $
  99.  
  100. and the 'NO WARRANTY' paragraph mentions Thinking Machines Corporation.
  101. Maybe these clues will help you track it down.  I can mail you a copy if
  102. you can't find it any other way.
  103.  
  104. -----cut-----8<-----here-----8<--------------8<--------------
  105. (autoload 'advise "advise" "" t)
  106.  
  107. ;; Where to put backups so our directory is neat and tidy.
  108. (defvar backup-directory "TILDE"
  109.   "Name of subdirectory in which to save backup files if it exists.")
  110.  
  111. ;; Change find-backup-file-name to save backups in the subdirectory
  112. ;; specified by backup-directory if it exists.
  113. ;;
  114. ;; Note: you need advise.el.  You will need to [auto]load it first.
  115. ;;
  116. (advise find-backup-file-name :before
  117.     (if (file-directory-p backup-directory)
  118.         (let ((fn (car arglist)))
  119.           (setq arglist (list (concat (file-name-directory fn)
  120.                       backup-directory "/"
  121.                       (file-name-nondirectory fn)))))))
  122. -----cut-----8<-----here-----8<--------------8<--------------
  123.  
  124. I hope this is useful.
  125.  
  126. Chris.
  127. --
  128. moore@src.bae.co.uk   /      Chris Moore      \
  129.                      / Sowerby Research Centre \
  130.                      \  British Aerospace PLC  /
  131. tel: +44 272 363375   \      BRISTOL, UK      /
  132.