From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Bingham, Jay" Newsgroups: gmane.emacs.help Subject: RE: Question about backup files Date: Tue, 1 Oct 2002 12:07:58 -0500 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <72A87F7160C0994D8C5A36E2FDC227F50346D413@txnexc01.americas.cpqcorp.net> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1033492192 21795 127.0.0.1 (1 Oct 2002 17:09:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Oct 2002 17:09:52 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17wQWr-0005fH-00 for ; Tue, 01 Oct 2002 19:09:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17wQXA-00011k-00; Tue, 01 Oct 2002 13:10:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17wQVC-00007l-00 for help-gnu-emacs@gnu.org; Tue, 01 Oct 2002 13:08:06 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17wQVA-00007Y-00 for help-gnu-emacs@gnu.org; Tue, 01 Oct 2002 13:08:06 -0400 Original-Received: from zcamail05.zca.compaq.com ([161.114.32.105]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17wQV7-00006O-00 for help-gnu-emacs@gnu.org; Tue, 01 Oct 2002 13:08:01 -0400 Original-Received: from cacexg11.americas.cpqcorp.net (cacexg11.americas.cpqcorp.net [16.105.250.94]) by zcamail05.zca.compaq.com (Postfix) with ESMTP id 411E73DBC for ; Tue, 1 Oct 2002 10:08:00 -0700 (PDT) Original-Received: from txnexc01.americas.cpqcorp.net ([16.74.7.244]) by cacexg11.americas.cpqcorp.net with Microsoft SMTPSVC(5.0.2195.2966); Tue, 1 Oct 2002 10:07:59 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Question about backup files Thread-Index: AcJpXYaFPkOekxQTQQu7Q9p+a3UEswABlXOw Original-To: X-OriginalArrivalTime: 01 Oct 2002 17:07:59.0906 (UTC) FILETIME=[18410020:01C2696D] Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2150 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2150 Ben, The lisp reference manual will answer many questions of this type. If = you do not have a copy installed on your system you can find a copy on = the web. The lisp reference manual for emacs 21.2 is at: = http://www.gnu.org/manual/elisp-manual-21-2.8/html_mono/elisp.html=20 The lisp reference manual for emacs 20.3 is at: = http://www.gnu.org/manual/elisp-manual-20-2.5/html_mono/elisp.html The answer to your question can be found in the section on 'prefix = command arguments'. Briefly here is what it says: The default prefix argument is 1, each = time that C-u is pressed the current prefix arg value is multiplied 4. = Therefore for the first C-u the arg value is 4, for the next it becomes = 16, for the next 64 and so on. -_ J_) C_)ingham . HP - NonStop Austin Software & Services - Software Product = Assurance . Austin, TX . Language is the apparel in which your thoughts parade in public. . Never clothe them in vulgar and shoddy attire. -Dr. George W. = Crane- -----Original Message----- From: Ben Key [mailto:BenK@FreedomScientific.com]=20 Sent: Tuesday, October 01, 2002 10:04 AM To: Bingham, Jay Subject: RE: Question about backup files Thanks for your response. How can I figure out what arguments are = passed to save-buffer when multiple C-u are typed? -----Original Message----- From: Bingham, Jay [mailto:Jay.Bingham@hp.com] Sent: Tuesday, October 01, 2002 10:27 AM To: Ben Key Subject: RE: Question about backup files Ben, In emacs, all (well most things) are possible depending on how much = effort you want to expend to make it happen. What the C-u does is pass a numeric argument to the function. I am not certain what gets passed when multiple C-u are typed. It is obvious = that it either causes a different numeric value or a different number of arguments of the same value to be passed in each case. The best way to = find out is to go look at the lisp for the command save-buffer which is an interactive compiled Lisp function in `files.el'. The argument list for this command is (save-buffer &optional ARGS). Once you know what to pass then you can write your own function that = calls save-buffer with the appropriate arguments and assign it to your key sequence. You may have to replicate some of the code that gets the name = of the buffer to save. Good luck -_ J_) C_)ingham . HP - NonStop Austin Software & Services - Software Product = Assurance . Austin, TX . Language is the apparel in which your thoughts parade in public. . Never clothe them in vulgar and shoddy attire. -Dr. George W. Crane- -----Original Message----- From: Ben Key [mailto:BenK@FreedomScientific.com]=20 Sent: Tuesday, October 01, 2002 8:16 AM To: help-gnu-emacs@gnu.org Subject: Question about backup files The following is an excerpt from the GNU Emacs manual: "You can also explicitly request making another backup file from a buffer even though it has already been saved at least once. If you save the buffer with `C-u C-x C-s', the version thus saved will be made into a backup file if you save the buffer again. `C-u C-u C-x C-s' saves the buffer, but first makes the previous file contents into a new backup file. `C-u C-u C-u C-x C-s' does both things: it makes a backup from the previous contents, and arranges to make another from the newly saved contents if you save again." My question is, is it possible to create a more simplified keystroke assignment that implements the same behavior as `C-u C-u C-u C-x C-s'. For example, I would like to assign this behavior to 'ESC C-x C-s'. _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnu-emacs