From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: how to force auto-save of buffers not visiting files, right now? Date: Mon, 21 Mar 2022 10:22:34 +0300 Message-ID: References: <019b7e509c29caa462ff1c30079ce9bfb8cdc668.camel@adminart.net> <87zglq200a.fsf@web.de> <8fffdb6b532a1fc1805229acfcf9510c3afe18ec.camel@adminart.net> <87wngsmdwp.fsf@web.de> <9f32ac59eb1bc186b015c0b6c5b94822e70d4135.camel@adminart.net> <87y2164u5p.fsf@web.de> <9c3935a33573d50e595f37103434db5e29c21063.camel@adminart.net> <87ilsa61tn.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14825"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.0 (2022-02-12) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 21 10:58:07 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWEnf-0003dM-4O for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Mar 2022 10:58:07 +0100 Original-Received: from localhost ([::1]:40970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWEne-0004eg-3u for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Mar 2022 05:58:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWEmx-0004Yu-Kn for help-gnu-emacs@gnu.org; Mon, 21 Mar 2022 05:57:23 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:60295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWEmv-0000IS-Ra for help-gnu-emacs@gnu.org; Mon, 21 Mar 2022 05:57:23 -0400 Original-Received: from localhost ([::ffff:41.210.146.200]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000005BF0F.0000000062384BDF.0000193D; Mon, 21 Mar 2022 02:56:46 -0700 Mail-Followup-To: Michael Heerdegen , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87ilsa61tn.fsf@web.de> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136703 Archived-At: * Michael Heerdegen [2022-03-19 06:48]: > hw writes: > > > > But why isn't your code located in a buffer visiting a file? > > > > It is. The output of perltidy replaces it. > > Ok - but does it have to be auto-save? Why not just use normal backup > files? You can explicitly force the creation of backup files. And keep > a lot of them around. See (info "(emacs) Backup") and > (info "(emacs) Backup Deletion"). You can, for example, have hundred > backups of each file you edit - in a folder of your choice so that they > don't clobber your working directories. Exactly so. My backup files look as these: -rw-r--r-- 1 19K Feb 7 19:36 double-opt-in.el -rw-r--r-- 1 19K Aug 11 2021 double-opt-in.el~ In reality I almost never use them. > If you are familiar with git, I suggest to have a look at Magit and the > wip modes. After some setup, you get a backup for every save - or even > two, if the original state of the file was not yet backed up. Due to > git's delta compression it doesn't waste much disk space. The interface > lets you browse the versions and diff them etc. Good idea. I got tired of it all and made Emacs: RCD Version Control system with PostgreSQL backend: https://hyperscope.link/3/6/7/9/6/Emacs-RCD-Version-Control-system-with-PostgreSQL-backend-36796.html And now it is all without thinking and my backup files I just recall by using a function. Not as sophisticated, though very automatic. A version of file is in the database. If I need it, I get it back. Sometimes I do need to repair functions from past. If the file name location change, I will still be able to find the file in the database, or save it to file system from there. ID 44774 Date created "2022-03-19 13:17:14.745576" Date modified nil User created "maddox" User modified "maddox" Table nil Column nil Table ID nil Value "-- \\i /usr/share/postgresql/8.3/contrib/insert_username.sql ..." PGP Signature nil Short description "Automatic revision: 2022-03-19-15:17:13" Description nil File name "/home/data1/protected/public_html/rcd-business/rcdbusiness.sql" Revision nil Buffer nil Schema nil Database nil Hostname nil -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/