unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Splitting image-dired.el into smaller files
@ 2021-12-08 21:50 Stefan Kangas
  2021-12-08 22:24 ` Stefan Monnier
                   ` (3 more replies)
  0 siblings, 4 replies; 41+ messages in thread
From: Stefan Kangas @ 2021-12-08 21:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mathias Dahl

Hi emacs-devel (copy to Mathias Dahl),

I'm working on image-dired.el lately, and I have plans for further
improvements that would be pretty far-reaching (if I can get that far).

But it feels at times like treading water, because the organization of
that file is not good.  While it has an okay foundation in terms of the
actual code, it has grown into a small organizational mess internally
over time.

Please consider the section markers I've recently added to that file;
and note that I spent some time thinking about them and where to place
them.  (Hint: good sectioning is currently not doable.)

My current best idea for improving its organization is to split it up in
several files along these lines:

    image/image-dired-bookmarks.el       ;; bookmark.el support
    image/image-dired-compat.el          ;; compatibility layer
    image/image-dired-gallery.el         ;; HTML gallery generation
    image/image-dired-tags.el            ;; home-cooked image tags
    image/image-dired-thumbs.el          ;; thumbnail generation
    image/image-dired.el

The big drawback here is that we will lose the git history.  However, we
lost most of that already in 2007 when the file was renamed.  From my
work and what I've seen so far, I don't think I will miss any history
that won't be massively outweighed by the benefits of better code
organization.

I'd also point out that the alternative to splitting it up into smaller
files would be to move things around in the file, which is also likely
to be pretty bad for git archaeologists.

One important thing to keep in mind when doing this, is to try not to
overdo it.  We don't want a situation where you need to be constantly
grepping to get anything done.  I think this can be avoided if it is
done with care, and considering which parts are orthogonal.  (For
example, the HTML gallery generation really has little to do with
anything else; it is almost entirely its own thing.)

I'd like to raise this here in case people have any feedback on this
plan, or indeed any significant objections.  Thanks in advance.



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-08-23 19:53 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).