all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: 14567@debbugs.gnu.org
Subject: bug#14567: Scrolling of large images
Date: Sun, 16 Jun 2013 08:18:57 +0200	[thread overview]
Message-ID: <87txky60j2.fsf@gmail.com> (raw)
In-Reply-To: <CAPcXcF0vncdwK6tp7FtnpEJRftPOWYr89HcH68g4CysQem=ZGg@mail.gmail.com>

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Sat, 15 Jun 2013 14:26:13 +0300
>>> From: Eli Zaretskii <eliz@gnu.org>
>>> Cc: 14567@debbugs.gnu.org
>>> 
>>> > From: Thierry Volpiatto <thierry.volpiatto@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 






  reply	other threads:[~2013-06-16  6:18 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 12:17 bug#14567: Scrolling of large images Thomas Wiecki
2013-06-06 16:42 ` Eli Zaretskii
2013-06-06 17:16   ` Thomas Wiecki
2013-06-06 17:32     ` Eli Zaretskii
2013-06-08 14:19       ` Eli Zaretskii
2013-06-08 15:52         ` Thomas Wiecki
2013-06-08 16:49           ` Eli Zaretskii
2013-06-08 17:51             ` Thomas Wiecki
2013-06-08 18:44               ` Eli Zaretskii
2013-06-08 21:39                 ` Thomas Wiecki
2013-06-09  2:42                   ` Eli Zaretskii
2013-06-09  9:27                     ` Vitalie Spinu
2013-06-11 20:14                     ` David Engster
2013-06-15  8:23                       ` Eli Zaretskii
2013-06-15  9:02                         ` David Engster
2013-06-15  9:39                           ` Eli Zaretskii
2013-06-15 10:08                             ` David Engster
2013-06-15 11:13                               ` Thierry Volpiatto
2013-06-15 11:26                                 ` Eli Zaretskii
2013-06-15 12:41                                   ` Eli Zaretskii
2013-06-16  5:33                                     ` Thierry Volpiatto
2013-06-16  6:18                                       ` Thierry Volpiatto [this message]
2013-06-16 16:24                                         ` Eli Zaretskii
2013-06-17  4:57                                           ` Thierry Volpiatto
2013-06-17 15:14                                             ` Eli Zaretskii
2013-06-18 11:35                                               ` Thierry Volpiatto
2013-06-18 16:13                                                 ` Eli Zaretskii
2013-06-19  6:43                                                   ` Thierry Volpiatto
2013-07-06  9:02 ` bug#14567: These changes sometimes break plain text navigation Dima Kogan
2013-07-06 11:02   ` Eli Zaretskii
2013-07-06 16:14     ` Dima Kogan
2013-07-06 17:41       ` Eli Zaretskii
2013-07-06 21:51         ` Dima Kogan
2013-07-07  2:48           ` Eli Zaretskii
2013-07-07  4:46             ` Dima Kogan
2013-07-07 15:51               ` Eli Zaretskii
2013-07-07 18:57                 ` Dima Kogan
2013-07-08 17:35                   ` Eli Zaretskii
2013-07-08 23:42                     ` Dima Kogan
2013-07-09 17:00                       ` bug#14598: " Eli Zaretskii
2013-07-10  9:30                         ` Stephen Berman
2013-07-10 16:27                           ` Eli Zaretskii
2013-07-10 21:33                             ` Stephen Berman

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=87txky60j2.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=14567@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 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.