From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.devel Subject: Re: Easy Customization for Directory Local Variables Date: Mon, 2 Oct 2023 07:06:27 -0300 Message-ID: <3c096b82-cf27-2306-ac25-9d24226685a8@gmail.com> References: <1199c8c5-b564-7af1-165f-3f7b19f5bda5@gmail.com> <26c0a93a-c8d5-422f-7e9b-892029478fd4@alphapapa.net> <8fd3190a-c401-e650-b851-063d430673d3@gmail.com> <86a5ta193q.fsf@mail.linkov.net> <23124c8c-b68b-5c19-382d-4055f28e35e5@gmail.com> <86bkdi6udv.fsf@mail.linkov.net> <838r8l8tt1.fsf@gnu.org> <86jzs5r0b9.fsf@mail.linkov.net> <83y1gl7amt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19993"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: adam@alphapapa.net, emacs-devel@gnu.org To: Eli Zaretskii , Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 02 12:07:46 2023 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 1qnFq6-0004hu-22 for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Oct 2023 12:07:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnFp4-00034D-2N; Mon, 02 Oct 2023 06:06:42 -0400 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 1qnFp0-00033z-LP for emacs-devel@gnu.org; Mon, 02 Oct 2023 06:06:38 -0400 Original-Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnFoz-0006wv-3Z; Mon, 02 Oct 2023 06:06:38 -0400 Original-Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c77449a6daso5007785ad.0; Mon, 02 Oct 2023 03:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696241194; x=1696845994; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:newsgroups:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YQ/9HCZ6CQVNJ5s/JVwJWvwXP11Ybk5/UTlIiIVoF9k=; b=TDXVZqJmAJWu/bslMPWUNL1UdtQMKQb+oIzlB902fdJcRkmQCZSgT+BuHxr3XP2h05 b2CyRZDI7klql//jKA+1+2nLwCr/MWIX6bYXM5YN+atfRRk1dL039LxYn0X2j50jhgC3 OwMeYmVfyfHX7X29mSUBnqYqguZorT1Ie1PLlSpk7ISS6QzrZa4DVKpbDbtX9hhFX2fc qA9a63g2TVN6EN3nNOcPOF6nYs/gW/jO5xqcDKWor9jpVWksBIoZMKweBwjQUkugBTww wd9XQZxjLEDCd+KbiEAUmPLQx703C2fu8+4Z1ZkuBrBWwYuZbLYwv8vpO2IdSE4tmE8q m1IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696241194; x=1696845994; h=content-transfer-encoding:in-reply-to:from:references:newsgroups:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YQ/9HCZ6CQVNJ5s/JVwJWvwXP11Ybk5/UTlIiIVoF9k=; b=wXJqSqeEOJDPcoY+NMa6mF9zDQVm2Uu6TmdA5QnDEdBh39wiNXEqq2iB+Gi9L1n7Q/ Zkn9BzsJ1Nj4jXl6PVtDFS4LxHhB2on7DBkZ7DbNmKM2ql9PsvmJkqumrMArKpyGif2Q /qWYzzjTVI0Cpv43L3rrLb9wyyVj0nbHai73Yub9BP7OlAoSorwxY+8JdDuPHv226YBo mxugllK643HdV9O36sEWbC7j2Noy0cDCTTdMOxME/F8Isli12dOozx8BfuEjYaQg5zNT SaWba+JI/rQpJXUKaFXRI39LtYvKckg/SuAL3sJ7lEUuqRqt+ovCaXsIzzd+GGJbISZJ yRiw== X-Gm-Message-State: AOJu0YyYCj/Ts45o5gduwe/eiXdSPPIIBRpwQ26Y/+KtZ2F73QDkP0VT 5n4BJSDKMcbl/cKp+nIXhZ4B39qeNdw= X-Google-Smtp-Source: AGHT+IGcZgql5E72I0Oj+et6m7m8II0iCzMvsa8YVQJov5TvY56LK8vnXImOxaOsEKxk29ZP8MmwkQ== X-Received: by 2002:a17:902:c942:b0:1c7:4ab6:b3cc with SMTP id i2-20020a170902c94200b001c74ab6b3ccmr9088852pla.54.1696241193677; Mon, 02 Oct 2023 03:06:33 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id y10-20020a17090322ca00b001c322a41188sm4200739plg.117.2023.10.02.03.06.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Oct 2023 03:06:33 -0700 (PDT) Content-Language: en-US Original-Newsgroups: gmane.emacs.devel In-Reply-To: <83y1gl7amt.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=maurooaranda@gmail.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -51 X-Spam_score: -5.2 X-Spam_bar: ----- X-Spam_report: (-5.2 / 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, NICE_REPLY_A=-3.058, 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.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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311235 Archived-At: On 2/10/23 04:21, Eli Zaretskii wrote: >> From: Juri Linkov >> Cc: maurooaranda@gmail.com, adam@alphapapa.net, emacs-devel@gnu.org >> Date: Mon, 02 Oct 2023 09:43:54 +0300 >> >>>> There is no single prefix in files-x.el, but still names are quite >>>> consistent. So you could choose any prefix you think would be >>>> internally consistent between all your new functions and variables. >>> >>> Why should this be in files-x.el? why not in custom.el, for example? >> >> If these functions implement a new customization type then >> a good place would be in custom.el indeed. Only functions >> that write the dir-locals file could remain in files-x.el. > > Or how about cus-edit.el? That's where many/most Customize commands > live. cus-edit.el seems like the better choice for me. When icons were added, the functions to customize icons went in there. The only difference here is that the new functionality doesn't write to the custom-file, rather to some .dir-locals.el. Apart from a function that writes to the .dir-locals-2.el file, all functions that manipulate the .dir-locals file are from files-x.el. The mentioned function is nowhere near smart as modify-dir-local-variable, but I had to code it since I didn't find that to be supported in files-x.el. Maybe modify-dir-local-variable and the like could be taught to handle .dir-locals-2.el too.