From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: listing auto-save files that are newer Date: Fri, 30 Dec 2022 22:01:41 -0700 Message-ID: References: <87tu1khk9r.fsf@vagabond.tim-landscheidt.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Tim Landscheidt Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 31 06:02:21 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 1pBU0j-0006aO-3b for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Dec 2022 06:02:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBU0R-00013N-4M; Sat, 31 Dec 2022 00:02:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBU0G-0000yC-Pv for help-gnu-emacs@gnu.org; Sat, 31 Dec 2022 00:01:58 -0500 Original-Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBU08-0004fS-5V for help-gnu-emacs@gnu.org; Sat, 31 Dec 2022 00:01:46 -0500 Original-Received: by mail-lj1-x22c.google.com with SMTP id i19so11010384ljg.8 for ; Fri, 30 Dec 2022 21:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eYe9J/TaR1NQOIr1sygZY1jaLb6kxBvdf0J7c8k57Z0=; b=pGblQc/xsgUjmXYxlGMbv6lHxDMmknxcHXIHyXtg62YtMUumQr9Eggl9oILlS7CFP1 81ZSoyIkWF4x4dGSJGc2y+LzrWRx7MXNniqGGSw5UaTuQco2WxKp5u0puSL5cZUIK1fZ I++ah0qYI8DF90yuw49mv/MoRYiYher8rvSqwUt1oDagilGRjGk610TyFNAcX+LqKM5V pEaK8mWfjwE9V79+XvWFgAXHIQBUDvTeaookAvWSr+NFvNQ+2C8B6sbUoBRDT27e24St CSX6EQrE6LX4qCIYEXhTMh1magMQSziaL7wATKUa9+ja/9LXYW3orYmqOjEmBIVeXk8C GkVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eYe9J/TaR1NQOIr1sygZY1jaLb6kxBvdf0J7c8k57Z0=; b=RRF0ydQn1XiUnVPlmPMNzIIGm/k3Pz4psKIXKI4KxpZH+ERa1Q1xhRv1d6mXs8ZYNO Ir1XbCr9LmeHeuGG/jSOGGtXVv8O2UOtGSSHVUCHIur4ugZI3YXl9jh2rU8JwoZN0g7R rcv/FGWh1yzA8b8xhUbuUM43Ti36tbtp6Fe8ak/LIHYOR7+OY4aEmruyWvNiFfxYr82M lBpDpOJ8AjehLAPvkbWCdvaT0/eVd+0L/zzXiEEZ8V0hZUuzqdncU7IEvvC+Syjvk8K7 V6dKetznPrvGRVNV/4L+j6dBF2JbiU+0SqsyYHYE8Sxoy+JVpvOUtgrxFTYP4l8kStzm enuw== X-Gm-Message-State: AFqh2krVfxyqRnvKkAw7+iOvQhWj/KiePPslKZ+zIUicpzRDiWAhO18U sAmQbTEig/i5cWO2cmCu5iAuwBGfJSwSjFJrcNh/AEXmJc7RdMgV X-Google-Smtp-Source: AMrXdXsAe7JeBPjxZZkF1o17qiXa8m9BSl7pX+/CQ8VZi9+RkF6JZik4djx2M/+WuEwR2OWlTz6SQ6ptN8Fgi/lZwN8= X-Received: by 2002:a05:651c:c91:b0:27f:c7b3:31b3 with SMTP id bz17-20020a05651c0c9100b0027fc7b331b3mr935378ljb.361.1672462902468; Fri, 30 Dec 2022 21:01:42 -0800 (PST) Original-Received: by 2002:aa6:c266:0:b0:23b:5e81:46ba with HTTP; Fri, 30 Dec 2022 21:01:41 -0800 (PST) In-Reply-To: <87tu1khk9r.fsf@vagabond.tim-landscheidt.de> Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=samologist@gmail.com; helo=mail-lj1-x22c.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142063 Archived-At: i forgot to mention, i have all of my auto-save files in one place: (setq auto-save-list-file-prefix (expand-file-name ".saves-" alpha-auto-save-directory)) (setq auto-save-file-name-transforms `((".*" ,alpha-auto-save-directory t))) your idea seems plausible. i also have this, but it depends on buffers. not files. (defun alpha-file-auto-save-newer-p () (or (recent-auto-save-p) (file-newer-than-file-p (or buffer-auto-save-file-name (make-auto-save-file-name)) buffer-file-name))) [i missed this message because i can't figure out how to filter [webmail, nothing so sophisticated as gnus].] On 12/24/22, Tim Landscheidt wrote: > Samuel Wales wrote: > >> is there a function for listing all files that have auto >> save files that are newer? e.g. for after a computer crash. > >> i found no such. i want to put such a list at top of scratch buffer >> on startup. like this: > >> auto-save file is newer -- fixme: /home/whatever/wherever/executive.org >> auto-save file is newer -- fixme: /home/whatever/wherever/config-file > > I don't know but I'm looking for something like that as > well. I was thinking about a function that iterates over > all ~/.emacs.d/auto-save-list files that are not of the cur- > rent Emacs process, iterates over all filenames in those, if > for one of those filenames there is an auto-save file, vis- > its the first one or, if there is none, deletes that > ~/.emacs.d/auto-save-list file. > > The UI flow would be to call the function and deal with the > first file, lather, rinse, repeat. As a Gnus user there > would be need to be an exception for ~/.newsrc.dribble~ > which Gnus handles itself. > > Tim > > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com