From: eschulte@cs.unm.edu
To: 15884@debbugs.gnu.org
Subject: bug#15884: 24.3; image-dired is mixing up buffers
Date: Wed, 13 Nov 2013 09:36:29 -0700 [thread overview]
Message-ID: <87li0sb6nm.fsf@cs.unm.edu> (raw)
When in an `image-dired-thumbnail-mode' buffer the movement functions
(`image-dired-forward-image' and `image-dired-backward-image') get
confused if the corresponding dired buffer is not visible and throws the
point to the end of the thumbnail buffer making navigation impossible.
Changing the definition of `image-dired-track-original-file' from the
original,
(defun image-dired-track-original-file ()
"Track the original file in the associated dired buffer.
See documentation for `image-dired-toggle-movement-tracking'.
Interactive use only useful if `image-dired-track-movement' is nil."
(interactive)
(let ((old-buf (current-buffer))
(dired-buf (image-dired-associated-dired-buffer))
(file-name (image-dired-original-file-name)))
(when (and (buffer-live-p dired-buf) file-name)
(set-buffer dired-buf)
(if (not (dired-goto-file file-name))
(message "Could not track file")
(set-window-point
(image-dired-get-buffer-window dired-buf) (point)))
(set-buffer old-buf))))
to the following
(defun image-dired-track-original-file ()
"Track the original file in the associated dired buffer.
See documentation for `image-dired-toggle-movement-tracking'.
Interactive use only useful if `image-dired-track-movement' is nil."
(interactive)
(let ((old-buf (current-buffer))
(dired-buf (image-dired-associated-dired-buffer))
(file-name (image-dired-original-file-name)))
(when (and (buffer-live-p dired-buf) file-name)
(set-buffer dired-buf)
(if (not (dired-goto-file file-name))
(message "Could not track file")
(let ((window (image-dired-get-buffer-window dired-buf)))
(if window (set-window-point window (point))
(message "Could not find associated dired buffer."))))
(set-buffer old-buf))))
fixes this bug.
Best, Eric
next reply other threads:[~2013-11-13 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 16:36 eschulte [this message]
2013-11-13 16:54 ` bug#15884: 24.3; image-dired is mixing up buffers Glenn Morris
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87li0sb6nm.fsf@cs.unm.edu \
--to=eschulte@cs.unm.edu \
--cc=15884@debbugs.gnu.org \
/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 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).