From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] package proposal: fannypack.el Date: Tue, 22 Feb 2022 16:41:33 -0500 Message-ID: References: <871qzvqbjj.fsf@thornhill.no> <87o82ylnrs.fsf@posteo.net> <87y222pu4y.fsf@thornhill.no> <87a6eik6u4.fsf@posteo.net> <87fsoa1ua6.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="313"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Philip Kaludercic , emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 22 22:47:09 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nMd00-000ASM-Uj for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 22:47:09 +0100 Original-Received: from localhost ([::1]:53370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMczz-00031C-J9 for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Feb 2022 16:47:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMcv5-0007mc-Rz for emacs-devel@gnu.org; Tue, 22 Feb 2022 16:42:04 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMcug-0001Yq-1y for emacs-devel@gnu.org; Tue, 22 Feb 2022 16:41:51 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DE5C41001CB; Tue, 22 Feb 2022 16:41:35 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5C23B100124; Tue, 22 Feb 2022 16:41:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1645566094; bh=nV+5fuVcKO/vJgiIof52X7B9+HC+XhEhOR+a58wgKpA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kVqqiXKPTHmNJyPeppA9NaHY496Gsoyu/8RnRlYPQmLDZN6gh22sQvQ50ErplGgdA QrWdN8gZj6Ob364d29uKO84Da06d6dXDbWYxnKFC/ljAp3fkQLmE11P6KaJZaVNnnB 46O5gTboJ3GQRv6j2eMu4kUkfe7Kx41Juo37KRa/Oj4kXxPUeTktI6Qf1bqSl/k22w BHKyXwce+yugBnSiZndBg9JgG3F1oh1Ck9OcAO1VB+j/8ThllbD5CbMfXmvz/FaYWv Q3TLNMSJNfT86cgjeUjGHk++U/4TiQcYiOTDjPqeIcXkRhy6az9wJfHD1ExZDKBv0p DAHPCN1S6XFaQ== Original-Received: from pastel (unknown [45.72.197.68]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 31565120AA3; Tue, 22 Feb 2022 16:41:34 -0500 (EST) In-Reply-To: <87fsoa1ua6.fsf@thornhill.no> (Theodor Thornhill's message of "Tue, 22 Feb 2022 22:11:13 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286607 Archived-At: Thanks, pushed `satchel` to elpa.git. See patch below (the first hunk of which is necessary before the tarball can be built). BTW, this makes me wonder if we couldn't make something slightly more automatic/transparent. E.g. keep track of all the times you select a file/buffer and the branch that was current for that file/buffer at that time, and then use that history to sort past files/buffers by frequency of use in the current context (directory&branch)? Stefan PS: Personally, the branch info would be of virtually no use to me since I rarely if ever `checkout` and use `git worktree`s instead. diff --git a/satchel.el b/satchel.el index 1d736f03e5..cef792af15 100644 --- a/satchel.el +++ b/satchel.el @@ -1,6 +1,6 @@ ;;; satchel.el --- A bag for your files, separated by git branches -*- lexical-binding: t; -*- -;; Copyright (C) 2022 Theodor Thornhill +;; Copyright (C) 2022 Free Software Foundation, Inc. ;; Author: Theodor Thornhill ;; Keywords: tools languages @@ -48,6 +48,7 @@ :group 'tools) (defcustom satchel-directory + ;; FIXME: Use `locate-user-emacs-file'? (concat user-emacs-directory ".local/satchel/") "Where the satchels will be saved." :type 'string) @@ -77,7 +78,7 @@ This is a file named after the path of the directory it refers to. There can be several of those files, appended with the current branch name. If the file can be found, we read that file -into lisp data." +into Lisp data." (let ((filename (satchel--name))) (when (file-exists-p filename) (with-temp-buffer