1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

157 Commits

Author SHA1 Message Date
Stefan Kangas
8557ecca53 ; Fix warnings in --without-x build
* lisp/image/image-crop.el (image-scaling-factor)
(image-property, image-size, imagep):
* test/src/image-tests.el (image-size, image-mask-p)
(image-metadata): Declare.
2022-09-23 15:19:00 +02:00
Stefan Kangas
b306bc5e6d Improve prompt of 'image-dired' command
* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Improve prompt.
2022-09-23 15:18:59 +02:00
Stefan Kangas
651c8ab5c5 Rename 'image-dired-db-file' to 'image-dired-tags-db-file'
* lisp/image/image-dired.el (image-dired-tags-db-file): Rename
from 'image-dired-db-file'.  Update all uses and make old name
into an obsolete variable alias.
2022-09-23 15:18:59 +02:00
Stefan Kangas
8892abbaf9 Autoload wallpaper-set
* lisp/image/wallpaper.el (wallpaper-set): Autoload.
* lisp/image-mode.el (wallpaper):
* lisp/image/image-dired.el (wallpaper):
* lisp/thumbs.el (wallpaper): Don't require.
2022-09-23 11:53:07 +02:00
Stefan Kangas
8238d87e15 ; * lisp/image/wallpaper.el: Fix last commit. 2022-09-23 05:42:13 +02:00
Stefan Kangas
f25f4699d7 Support several new DEs in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper--check-command, wallpaper-command): Add support for Unity,
Pantheon, Budgie, LXQt, and LXDE.  Also add support for Lubuntu,
Xubuntu, and Pop!_OS.
2022-09-23 03:27:34 +02:00
Stefan Kangas
4de526edb7 image-dired: Obsolete two unused functions
* lisp/image/image-dired-util.el (image-dired-display-window)
(image-dired-associated-dired-buffer-window): Make obsolete; they are
currently unused.
2022-09-23 03:27:34 +02:00
Stefan Kangas
e9f42b1cba image-dired: Improve minor mode docstring
* lisp/image/image-dired-dired.el (image-dired-minor-mode):
Improve docstring.
2022-09-22 14:30:13 +02:00
Stefan Kangas
b9c06cf94a image-dired: Remove redundant keybindings
* lisp/image/image-dired-dired.el (image-dired-minor-mode-map):
Don't redundantly bind keys that are already bound in dired.
2022-09-22 14:30:13 +02:00
Stefan Kangas
447ff572be Prefer command remapping in image-dired-minor-mode
* lisp/image/image-dired-dired.el (image-dired-minor-mode-map):
Prefer command remapping.
(image-dired-minor-mode): Improve docstring.
2022-09-21 18:02:51 +02:00
Stefan Kangas
cc9acda7d3 image-dired: Support the customize-mode command
* lisp/image/image-dired.el (image-dired-thumbnail-mode)
(image-dired-display-image-mode): Add custom group 'image-dired'.
2022-09-21 08:29:05 +02:00
Stefan Kangas
f735aa0f39 Prefer DE specific commands to set wallpaper
* lisp/image/wallpaper.el (wallpaper--default-commands): Rearrange
order to prioritize desktop environment specific commands before
general Wayland commands like "wbg" or even "swaybg".  (Bug#57781)
2022-09-19 11:39:03 +02:00
Lars Ingebrigtsen
62b1e3b1f3 Restore the point after aborting an image crop
* lisp/image/image-crop.el (image-crop): Restore point after
aborted cropping (bug#57874).
2022-09-18 13:10:02 +02:00
Stefan Kangas
59e887f913 image-dired: Don't require subr-x
* lisp/image/image-dired-dired.el (subr-x):
* lisp/image/image-dired.el (subr-x): Don't require, since string-join
is now autoloaded.
2022-09-18 12:22:52 +02:00
Stefan Kangas
2f7139a15c image-dired: Display image on double click
* lisp/image/image-dired.el (image-dired-thumbnail-mode-map):
Display image on 'double-mouse-1'.
2022-09-18 02:52:51 +02:00
Stefan Kangas
76e67cc85e ; image-dired: Fix last commit
* lisp/image/image-dired-external.el (image-dired-create-thumb-1): Fix
specification for format-spec.
* lisp/image/image-dired-external.el (image-dired-thumb-size):
Declare.
2022-09-18 02:48:47 +02:00
Stefan Kangas
24513b3786 image-dired: Remove spurious message on C-<mouse-1>
* lisp/image/image-dired.el (image-dired-thumbnail-mode-map): Fix
spurious message about C-<down-mouse-1> being undefined.
2022-09-18 02:11:30 +02:00
Stefan Kangas
e59058d574 ; * lisp/image/image-dired.el: Use two spaces after period. 2022-09-18 02:06:21 +02:00
Stefan Kangas
7d3af135b9 ; * lisp/image/image-dired.el: Fix typo in last commit. 2022-09-18 01:53:57 +02:00
Stefan Kangas
5cceb6d6ac Increase image-dired-thumb-size to 128
* lisp/image/image-dired.el (image-dired-thumb-size): Increase default
to 128.
2022-09-18 00:21:12 +02:00
Stefan Kangas
f5f296b080 image-dired: Change some custom types to natnum
* lisp/image/image-dired.el (image-dired-thumb-size)
(image-dired-thumb-relief, image-dired-thumb-margin)
(image-dired-thumbs-per-row, image-dired-thumb-width)
(image-dired-thumb-height): Change :type to natnum.
2022-09-18 00:20:29 +02:00
Stefan Kangas
9aef9e2cb6 Make `image-dired-thumb-(height|width)' obsolete
* lisp/image/image-dired.el (image-dired-thumb-width)
(image-dired-thumb-height): Make obsolete.
(image-dired-thumb-size): Clean up and improve docstring.
* lisp/image/image-dired-external.el (image-dired-thumb-size): Use
'image-dired-thumb-size' instead of above obsolete variables.
(image-dired-create-thumb-1): Support %s format specifier for size.
(image-dired-cmd-create-thumbnail-options): Document %s format
specifier.
(image-dired--thumb-size): Rename function from
'image-dired-thumb-size' and make old name into an obsolete alias.
Update all callers.
2022-09-18 00:18:22 +02:00
Stefan Kangas
44457b3977 Simplify image-dired-thumbnail-storage customization
* lisp/image/image-dired.el (image-dired-dir): Improve docstring.
(image-dired-thumbnail-storage): Change default to `image-dired',
maintain `use-image-dired-dir' for backwards compatibility.
* lisp/image/image-dired-util.el (image-dired-thumb-name): Handle
above new default value.
2022-09-18 00:18:22 +02:00
Stefan Kangas
704cdf5e6c * lisp/image/image-dired.el: Bump version for Emacs 29. 2022-09-17 20:43:20 +02:00
Stefan Kangas
fe7c015b20 Support XFCE in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Support XFCE.  (Bug#57781)
Thanks to Thierry Volpiatto <thievol@posteo.net>.
2022-09-16 22:39:33 +02:00
Stefan Kangas
aaf39c3878 image-dired: Add support for PDF files (Bug#26432)
* lisp/image/image-dired.el
(image-dired--file-name-regexp): New function.
(image-dired-display-thumbnail-original-image): Clean up.
(image-dired-display-image): Support visiting PDF files.
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs):
* lisp/image/image-dired.el (image-dired-get-thumbnail-image)
(image-dired-show-all-from-dir): Use above new function instead of
'image-file-name-regexp'.
2022-09-16 22:28:46 +02:00
Stefan Kangas
dda7502e0a image-dired: Print command when debugging
* lisp/image/image-dired-external.el (image-dired-create-thumb-1):
Display command and arguments when debugging.
* lisp/image/image-dired-util.el (image-dired-debug): Rename from
'image-dired-debug-message'.
2022-09-16 21:36:10 +02:00
Stefan Kangas
f8c5a82ba1 ; Add myself as image-dired maintainer
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el:
* lisp/image/image-dired.el: Add myself as maintainer.
2022-09-16 17:08:24 +02:00
Eli Zaretskii
e485734151 ; * lisp/image/image-crop.el (image-cut): Doc fix. 2022-09-16 14:23:41 +03:00
Lars Ingebrigtsen
e0ab4e3612 Rename image-elide' to image-cut' and add more bindings
* doc/lispref/display.texi (Showing Images): Update.
* lisp/image.el (image-map): Move binding to mirror Gimp bindings.

* lisp/image/image-crop.el (image-crop-cut-command): Rename.
(image-cut-color): New user option.
(image-cut): Rename and remove prefix.
(image-crop): Remove prefix.
(image-crop--crop-image-update): Add commands to switch to
move/square modes.
2022-09-16 11:03:42 +02:00
Peter Münster
7ec31d3222 image-dired: Fix thumbnail options for gm
* lisp/image/image-dired-external.el
(image-dired-cmd-create-standard-thumbnail-options): Fix options for
"gm" (GraphicsMagick).  (Bug#52200)
2022-09-16 02:23:35 +02:00
Stefan Kangas
89084a193e Improve image-dired-display-properties-format
* lisp/image/image-dired.el
(image-dired-display-properties-format): Change default format,
improve docstring and add :safe property
2022-09-16 00:08:56 +02:00
Stefan Kangas
c3828d47dd image-dired: Show header line on start
* lisp/image/image-dired.el (image-dired-show-all-from-dir): Update
header line, to ensure that it is immediately visible on start.
2022-09-15 23:36:25 +02:00
Stefan Kangas
bb76ab015a image-dired: Fix performance bug with mouse click
* lisp/image/image-dired.el
(image-dired--on-file-in-dired-buffer): Move call to
'image-dired-thumb-update-marks' from here...
(image-dired--do-mark-command): ...to here.  Add new optional
argument UPDATE to control calling it.  Update callers.
(image-dired-mouse-toggle-mark-1): Fix performance bug by setting
above new optional argument to nil.  (Bug#53599)
2022-09-15 22:19:00 +02:00
Stefan Kangas
c6fc00f5d7 Make image-dired-toggle-mark-thumb-original-file obsolete
* lisp/image/image-dired.el
(image-dired-toggle-mark-thumb-original-file): Make obsolete.
(image-dired-mouse-toggle-mark-1): Don't use above obsolete
function.
2022-09-15 22:08:19 +02:00
Mattias Engdegård
bfc4393040 Include nil as valid wallpaper-commmand
* lisp/image/wallpaper.el (wallpaper-command):
Include nil in the type since that is a valid value for the variable,
and may be the default value.  This should fix test-custom-opts.
2022-09-15 22:04:26 +02:00
Stefan Kangas
3c1579697f ; Fix wallpaper-set on TTY
* lisp/image/wallpaper.el (wallpaper-set): Don't check for
'display-graphic-p', to allow setting the wallpaper from a TTY.
2022-09-15 19:25:09 +02:00
Stefan Kangas
4907859ee0 Document MS-Windows support in wallpaper.el
* lisp/image/wallpaper.el: Add MS-Windows to Commentary.
(wallpaper-command, wallpaper-command-args, wallpaper-set):
Document MS-Windows support.
2022-09-15 19:14:38 +02:00
Stefan Kangas
3ba47a0782 Improve error when wallpaper-command is nil
* lisp/image/wallpaper.el (wallpaper-set): Improve the error message
when 'wallpaper-command' is nil.
2022-09-15 18:48:41 +02:00
Stefan Kangas
2e0cde244a Support macOS in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Support macOS using "osascript".
(wallpaper-set): Display image name when wallpaper-debug is t.
2022-09-15 18:34:35 +02:00
Stefan Kangas
99bb6de7e1 ; Silence byte-compiler in wallpaper.el
* lisp/image/wallpaper.el (w32-set-wallpaper): Declare.
2022-09-15 15:44:27 +02:00
Eli Zaretskii
09e93c4daf Implement support for 'wallpaper-set' on MS-Windows
* src/w32fns.c (Fw32_set_wallpaper): New primitive.
(syms_of_w32fns): Defsubr it.
(globals_of_w32fns): Attempt to load SystemParametersInfoW from
its DLL at run time.

* lisp/image/wallpaper.el (wallpaper-set): Support MS-Windows by
calling 'w32-set-wallpaper'.

* etc/NEWS: Update and simplify wording of the 'wallpaper-set'
entry.
2022-09-15 14:51:31 +03:00
Stefan Kangas
5798c4aa2a Support fbsetbg in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "fbsetbg".
2022-09-15 00:55:16 +02:00
Eli Zaretskii
7e69230171 ; * lisp/image/image-crop.el (image-elide, image-crop): Doc fixes. 2022-09-14 21:37:50 +03:00
Lars Ingebrigtsen
b525f201ba Allow specifying the color to use in image-elide
* lisp/image/image-crop.el (image-crop-elide-command): Adjust to
allow specifying the color.
(image-elide): Prompt for a color.
(image-crop--crop-image-update): Pass the color along.
2022-09-14 20:21:54 +02:00
Lars Ingebrigtsen
0df76e3e71 Make image-crop variables into user options
* lisp/image/image-crop.el (image-crop): New group.
(image-crop-crop-command, image-crop-resize-command)
(image-crop-elide-command, image-crop-crop-command): Make into
defcustoms.
2022-09-14 18:33:33 +02:00
Stefan Kangas
9148892768 Support hsetroot in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper-command): Add "hsetroot".
2022-09-14 18:17:42 +02:00
Stefan Kangas
80c516bbc8 ; Fix typo in wallpaper--default-commands
* lisp/image/wallpaper.el (wallpaper--default-commands): Fix typo.
2022-09-14 18:13:06 +02:00
Lars Ingebrigtsen
15f42f193b Fix image-mode.el compilation
* lisp/image/image-crop.el (text-property-search): Require.
2022-09-14 16:04:52 +02:00
Lars Ingebrigtsen
997284d2a5 Don't alter the buffer contents in image-crop by default
* lisp/image/image-crop.el (image-crop-buffer-text-function):
Allow modes to alter the textual representation.
(image-crop): Delete the complete image data without assuming it's
all on one line (which isn't the case in image-mode, for instance).
(image-crop--crop-image-update, image-crop--insert-image-data):
Use image-crop-buffer-text-function.
(image-crop--default-buffer-text): New default action -- don't
alter the buffer contents (bug#57793).
2022-09-14 16:04:52 +02:00