all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: Stefan Kangas <stefan@marxist.se>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 51763@debbugs.gnu.org
Subject: bug#51763: 27.2; Displaying many images take all memory
Date: Sat, 13 Nov 2021 07:32:18 +0000	[thread overview]
Message-ID: <87v90wcxod.fsf@posteo.net> (raw)
In-Reply-To: <CADwFkmnR+PvPKSywKnukL78N2Ze+HOJOimR+74FfDH=XNddt4A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]


Stefan Kangas <stefan@marxist.se> writes:

> Relatedly, image-mode could be smarter, and evict images manually from
> the cache.  Let's say that when flipping through images in a directory,
> we only keep the previous N images (where N is, like, 5 or something).

I did this in helm and it works fine.

Also in image-dired when images are too large emacs ask for something
like "file too large really open yes no etc...", this because you use
`find-file-other-window` instead of `find-file-noselect`, do you want me
to open another issue for this? (patch below otherwise):

diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index a2c37f00f23..fed23fb1830 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -1942,10 +1942,11 @@ based on `image-mode'."
         (cur-win (selected-window)))
     (when buf
       (kill-buffer buf))
-    (when-let ((buf (find-file-other-window file)))
+    (when-let ((buf (find-file-noselect file t)))
       (display-buffer buf)
-      (rename-buffer image-dired-display-image-buffer)
-      (image-dired-display-image-mode)
+      (with-current-buffer buf
+        (rename-buffer image-dired-display-image-buffer)
+        (image-dired-display-image-mode))
       (select-window cur-win))))
 
 (defun image-dired-display-thumbnail-original-image (&optional arg)


-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

      parent reply	other threads:[~2021-11-13  7:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  9:00 bug#51763: 27.2; Displaying many images take all memory Thierry Volpiatto
2021-11-11  9:50 ` Stefan Kangas
2021-11-11 11:22   ` Thierry Volpiatto
2021-11-11 17:33     ` Stefan Kangas
2021-11-11 18:11       ` Thierry Volpiatto
2021-11-11 12:39   ` Lars Ingebrigtsen
2021-11-11 17:33     ` Stefan Kangas
2021-11-12  3:30       ` Lars Ingebrigtsen
2021-11-12  4:03         ` Stefan Kangas
2021-11-12  6:24           ` Lars Ingebrigtsen
2021-11-13  7:32       ` Thierry Volpiatto [this message]

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=87v90wcxod.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=51763@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --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.