Merge from origin/emacs-29

0c29f53ab8 Fix 'string-pixel-width' under 'line-prefix'
7bbd7cae07 Fix find-dired-with-command for remote directories
c4a8572025 ; * etc/HISTORY: Fix Emacs 28.3 entry.
This commit is contained in:
Eli Zaretskii 2023-08-04 03:17:49 -04:00
commit 23f4999989
3 changed files with 10 additions and 6 deletions

View file

@ -228,7 +228,8 @@ GNU Emacs 28.1 (2022-04-04) emacs-28.1
GNU Emacs 28.2 (2022-09-12) emacs-28.2
GNU Emacs 28.3 (2023-02-17) emacs-28.3 (was not actually released)
GNU Emacs 28.3 (2023-02-17) emacs-28.3-rc1
Was not actually released.
GNU Emacs 29.1 (2023-07-30) emacs-29.1

View file

@ -337,12 +337,15 @@ as the new values of the bound variables in the recursive invocation."
;; Keeping a work buffer around is more efficient than creating a
;; new temporary buffer.
(with-current-buffer (get-buffer-create " *string-pixel-width*")
;; `display-line-numbers-mode' is enabled in internal buffers
;; that breaks width calculation, so need to disable (bug#59311)
;; If `display-line-numbers-mode' is enabled in internal
;; buffers, it breaks width calculation, so disable it (bug#59311)
(when (bound-and-true-p display-line-numbers-mode)
(display-line-numbers-mode -1))
(delete-region (point-min) (point-max))
(insert string)
;; Disable line-prefix and wrap-prefix, for the same reason.
(setq line-prefix nil
wrap-prefix nil)
(insert (propertize string 'line-prefix nil 'wrap-prefix nil))
(car (buffer-text-pixel-size nil nil t)))))
;;;###autoload

View file

@ -247,8 +247,8 @@ it finishes, type \\[kill-find]."
(erase-buffer)
(setq default-directory dir)
;; Start the find process.
(shell-command (concat command "&") (current-buffer))
(let ((proc (get-buffer-process (current-buffer))))
(let ((proc (start-file-process-shell-command
(buffer-name) (current-buffer) command)))
;; Initialize the process marker; it is used by the filter.
(move-marker (process-mark proc) (point) (current-buffer))
(set-process-filter proc #'find-dired-filter)