all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Kangas <stefan@marxist.se>,
	 emacs-devel@gnu.org, mathias.dahl@gmail.com
Subject: Re: Splitting image-dired.el into smaller files
Date: Sun, 21 Aug 2022 13:02:52 -0400	[thread overview]
Message-ID: <jwvh725y1tv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83r119bp35.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 Aug 2022 18:20:30 +0300")

>> Do you mean naming the files like this?
>> 
>>     image-dired/compat.el
>>     image-dired/dired.el
>>     image-dired/external.el
>>     image-dired/gallery.el
>>     image-dired/tags.el
>>     image-dired/util.el
>>     image-dired/image-dired.el
>
> Yes.

image-dired.el is not terribly large, so maybe keeping it as a single
file is not a bad option either.  I think the main goal in splitting
files is when that lets us load only some of them in common use cases.

>> How would I then require them, is it like this?
>>
>>     (require 'image-dired/compat)
>>
>> If that works, it does sound a bit neater.
>
> It does work: we use it in cedet/ subdirectories.

Indeed.  It does suffer from various issues, tho (e.g. `load-history`
doesn't remember that we used `image-dired/tags` to load the file so
(eval-after-load "tags" ...) may run unexpectedly).  It might be good to
use it more widely to force us to face the problems and fix them,
of course.

>> > And maybe leave the -util.el part inside the main file?
>> That's not very easy to do without introducing circular dependencies,
>> unfortunately.

I think most multi-file projects ends up using either ugly/broken hacks
(e.g. ediff and viper), or a package-specific autoloads file for that
(e.g. `mh-autoloads`, `cl-autoloads`, `tramp-autoloads`, ...).

Lars's new autoloads code supports those autoloads file much better than
the old one.


        Stefan




  parent reply	other threads:[~2022-08-21 17:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 21:50 Splitting image-dired.el into smaller files Stefan Kangas
2021-12-08 22:24 ` Stefan Monnier
2021-12-08 22:54   ` Stefan Kangas
2021-12-09  1:05 ` Lars Ingebrigtsen
2021-12-09  7:28   ` Eli Zaretskii
2021-12-09 13:58     ` Stefan Kangas
2021-12-09 14:03       ` Eli Zaretskii
2022-01-27 21:26         ` Mathias Dahl
2021-12-09  3:20 ` Renaming files with git not all that bad? Stefan Kangas
2021-12-09  3:56   ` Phil Sainty
2021-12-09  8:43     ` Andreas Schwab
2021-12-09  9:00       ` tomas
2021-12-09  9:24     ` Eli Zaretskii
2021-12-09 13:57       ` Stefan Kangas
2021-12-09  5:40   ` Yuri Khan
2021-12-09  6:02     ` Tassilo Horn
2021-12-09  6:35       ` Yuri Khan
2021-12-09  7:04         ` Tassilo Horn
2021-12-09  7:28           ` Yuri Khan
2021-12-09 22:03         ` Stefan Kangas
2021-12-10 12:28           ` Tassilo Horn
2021-12-11 12:11           ` Yuri Khan
2021-12-09 14:55     ` Stefan Kangas
2021-12-09 15:50       ` tomas
2021-12-09 22:18         ` Stefan Kangas
2021-12-10  8:17           ` tomas
2022-08-21  0:56 ` Splitting image-dired.el into smaller files Stefan Kangas
2022-08-21  5:50   ` Eli Zaretskii
2022-08-21 14:32     ` Stefan Kangas
2022-08-21 14:35       ` Eli Zaretskii
2022-08-21 15:11         ` Stefan Kangas
2022-08-21 15:16           ` Lars Ingebrigtsen
2022-08-21 15:20           ` Eli Zaretskii
2022-08-21 15:22             ` Lars Ingebrigtsen
2022-08-21 17:02             ` Stefan Monnier [this message]
2022-08-23 19:02             ` Stefan Kangas
2022-08-23 19:09               ` Eli Zaretskii
2022-08-23 19:53                 ` Stefan Kangas
2022-08-21 16:20   ` Juri Linkov
2022-08-22 13:08     ` Stefan Kangas
2022-08-22 15:18       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvh725y1tv.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mathias.dahl@gmail.com \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.