GNU bug report logs -
#15466
24.3.50; [PATCH] Add some keybindings for doc-view-mode
Previous Next
Reported by: Xue Fuqiao <xfq.free <at> gmail.com>
Date: Thu, 26 Sep 2013 14:16:02 UTC
Severity: normal
Tags: patch
Found in version 24.3.50
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15466 in the body.
You can then email your comments to 15466 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15466
; Package
emacs
.
(Thu, 26 Sep 2013 14:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xue Fuqiao <xfq.free <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 26 Sep 2013 14:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
severity minor
tags patch
This patch adds some keybindings to doc-view-mode:
=== modified file 'lisp/doc-view.el'
*** lisp/doc-view.el 2013-09-18 04:38:49 +0000
--- lisp/doc-view.el 2013-09-26 14:10:57 +0000
***************
*** 405,411 ****
--- 405,415 ----
(define-key map (kbd "RET") 'image-next-line)
;; Zoom in/out.
(define-key map "+" 'doc-view-enlarge)
+ (define-key map "=" 'doc-view-enlarge)
+ (define-key map (kbd "C-x C-+") 'doc-view-enlarge)
+ (define-key map (kbd "C-x C-=") 'doc-view-enlarge)
(define-key map "-" 'doc-view-shrink)
+ (define-key map (kbd "C-x C--") 'doc-view-shrink)
;; Fit the image to the window
(define-key map "W" 'doc-view-fit-width-to-window)
(define-key map "H" 'doc-view-fit-height-to-window)
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15466
; Package
emacs
.
(Thu, 26 Sep 2013 18:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15466 <at> debbugs.gnu.org (full text, mbox):
> (define-key map (kbd "RET") 'image-next-line)
> ;; Zoom in/out.
> (define-key map "+" 'doc-view-enlarge)
> + (define-key map "=" 'doc-view-enlarge)
> + (define-key map (kbd "C-x C-+") 'doc-view-enlarge)
> + (define-key map (kbd "C-x C-=") 'doc-view-enlarge)
> (define-key map "-" 'doc-view-shrink)
> + (define-key map (kbd "C-x C--") 'doc-view-shrink)
> ;; Fit the image to the window
> (define-key map "W" 'doc-view-fit-width-to-window)
> (define-key map "H" 'doc-view-fit-height-to-window)
I think it's OK (unless Tassilo disagrees, obviously), but it needs some
comments about why it's added (for the = binding, I guess it's because
it's the "unshifted +", which for the other it's to override
text-scale-adjust).
Also, maybe instead of rebinding C-x C-+, we should remap text-scale-adjust.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15466
; Package
emacs
.
(Thu, 26 Sep 2013 18:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 15466 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> (define-key map (kbd "RET") 'image-next-line)
>> ;; Zoom in/out.
>> (define-key map "+" 'doc-view-enlarge)
>> + (define-key map "=" 'doc-view-enlarge)
>> + (define-key map (kbd "C-x C-+") 'doc-view-enlarge)
>> + (define-key map (kbd "C-x C-=") 'doc-view-enlarge)
>> (define-key map "-" 'doc-view-shrink)
>> + (define-key map (kbd "C-x C--") 'doc-view-shrink)
>> ;; Fit the image to the window
>> (define-key map "W" 'doc-view-fit-width-to-window)
>> (define-key map "H" 'doc-view-fit-height-to-window)
>
> I think it's OK (unless Tassilo disagrees, obviously),
No, it's fine with me.
> Also, maybe instead of rebinding C-x C-+, we should remap
> text-scale-adjust.
Yeah
(define-key map [remap text-scale-adjust] 'doc-view-enlarge)
(define-key map (kbd "C-x C--") 'doc-view-shrink)
should be equivalent. Well, except that C-x C-0 would also enlarge. It
wouldn't be bad to have a command to reset to the original size. That
shouldn't be hard to do. In the non-ImageMagick case, it's killing the
buffer-local value of doc-view-resolution and reconverting, and in the
ImageMagick case it's just killing the local value of
doc-view-image-width and re-inserting the image with
doc-view-insert-image.
Bye,
Tassilo
Reply sent
to
Tassilo Horn <tsdh <at> gnu.org>
:
You have taken responsibility.
(Thu, 26 Sep 2013 19:09:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xue Fuqiao <xfq.free <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 26 Sep 2013 19:09:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 15466-done <at> debbugs.gnu.org (full text, mbox):
Tassilo Horn <tsdh <at> gnu.org> writes:
> Yeah
>
> (define-key map [remap text-scale-adjust] 'doc-view-enlarge)
> (define-key map (kbd "C-x C--") 'doc-view-shrink)
>
> should be equivalent. Well, except that C-x C-0 would also enlarge. It
> wouldn't be bad to have a command to reset to the original size.
I've committed the bindings and added a new command
doc-view-reset-zoom-level in revno 114463 on the trunk. So now all
text-scaling key bindings work appropriately in doc-view buffers.
I'm closing the bug.
Bye,
Tassilo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15466
; Package
emacs
.
(Fri, 27 Sep 2013 06:52:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 15466-done <at> debbugs.gnu.org (full text, mbox):
Tassilo Horn <tsdh <at> gnu.org> writes:
>> (define-key map [remap text-scale-adjust] 'doc-view-enlarge)
>> (define-key map (kbd "C-x C--") 'doc-view-shrink)
>>
>> should be equivalent. Well, except that C-x C-0 would also enlarge. It
>> wouldn't be bad to have a command to reset to the original size.
>
> I've committed the bindings and added a new command
> doc-view-reset-zoom-level in revno 114463 on the trunk. So now all
> text-scaling key bindings work appropriately in doc-view buffers.
Of course the above was a bit bogus in case a user has bound
text-scale-adjust to something different that C-x C-<+,=,-,0>. So now
I've added a new command `doc-view-scale-adjust' that dispatches the
action to take by the key binding like `text-scale-adjust' does, and
that's now the remapping binding (revno 114464).
Bye,
Tassilo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15466
; Package
emacs
.
(Fri, 27 Sep 2013 13:05:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 15466-done <at> debbugs.gnu.org (full text, mbox):
> Of course the above was a bit bogus in case a user has bound
> text-scale-adjust to something different that C-x C-<+,=,-,0>. So now
> I've added a new command `doc-view-scale-adjust' that dispatches the
> action to take by the key binding like `text-scale-adjust' does, and
> that's now the remapping binding (revno 114464).
Great, thanks,
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 26 Oct 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 234 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.