summaryrefslogtreecommitdiff
path: root/lisp/image
Commit message (Collapse)AuthorAgeFilesLines
* Avoid errors in 'image-dired-tag-thumbnail'Eli Zaretskii2024-05-082-24/+22
| | | | | | * lisp/image/image-dired.el (image-dired-tag-thumbnail) (image-dired-tag-thumbnail-remove): Move here from image-dired-tags.el. (Bug#70821)
* Fix image-dired-tags-db-file void variable errorStefan Kangas2024-01-211-0/+1
| | | | | * lisp/image/image-dired-tags.el (image-dired-sane-db-file): Require 'image-dired'. (Bug#68636)
* ; Add 2024 to copyright yearsPo Lu2024-01-0211-11/+11
|
* Add missing builtin package declarationsStefan Kangas2023-09-184-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/finder.el (finder--builtins-alist): Add new package directories 'leim' and 'obsolete' as part of the 'emacs' package. Add new package directory 'use-package' as part of the 'use-package' package. * lisp/net/eudc-capf.el: * lisp/net/eudcb-ecomplete.el: * lisp/net/eudcb-macos-contacts.el: * lisp/net/eudcb-mailabbrev.el: Declare library as part of the 'eudc' package. * lisp/mail/ietf-drums-date.el: Declare library as part of the 'ietf-drums' package. * lisp/image/image-dired-dired.el: * lisp/image/image-dired-external.el: * lisp/image/image-dired-tags.el: * lisp/image/image-dired-util.el: Declare library as part of the 'image-dired' package. * lisp/emacs-lisp/oclosure.el: * lisp/keymap.el: * lisp/progmodes/c-ts-common.el: Declare library as part of the 'emacs' package. (Bug#62751) (cherry picked from commit 94b1de2774b5c1fa3c28285229900657638f5c3f)
* Fix handling of sliced imagesEli Zaretskii2023-04-081-13/+46
| | | | | | | | | | | | | * lisp/image.el (image-slice-map): New keymap, without some bindings that make no sense with sliced images. (insert-image, insert-sliced-image): Use it. (insert-sliced-image): Make the 'keymap' property rear-nonsticky, to prevent calling image commands when point is to the right of the slice. (Bug#62679) * lisp/image/image-crop.el (image-cut, image-crop): Doc fixes. (image-crop): Don't try using stock MS-Widows convert.exe program. Use 'image--get-image' to support sliced images.
* Defaults to zero for image-dired--number-of-thumbnailsManuel Giraud2023-02-281-1/+1
| | | | | * lisp/image/image-dired.el (image-dired--number-of-thumbnails): Defaults zero to avoid wrong type argument error. (Bug#61734)
* Do not error out on non image file (bug#61639)Manuel Giraud2023-02-221-5/+7
| | | | | | * lisp/image/image-dired.el (image-dired-display-thumbs): Do not insert non image file and do not display image-dired buffer if it is empty.
* ; Improve image-dired-thumbnail-storage docstringStefan Kangas2023-02-191-8/+7
| | | | | * lisp/image/image-dired.el (image-dired-thumbnail-storage): Improve docstring.
* Update thumbnail buffer's header moreManuel Giraud2023-02-191-1/+2
| | | | | * lisp/image/image-dired.el (image-dired-display-thumbs): Call image-dired--update-header-line. (Bug#61508)
* ; Fix typosStefan Kangas2023-02-121-1/+1
|
* ; Fix doc strings in lisp/image/ directoryEli Zaretskii2023-02-119-181/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper-setter) (wallpaper--find-command, wallpaper--x-monitor-name) (wallpaper--format-arg): * lisp/image/image-dired-util.el (image-dired-associated-dired-buffer) (image-dired--with-dired-buffer): * lisp/image/image-dired-tags.el (image-dired--with-db-file) (image-dired-remove-tag, image-dired-list-tags) (image-dired-tag-files, image-dired-write-comments) (image-dired-update-property): * lisp/image/image-dired-external.el (image-dired-cmd-pngnq-options) (image-dired-cmd-pngcrush-program) (image-dired-cmd-pngcrush-options) (image-dired-cmd-optipng-options) (image-dired-cmd-create-standard-thumbnail-options) (image-dired-cmd-rotate-original-program) (image-dired-cmd-rotate-original-options) (image-dired-cmd-write-exif-data-options, image-dired-queue) (image-dired-queue-active-limit, image-dired-pngnq-thumb) (image-dired-pngcrush-thumb, image-dired-optipng-thumb) (image-dired-thumb-queue-run, image-dired-get-exif-file-name) (image-dired-thumbnail-set-image-description): * lisp/image/image-dired.el (image-dired-thumbnail-storage) (image-dired-tags-db-file) (image-dired-rotate-original-ask-before-overwrite) (image-dired-line-up-method, image-dired-track-movement) (image-dired-display-properties-format) (image-dired-external-viewer) (image-dired-show-all-from-dir-max-files) (image-dired-insert-image) (image-dired-dired-with-window-configuration) (image-dired-restore-window-configuration) (image-dired-track-original-file) (image-dired-toggle-movement-tracking) (image-dired-format-properties-string) (image-dired--on-file-in-dired-buffer) (image-dired-thumbnail-display-external) (image-dired-display-image, image-dired-copy-filename-as-kill): * lisp/image/image-dired-dired.el (image-dired-dired-toggle-marked-thumbs) (image-dired-dired-after-readin-hook) (image-dired-next-line-and-display) (image-dired-previous-line-and-display) (image-dired-mark-and-display-next, image-dired-track-thumbnail) (image-dired-dired-next-line, image-dired-dired-previous-line) (image-dired-dired-display-external) (image-dired-copy-with-exif-file-name) (image-dired-mark-tagged-files) (image-dired-dired-display-properties): * lisp/image/image-crop.el (image-crop-exif-rotate) (image-crop-resize-command, image-crop-cut-command) (image-crop-crop-command, image-crop-rotate-command) (image-crop-buffer-text-function, image-cut-color): * lisp/image/image-converter.el (image-converter) (image-convert-to-format, image-converter-regexp) (image-converter--converters, image-convert-p, image-convert) (image-converter--value, image-converter--probe) (image-converter--find-converter, image-converter--convert) (image-converter-add-handler): * lisp/image/exif.el (exif-parse-buffer, exif-field) (exif-orientation, exif--direct-ascii-value) (exif--process-value, exif--read-chunk, exif--read-number-be) (exif--read-number-le, exif--read-number): Fix doc strings.
* ; Remove extraneous local variables from image-dired-*.el filesEli Zaretskii2023-02-114-16/+0
| | | | | | | | | These cause annoying prompts when visiting these files, and evidently belong to a third-party package. * lisp/image/image-dired-external.el: * lisp/image/image-dired-tags.el: * lisp/image/image-dired-dired.el: * lisp/image/image-dired-util.el: Remove unsafe local-variables.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-0111-11/+11
|
* ; Fix several symbol name typosStefan Kangas2022-10-261-1/+1
|
* Fix setting the wallpaper with "swaybg" and "wbg"Stefan Kangas2022-10-071-29/+71
| | | | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper-setter): Add 'init-action' and 'detach' fields to structure. (wallpaper--init-action-kill): New helper function. (wallpaper--default-setters): Use above new fields for "swaybg" and "wbg", to start/restart the corresponding processes as needed. (wallpaper-default-set-function): Call 'init-action' function if there is one. If 'detach', use 'call-process' instead of 'start-process'. (Bug#57781) * test/lisp/image/wallpaper-tests.el (wallpaper--find-setter) (wallpaper--find-setter/call-predicate) (wallpaper--find-setter/set-current-setter) (wallpaper-set/runs-command, wallpaper-set/runs-command/detach) (wallpaper-set/calls-init-action) (wallpaper-set/calls-wallpaper-set-function): New tests.
* ; Make wallpaper--format-arg more resilientStefan Kangas2022-10-071-16/+20
| | | | | * lisp/image/wallpaper.el (wallpaper--format-arg): Make more resilient to errors.
* image-dired: Shorten several long namesStefan Kangas2022-10-041-45/+58
| | | | | | | | | | | | | | | | * lisp/image/image-dired.el (image-dired-image-mode-map) (image-dired-image-mode): Rename from 'image-dired-display-image-mode-map' and 'image-dired-display-image-mode'. Update all uses and make old names into obsolete aliases. (image-dired-display-this, image-dired-display-next) (image-dired-display-previous): Rename from 'image-dired-display-thumbnail-original-image', 'image-dired-display-next-thumbnail-original', and 'image-dired-display-previous-thumbnail-original'. Update all uses and make old names into obsolete aliases. * doc/emacs/dired.texi (Image-Dired): Update documentation for the above changes, and improve indexing.
* image-dired: Fix arrow keys in thumbs bufferStefan Kangas2022-10-041-0/+2
| | | | | * lisp/image/image-dired.el (image-dired-thumbnail-mode-map): Also remap 'left-char' and 'right-char'.
* Delete thumbs in image-dired-do-flagged-delete after confirmationPeter Münster2022-10-021-11/+15
| | | | | * lisp/image/image-dired.el (image-dired-do-flagged-delete): Remove thumbnails only after confirming deletion of the files. (Bug#58255)
* ; * lisp/image/wallpaper.el (wallpaper--x-monitor-name): Doc fix.Eli Zaretskii2022-09-291-1/+3
|
* Fix loading wallpaper.el on MS-WindowsStefan Kangas2022-09-291-2/+4
| | | | | | | * lisp/image/wallpaper.el (wallpaper--find-command) (wallpaper--find-command-args): Avoid backtrace when 'wallpaper--find-setter' returns nil, e.g. on MS-Windows. (Bug#58167)
* New command image-dired-do-flagged-deletePeter Münster2022-09-291-8/+15
| | | | | | | | | * lisp/image/image-dired.el (image-dired-delete-marked): Remove command, because it was too buggy. (image-dired-do-flagged-delete): New command that does almost the same as the above removed command but with flagged images. (image-dired-thumbnail-mode-map): Bind "x" to 'image-dired-do-flagged-delete'.
* image-dired-delete-char: Don't disturb formattingPeter Münster2022-09-291-5/+9
| | | | | | * lisp/image/image-dired.el (image-dired-delete-char): Don't disturb the expected formatting of the thumbnail buffer (always one space/newline after a thumbnail).
* wallpaper-set: Get monitor name on non-graphical displayStefan Kangas2022-09-291-7/+36
| | | | | | | | | * lisp/image/wallpaper.el (wallpaper--format-arg): Break out function from here... (wallpaper--x-monitor-name): ...to here. Try to get the monitor name non-graphical displays, and prompt if that doesn't work. (wallpaper-default-set-function): Improve debugging output. Ref. https://lists.gnu.org/r/emacs-devel/2022-09/msg01910.html
* Prompt for wallpaper width/height only when neededStefan Kangas2022-09-291-8/+10
| | | | | * lisp/image/wallpaper.el (wallpaper--format-arg): Don't prompt for width and height unless the values are actually used.
* ; image-dired: Fix last changeStefan Kangas2022-09-281-1/+2
| | | | | | | * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/per-directory): * lisp/image/image-dired-util.el (image-dired-thumb-name): Fix last change.
* ; Fix debugging image-dired-dired-toggle-marked-thumbsStefan Kangas2022-09-281-0/+1
| | | | | * lisp/image/image-dired-dired.el (image-dired-dired-toggle-marked-thumbs): Fix debugging.
* image-dired: End thumbnail file names with ".jpg"Stefan Kangas2022-09-281-31/+22
| | | | | | | | | | * lisp/image/image-dired-util.el (image-dired-thumb-name): Always end thumbnail name in ".jpg" and simplify naming to just use the SHA-1 hash. (Bug#57961) * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/image-dired): Adjust test for the above change. * etc/NEWS: Announce the above change.
* ; * lisp/image/image-dired.el: Fix typo.Stefan Kangas2022-09-271-1/+1
|
* Make image-dired-dired-toggle-marked-thumbs fasterStefan Kangas2022-09-271-2/+2
| | | | | | * lisp/image/image-dired-dired.el (image-dired-dired-toggle-marked-thumbs): Don't show progress, since it makes things slower.
* image-dired: Fix header line when file is missingStefan Kangas2022-09-271-3/+5
| | | | | | * lisp/image/image-dired.el (image-dired-format-properties-string): Don't error when file has been deleted.
* ; Simplify wallpaper--format-arg with let-alistStefan Kangas2022-09-271-5/+3
| | | | * lisp/image/wallpaper.el (wallpaper--format-arg): Use let-alist.
* ; * lisp/image/wallpaper.el (wallpaper--format-arg): Fix typo.Stefan Kangas2022-09-271-1/+1
|
* Fix OBOE in image-dired--with-markedStefan Kangas2022-09-271-1/+1
| | | | | * lisp/image/image-dired.el (image-dired--with-marked): Fix off-by-one error.
* Get rid of default wallpaper-setter constructorStefan Kangas2022-09-261-1/+2
| | | | | * lisp/image/wallpaper.el (wallpaper-setter): Actually get rid of the default constructor.
* Set XFCE wallpaper also in single-workspace-modeStefan Kangas2022-09-261-8/+27
| | | | | | | | | | | | | This fixes setting the wallpaper on XFCE whether or not the "/backdrop/single-workspace-mode" setting is true or false. That XFCE setting controls whether or not the same wallpaper is used on all workspaces or not. * lisp/image/wallpaper.el (wallpaper-setter) (wallpaper-command-args, wallpaper-default-set-function): Allow using a function for getting the command line arguments. (wallpaper-xfce-command-args): New function. (wallpaper--default-setters): Use above new function for XFCE.
* ; * lisp/image/wallpaper.el (cl-macs): Require, to avoid warnings.Eli Zaretskii2022-09-261-0/+1
|
* Display a message when wallpaper was setStefan Kangas2022-09-261-2/+4
| | | | | * lisp/image/wallpaper.el (wallpaper-default-set-function): Display a message when the wallpaper was successfully set.
* Fix setting the wallpaper in XFCEStefan Kangas2022-09-261-31/+65
| | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper-command-args) (wallpaper-default-set-function): Support new format specifiers %S for screen, %W for workspace, and %M for monitor. (wallpaper--default-setters): Use above new specifiers for XFCE. (wallpaper--format-arg): New defun broken out from... (wallpaper-default-set-function): ...here. (wallpaper--get-height-or-width): Support noninteractive use. * test/lisp/image/wallpaper-tests.el (wallpaper--format-arg/filename) (wallpaper--format-arg/filename-hex) (wallpaper--format-arg/width, wallpaper--format-arg/screen) (wallpaper--format-arg/monitor, wallpaper--format-arg/workspace): New tests.
* Rewrite wallpaper.el to use a cl-defstructStefan Kangas2022-09-261-127/+190
| | | | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper--default-commands): Delete variable. (wallpaper-setter): New cl-defstruct. (wallpaper--default-methods-create): New macro. (wallpaper--default-setters): (wallpaper--current-setter): New variables. (wallpaper--find-setter): New defun to pick a wallpaper-setter. (wallpaper--find-command, wallpaper--find-command-args): Use 'wallpaper--find-setter'. (wallpaper-command): Doc fix. * test/lisp/image/wallpaper-tests.el (wallpaper--find-command/return-string) (wallpaper--find-command-args/return-list) (wallpaper--image-file-regexp/return-string): New tests.
* Autoload image-dired-thumbnail-storage :safe propertyStefan Kangas2022-09-261-1/+1
| | | | | * lisp/image/image-dired.el (image-dired-thumbnail-storage): Autoload :safe property.
* Refactor system specific code in wallpaper.elStefan Kangas2022-09-251-62/+80
| | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper-set-function): New defvar containing system specific function for setting wallpaper. (wallpaper-default-set-function): Factor out function from... (wallpaper-set): ...here. Use above new defvar. (wallpaper-default-file-name-regexp): Delete defvar. (wallpaper-image-file-extensions): New defvar. (wallpaper--image-file-regexp): New defun that returns a regexp to match for completion purposes. (wallpaper--use-default-set-function-p): New defun. (wallpaper--find-command, wallpaper--find-command-arguments): Do nothing on MS-Windows and Haiku.
* Add reasonable default to wallpaper-setStefan Kangas2022-09-251-8/+26
| | | | | | | | * lisp/image/wallpaper.el (wallpaper-default-file-name-regexp): New variable. (wallpaper--get-default-file): New function. (wallpaper-set): Use above new function to set a default. * test/lisp/image/wallpaper-tests.el: New file.
* wallpaper: URI-encode gsettings argumentStefan Kangas2022-09-251-7/+11
| | | | | | * lisp/image/wallpaper.el (wallpaper--default-commands) (wallpaper-command-args, wallpaper-set): URI-encode gsettings argument.
* Make image-dired-thumb-name more portableStefan Kangas2022-09-251-11/+14
| | | | | | | | | * lisp/image/image-dired-util.el (image-dired-thumb-name): Create file names in a portable manner. * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/standard) (image-dired-thumb-name/image-dired) (image-dired-thumb-name/per-directory): Expand tests.
* Add new command image-dired-copy-filename-as-killStefan Kangas2022-09-251-0/+8
| | | | | | * lisp/image/image-dired.el (image-dired-copy-filename-as-kill): New command. (image-dired-thumbnail-mode-map): Bind above new command to "w".
* ; Simplify image-dired-forward-imageStefan Kangas2022-09-241-9/+7
| | | | * lisp/image/image-dired.el (image-dired-forward-image): Simplify.
* image-dired: Add faces for header lineStefan Kangas2022-09-241-24/+59
| | | | | | | | | | * lisp/image/image-dired.el (image-dired-thumb-header-file-name) (image-dired-thumb-header-directory-name) (-image-dired-thumb-header-file-size) (image-dired-thumb-header-image-count): New faces. (image-dired-format-properties-string): Use above new faces. (image-dired-thumb-mark, image-dired-thumb-flagged): Move definition further down.
* image-dired: Add new %-format specifiers for header lineStefan Kangas2022-09-242-42/+65
| | | | | | | | | | | | | | | | | * lisp/image/image-dired.el (image-dired-format-properties-string): Add new specifiers "%n", "%d", and "%s". (image-dired-display-properties-format): Change default format to use above new specifiers. (image-dired--number-of-thumbnails): New variable. (image-dired-insert-thumbnail, image-dired-display-thumbs): Keep track of file number when appending it into the thumbnail buffer. (image-dired--update-header-line): Support above new format specifiers. Rename from 'image-dired-update-header-line' and update callers. * lisp/image/image-dired-dired.el (image-dired-dired-display-properties): Support above new format specifiers.
* image-dired: Move menu definitions to keymapsStefan Kangas2022-09-242-7/+5
| | | | | | | | | * lisp/image/image-dired.el (image-dired-thumbnail-mode-menu): * lisp/image/image-dired-dired.el (image-dired-minor-mode-menu): Delete variables and move menus to... * lisp/image/image-dired.el (image-dired-thumbnail-mode-map): * lisp/image/image-dired-dired.el(image-dired-minor-mode-map): ...here.