Change doc-view-mode-map prefix key 's' to 'c'.
* doc/emacs/misc.texi (DocView Slicing): Change prefix key 's' to 'c'. * lisp/doc-view.el (doc-view-mode-map): Change prefix key 's' to 'c'. * lisp/image-mode.el (image-mode-map): Add image-transform-set-scale to menu. * doc/emacs/files.texi (Image Mode): Describe commands image-transform-fit-both, image-transform-set-scale, image-transform-reset. * etc/NEWS: Rearrange image sections. https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01315.html
This commit is contained in:
parent
400ff5cd19
commit
ba6104d1e8
5 changed files with 55 additions and 38 deletions
|
@ -2113,8 +2113,6 @@ point. Partial Completion mode offers other features extending
|
||||||
|
|
||||||
@findex image-mode
|
@findex image-mode
|
||||||
@findex image-toggle-display
|
@findex image-toggle-display
|
||||||
@findex image-next-file
|
|
||||||
@findex image-previous-file
|
|
||||||
@cindex images, viewing
|
@cindex images, viewing
|
||||||
Visiting image files automatically selects Image mode. In this
|
Visiting image files automatically selects Image mode. In this
|
||||||
major mode, you can type @kbd{C-c C-c} (@code{image-toggle-display})
|
major mode, you can type @kbd{C-c C-c} (@code{image-toggle-display})
|
||||||
|
@ -2136,6 +2134,19 @@ window, so this is only necessary if you customize the default
|
||||||
behavior by using the options @code{image-auto-resize} and
|
behavior by using the options @code{image-auto-resize} and
|
||||||
@code{image-auto-resize-on-window-resize}.
|
@code{image-auto-resize-on-window-resize}.
|
||||||
|
|
||||||
|
@findex image-transform-fit-both
|
||||||
|
@findex image-transform-set-scale
|
||||||
|
@findex image-transform-reset
|
||||||
|
To resize the image manually you can use the command
|
||||||
|
@code{image-transform-fit-both} bound to @kbd{s b}
|
||||||
|
that fits the image to both the window height and width.
|
||||||
|
To scale the image specifying a scale factor, use the command
|
||||||
|
@code{image-transform-set-scale} bound to @kbd{s s}.
|
||||||
|
To reset all transformations to the initial state, use
|
||||||
|
@code{image-transform-reset} bound to @kbd{s 0}.
|
||||||
|
|
||||||
|
@findex image-next-file
|
||||||
|
@findex image-previous-file
|
||||||
You can press @kbd{n} (@code{image-next-file}) and @kbd{p}
|
You can press @kbd{n} (@code{image-next-file}) and @kbd{p}
|
||||||
(@code{image-previous-file}) to visit the next image file and the
|
(@code{image-previous-file}) to visit the next image file and the
|
||||||
previous image file in the same directory, respectively.
|
previous image file in the same directory, respectively.
|
||||||
|
@ -2204,7 +2215,6 @@ can be used to transform the image in question to @acronym{PNG} before
|
||||||
displaying. GraphicsMagick, ImageMagick and @command{ffmpeg} are
|
displaying. GraphicsMagick, ImageMagick and @command{ffmpeg} are
|
||||||
currently supported for image conversions.
|
currently supported for image conversions.
|
||||||
|
|
||||||
|
|
||||||
@findex thumbs-mode
|
@findex thumbs-mode
|
||||||
@cindex mode, Thumbs
|
@cindex mode, Thumbs
|
||||||
The Image-Dired package can also be used to view images as
|
The Image-Dired package can also be used to view images as
|
||||||
|
|
|
@ -617,12 +617,12 @@ of pages to display. A slice is a rectangle within the page area;
|
||||||
once you specify a slice in DocView, it applies to whichever page you
|
once you specify a slice in DocView, it applies to whichever page you
|
||||||
look at.
|
look at.
|
||||||
|
|
||||||
To specify the slice numerically, type @kbd{s s}
|
To specify the slice numerically, type @kbd{c s}
|
||||||
(@code{doc-view-set-slice}); then enter the top left pixel position
|
(@code{doc-view-set-slice}); then enter the top left pixel position
|
||||||
and the slice's width and height.
|
and the slice's width and height.
|
||||||
@c ??? how does this work?
|
@c ??? how does this work?
|
||||||
|
|
||||||
A more convenient graphical way to specify the slice is with @kbd{s
|
A more convenient graphical way to specify the slice is with @kbd{c
|
||||||
m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
|
m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
|
||||||
select the slice. Simply press and hold the left mouse button at the
|
select the slice. Simply press and hold the left mouse button at the
|
||||||
upper-left corner of the region you want to have in the slice, then
|
upper-left corner of the region you want to have in the slice, then
|
||||||
|
@ -631,10 +631,10 @@ button.
|
||||||
|
|
||||||
The most convenient way is to set the optimal slice by using
|
The most convenient way is to set the optimal slice by using
|
||||||
BoundingBox information automatically determined from the document by
|
BoundingBox information automatically determined from the document by
|
||||||
typing @kbd{s b} (@code{doc-view-set-slice-from-bounding-box}).
|
typing @kbd{c b} (@code{doc-view-set-slice-from-bounding-box}).
|
||||||
|
|
||||||
@findex doc-view-reset-slice
|
@findex doc-view-reset-slice
|
||||||
To cancel the selected slice, type @kbd{s r}
|
To cancel the selected slice, type @kbd{c r}
|
||||||
(@code{doc-view-reset-slice}). Then DocView shows the entire page
|
(@code{doc-view-reset-slice}). Then DocView shows the entire page
|
||||||
including its entire margins.
|
including its entire margins.
|
||||||
|
|
||||||
|
|
47
etc/NEWS
47
etc/NEWS
|
@ -866,6 +866,11 @@ its functions.
|
||||||
*** A new user option 'doc-view-pdftotext-program-args' has been added
|
*** A new user option 'doc-view-pdftotext-program-args' has been added
|
||||||
to allow controlling how the conversion to text is done.
|
to allow controlling how the conversion to text is done.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** The prefix key 's' was changed to 'c' for slicing commands
|
||||||
|
to avoid conflicts with image-mode key 's'. The new key 'c' still
|
||||||
|
has good mnemonics of "cut", "clip", "crop".
|
||||||
|
|
||||||
** Ido
|
** Ido
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -3523,12 +3528,32 @@ functions.
|
||||||
*** 'image-mode' now uses this library to automatically rotate images
|
*** 'image-mode' now uses this library to automatically rotate images
|
||||||
according to the orientation in the Exif data, if any.
|
according to the orientation in the Exif data, if any.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** The command 'image-rotate' now accepts a prefix argument.
|
||||||
|
With a prefix argument, 'image-rotate' now rotates the image at point
|
||||||
|
90 degrees counter-clockwise, instead of the default clockwise.
|
||||||
|
|
||||||
+++
|
+++
|
||||||
*** In 'image-mode' the image is resized automatically to fit in window.
|
*** In 'image-mode' the image is resized automatically to fit in window.
|
||||||
By default, the image will resize upon first display and whenever the
|
By default, the image will resize upon first display and whenever the
|
||||||
window's dimensions change. Two user options 'image-auto-resize' and
|
window's dimensions change. Two user options 'image-auto-resize' and
|
||||||
'image-auto-resize-on-window-resize' control the resizing behavior
|
'image-auto-resize-on-window-resize' control the resizing behavior
|
||||||
(including the possibility to disable auto-resizing).
|
(including the possibility to disable auto-resizing). A new key
|
||||||
|
prefix 's' contains the commands that can be used to fit the image to
|
||||||
|
the window manually.
|
||||||
|
|
||||||
|
---
|
||||||
|
*** Some 'image-mode' variables are now buffer-local.
|
||||||
|
The image parameters 'image-transform-rotation',
|
||||||
|
'image-transform-scale' and 'image-transform-resize' are now declared
|
||||||
|
buffer-local, so each buffer could have its own values for these
|
||||||
|
parameters.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** Three new 'image-mode' commands have been added: 'm', which marks
|
||||||
|
the file in the dired buffer(s) for the directory the file is in; 'u',
|
||||||
|
which unmarks the file; and 'w', which pushes the current buffer's file
|
||||||
|
name to the kill ring.
|
||||||
|
|
||||||
---
|
---
|
||||||
*** New library image-converter.
|
*** New library image-converter.
|
||||||
|
@ -3549,26 +3574,6 @@ These now default to using 'image-mode'.
|
||||||
some years back. It now respects 'imagemagick-types-inhibit' as a way
|
some years back. It now respects 'imagemagick-types-inhibit' as a way
|
||||||
to disable that.
|
to disable that.
|
||||||
|
|
||||||
---
|
|
||||||
*** Some 'image-mode' variables are now buffer-local.
|
|
||||||
The image parameters 'image-transform-rotation',
|
|
||||||
'image-transform-scale' and 'image-transform-resize' are now declared
|
|
||||||
buffer-local, so each buffer could have its own values for these
|
|
||||||
parameters.
|
|
||||||
|
|
||||||
+++
|
|
||||||
*** Three new 'image-mode' commands have been added: 'm', which marks
|
|
||||||
the file in the dired buffer(s) for the directory the file is in; 'u',
|
|
||||||
which unmarks the file; and 'w', which pushes the current buffer's file
|
|
||||||
name to the kill ring.
|
|
||||||
|
|
||||||
+++
|
|
||||||
*** The command 'image-rotate' now accepts a prefix argument.
|
|
||||||
With a prefix argument, 'image-rotate' now rotates the image at point
|
|
||||||
90 degrees counter-clockwise, instead of the default clockwise.
|
|
||||||
|
|
||||||
*** 'image-mode' has a new key prefix 's' for transformation commands.
|
|
||||||
|
|
||||||
** Modules
|
** Modules
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -59,16 +59,16 @@
|
||||||
;; will be remembered and applied to all pages of the current
|
;; will be remembered and applied to all pages of the current
|
||||||
;; document. This enables you to cut away the margins of a document
|
;; document. This enables you to cut away the margins of a document
|
||||||
;; to save some space. To select a slice you can use
|
;; to save some space. To select a slice you can use
|
||||||
;; `doc-view-set-slice' (bound to `s s') which will query you for the
|
;; `doc-view-set-slice' (bound to `c s') which will query you for the
|
||||||
;; coordinates of the slice's top-left corner and its width and
|
;; coordinates of the slice's top-left corner and its width and
|
||||||
;; height. A much more convenient way to do the same is offered by
|
;; height. A much more convenient way to do the same is offered by
|
||||||
;; the command `doc-view-set-slice-using-mouse' (bound to `s m').
|
;; the command `doc-view-set-slice-using-mouse' (bound to `c m').
|
||||||
;; After invocation you only have to press mouse-1 at the top-left
|
;; After invocation you only have to press mouse-1 at the top-left
|
||||||
;; corner and drag it to the bottom-right corner of the desired slice.
|
;; corner and drag it to the bottom-right corner of the desired slice.
|
||||||
;; Even more accurate and convenient is to use
|
;; Even more accurate and convenient is to use
|
||||||
;; `doc-view-set-slice-from-bounding-box' (bound to `s b') which uses
|
;; `doc-view-set-slice-from-bounding-box' (bound to `c b') which uses
|
||||||
;; the BoundingBox information of the current page to set an optimal
|
;; the BoundingBox information of the current page to set an optimal
|
||||||
;; slice. To reset the slice use `doc-view-reset-slice' (bound to `s
|
;; slice. To reset the slice use `doc-view-reset-slice' (bound to `c
|
||||||
;; r').
|
;; r').
|
||||||
;;
|
;;
|
||||||
;; You can also search within the document. The command `doc-view-search'
|
;; You can also search within the document. The command `doc-view-search'
|
||||||
|
@ -433,10 +433,10 @@ Typically \"page-%s.png\".")
|
||||||
;; Killing the buffer (and the process)
|
;; Killing the buffer (and the process)
|
||||||
(define-key map (kbd "K") 'doc-view-kill-proc)
|
(define-key map (kbd "K") 'doc-view-kill-proc)
|
||||||
;; Slicing the image
|
;; Slicing the image
|
||||||
(define-key map (kbd "s s") 'doc-view-set-slice)
|
(define-key map (kbd "c s") 'doc-view-set-slice)
|
||||||
(define-key map (kbd "s m") 'doc-view-set-slice-using-mouse)
|
(define-key map (kbd "c m") 'doc-view-set-slice-using-mouse)
|
||||||
(define-key map (kbd "s b") 'doc-view-set-slice-from-bounding-box)
|
(define-key map (kbd "c b") 'doc-view-set-slice-from-bounding-box)
|
||||||
(define-key map (kbd "s r") 'doc-view-reset-slice)
|
(define-key map (kbd "c r") 'doc-view-reset-slice)
|
||||||
;; Searching
|
;; Searching
|
||||||
(define-key map (kbd "C-s") 'doc-view-search)
|
(define-key map (kbd "C-s") 'doc-view-search)
|
||||||
(define-key map (kbd "<find>") 'doc-view-search)
|
(define-key map (kbd "<find>") 'doc-view-search)
|
||||||
|
|
|
@ -452,12 +452,12 @@ call."
|
||||||
|
|
||||||
;; Transformation keys
|
;; Transformation keys
|
||||||
(define-key map "sf" 'image-mode-fit-frame)
|
(define-key map "sf" 'image-mode-fit-frame)
|
||||||
(define-key map "sb" 'image-transform-fit-both)
|
|
||||||
(define-key map "sh" 'image-transform-fit-to-height)
|
(define-key map "sh" 'image-transform-fit-to-height)
|
||||||
(define-key map "sw" 'image-transform-fit-to-width)
|
(define-key map "sw" 'image-transform-fit-to-width)
|
||||||
|
(define-key map "sb" 'image-transform-fit-both)
|
||||||
|
(define-key map "ss" 'image-transform-set-scale)
|
||||||
(define-key map "sr" 'image-transform-set-rotation)
|
(define-key map "sr" 'image-transform-set-rotation)
|
||||||
(define-key map "s0" 'image-transform-reset)
|
(define-key map "s0" 'image-transform-reset)
|
||||||
(define-key map "ss" 'image-transform-set-scale)
|
|
||||||
|
|
||||||
;; Multi-frame keys
|
;; Multi-frame keys
|
||||||
(define-key map (kbd "RET") 'image-toggle-animation)
|
(define-key map (kbd "RET") 'image-toggle-animation)
|
||||||
|
@ -512,6 +512,8 @@ call."
|
||||||
:help "Resize image to match the window width"]
|
:help "Resize image to match the window width"]
|
||||||
["Fit to Window Height and Width" image-transform-fit-both
|
["Fit to Window Height and Width" image-transform-fit-both
|
||||||
:help "Resize image to match the window height and width"]
|
:help "Resize image to match the window height and width"]
|
||||||
|
["Set Scale..." image-transform-set-scale
|
||||||
|
:help "Resize image by specified scale factor"]
|
||||||
["Rotate Image..." image-transform-set-rotation
|
["Rotate Image..." image-transform-set-rotation
|
||||||
:help "Rotate the image"]
|
:help "Rotate the image"]
|
||||||
["Reset Transformations" image-transform-reset
|
["Reset Transformations" image-transform-reset
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue