1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

205 Commits

Author SHA1 Message Date
Matthias Meulien
7c99526435 Extend bookmark menu with with handler type column
* lisp/bookmark.el (bookmark-bmenu--revert): Extend table entries with
handler type.
(bookmark-bmenu-mode): Add handler type column.
* lisp/doc-view.el (doc-view-bookmark-jump): Set bookmark handler type.
* lisp/help-mode.el (help-bookmark-jump): Set bookmark handler type.
* lisp/image-dired.el (image-dired-bookmark-jump): Set bookmark handler type.
* lisp/info.el (Info-bookmark-jump): Set bookmark handler type.
* lisp/net/eww.el (eww-bookmark-jump): Set bookmark handler type.
* lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Set bookmark handler type.
* lisp/woman.el (woman-bookmark-jump): Set bookmark handler type.
2022-02-17 12:58:12 +01:00
Peter Münster
9cbcfe696f Make image-dired-delete-marked more resilient
* lisp/image-dired.el (image-dired-delete-marked): Don't bug out
on empty buffers (bug#53385).
2022-01-20 15:16:46 +01:00
Stefan Kangas
bef9fcc999 image-dired: Use MD5 for thumb filename generation
* lisp/image-dired.el (image-dired-thumb-name): Revert back to MD5 for
file name generation to preserve backwards-compatibility.  (Bug#53229)
2022-01-14 16:18:34 +01:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
d601fd4692 Merge from origin/emacs-28
7a25ba0fde ; * lisp/image-dired.el: Fix typo.
dda6337066 emacsclient takes more care about XDG_RUNTIME_DIR
26fb4168b8 ; Prefer HTTPS in more URLs
6b89578524 ; * lisp/progmodes/flymake.el: Update the minimum Emacs ve...
2021-12-10 06:30:33 +01:00
Stefan Kangas
7a25ba0fde ; * lisp/image-dired.el: Fix typo. 2021-12-10 02:34:12 +01:00
Stefan Kangas
dae4fc738a image-dired: Show image info in header line
* lisp/image-dired.el
(image-dired-update-header-line): New function to show image
information in the header line.
(image-dired-display-thumb-properties): Make obsolete.
(image-dired-track-thumbnail)
(image-dired--display-thumb-properties-fun)
(image-dired-forward-image, image-dired-next-line)
(image-dired-previous-line, image-dired-beginning-of-buffer)
(image-dired-end-of-buffer, image-dired-read-comment): Use
image-dired-update-header-line instead of
image-dired-display-thumb-properties.
2021-12-09 03:28:19 +01:00
Stefan Kangas
63f07ea22f image-dired: Go to next image when marking
* lisp/image-dired.el
(image-dired-marking-shows-next): New user option to show the next
image after marking, unmarking or flagging an image.
(image-dired--do-mark-command): New macro.
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-unmark-all-marks): Use above new macro.
2021-12-09 00:57:34 +01:00
Stefan Kangas
929a8010ac image-dired: Remove some TODOs
To the extent that these TODOs are relevant or useful, it would be
better to add such features to image-mode directly.
* lisp/image-dired.el: Remove some TODOs.
2021-12-09 00:04:09 +01:00
Stefan Kangas
10655ce02f image-dired: Navigate from image display buffer
* lisp/image-dired.el
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-unmark-all-marks)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Make commands
usable from image-dired-display-image-mode.
(image-dired-display-image-mode-map): Bind above commands.
(image-dired--with-thumbnail-buffer): New macro.
2021-12-08 01:00:38 +01:00
Stefan Kangas
00e6aeacf2 image-dired: Fix behavior of slideshow command
* lisp/image-dired.el (image-dired-slideshow-start): Fix behavior
to match documentation.  Minor simplification of docstring.
2021-12-07 13:00:24 +01:00
Paul Eggert
524c42fa0e Prefer nil to (current-time) when either will do
* lisp/emacs-lisp/timer.el (timer-event-handler, run-at-time):
* lisp/gnus/gnus-score.el (gnus-score-date):
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date)
(gnus-search-imap-handle-date):
* lisp/gnus/gnus-sum.el (gnus-user-date)
(gnus-summary-create-article):
* lisp/image-dired.el (image-dired-create-thumb-1):
* lisp/image/gravatar.el (gravatar-retrieve)
(gravatar--prune-cache):
* lisp/net/dbus.el (dbus-monitor-handler):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert)
(auto-revert-tests--write-file, auto-revert-test--wait-for):
* test/lisp/net/tramp-tests.el (tramp--test-print-duration):
Prefer nil to (current-time) when either will do, as this avoids
some consing.  Similarly, prefer omitting (current-time) arg
when this is equivalent.
2021-12-05 23:24:08 -08:00
Stefan Kangas
82f96ed380 image-dired: Use string-match-p in one case
* lisp/image-dired.el (image-dired-get-thumbnail-image): Use
string-match-p.
2021-12-06 02:53:31 +01:00
Stefan Kangas
fba7c87595 image-dired: Don't disable mouse dragging
* lisp/image-dired.el (image-dired-thumbnail-mode-map): Don't
disable mouse dragging.  (Bug#52201)
2021-12-06 02:49:03 +01:00
Stefan Kangas
244baa550b image-dired: Improve some messages
* lisp/image-dired.el (image-dired-dir)
(image-dired-create-thumb-1): Improve messages.
(image-dired-rotate-original): Signal 'user-error' instead of 'error'.
2021-11-20 12:55:37 +01:00
Stefan Kangas
38322419e4 Revert "* lisp/image-dired.el: Remove unnecessary 'declare-function'."
This reverts commit e0261d4a0c.

This commit gives warnings on builds --without-x.
Problem pointed out by Glenn Morris <rgm@gnu.org> in:
https://lists.gnu.org/r/emacs-devel/2021-11/msg01278.html
2021-11-18 01:00:57 +01:00
Stefan Kangas
e0261d4a0c * lisp/image-dired.el: Remove unnecessary 'declare-function'. 2021-11-17 11:47:49 +01:00
Stefan Kangas
7fdac623dd image-dired: Quote function symbols as such
* lisp/image-dired.el (image-dired-thumbnail-mode-line-up-map)
(image-dired-thumbnail-mode-tag-map)
(image-dired-thumbnail-mode-map, image-dired-minor-mode-map):
Quote function symbols as such.
2021-11-12 05:04:08 +01:00
Stefan Kangas
c9914ba01b Make image-dired-thumbnail-mode non-interactive
* lisp/image-dired.el (image-dired-thumbnail-mode): No longer
interactive, as it only makes sense in a specially prepared buffer.
2021-11-12 04:27:35 +01:00
Stefan Kangas
1d95cef0fe image-dired: Revamp slideshow functionality
* lisp/image-dired.el
(image-dired-slideshow-delay): New defcustom.
(image-dired--slideshow-initial): New defvar.
(image-dired-slideshow-start): Don't show any prompts when starting a
slideshow, unless user gave a negative prefix argument.  Use the value
of the above new defcustom as the default delay.
(image-dired-slideshow-stop): Don't count number of images.  Instead,
continue the slideshow until the next command.
(image-dired-slideshow-step): Use the correct buffer.
(image-dired-slideshow-count, image-dired-slideshow-times): Make
obsolete.
(image-dired--slideshow-timer): Rename from
'image-dired-slideshow-timer'.  Make the old name into an obsolete
variable alias.
(image-dired-display-image-mode-map)
(image-dired-thumbnail-mode-map): Bind 'image-dired-slideshow-start'
to "S".
(image-dired-thumbnail-mode-menu): Add 'image-dired-slideshow-start'.
2021-11-12 04:27:35 +01:00
Stefan Kangas
9ea7e7c4d4 image-dired: Improve thumbnail mode menu
* lisp/image-dired.el (image-dired-thumbnail-mode-menu): Improve menu
with more logical ordering and better naming.
2021-11-12 04:27:35 +01:00
Stefan Kangas
cc093b03e0 ; * lisp/image-dired.el: Add some basic sections.
This file is currently rather hard to follow due to things just being
thrown in at random by many different contributors, with seemingly no
overall plan or idea.  This is the first step towards giving it some
kind of organization.
2021-11-08 07:37:48 +01:00
Stefan Kangas
a1e11502d6 image-dired: Set window-resize-pixelwise to t
* lisp/image-dired.el (image-dired-thumbnail-mode): Set
'window-resize-pixelwise' to t.
2021-11-08 06:21:57 +01:00
Eli Zaretskii
c659182d55 ; Fix doc strings of a recent commit
* lisp/image-dired.el (image-dired-gallery-image-root-url)
(image-dired-gallery-thumb-image-root-url)
(image-dired-gallery-dir): Don't use "path" for file names and
URLs.
2021-11-05 15:47:00 +02:00
Stefan Kangas
e29e2f5776 image-dired: Delete commented out code
* lisp/image-dired.el: Delete broken and commented out speedbar code;
it is not clear what, if anything, it is supposed to do.  If anyone
wants to work on this, they are better off starting from scratch.
2021-11-05 01:10:11 +01:00
Stefan Kangas
b5420c46c2 image-dired: New defgroup and section for gallery support
* lisp/image-dired.el: Add new section header "Gallery support" to
improve file organization.  Move relevant TODO:s there.

(image-dired-gallery): New defgroup.
(image-dired-gallery-dir, image-dired-gallery-image-root-url)
(image-dired-gallery-thumb-image-root-url)
(image-dired-gallery-hidden-tags): Add options to above new defgroup.

(image-dired-add-to-file-comment-list)
(image-dired-create-gallery-lists)
(image-dired-add-to-tag-file-lists, image-dired-hidden-p): Rename to...
(image-dired--add-to-file-comment-list)
(image-dired--create-gallery-lists)
(image-dired--add-to-tag-file-lists, image-dired--hidden-p):
...this, to make it more clear that these functions are internal.
Make the old names obsolete function aliases.
(image-dired-add-to-tag-file-list): Make unused function obsolete.
2021-11-05 01:09:52 +01:00
Stefan Kangas
99a1e87067 ; Fix typo
* lisp/image-dired.el (image-dired-display-current-image-full):
Fix typo.
2021-11-04 19:36:45 +01:00
Stefan Kangas
e4c6673be6 image-dired: Set default-directory in thumbnail buffer
* lisp/image-dired.el (image-dired-show-all-from-dir): Set
default-directory.  This fixes e.g. 'dired-jump'.
2021-11-04 05:10:28 +01:00
Stefan Kangas
73a6c8f98f Make image-dired-display-image-mode inherit from image-mode
* lisp/image-dired.el (image-dired-display-image-mode):
Inherit from 'image-mode'.  (Bug#10758)
(image-dired-display-image): Don't generate a temporary image, which
is no longer needed with the above change.
(image-dired-display-thumbnail-original-image)
(image-dired-dired-display-image)
(image-dired-mouse-display-image): Simplify.

(image-dired-temp-image-file)
(image-dired-cmd-create-temp-image-program)
(image-dired-cmd-create-temp-image-options)
(image-dired-display-window-width-correction)
(image-dired-display-window-height-correction)
(image-dired-display-window-width)
(image-dired-display-window-height)
(image-dired-display-current-image-full)
(image-dired-display-current-image-sized)
(image-dired-window-height-pixels): Make obsolete.
(image-dired-create-display-image-buffer): Make into obsolete
function alias for 'ignore'.
(image-dired-display-image-mode-map): Simplify by removing things
duplicated from `image-mode-map'.  Disable some commands from
`image-mode-map' that doesn't make sense for Image-Dired.
(image-dired-display-image-mode-menu): Remove menu, as it no longer
contains anything useful.
(image-dired-minor-mode):
* doc/emacs/dired.texi (Image-Dired): Update documentation for the
above change.
2021-11-04 02:05:29 +01:00
Stefan Kangas
bf953694ad ; * lisp/image-dired.el: Remove redundant :group args. 2021-11-03 23:25:23 +01:00
Stefan Kangas
733eff49d3 image-dired: Add face for flagged files
* lisp/image-dired.el (image-dired-thumb-mark): New defface.
(image-dired-thumb-update-marks): Mark flagged file with above new defface.
(image-dired-dired-file-marked-p)
(image-dired-thumb-file-marked-p): Add optional argument to be
used by 'image-dired-*-flagged-p' functions below.
(image-dired-dired-file-flagged-p)
(image-dired-thumb-file-flagged-p): New defuns.
(image-dired-thumb-mark): Improve definition with color classes.
(image-dired-thumb-visible-marks): Doc fix.
2021-11-03 22:34:51 +01:00
Philipp Stephani
4422ed2c19 Fix declaration syntax of 'image-dired--on-file-in-dired-buffer'.
* lisp/image-dired.el (image-dired--on-file-in-dired-buffer): Fix
declaration syntax.
2021-11-03 21:48:13 +01:00
Stefan Kangas
f1770a68ae image-dired: Improve marking behavior
* lisp/image-dired.el (image-dired-thumb-mark): Use DarkOrange as
background to better match the 'dired-marked' face.
(image-dired-show-all-from-dir): Disable all marks when entering a
full directory.
(image-dired-unmark-all-marks): Add mode tag.
(image-dired-thumbnail-mode-map): Bind 'image-dired-unmark-all-marks'
to "U".
2021-11-03 08:02:56 +01:00
Stefan Kangas
73c3d622a8 image-dired: Cleanup of four commands
* lisp/image-dired.el
(image-dired--on-file-in-dired-buffer): New macro.
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file): Rewrite using
above new macro.
(image-dired-modify-mark-on-thumb-original-file): Make obsolete in
favor of above new macro.
2021-11-03 07:02:13 +01:00
Stefan Kangas
16b46b9ee2 image-dired: Support wrap-around in display-next-thumbnail-original
* lisp/image-dired.el (image-dired-forward-image): Support negative
prefix argument.  Optionally wrap-around, which means to continue from
first image after reaching the last one and vice versa.
(image-dired-backward-image): Reimplement in terms of
'image-dired-forward-image'.
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Wrap around; when
reaching the last image, continue from the first one.  Add optional
prefix argument to move more than one image at a time.
2021-11-03 05:10:24 +01:00
Stefan Kangas
67af04403c image-dired: Improve menus
* lisp/image-dired.el (image-dired-toggle-append-browsing)
(image-dired-toggle-movement-tracking): Improve messages.
(image-dired-thumbnail-mode-menu, image-dired-minor-mode-menu):
Make toggle entries into checkboxes.  Add separators.  Remove
obsoleted commands accidentally added back in merge.
2021-11-03 05:10:24 +01:00
Stefan Kangas
09a38b021b image-dired: Signal error if file is missing on display
* lisp/image-dired.el (image-dired-display-image): Signal error if
file is missing.
2021-11-03 05:10:24 +01:00
Stefan Kangas
91b6f49cdd image-dired: Move menu definitions to top level
* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
Move menu definitions from here...
(image-dired-thumbnail-mode-menu)
(image-dired-display-image-mode-menu)
(image-dired-minor-mode-menu): ...to these new top level
definitions.
2021-11-03 05:10:24 +01:00
Glenn Morris
af22a0a083 Merge from origin/emacs-28
f52fa1c150 image-dired: Unreverse accidentally reversed menus

# Conflicts:
#	lisp/image-dired.el
2021-10-29 09:20:05 -07:00
Stefan Kangas
f52fa1c150 image-dired: Unreverse accidentally reversed menus
* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
In Emacs 26.1 (commits b905454680 and bed0373855), the menus were
converted to use 'easy-menu-define', but they were reversed in the
process.  Unreverse the menus.  (Bug#51446)
2021-10-28 12:54:07 +02:00
Stefan Kangas
cb94996357 Do interactive mode tagging in image-dired.el
* lisp/image-dired.el (image-dired-restore-window-configuration)
(image-dired-next-line, image-dired-previous-line)
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-jump-original-dired-buffer)
(image-dired-delete-char, image-dired-refresh-thumb)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Do interactive
tagging; these will only work in 'image-dired-thumbnail-mode'.
2021-10-28 02:10:09 +02:00
Stefan Kangas
bc4937539e image-dired: Make thumbnail rotation commands obsolete
* lisp/image-dired.el (image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options)
(image-dired-rotate-thumbnail)
(image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right): Make obsolete in favor of
'image-dired-refresh-thumb' and 'image-rotate'.  It makes no sense to
have destructive thumbnail rotation commands now that Emacs can rotate
thumbnails in memory, and it is very fast to just generate a new one
reflecting the rotation of the original.
(image-dired-thumbnail-mode-map): Remove menu entries and key bindings
for above obsolete commands.  The rotate right keybinding had already
been made ineffective by the local keymap added by 'insert-image'.
2021-10-28 02:03:05 +02:00
Stefan Kangas
722a9080db ; * lisp/image-dired.el: Be more consistent with spelling. 2021-10-27 22:10:04 +02:00
Stefan Kangas
75ebbc6a27 image-dired: Don't show thumbnails if there are no image files
* lisp/image-dired.el (image-dired-show-all-from-dir): Don't show
thumbnail buffer if there are no image files.
2021-10-27 21:05:16 +02:00
Stefan Kangas
c70fdcdd11 Increase image-dired-show-all-from-dir-max-files to 500
* lisp/image-dired.el (image-dired-show-all-from-dir-max-files):
Increase default to 500 to ask for confirmation much less frequently.
The old value was added before we had asynchronous generation of
thumbnails, when a large number of files would lock up Emacs.  Asking
for confirmation could probably be disabled completely these days, but
let's be conservative and set it to some large number of files for
which some users might want to see a prompt.  It can't hurt.
(image-dired-show-all-from-dir): Never warn if above variable is nil.
(image-dired-bookmark-jump): Let-bind above variable to nil instead of
'most-positive-fixnum'.
* doc/emacs/dired.texi (Image-Dired): Don't mention the above
variable, as it is no longer important enough to deserve the space.
* etc/NEWS: Announce the above change.
2021-10-27 20:39:10 +02:00
Glenn Morris
edcf9edc8c Merge from origin/emacs-28
2bdd5732aa (origin/emacs-28) ; * etc/NEWS: Fix last change.
492b927909 Fix help commands for menu-bar menus
9589be772d ; * etc/NEWS: Fix typos.
d353fc4a00 ; Explain why "kinds of atom" isn't a typo
47a3750162 ; * etc/NEWS: Improve wording of the Emoji entry.
b814712796 ; Checkdoc fixes in image-dired.el
e45b3fc521 Improve function documentation with text from XDG BDS spec
284c77eeb6 * lisp/transient.el: Update to package version 0.3.7.
40400e6977 ; Revert parts of "Use string-replace instead of replace-r...
214c2e268c ; Revert parts of "Use string-search instead of string-mat...

# Conflicts:
#	etc/NEWS
2021-10-27 07:59:28 -07:00
Stefan Kangas
484468a1af image-dired: Set line-spacing to match horizontal space
* lisp/image-dired.el (image-dired-thumbnail-mode): Set value of
'line-spacing' to approximately match horizontal space.  This makes
the thumbnail view look better.
2021-10-27 07:53:03 +02:00
Stefan Kangas
e88be49b9d image-dired: Add support for bookmark.el
* lisp/image-dired.el (image-dired-thumbnail-mode): Add bookmark.el support.
(bookmark-make-record-default, bookmark-prop-get): Declare.
(image-dired-bookmark-name, image-dired-bookmark-make-record)
(image-dired-bookmark-jump): New defuns.
2021-10-27 06:12:25 +02:00
Stefan Kangas
7f4afe1609 ; * lisp/image-dired.el: Move obsolete things to "Obsolete" section 2021-10-27 06:12:25 +02:00