From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: hw Newsgroups: gmane.emacs.help Subject: Re: how to force auto-save of buffers not visiting files, right now? Date: Sun, 20 Mar 2022 07:36:42 +0100 Message-ID: <95f0e96687187c20086bf9f85a031a7271401407.camel@adminart.net> 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> <37e890d9c251b30d0caf83aa590bca1ad92ec5d4.camel@adminart.net> <87wngqclgk.fsf@gmx.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="16142"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 20 07:37:42 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 1nVpCA-00042U-5O for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 07:37:42 +0100 Original-Received: from localhost ([::1]:58160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVpC8-0008Te-F6 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Mar 2022 02:37:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVpBH-0008TR-HV for help-gnu-emacs@gnu.org; Sun, 20 Mar 2022 02:36:49 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:34673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVpBF-0006FA-Oo for help-gnu-emacs@gnu.org; Sun, 20 Mar 2022 02:36:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1647758202; s=strato-dkim-0002; d=adminart.net; h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From: Subject:Sender; bh=1Mofyj3V57CU3E4EpTjBExhmEWN4Z/pF+LEawFT3W4Q=; b=lkX5p5UXfmYYVSpUGOAfyNJIpjVTcZJkQdm1mDXGtDr2Ay464VBNqCfZBUjMV0kllL xaRRUky3PkFpOXsGJ4QY6q0KgxJRHlok/0KLd0d99a+s+fO4vLdHIkzNDxc5p4weOx9w BWHeZurQChKYXPe5vXjerkVLn8O/nrzKVoRqy+LCc6UkpWCvVkzlrPSRGxNIUDvzvB7+ QhBhVI9KzyipLmRfIWzl1miNIWPkm2CHylvK/NVFwtqAKYeoUC0ucY8hLmgS8WNX7uJm VKV8cE9f6VbQv1ewp6hZzoC7mEqNwyewiSyroS0nhpiiTdYSY39KLP4fjfuxLEGGqsJH 2Z/g== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JHskdESlcvGJlcww5P8kEdDfB60eDdbwg2z1BLI60U5wCzf09BLZZsSKYxPQaavhGO/kap91D/OoCoP2QrxBY8ct0jBjyQ6QTgS1" X-RZG-CLASS-ID: mo00 Original-Received: from [IPv6:2a09:8e40:1b4d:a200:156a:299a:44c4:5337] by smtp.strato.de (RZmta 47.41.1 AUTH) with ESMTPSA id U40bf1y2K6agAVU (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sun, 20 Mar 2022 07:36:42 +0100 (CET) In-Reply-To: <87wngqclgk.fsf@gmx.de> Received-SPF: none client-ip=85.215.255.22; envelope-from=hw@adminart.net; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=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:136685 Archived-At: On Sat, 2022-03-19 at 10:58 +0100, Michael Albinus wrote: > hw writes: > > Hi, > > > For example, I may edit a file '/usr/local/bin/example.pl' which is > > owned by foo:foo because I made that so. The directory > > '/usr/local/bin/' is owned by root. How do you expect emacs to create > > a backup file there? For remote files, I have set > > tramp-auto-save-directory to a local directory, and I'm missing an > > equivalent option for local files. > > There is the user option auto-save-file-name-transforms, which gives you > this feature also for local files. Thanks! Its value is (("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'" "/tmp/\\2" t)) Ah, hm, what is that regexp supposed to match? All files with at least a ':', a bunch of slashes and some optional brackets? Who puts bracktes into file names, that shouldn't be allowed. Apprently that leads to puttting some files into /tmp, and I would consider it a bug to put auto-save files into /tmp because doing that totally defeats the auto-saving because /tmp is volatile. I don't know who made the utterly stupid decision to make /tmp volatile, but it's the way it is since quite a while now. This default needs to be changed, or /tmp needs to go back to be a useful directory. Why didn't they just make a directory /volatile in addition to /tmp? Because someone would argue that when something must not be saved, then don't save it to begin with? But then, the auto-save files for buffers not visiting files show up in the directories the files are in from which the buffers not visiting these files were created. That is very confusing.