GNU bug report logs -
#14567
Scrolling of large images
Previous Next
Full log
View this message in rfc822 format
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Date: Sat, 15 Jun 2013 14:26:13 +0300
>>> From: Eli Zaretskii <eliz <at> gnu.org>
>>> Cc: 14567 <at> debbugs.gnu.org
>>>
>>> > From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
>>> > Date: Sat, 15 Jun 2013 13:13:05 +0200
>>> >
>>> > however it would be great to be able to scroll horizontally too.
>>>
>>> That's a much larger project, since we lack infrastructure to scroll
>>> horizontally by pixels.
>>
>> Actually, I see that I was wrong: set-window-hscroll can do the job.
>> The only problem is to get C-f/C-b and <left>/<right> keys invoke that
>> function when appropriate. Patches are welcome.
>
> I don't understand how to use this, it is actually setting the number of
> column where to start scrolling, and it seems an image have only one
> column?
>
> Though only setting `auto-hscroll-mode' to nil let move with C-f/b and
> left/right as expected, may be this value should be let-bounded when
> image-mode is detected?
I saw auto-hscroll-mode was already used, but have no effect, when
moving it to image-mode and make it buffer-local, it is working.
However, navigation in image looks a little slower than scrolling
vertically, but maybe I am wrong.
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 30dfd04..fdede81 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -446,7 +446,8 @@ to toggle between display as an image and display as text."
(kill-all-local-variables)
(setq major-mode 'image-mode)
-
+ ;; Allow navigation of large images.
+ (set (make-variable-buffer-local 'auto-hscroll-mode) nil)
(if (not (image-get-display-property))
(progn
(image-toggle-display-image)
@@ -643,8 +644,6 @@ was inserted."
(if (coding-system-equal (coding-system-base buffer-file-coding-system)
'no-conversion)
(setq-local find-file-literally t))
- ;; Allow navigation of large images.
- (setq-local auto-hscroll-mode nil)
(setq image-type type)
(if (eq major-mode 'image-mode)
(setq mode-name (format "Image[%s]" type)))
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
This bug report was last modified 5 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.