From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Splitting image-dired.el into smaller files Date: Tue, 23 Aug 2022 22:09:12 +0300 Message-ID: <83lere7p5z.fsf@gnu.org> References: <83sflqcfhk.fsf@gnu.org> <83tu65br5f.fsf@gnu.org> <83r119bp35.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, mathias.dahl@gmail.com To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 23 21:10:16 2022 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 1oQZHz-00026u-OS for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Aug 2022 21:10:15 +0200 Original-Received: from localhost ([::1]:39296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQZHy-0005sl-5J for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Aug 2022 15:10:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQZGs-00053S-FZ for emacs-devel@gnu.org; Tue, 23 Aug 2022 15:09:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQZGs-0001bX-0S; Tue, 23 Aug 2022 15:09:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BgkzFCpbRnc7hw16kqq7mpdOW7ivg03ubsviyGavxkA=; b=BAWr+/uwUC9Z 7HHk/+6rm+7C0UAyaZlW3K/Hz6fB9ICNfIRUo1liCXMMNzjASnVNsntXsPrqTMW7ciFP9EdVcBmRE v+bNOqYnznWn/2sEeclfhQnJ1z6dASA0Opxa863Oyugj184hWXCoItA9QVDn8dI7fFHyWXKH/vobo FsMBsYGkA2CFMQswgEWSMrOvTXPqeNbojPVDLB8Q3IK8dFGgwfMxdpZfsHiCK8Bon3NN9qaauDicc gfxmUjevryvQ9lK8fDY8M+r2xVHMcW7BkEHtSJRNvOXnyjcJkzOIXxWh/+GR2naXdqSDbNeYoC6s8 GGFDPZUkLxBfO/+n2nHcUg==; Original-Received: from [87.69.77.57] (port=4497 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQZGr-0005qU-9P; Tue, 23 Aug 2022 15:09:05 -0400 In-Reply-To: (message from Stefan Kangas on Tue, 23 Aug 2022 12:02:47 -0700) 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:293917 Archived-At: > From: Stefan Kangas > Date: Tue, 23 Aug 2022 12:02:47 -0700 > Cc: emacs-devel@gnu.org, mathias.dahl@gmail.com > > For example, `image-dired-dir' is used in image-dired-tags.el, > image-dired-dired.el, and image-dired.el. To have a non-circular > dependency graph, I introduced image-dired-util.el, which gives me a > diamond shaped dependency graph with arrows pointing in only one > direction. > > It's possible that this is fixable using autoloads, but that leaves us > with the same number of files, so I'm not sure it's much of an > improvement. > > But maybe I'm missing something. Yes, I think this is the wrong way of dividing the big file into several smaller ones. You don't go by dependencies, you go by functionalities. And if there's no way of breaking it into separate functionalities, it means it shouldn't be broken at all, unless completely rewritten. The file is just 3K lines, so if it doesn't lend itself easily to division, it isn't worth the effort, IMO.