From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: user-directory: New library to find user {conf, data, state, ...} files Date: Sun, 7 Nov 2021 21:35:15 -0600 Message-ID: References: <83sfwp1c27.fsf@gnu.org> <83sfwnyi65.fsf@gnu.org> <83k0hzydcg.fsf@gnu.org> 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="6118"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 08 04:36:50 2021 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 1mjvSk-0001QV-Az for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Nov 2021 04:36:50 +0100 Original-Received: from [::1] (port=57794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjvSi-0002Id-Db for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 22:36:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjvRG-0000rB-Og for emacs-devel@gnu.org; Sun, 07 Nov 2021 22:35:18 -0500 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:53046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjvRF-0002cP-Bd; Sun, 07 Nov 2021 22:35:18 -0500 Original-Received: by mail-pj1-f46.google.com with SMTP id h24so6040141pjq.2; Sun, 07 Nov 2021 19:35:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=KJWsPPsGwxV9lQ3KWVk9GR/BHOwg5Bt4DdHYeMasrzk=; b=tmlbQBBlb4NE+uVFHpqb5BT6bGKWLrJS+7GzX2DyKnyfpAYam5FnskM3CVZDG0s66k QwkDGiWIBOsr9fdRA3aX3RwpJfvZLsxchDt/SZDSTM6r79G+Q1OwC6j6BYNuGrTJ/11E UxXgSzuotX3pvn2wqig1pOuzGY9sF20QMNo3Ba8+PIQe2lF4gYkmt+jPHygMdBsJpaew HsD8lhQq7SWr2FZ+jWH017oalULu3Pwy2GZtqFMw3OAWYAkEIGT8bAyuMV72sOLE1/vY 0qbB3fE/dgvVrXOcGo6y2WJu6ppcOO+s5ARflrDYmG2Jc1Bok4wWDm0uTEFZ7jU+uhUf rnKw== X-Gm-Message-State: AOAM530q/EiAuSoLWOkalyLPC+ldm/3Oik+LreDD3FehpfqRnmIyDyky 2uKRuq/wOO9kBjFlcE0tdSrV36ebrenb5tjZD6A= X-Google-Smtp-Source: ABdhPJxv67Emk6RfBNatF7UIoX4Mt3X6aHZcjugOKPbvwwfqAdjvHGY3Y69nqzSvRYb/Ur9MKE7x9rVyrVl7zG/iUv0= X-Received: by 2002:a17:90a:be10:: with SMTP id a16mr47847028pjs.133.1636342515530; Sun, 07 Nov 2021 19:35:15 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 7 Nov 2021 21:35:15 -0600 In-Reply-To: Received-SPF: pass client-ip=209.85.216.46; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f46.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:279009 Archived-At: Stefan Kangas writes: > I also think we should consider adding some heuristics to `user-file' to > be able to find the old name if it exists. I considered some > alternatives, but I thought I'd see what people think first. Currently, > application code would say: > > (user-file 'cache "image-dired" > (locate-user-emacs-file "image-dired")) > > Which could, if we want to be smart, be simplified to: > > (user-file 'cache "image-dired" "image-dired") I have implemented the above simplification now, see my recent commit to features/user-directory. We could take it even further if we want to of course, to support the below as well: > Or even: > > (user-file 'cache "image-dired") > > Unfortunately, in this case I think it's harder to be smart: > > (user-file 'data "bookmarks" > (locate-user-emacs-file "bookmarks" ".emacs.bmk")) > > But perhaps we can think of something even for that.