From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Emacs Modular Configuration: the preferable way. Date: Tue, 22 Jun 2021 09:52:09 +0200 Message-ID: References: <87pmwgdiyj.fsf@zoho.eu> <878s33dvd4.fsf@zoho.eu> <87czsewys6.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2400"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 22 09:53:06 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 1lvbDW-0000Sr-9X for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Jun 2021 09:53:06 +0200 Original-Received: from localhost ([::1]:54378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvbDV-0004Ji-Ah for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 22 Jun 2021 03:53:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvbCj-0004GL-8P for help-gnu-emacs@gnu.org; Tue, 22 Jun 2021 03:52:17 -0400 Original-Received: from mail-vi1eur05olkn2078.outbound.protection.outlook.com ([40.92.90.78]:55214 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvbCf-0000fu-4u for help-gnu-emacs@gnu.org; Tue, 22 Jun 2021 03:52:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TPQEHzVPtCh01q0nkGpOQF5ySm2sU6pbwGgFzu6D4pEeQ2VlXSpCl/Pn+PgUVAdpO19V3bGAZMZIWnEdiQzl4U4BVBewxxL1m9FpOAqPJKfTtreiOUe+DgRN6pLWgKy28IuMCC2+82TIgHps+EUt/wvsmhVMgnqroFCkdmhwsWCjELeLsxBBu7HbezVRTFU8yRdy8g3iIDsnN0huWCObrRfozl/EtqobPAGlrhOs8UtGMkL4RkeJpddHcnMLDcOAMd91hq+foRi78Q5z0HmfkCTCOvmhIEgYrXzUivxEAiCjc/aBZiKYQfDFlIYkghx2JaotGnBxprVZTg1qJLKu+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n5lpG/MaZ8mtlOvs9YXNtHM+4Lt1L2xtDP05+pqMqvg=; b=Ava+V2QKgRZ8stQBB0eaeC5jSyKPdPH47Zr0EfD2kCbCxa6TW73zZWiDkqnj/HvZzGlfhR3M4znO6/xtlzxOGxoIyTQfIY5420u2xUFb+Dpgj20XcVKaM8VXE/1ihxUYl0IH1DvNPrnA4wR90NwSbu43UshTaBbcprwtT5rPYFC0aLJU5esojB/d3lFphXtEZkV8WPjkZ8LaFRM4NNNNrJ6g21Rp0SVFePwhqlZcMDy3WCaI7DUY7t5frfPTQgSS/UfIhk30HprX5zJqKJaCGBTPPgtyLR+UN5kGoYRVewRwI54Kr/Zad1LcCL1NvtxRbNoTxkqo1pq6u1eupmMXEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n5lpG/MaZ8mtlOvs9YXNtHM+4Lt1L2xtDP05+pqMqvg=; b=L+68S6kw6eLyw0svCyipRGvi9tLEvtpYBJGCGNoRrQl49div/t626pkySk2OK9cSZ25ONywSDpp95u4V8WvqpErKJ0rKm7ku6cPf8Z6EtkArm5/lm4mNu9qfWtH4Z6mrIDCmIDW1VW6gmIzMnHIOLJvwT+JG4Sep2YEjHU6TzQYWK+O7cfRHoC6LdfEZdOY/ATpjtzLA8bausKxhxOtbNgYwYhgHHiA1d0+97s7uSEaRWdrepwPPRWrVd5efMmwAQWSdPZYQEawOb/pdG+T3MRcFlAUa26Kv3lW2hNV2Ae9IxOKxsclX/zC0uD5BXXKQmgeV0u33eQ/Vok/0bjRgRw== Original-Received: from AM6EUR05FT033.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::52) by AM6EUR05HT170.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::379) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Tue, 22 Jun 2021 07:52:10 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc11::4e) by AM6EUR05FT033.mail.protection.outlook.com (2a01:111:e400:fc11::273) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 22 Jun 2021 07:52:10 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:32BF990BBFBDAFAF0FE16532C5C6326FE83ADE39BC490D8A97BFCF1A36E62BCC; UpperCasedChecksum:BAF15BBE6E10AEE83D7AA7F00D0B5DCA34C004220EC200FF991611533A0E3307; SizeAsReceived:7650; Count:45 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::51ca:cb30:2619:5219]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::51ca:cb30:2619:5219%5]) with mapi id 15.20.4264.018; Tue, 22 Jun 2021 07:52:10 +0000 In-Reply-To: <87czsewys6.fsf@zoho.eu> (Emanuel Berg via Users list for the's message of "Tue, 22 Jun 2021 02:03:53 +0200") X-TMN: [M77vyTH1Kst7spvsby/4Wi1EmNAnh/7b] X-ClientProxiedBy: AM6P191CA0046.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::23) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnqmcp5i.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6P191CA0046.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 22 Jun 2021 07:52:09 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 18ca33dd-4b1b-431a-3c2d-08d93552a37b X-MS-TrafficTypeDiagnostic: AM6EUR05HT170: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XUI1jyfC0isucJU8MXVs3YGppoKoIPcV1htyD8kPvoj6FwICO/iCpiy/AHmhLOevN4RVgXzHC+Q7nYmlZsATGdYenSTG8bdwL4yGop64s4icIInt0QIXM8ScqyU5HjeHCq4yjH5NTaqrmr6/aDpmt3U42VX33wLv4eP+pCjf5/87KdnsU/IDDgiCgtZoMTFiCgr3PqDNejBFOTUXD3LF2MKm9ZofkJUTwp+7lZOxXaMnpFiB8l1AmKszygGNHNRC1yr4vai3h8JopnHziAIGZlnHNpIDb8qbwDgTPdoR35p/D4pTiF1b751YnP6vmabl9E1Hmlqz21Emse68DZhsOZrK8xoifM7BV1OJUA1QfEmahG+hdW3zCo0mZXHUi5+C X-MS-Exchange-AntiSpam-MessageData: T2f0d83vBmktAhVyMVP952jrZTSsvB0Q0gE7oGM7xGHi36ad6sS7THD3mLUGx8VSIaIacVMzEOwakq36LmPbXyLmMckzxSMl2RZuiki+yPEBIO3cttFFljtiDXTyH09BE4HMO7pKx/ti+9vQh4y7gg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18ca33dd-4b1b-431a-3c2d-08d93552a37b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2021 07:52:10.2888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT033.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT170 Received-SPF: pass client-ip=40.92.90.78; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:131180 Archived-At: Emanuel Berg via Users list for the GNU Emacs text editor writes: >> In some functions it matters if you end filename with >> a slash or not when you work with directories. > > I can imagine the situation but if it should do different > things depending on if it is a directory or a regular file, it > is better for these functions themselves to determine what it > is, and not rely on the user of the function to insert a slash > to denote a directory... > >>> Or what do you think one should do to put together for >>> example the complete path >>> ~/.emacs.d/emacs-init/erc/erc-iterate.el ? >> >> I pasted you an example from my init file. > > All that can't possibly be less error prone than a simple > string concat with `format', besides what errors exactly are > we trying to avoid? "All that" was far less than what you had :). I do think it is less error prone. It lets me type less of long paths, then if I was typing and concating strings. As you see I have setup one directory, "etc", and everything is relative to that one. Instead of typing and concating every file name for every directory and file, I can use that parth as a variable. If i decide to change that directory I don't need to do it in 20 different places and re-type everything, I can just type it in one place. Even with search-replace I think it is more error prone to have it the way you do, than to have just one place to edit. For me it is important to be able to clone my setup from git and just generate init files without having to tweak much. Currently I am able to actually do that on both my stationary gnu/linux computer and a Windows laptop. Not hardcoding paths as you did is one part of that setup. Even if you personally don't care about other OS:s then *nix, you may still have different physical machines with slightly different setup, say some simple Pi computer and more powerful desktop computer which might have different capabilities and your Emacs init doing differnt things at startup, with different paths, hardware etc. I don't know, just how I am using my computer(s), you may of course setup your init file the way you prefer.