From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help,gmane.emacs.erc.general Subject: Re: Set the default-directory dynamically according to the buffer-file-name. Date: Thu, 30 Sep 2021 15:00:48 +0800 Message-ID: References: <87bl4b2y70.fsf@gnu.org> <87fstmohsw.fsf@zoho.eu> 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="25647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-erc@gnu.org To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 30 09:03:43 2021 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 1mVq6Y-0006QG-OT for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 30 Sep 2021 09:03:42 +0200 Original-Received: from localhost ([::1]:55824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVq6X-0005nI-49 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 30 Sep 2021 03:03:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVq41-0005ko-Kz; Thu, 30 Sep 2021 03:01:11 -0400 Original-Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]:41830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVq3x-00086M-3Q; Thu, 30 Sep 2021 03:01:05 -0400 Original-Received: by mail-vs1-xe35.google.com with SMTP id az15so6053535vsb.8; Thu, 30 Sep 2021 00:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=awq9+LlQYlvm6DpxmjL3L/ftR20fenMt7kA+kNAl+rU=; b=HTDm9E6bkUHTNBqsK5hY5TuRqBqET5oer3fA0R7v17cu+ezGn3ISc+krQmMb3IIEM1 aul2W20NwJrjhTCbsMmRcLc/zNtkZBaGGpdjPASOUXHI0EU9aoXhmtOhZELC+T3rKqfL 8VdzyPf286vNzPQlJHcC94mRKDF9voOknojFJYpi0MYykRc2tRbxGdLK0Herhdgb/Emm NlpRZY8DMrOGoGazKSqCZuXm8iAlP0/bNS+OAIoRBh5INAsFSLKDgTJmEg4uTRvTXfbK PDlk1J4q7LGAhktDOxv2V/rfevibvmkWgIW77XMiaVCHXQc6cJ5RuhyXFbHDGcthIrte fqiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=awq9+LlQYlvm6DpxmjL3L/ftR20fenMt7kA+kNAl+rU=; b=qvm+JoGDxVoqs1TpImejoHMbQl8YLvEYUb0QojdFyZfSAwI0aqYmiY/o8sanDZQhZV Sc1roI8S0ZX4VNnn5KHwOvhovNWeAyUoi4vcLC4zWd6SD+bG3lX8TrGhTx7TPBVULR57 p0QgLc6L3neC+RHdkolbOFfm1RhtaFXaIw+3EgrIibffbAeRwrr9m6JiCdDK0LX6p/Gf o6UooN7KCeaPQPd31jdlKJwPvkzJENKVkPl1Ybyw1rWtyYDfXiSoZXIDIgBcuv52W/nS jizwAdUf3IoKrdrNVS93lY+m4+UL+j9HOJTy2uSMuJNFmhNRv546SqWGD7rDt/+ewR/J gEww== X-Gm-Message-State: AOAM532VEUKv4fVDUHS9tP6TxDbQ9/hmFOatDC+iyMc2+J7moqsJUTk1 8MLcqd8G+eIwiF8WzutNuq5s1ssoEdm0B20xfQg= X-Google-Smtp-Source: ABdhPJz4PPxgs1YsuNH+qAmwq307fBldIeP+5CJQy7JzBsCLoo2n9SGf2c0iLmtmYOSc2r+vWve+8kqOy1Glvau5Ir4= X-Received: by 2002:a05:6102:1357:: with SMTP id j23mr2073560vsl.25.1632985259454; Thu, 30 Sep 2021 00:00:59 -0700 (PDT) In-Reply-To: <87fstmohsw.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=hongyi.zhao@gmail.com; helo=mail-vs1-xe35.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.23 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:133409 gmane.emacs.erc.general:1614 Archived-At: On Thu, Sep 30, 2021 at 11:37 AM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > Yes, that's it. So, my code snippet is unnecessary. > > I have 100+ Elisp files [1] and if everything unnecessary was > to be identified and dropped I think that would mean -25 files > or more :) > > But I got an idea recently that I told you about already, but > I can tell you again, only I only implemented it to a very > small degree so far (if I'll ever complete the intention), > anyway it is a good idea, and simple as well, namely, keep all > configuration (within a field) in _one_ file, and all > extensions (within the same field) in other, separate files - The most difficult thing, IMHO, is the classification criteria for the different fields. > that way people can browse the extensions, and use it if they > like it, or tell me if it is, in your words, "unnecessary" - > I don't think they will, but chances are better since no one > wants to browse some other guy's mere options ... > > Also with this configuration/extension split on can easily add > the extensions to a place like the EmacsWiki, just ship it > with no prior edit needed! > > If only I had come up with this idea 10~15 years ago. Regrets, > I have but a few ... No, just kidding :) A detail of course. > > I only did it for ERC so far, I think? Have a look > > https://dataswamp.org/~incal/emacs-init/erc/ Which ones are configuration and Which ones are extensions in your terminology? > [1] https://dataswamp.org/~incal/emacs-init/ HZ