From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Default for image-dired-main-image-directory Date: Tue, 26 Oct 2021 22:58:09 +0800 Message-ID: <877ddzvnni.fsf@localhost> References: <83sfwp1c27.fsf@gnu.org> <83a6iwylp7.fsf@gnu.org> <87a6ivvr5t.fsf@localhost> <83wnlzyir1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29956"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 26 16:59:52 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 1mfNvb-0007Yn-KC for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 16:59:51 +0200 Original-Received: from localhost ([::1]:50860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfNva-0002XW-Ht for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Oct 2021 10:59:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfNsf-0006Fw-1T for emacs-devel@gnu.org; Tue, 26 Oct 2021 10:56:49 -0400 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:39866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfNsb-0001QM-TW; Tue, 26 Oct 2021 10:56:47 -0400 Original-Received: by mail-pl1-x631.google.com with SMTP id t21so10519228plr.6; Tue, 26 Oct 2021 07:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=VUvq1m22bvPepvd/KhLv0pL00fXF+dVztQec4uJbg/M=; b=m8EPeb6z54LxeJ+exaiGtM9krJ1XOc/viMajDMKNc+8hdv74QBNcBgPcj+EYqLUmaF zh8rfHv9IAweRiptvqCha1Qo6WvYPfW+rSyTrZ46RTecRVcGlE3YAWQV6enT8qj276FP 4P2t/enwiokJgfEqrgYgy+Os4nuOfB276SRT/DfTXkoQLMKOgmY56N2GFoqSRiqXCSam xWBX/5Vu0qaK3cWUABR1+U1Gq11YhTCWdDfBUEsIs2F73jh1eYSfA9ED5kLykz3kH/ok mIEF1mC92JfZCcYkQdW5gt75EKaQHEATx6WKjzXJuJzHM44OeKBCMcc7XgT2MAQWrmVr FlmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=VUvq1m22bvPepvd/KhLv0pL00fXF+dVztQec4uJbg/M=; b=DZYkIyqjrMCCWOD/HPK/c6CEmooaNftCsuBAIMSV3fhp48GVsM5svsOa9l3TEdH5wR 3Ny65lYETL5p9Xv8A5pVp8RgsxPdlNK2d2E224XJczPsd07LqL8qZYJXBPjjWzm0KXZ3 yjndGzSJhCdKf1ynRYLoquV6dTpviofq/mk5SoM1WkSPNYW1XL7IwMm/Lk8Gar4e8fWl kBT6ClLxLQ44FyIt+Fuk9HaaCUIa+CvEkCBMhpefHuah5EsH+3ivHqUKZLXZ6OIouu57 2prULvFG/K8ugKyHFeMdkj7c+FUttJVRSeqDXdOqV5v5rN+8AioSte6OCTd0y3iy6J1E RfAA== X-Gm-Message-State: AOAM533zOJmkeC1dUBwwjHUq1BP8lMPVWN4MAtnxjeAVizAoYJ5yOH3f B7GEJCidw8HlL39/9Pdyj1FZTyNwcLfl4w== X-Google-Smtp-Source: ABdhPJy0bILv+Om4ymyXdCgUwjaHGMofnE6je4kf2JDBs09/shFJrhwcefo8OpM/JwOuXTujCCrlTg== X-Received: by 2002:a17:90a:8b08:: with SMTP id y8mr13229883pjn.148.1635260203563; Tue, 26 Oct 2021 07:56:43 -0700 (PDT) Original-Received: from localhost ([103.125.234.161]) by smtp.gmail.com with ESMTPSA id b14sm1119078pjo.44.2021.10.26.07.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 07:56:43 -0700 (PDT) In-Reply-To: <83wnlzyir1.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yantar92@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:277875 Archived-At: Eli Zaretskii writes: >> Essentially, it is similar to XDG directory set, but all the directories >> are inside .emacs.d by default. > > That's a different philosophy, and since it contradicts XDG, which > many people want, I don't think we can go that way, except as an > opt-in feature (which will then become a maintenance burden, as it > will be yet another, third, set of defaults). Not necessarily. no-littering provides a unified directory structure to be used by other packages. Yes, it defaults to structure inside .emacs.d (and thus do not need to bother with OS-specific conventions), but that's not required: (defvar no-littering-etc-directory (expand-file-name (convert-standard-filename "etc/") user-emacs-directory) "The directory where packages place their configuration files. This variable has to be set before `no-littering' is loaded.") >From point of view of a package author, I usually have difficulty deciding where to put files. Package install dir? Directly into .emacs.d? User home dir? I would prefer to have a convention about default dirs. I would prefer Emacs to handle variations of directory structure in different OS. no-littering proposes a set of Emacs-specific conventions about where to put package files: >> (A) File names >> >> File names are based on the name of the respective Emacs lisp variables >> and the name of the respective Emacs package. >> >> The name of the respective Emacs package should serve as the prefix of >> the file name, unless the file is in a subdirectory in which case the >> name of the subdirectory serves as the prefix. >> >> If the name of the package and the prefix of the variable do not match, >> then we prefer the name of the package. >> >> If the name of a path variable ends with -file, -default-file, >> -directory, -default-directory, or something similar, then that suffix >> is usually dropped from the file name. >> >> If applicable, the appropriate extension is added to the file name so >> that files are visited using the appropriate major-modes and also to >> provide a hint about the kind of data stored in the file. E.g. if a file >> contains an S-expression, then the suffix should be *.el. >> >> B) File location and subdirectories If a package has only one data file, >> then that is usually placed in no-littering-var-directory itself. >> Likewise if a package has only one config file, then that is placed in >> no-littering-etc-directory itself. >> >> If a package has multiple data (or config files), then those files are >> placed in a subdirectory of no-littering-var-directory (or >> no-littering-etc-directory). >> >> If a subdirectory is used for a package's data (or config) file >> variables, then the name of the directory should match the name of the >> package in most cases. The subdirectory name may serve as the package >> prefix of the file name. >> >> If a package provides a "framework" for other packages to use, then we >> may reuse its directories for other packages that make use of that >> framework or otherwise "extend" the "main package". E.g. we place all >> helm related files in helm/. >> >> If a package only defines a single variable that specifies a data (or >> config) directory, then the directory name should nevertheless be just >> the package name. E.g. the path used for sx-cache-directory from the sx >> package is sx/cache/, not sx-cache/. >> >> However if the name of the directory variable implies that the package >> won't ever define any data (or config) files that won't be placed in >> that directory, then we use a top-level directory. E.g. when the name of >> the variable is -directory, in which case we would use just >> / as the path. Best, Ihor