commit 484468a1af1d6a3e4bed16002e08ddbf4457dd01 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Wed Oct 27 07:51:35 2021 +0200 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. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index d089d4a26d..f6a263749f 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1767,7 +1767,9 @@ You probably want to use this together with Use `image-dired-minor-mode' to get a nice setup." (buffer-disable-undo) (add-hook 'file-name-at-point-functions 'image-dired-file-name-at-point nil t) - (setq-local bookmark-make-record-function #'image-dired-bookmark-make-record)) + (setq-local bookmark-make-record-function #'image-dired-bookmark-make-record) + ;; Use approximately as much vertical spacing as horizontal. + (setq-local line-spacing (frame-char-width))) (define-derived-mode image-dired-display-image-mode special-mode "image-dired-image-display" commit 4febba2c61722817ed2da0c775ac8b6acc4d1afa Author: Stefan Kangas Date: Wed Oct 27 07:05:33 2021 +0200 ; * test/lisp/files-tests.el: Fix last commit. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index c8b80e3660..4b9d4e4516 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1552,7 +1552,6 @@ The door of all subtleties! (should-error (file-name-with-extension "/is/a/directory/" "css"))) (ert-deftest files-tests-file-name-base () - (should (equal (file-name-base) "files-tests")) (should (equal (file-name-base "") "")) (should (equal (file-name-base "/foo/") "")) (should (equal (file-name-base "/foo") "foo")) commit e88be49b9db51f36ef2b6b3fc6716cd02203775f Author: Stefan Kangas Date: Wed Oct 27 06:05:39 2021 +0200 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. diff --git a/etc/NEWS b/etc/NEWS index 1cb19ee888..093c8ac963 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -227,6 +227,12 @@ to use it; it is not enabled by default. Support for the GraphicsMagick command line tool ("gm") has been added, and is used instead of ImageMagick when it is available. +--- +*** Support for bookmark.el. +The command 'bookmark-set' (bound to 'C-x r m') is now supported in +the thumbnail view, and will create a bookmark that opens the current +directory in Image-Dired. + ** Dired --- diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 53cc867894..d089d4a26d 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1766,7 +1766,8 @@ You probably want to use this together with "Browse and manipulate thumbnail images using dired. Use `image-dired-minor-mode' to get a nice setup." (buffer-disable-undo) - (add-hook 'file-name-at-point-functions 'image-dired-file-name-at-point nil t)) + (add-hook 'file-name-at-point-functions 'image-dired-file-name-at-point nil t) + (setq-local bookmark-make-record-function #'image-dired-bookmark-make-record)) (define-derived-mode image-dired-display-image-mode special-mode "image-dired-image-display" @@ -2815,6 +2816,38 @@ tags to their respective image file. Internal function used by (dolist (tag tag-list) (push (cons file tag) lst)))))) + +;;;; bookmark.el support + +(declare-function bookmark-make-record-default + "bookmark" (&optional no-file no-context posn)) +(declare-function bookmark-prop-get "bookmark" (bookmark prop)) + +(defun image-dired-bookmark-name () + "Create a default bookmark name for the current EWW buffer." + (file-name-nondirectory + (directory-file-name + (file-name-directory (image-dired-original-file-name))))) + +(defun image-dired-bookmark-make-record () + "Create a bookmark for the current EWW buffer." + `(,(image-dired-bookmark-name) + ,@(bookmark-make-record-default t) + (location . ,(file-name-directory (image-dired-original-file-name))) + (image-dired-file . ,(file-name-nondirectory (image-dired-original-file-name))) + (handler . image-dired-bookmark-jump))) + +;;;###autoload +(defun image-dired-bookmark-jump (bookmark) + "Default bookmark handler for Image-Dired buffers." + ;; User already cached thumbnails, so disable any checking. + (let ((image-dired-show-all-from-dir-max-files most-positive-fixnum)) + (image-dired (bookmark-prop-get bookmark 'location)) + ;; TODO: Go to the bookmarked file, if it exists. + ;; (bookmark-prop-get bookmark 'image-dired-file) + (goto-char (point-min)))) + + ;;;; Obsolete ;;;###autoload commit e89b94f46d8a0ef3a270c31f3129eb8b4c8da646 Author: Stefan Kangas Date: Wed Oct 27 05:34:52 2021 +0200 Add test for file-name-base * test/lisp/files-tests.el (files-tests-file-name-base): New test. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index b283a512a4..c8b80e3660 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1551,6 +1551,15 @@ The door of all subtleties! (should-error (file-name-with-extension "Jack" ".")) (should-error (file-name-with-extension "/is/a/directory/" "css"))) +(ert-deftest files-tests-file-name-base () + (should (equal (file-name-base) "files-tests")) + (should (equal (file-name-base "") "")) + (should (equal (file-name-base "/foo/") "")) + (should (equal (file-name-base "/foo") "foo")) + (should (equal (file-name-base "/foo/bar") "bar")) + (should (equal (file-name-base "foo") "foo")) + (should (equal (file-name-base "foo/bar") "bar"))) + (ert-deftest files-test-dir-locals-auto-mode-alist () "Test an `auto-mode-alist' entry in `.dir-locals.el'" (find-file (ert-resource-file "whatever.quux")) commit 7f4afe16094247a7681bbb7ffa90b927c9452799 Author: Stefan Kangas Date: Wed Oct 27 05:16:05 2021 +0200 ; * lisp/image-dired.el: Move obsolete things to "Obsolete" section diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 37c324f480..53cc867894 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1146,9 +1146,6 @@ displayed." ;;;###autoload (defalias 'image-dired 'image-dired-show-all-from-dir) -;;;###autoload -(define-obsolete-function-alias 'tumme 'image-dired "24.4") - (defun image-dired-sane-db-file () "Check if `image-dired-db-file' exists. If not, try to create it (including any parent directories). @@ -1836,10 +1833,6 @@ Note that n, p and and will be hijacked and bound to `image-dired-dired-x-line'." :keymap image-dired-minor-mode-map) -;;;###autoload -(define-obsolete-function-alias 'image-dired-setup-dired-keybindings 'image-dired-minor-mode - "26.1") - (declare-function clear-image-cache "image.c" (&optional filter)) (defun image-dired-create-thumbs (&optional arg) @@ -2824,6 +2817,13 @@ tags to their respective image file. Internal function used by ;;;; Obsolete +;;;###autoload +(define-obsolete-function-alias 'tumme #'image-dired "24.4") + +;;;###autoload +(define-obsolete-function-alias 'image-dired-setup-dired-keybindings + #'image-dired-minor-mode "26.1") + (defcustom image-dired-cmd-read-exif-data-program "exiftool" "Program used to read EXIF data to image. Used together with `image-dired-cmd-read-exif-data-options'." commit 236457e05243f7d9acdbd0996076507c9134ce6d Author: Stefan Kangas Date: Wed Oct 27 04:34:25 2021 +0200 image-dired: Improve mouse behaviour * lisp/image-dired.el (image-dired-thumbnail-mode-map): Improve mouse behaviour: ignore dragging, as it currently doesn't do anything useful, and make all clicks just select the thumbnail. (image-dired-mouse-display-image) (image-dired-mouse-select-thumbnail): Move point to closest image after clicking in buffer. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index cc8b80dd51..37c324f480 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1657,6 +1657,15 @@ You probably want to use this together with ;; Mouse (define-key map [mouse-2] 'image-dired-mouse-display-image) (define-key map [mouse-1] 'image-dired-mouse-select-thumbnail) + (define-key map [mouse-3] #'image-dired-mouse-select-thumbnail) + (define-key map [down-mouse-1] #'image-dired-mouse-select-thumbnail) + (define-key map [down-mouse-2] #'image-dired-mouse-select-thumbnail) + (define-key map [down-mouse-3] #'image-dired-mouse-select-thumbnail) + ;; Let's disable mouse dragging, as it currently doesn't do + ;; anything useful. + (define-key map [drag-mouse-1] #'ignore) + (define-key map [drag-mouse-2] #'ignore) + (define-key map [drag-mouse-3] #'ignore) ;; Seems I must first set C-down-mouse-1 to undefined, or else it ;; will trigger the buffer menu. If I try to instead bind ;; C-down-mouse-1 to `image-dired-mouse-toggle-mark', I get a message @@ -2410,6 +2419,8 @@ non-nil." (interactive "e") (mouse-set-point event) (goto-char (posn-point (event-end event))) + (unless (image-at-point-p) + (image-dired-backward-image)) (let ((file (image-dired-original-file-name))) (when file (if image-dired-track-movement @@ -2425,6 +2436,8 @@ non-nil." (interactive "e") (mouse-set-point event) (goto-char (posn-point (event-end event))) + (unless (image-at-point-p) + (image-dired-backward-image)) (if image-dired-track-movement (image-dired-track-original-file)) (image-dired-display-thumb-properties)) commit 16bd8dce28772e8f952620b152bab7b2cbbfcb29 Author: Stefan Kangas Date: Wed Oct 27 03:43:21 2021 +0200 image-dired: Don't ding at beginning or end of buffer * lisp/image-dired.el (image-dired--display-thumb-properties-fun): New defun. (image-dired-forward-image, image-dired-backward-image): Don't ding when moving past first or last image; instead show a message, wait a second and then show image properties. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index cd18ca1565..cc8b80dd51 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1372,6 +1372,15 @@ With prefix argument, move ARG lines." (if image-dired-track-movement (image-dired-track-thumbnail))) +(defun image-dired--display-thumb-properties-fun () + (let ((old-buf (current-buffer)) + (old-point (point))) + (lambda () + (when (and (equal (current-buffer) old-buf) + (= (point) old-point)) + (ignore-errors + (image-dired-display-thumb-properties)))))) + (defun image-dired-forward-image (&optional arg) "Move to next image and display properties. Optional prefix ARG says how many images to move; default is one @@ -1387,11 +1396,12 @@ image." (forward-char)) (setq pos (point)) (image-dired-image-at-point-p))) - (goto-char pos) - (error "At last image")))) + (progn (goto-char pos) + (image-dired-display-thumb-properties)) + (message "At last image") + (run-at-time 1 nil (image-dired--display-thumb-properties-fun))))) (when image-dired-track-movement - (image-dired-track-original-file)) - (image-dired-display-thumb-properties)) + (image-dired-track-original-file))) (defun image-dired-backward-image (&optional arg) "Move to previous image and display properties. @@ -1408,11 +1418,12 @@ image." (backward-char)) (setq pos (point)) (image-dired-image-at-point-p))) - (goto-char pos) - (error "At first image")))) + (progn (goto-char pos) + (image-dired-display-thumb-properties)) + (message "At first image") + (run-at-time 1 nil (image-dired--display-thumb-properties-fun))))) (when image-dired-track-movement - (image-dired-track-original-file)) - (image-dired-display-thumb-properties)) + (image-dired-track-original-file))) (defun image-dired-next-line () "Move to next line and display properties." @@ -1612,10 +1623,10 @@ You probably want to use this together with (define-key map "\C-p" 'image-dired-previous-line) (define-key map "\C-n" 'image-dired-next-line) - (define-key map "<" 'image-dired-beginning-of-buffer) - (define-key map ">" 'image-dired-end-of-buffer) - (define-key map (kbd "M-<") 'image-dired-beginning-of-buffer) - (define-key map (kbd "M->") 'image-dired-end-of-buffer) + (define-key map "<" #'image-dired-beginning-of-buffer) + (define-key map ">" #'image-dired-end-of-buffer) + (define-key map (kbd "M-<") #'image-dired-beginning-of-buffer) + (define-key map (kbd "M->") #'image-dired-end-of-buffer) (define-key map "d" 'image-dired-flag-thumb-original-file) (define-key map [delete] 'image-dired-flag-thumb-original-file) commit ab11a3adf91311e752fae0749113c00a20e6ee4e Author: Stefan Kangas Date: Wed Oct 27 03:23:49 2021 +0200 image-dired: Add new commands for beginning/end of buffer * lisp/image-dired.el (image-dired-beginning-of-buffer) (image-dired-end-of-buffer): New commands. (image-dired-thumbnail-mode-map): Bind new beginning of buffer command to '<' and 'M-<', and end of buffer command to '>' and 'M->'. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index b54404b090..cd18ca1565 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1444,6 +1444,28 @@ image." (image-dired-track-original-file)) (image-dired-display-thumb-properties)) +(defun image-dired-beginning-of-buffer () + "Move to the first image in the buffer and display properties." + (interactive nil image-dired-thumbnail-mode) + (goto-char (point-min)) + (while (and (not (image-at-point-p)) + (not (eobp))) + (forward-char 1)) + (when image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) + +(defun image-dired-end-of-buffer () + "Move to the last image in the buffer and display properties." + (interactive nil image-dired-thumbnail-mode) + (goto-char (point-max)) + (while (and (not (image-at-point-p)) + (not (bobp))) + (forward-char -1)) + (when image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) + (defun image-dired-format-properties-string (buf file props comment) "Format display properties. BUF is the associated dired buffer, FILE is the original image file @@ -1590,6 +1612,11 @@ You probably want to use this together with (define-key map "\C-p" 'image-dired-previous-line) (define-key map "\C-n" 'image-dired-next-line) + (define-key map "<" 'image-dired-beginning-of-buffer) + (define-key map ">" 'image-dired-end-of-buffer) + (define-key map (kbd "M-<") 'image-dired-beginning-of-buffer) + (define-key map (kbd "M->") 'image-dired-end-of-buffer) + (define-key map "d" 'image-dired-flag-thumb-original-file) (define-key map [delete] 'image-dired-flag-thumb-original-file) (define-key map "m" 'image-dired-mark-thumb-original-file) commit 203279a02448c6d9cfc766ae5dd159cdacabd7df Author: Stefan Kangas Date: Wed Oct 27 03:22:09 2021 +0200 Add new function image-at-point-p * lisp/image.el (image-at-point-p): New defun. * doc/lispref/display.texi (Showing Images): Document above new defun. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index cc9ca28bf0..92932af9ba 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6549,6 +6549,11 @@ cache, it can always be displayed, even if the value of @code{max-image-size} is subsequently changed (@pxref{Image Cache}). @end defvar +@defun image-at-point-p +This function returns @code{t} if point is on an image, and @code{nil} +otherwise. +@end defun + Images inserted with the insertion functions above also get a local keymap installed in the text properties (or overlays) that span the displayed image. This keymap defines the following commands: diff --git a/etc/NEWS b/etc/NEWS index 6d3256959e..1cb19ee888 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -386,6 +386,11 @@ something usable even if the syntax of the argument isn't completely correct. The 'kbd-valid-p' predicate does a stricter check of the syntax. ++++ +** New function 'image-at-point-p'. +This function returns t if point is on a valid image, and nil +otherwise. + * Changes in Emacs 29.1 on Non-Free Operating Systems diff --git a/lisp/image.el b/lisp/image.el index 5343e26d03..bfcbb66c25 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -1140,6 +1140,13 @@ default is 20%." (error "No image under point")) image)) +;;;###autoload +(defun image-at-point-p () + "Return non-nil if there is an image at point." + (condition-case nil + (prog1 t (image--get-image)) + (error nil))) + (defun image--get-imagemagick-and-warn (&optional position) (declare-function image-transforms-p "image.c" (&optional frame)) (unless (or (fboundp 'imagemagick-types) (image-transforms-p)) commit d22cd6d4c6a88894facbad9130200e86de22dd8a Author: Stefan Kangas Date: Wed Oct 27 02:36:57 2021 +0200 image-dired: Use an evenly spaced grid for thumbnails * lisp/image-dired.el (image-dired-line-up): Use an evenly spaced grid for thumbnails, even if image sizes differ. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index b7650ba772..b54404b090 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1884,18 +1884,26 @@ See also `image-dired-line-up-dynamic'." (not (eobp))) (delete-char 1))) (goto-char (point-min)) - (let ((count 0)) + (let ((seen 0) + (thumb-prev-pos 0) + (thumb-width-chars + (ceiling (/ (+ (* 2 image-dired-thumb-relief) + (* 2 image-dired-thumb-margin) + (image-dired-thumb-size 'width)) + (float (frame-char-width)))))) (while (not (eobp)) (forward-char) (if (= image-dired-thumbs-per-row 1) (insert "\n") - (insert " ") - (setq count (1+ count)) - (when (and (= count (- image-dired-thumbs-per-row 1)) + (cl-incf thumb-prev-pos thumb-width-chars) + (insert (propertize " " 'display `(space :align-to ,thumb-prev-pos))) + (cl-incf seen) + (when (and (= seen (- image-dired-thumbs-per-row 1)) (not (eobp))) (forward-char) (insert "\n") - (setq count 0))))) + (setq seen 0) + (setq thumb-prev-pos 0))))) (goto-char (point-min)))) (defun image-dired-line-up-dynamic () commit 79c29ff8ffb519be5762afaa6aa59cfe1ec27351 Author: Stefan Kangas Date: Wed Oct 27 02:07:35 2021 +0200 ; * lisp/image-dired.el (image-dired-cmd-pngnq-options): Fix :version. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 1a1d89c461..b7650ba772 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -320,8 +320,8 @@ using the NeuQuant algorithm." "Arguments to pass `image-dired-cmd-pngnq-program'. Available format specifiers are the same as in `image-dired-cmd-create-thumbnail-options'." - :version "26.1" - :type '(repeat (string :tag "Argument"))) + :type '(repeat (string :tag "Argument")) + :version "29.1") (defcustom image-dired-cmd-pngcrush-program (executable-find "pngcrush") "The file name of the `pngcrush' program. commit b37b080af182628c18f53401c5730f1b00a11287 Author: Stefan Kangas Date: Wed Oct 27 02:00:24 2021 +0200 image-dired: Use example.org in examples * lisp/image-dired.el (image-dired-gallery-image-root-url) (image-dired-gallery-thumb-image-root-url): Use example.org to be RFC 2606 compliant. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 4ce61ea211..1a1d89c461 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -240,18 +240,22 @@ the index.html page that image-dired creates." :type 'directory) (defcustom image-dired-gallery-image-root-url -"https://your.own.server/image-diredpics" - "URL where the full size images are to be found. -Note that this path has to be configured in your web server. Image-Dired -expects to find pictures in this directory." - :type 'string) + "https://example.org/image-diredpics" + "URL where the full size images are to be found on your web server. +Note that this path has to be configured on your web server. +Image-Dired expects to find pictures in this directory. +This is used by `image-dired-gallery-generate'." + :type 'string + :version "29.1") (defcustom image-dired-gallery-thumb-image-root-url -"https://your.own.server/image-diredthumbs" - "URL where the thumbnail images are to be found. -Note that this path has to be configured in your web server. Image-Dired -expects to find pictures in this directory." - :type 'string) + "https://example.org/image-diredthumbs" + "URL where the thumbnail images are to be found on your web server. +Note that this path has to be configured on your web server. +Image-Dired expects to find pictures in this directory. +This is used by `image-dired-gallery-generate'." + :type 'string + :version "29.1") (defcustom image-dired-cmd-create-thumbnail-program (if (executable-find "gm") "gm" "convert") commit 23d2e7d112dd1a06b4392185cb78a03a96baf34c Author: Stefan Kangas Date: Wed Oct 27 01:32:58 2021 +0200 image-dired: Increase number of asynch thumbnail generation jobs * lisp/image-dired.el (image-dired-queue-active-limit): Increase the number of asynchronous thumbnail generation jobs to a maximum of 4 or processor count divided by 2. This makes thumbnail generation around 30 % faster when benchmarking this on my machine (8 cores/4 jobs). (image-dired-debug): New defvar. (image-dired-debug-message): New defun. (image-dired--generate-thumbs-start): New defvar. (image-dired-create-thumb-1, image-dired-display-thumbs): Display time spent on thumbnail generation if 'image-dired-debug' is non-nil. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index d73dbdb0db..4ce61ea211 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -576,6 +576,14 @@ If there are more files than this in a selected directory, the :type 'integer :version "29.1") +(defvar image-dired-debug nil + "Non-nil means enable debug messages.") + +(defun image-dired-debug-message (&rest args) + "Display debug message ARGS when `image-dired-debug' is non-nil." + (when image-dired-debug + (apply #'message args))) + (defmacro image-dired--with-db-file (&rest body) "Run BODY in a temp buffer containing `image-dired-db-file'. Return the last form in BODY." @@ -704,6 +712,9 @@ DIMENSION should be either the symbol `width' or `height'." (width image-dired-thumb-width) (height image-dired-thumb-height))))) +(defvar image-dired--generate-thumbs-start nil + "Time when `display-thumbs' was called.") + (defvar image-dired-queue nil "List of items in the queue. Each item has the form (ORIGINAL-FILE TARGET-FILE).") @@ -711,9 +722,12 @@ Each item has the form (ORIGINAL-FILE TARGET-FILE).") (defvar image-dired-queue-active-jobs 0 "Number of active jobs in `image-dired-queue'.") -(defvar image-dired-queue-active-limit 2 +(defvar image-dired-queue-active-limit (min 4 (max 2 (/ (num-processors) 2))) "Maximum number of concurrent jobs permitted for generating images. -Increase at own risk.") +Increase at own risk. If you want to experiment with this, +consider setting `image-dired-debug' to a non-nil value to see +the time spent on generating thumbnails. Run `image-clear-cache' +and remove the cached thumbnail files between each trial run.") (defvar image-dired-tag-history nil "Variable holding the tag history.") @@ -823,6 +837,12 @@ Increase at own risk.") ;; Trigger next in queue once a thumbnail has been created (cl-decf image-dired-queue-active-jobs) (image-dired-thumb-queue-run) + (when (= image-dired-queue-active-jobs 0) + (image-dired-debug-message + (format-time-string + "Generated thumbnails in %s.%3N seconds" + (time-subtract (current-time) + image-dired--generate-thumbs-start)))) (if (not (and (eq (process-status process) 'exit) (zerop (process-exit-status process)))) (message "Thumb could not be created for %s: %s" @@ -1076,6 +1096,7 @@ used or not. If non-nil, use `display-buffer' instead of `image-dired-previous-line-and-display' where we do not want the thumbnail buffer to be selected." (interactive "P") + (setq image-dired--generate-thumbs-start (current-time)) (let ((buf (image-dired-create-thumbnail-buffer)) thumb-name files dired-buf) (if arg commit b3a5ad14c1f047786fb71ff6f181b529ffc6ed9e Author: Alan Mackenzie Date: Tue Oct 26 20:13:18 2021 +0000 CC Mode: minor amendments more accurately to handle virtual semicolons, etc. * lisp/progmodes/cc-engine.el (c-laomib-loop): Check for a virtual semicolon as well as a ;. (c-guess-basic-syntax): CASE 5D - Use c-crosses-statement-barrier-p to check whether we've gone back past a virtual semicolon. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 75487bdb6b..a4568bd4ef 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -12102,7 +12102,10 @@ comment at the start of cc-engine.el for more info." (and (c-major-mode-is 'pike-mode) c-decl-block-key))) (while (eq braceassignp 'dontknow) - (cond ((eq (char-after) ?\;) + (cond ((or (eq (char-after) ?\;) + (save-excursion + (progn (c-backward-syntactic-ws) + (c-at-vsemi-p)))) (setq braceassignp nil)) ((and class-key (looking-at class-key)) @@ -14026,7 +14029,8 @@ comment at the start of cc-engine.el for more info." ;; clause - we assume only C++ needs it. (c-syntactic-skip-backward "^;,=" lim t)) (setq placeholder (point)) - (memq (char-before) '(?, ?= ?<))) + (and (memq (char-before) '(?, ?= ?<)) + (not (c-crosses-statement-barrier-p (point) indent-point)))) (cond ;; CASE 5D.6: Something like C++11's "using foo = " commit 5f150387f17ed24e4bc19842866fdc254ca3f945 Author: Alan Mackenzie Date: Tue Oct 26 16:54:01 2021 +0000 * lisp/progmodes/cc-engine.el (c-fontify-new-found-type): Declare near BO File diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ace6b1b686..75487bdb6b 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -174,6 +174,7 @@ (cc-bytecomp-defun c-clear-string-fences) (cc-bytecomp-defun c-restore-string-fences) (cc-bytecomp-defun c-remove-string-fences) +(cc-bytecomp-defun c-fontify-new-found-type) ;; Make declarations for all the `c-lang-defvar' variables in cc-langs. commit e6bbbd303f411fb0e95f958d25234d046c88c9e1 Author: Michael Albinus Date: Tue Oct 26 18:52:39 2021 +0200 * test/infra/gitlab-ci.yml (build-image-inotify): Increase timeout. (test-native-comp-speed0): Adapt make_params. diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 57f90b15ef..0b1f982c21 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -117,7 +117,7 @@ default: - test -n "$(docker ps -aq -f name=${test_name})" && ( docker export ${test_name} | tar -tvf - ) - test -n "$(docker ps -aq -f name=${test_name})" && docker cp ${test_name}:checkout/test ${test_name} - test -n "$(docker ps -aq -f name=${test_name})" && docker rm ${test_name} - - ls -alR ${test_name} + # - ls -alR ${test_name} .build-template: needs: [] @@ -224,6 +224,8 @@ build-image-inotify: extends: [.job-template, .build-template] variables: target: emacs-inotify +# Temporarily. + timeout: 8 hours # test-fast-inotify: # stage: fast @@ -300,8 +302,7 @@ test-native-comp-speed0: extends: [.job-template, .test-template, .native-comp-template] variables: target: emacs-native-comp-speed0 - make_params: >- - "-C test check SELECTOR='(and (not (tag :unstable)) (tag :nativecomp)))'" + make_params: "-C test check SELECTOR='(not (tag :unstable))'" test-all-inotify: # This tests also file monitor libraries inotify and inotifywatch.