commit 7f04e046fb74cda0109e1be9aee790f093fbf003 (HEAD, refs/remotes/origin/master) Author: Stephen Gildea Date: Wed Dec 3 19:49:28 2025 -0800 ; time-stamp: factor out two small, internal utilities * lisp/time-stamp.el (time-stamp--message, time-stamp--system-name): New utility functions. (time-stamp, time-stamp-once, time-stamp-string-preprocess): Call the new functions. diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index df5f50f09ac..5e9e09be862 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -117,7 +117,7 @@ limit yourself to the formats recommended by that older version." (defcustom time-stamp-active t "Non-nil enables time-stamping of buffers by \\[time-stamp]. Can be toggled by \\[time-stamp-toggle-active] as an easy way to -temporarily disable time-stamp while saving a file. +temporarily disable `time-stamp' while saving a file. This option does not affect when `time-stamp' is run, only what it does when it runs. To activate automatic time-stamping of buffers @@ -377,12 +377,10 @@ to customize the information in the time stamp and where it is written." (setq ts-end (match-string 6 time-stamp-pattern))))) (cond ((not (integerp line-limit)) (setq line-limit 8) - (message "time-stamp-line-limit is not an integer") - (sit-for 1))) + (time-stamp--message "time-stamp-line-limit is not an integer"))) (cond ((not (integerp ts-count)) (setq ts-count 1) - (message "time-stamp-count is not an integer") - (sit-for 1)) + (time-stamp--message "time-stamp-count is not an integer")) ((< ts-count 1) ;; We need to call time-stamp-once at least once ;; to output any warnings about time-stamp not being active. @@ -395,8 +393,7 @@ to customize the information in the time stamp and where it is written." (cond ((not (and (stringp ts-start) (stringp ts-end))) - (message "time-stamp-start or time-stamp-end is not a string") - (sit-for 1)) + (time-stamp--message "time-stamp-start or time-stamp-end is not a string")) (t (let ((nl-start 0)) (while (string-match "\n" ts-end nl-start) @@ -466,10 +463,8 @@ Returns the end point, which is where `time-stamp' begins the next search." (cond ((not time-stamp-active) (if time-stamp-warn-inactive - ;; don't signal an error in a hook - (progn - (message "Warning: time-stamp-active is off; did not time-stamp buffer.") - (sit-for 1))) + (time-stamp--message + "Warning: time-stamp-active is off; did not time-stamp buffer.")) nil) (t (let ((new-time-stamp (time-stamp-string ts-format))) @@ -753,7 +748,7 @@ and all `time-stamp-format' compatibility." time-stamp-no-file)) ((eq cur-char ?s) ;system name, legacy (time-stamp-conv-warn "%s" "%Q") - (system-name)) + (time-stamp--system-name :full)) ((eq cur-char ?u) ;user name, legacy (time-stamp-conv-warn "%u" "%l") (user-login-name)) @@ -765,16 +760,13 @@ and all `time-stamp-format' compatibility." ((eq cur-char ?L) ;full name of logged-in user (user-full-name)) ((eq cur-char ?h) ;mail host name - (or mail-host-address (system-name))) + (or mail-host-address (time-stamp--system-name :full))) ((or (eq cur-char ?q) ;unqualified host name (eq cur-char ?x)) ;short system name, experimental - (let ((shortname (system-name))) - (if (string-match "\\." shortname) - (substring shortname 0 (match-beginning 0)) - shortname))) + (time-stamp--system-name :short)) ((or (eq cur-char ?Q) ;fully-qualified host name (eq cur-char ?X)) ;full system name, experimental - (system-name)) + (time-stamp--system-name :full)) )) (if (numberp field-result) (progn @@ -838,7 +830,7 @@ This is an internal helper for `time-stamp-string-preprocess'." (defun time-stamp-filtered-buffer-file-name (type) "Return a printable string representing the buffer file name. -Non-graphic characters are replaced by ?. TYPE is :absolute +Non-graphic characters are replaced by ?. TYPE is :absolute for the full name or :nondirectory for base name only." (declare (ftype (function ((member :absolute :nondirectory)) string))) (let ((file-name buffer-file-name) @@ -857,6 +849,18 @@ for the full name or :nondirectory for base name only." (setq file-name (file-name-nondirectory file-name))) (apply #'string (mapcar safe-character-filter file-name)))) +(defun time-stamp--message (warning-string) + "Display WARNING-STRING for one second." + (message "%s" warning-string) + (sit-for 1)) + +(defun time-stamp--system-name (type) + "Return the host name of this system. +TYPE is :short for the unqualified name, :full for the full name." + (let ((fullname (system-name))) + (if (and (eq type :short) (string-match "\\." fullname)) + (substring fullname 0 (match-beginning 0)) + fullname))) (defvar time-stamp-conversion-warn t "Enable warnings for old formats in `time-stamp-format'. diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 20385fe336b..fe77f102ea2 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el @@ -40,14 +40,9 @@ (lambda (old-format _new &optional _newer) (ert-fail (format "Unexpected format warning for '%s'" old-format)))) - ((symbol-function 'message) - (lambda (format-string &rest args) - (ert-fail (format "Unexpected message: %s" - (apply #'format format-string args))))) - ((symbol-function 'sit-for) - (lambda (&rest _args) - ;; do not wait during tests - ))) + ((symbol-function 'time-stamp--message) + (lambda (msg) + (ert-fail (format "Unexpected message: %s" msg))))) ;; Not all reference times are used in all tests; ;; suppress the byte compiler's "unused" warning. (list ref-time1 ref-time2 ref-time3) @@ -65,10 +60,13 @@ ,@body))) (defmacro with-time-stamp-system-name (name &rest body) - "Force function `system-name' to return NAME while evaluating BODY." + "Force `time-stamp--system-name' to return NAME while evaluating BODY." (declare (indent 1) (debug t)) - `(cl-letf (((symbol-function 'system-name) - (lambda () ,name))) + `(cl-letf (((symbol-function 'time-stamp--system-name) + (lambda (type) + (if (and (eq type :short) (string-match "\\." ,name)) + (substring ,name 0 (match-beginning 0)) + ,name)))) ,@body)) @@ -92,10 +90,10 @@ (should ,form))) (defmacro time-stamp-should-message (variable &rest body) - "Output a message about VARIABLE if `message' is not called by BODY." + "Fail test about VARIABLE if BODY does not call `time-stamp--message'." (declare (indent 1) (debug t)) `(time-stamp-test--count-function-calls - message (format "variable %s" ',variable) + time-stamp--message (format "variable %s" ',variable) ,@body)) ;;; Tests: commit 335f1a11f072ee05e2ea52ea08bf7df6a42e3e50 Author: Paul Eggert Date: Wed Dec 3 13:07:22 2025 -0800 Waste 4 fewer bytes in GNU/Linux 32-bit HPPA Also, add more commentary about the situation. * src/systhread.h (SYSTHREAD_ALIGN_ROOM): Use alignof (double), not alignof (int), to align the room. This means we have only 8 (not 12) bytes of slop on 32-bit HPPA GNU/Linux. diff --git a/src/systhread.h b/src/systhread.h index 30fa5a94b45..14266ff600f 100644 --- a/src/systhread.h +++ b/src/systhread.h @@ -32,7 +32,16 @@ along with GNU Emacs. If not, see . */ Unfortunately POSIX allows this curious situation. Do this by allocating possibly-poorly-aligned objects a bit larger than pthread_mutex_t and pthread_cond_t, and then aligning pointers - to these objects at runtime. */ + to these objects at runtime. + + Although since glibc 2.4 (2006) the stricter alignment has not been + needed by the underlying 32-bit HPPA code so the types are overaligned, + the overalignment is still present in glibc 2.42 (2025) to avoid + changing ABI offsets in structs that other libraries make visible. + Address the issue for all platforms that overalign the two types. + Do not bother to optimize for glibc 2.4+ on 32-bit HPPA even though + as of 2025 it is the only maintained platform known to overalign and + it does not need the overalignment. */ #if (ALIGNOF_PTHREAD_COND_T <= ALIGNOF_MAX_ALIGN_T \ && ALIGNOF_PTHREAD_MUTEX_T <= ALIGNOF_MAX_ALIGN_T) @@ -40,17 +49,21 @@ along with GNU Emacs. If not, see . */ and is already aligned properly. */ # define SYSTHREAD_ALIGN_PTR(type, ptr) (ptr) #else -/* An unusual case, e.g., GNU/Linux 32-bit HPPA. +/* An unusual case, e.g., GNU/Linux 32-bit HPPA with glibc 2.42. Aligning SYSTHREAD_ALIGN_ROOM (TYPE) * up for TYPE * results in a - valid pointer. TYPE's alignment must be at least that of int; + valid pointer. TYPE's alignment must be at least that of double; in practice it is always greater than that of max_align_t. */ # define SYSTHREAD_ALIGN_ROOM(type) \ - union { int i; char room[sizeof (type) + alignof (type) - alignof (int)]; } + union \ + { \ + double i; \ + char room[sizeof (type) + alignof (type) - alignof (double)]; \ + } /* Align PTR up for TYPE *. PTR should be of type SYSTHREAD_ALIGN_ROOM (TYPE) *. */ # define SYSTHREAD_ALIGN_PTR(type, ptr) \ - ((type *) ((uintptr_t) ((ptr)->room + (alignof (type) - alignof (int))) \ - & ~(alignof (type) - alignof (int)))) + ((type *) ((uintptr_t) ((ptr)->room + (alignof (type) - alignof (double))) \ + & ~(alignof (type) - alignof (double)))) #endif /* A system mutex is just a pthread mutex, possibly with alignment slop. commit c79eb45340d8c82acd148fbfab498b9579f27c6d Author: Stefan Monnier Date: Wed Dec 3 14:23:34 2025 -0500 lisp/emacs-lisp/bytecomp.el (seq-sort-by): Improve `funarg-positions` diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 66b1bd4f54e..6a65449849e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3606,7 +3606,7 @@ This assumes the function has the `important-return-value' property." (dolist (f '( funcall apply mapcar mapatoms mapconcat mapc maphash mapcan map-char-table map-keymap map-keymap-internal functionp - seq-do seq-do-indexed seq-sort seq-sort-by seq-group-by + seq-do seq-do-indexed seq-sort seq-group-by seq-find seq-count seq-filter seq-reduce seq-remove seq-keep seq-map seq-map-indexed seq-mapn seq-mapcat @@ -3616,6 +3616,7 @@ This assumes the function has the `important-return-value' property." cl-mapcar cl-mapcan cl-mapcon cl-mapc cl-mapl cl-maplist )) (put f 'funarg-positions '(1))) +(put 'seq-sort-by 'funarg-positions '(1 2)) (dolist (f '( defalias fset sort replace-regexp-in-string add-hook remove-hook advice-remove advice--remove-function @@ -3669,7 +3670,6 @@ This assumes the function has the `important-return-value' property." )) (put (car fa) 'funarg-positions (cdr fa))) - (defun byte-compile-normal-call (form) (when (and (symbolp (car form)) (byte-compile-warning-enabled-p 'callargs (car form))) commit 7f4f9c3b8fd089ff6bac5fd273765abc1dc94ae8 Author: Stefan Monnier Date: Wed Dec 3 14:22:47 2025 -0500 gnus-icalendar.el: Avoid EIEIO's non-standard FOO-p predicates * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event->gnus-calendar) (gnus-icalendar-event:inline-org-buttons): Avoid EIEIO's non-standard FOO-p predicates. diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 5a55efb3243..a3ca1925109 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -532,14 +532,15 @@ Return nil for non-recurring EVENT." recurring-days) (let ((repeat "+1w") (dates (seq-sort-by - 'car - 'time-less-p + #'car + #'time-less-p (seq-map (lambda (x) (gnus-icalendar--find-day start end x)) recurring-days)))) (mapconcat (lambda (x) (gnus-icalendar-event--org-timestamp (car x) (cadr x) - repeat)) dates "\n")) + repeat)) + dates "\n")) (gnus-icalendar-event--org-timestamp start end org-repeat)))) (defun gnus-icalendar--format-summary-line (summary &optional location) @@ -835,7 +836,7 @@ These will be used to retrieve the RSVP information from ical events." (capitalize (symbol-name participation-type)))) ("Method" ,method)))) - (when (and (not (gnus-icalendar-event-reply-p event)) rsvp) + (when (and (not (cl-typep event 'gnus-icalendar-event-reply)) rsvp) (setq headers (append headers `(("Status" ,(or reply-status "Not replied yet")))))) @@ -964,7 +965,7 @@ These will be used to retrieve the RSVP information from ical events." (delq nil (list `("Show Agenda" gnus-icalendar-show-org-agenda ,event) - (when (gnus-icalendar-event-request-p event) + (when (cl-typep event 'gnus-icalendar-event-request) `(,export-button-text gnus-icalendar-sync-event-to-org ,event)) (when org-entry-exists-p `("Show Org Entry" gnus-icalendar--show-org-event ,event)))))) commit ed87a95a786cca2cb5ddd116563a0ded2fafd1a9 Author: Sean Whitton Date: Wed Dec 3 16:09:52 2025 +0000 Query-on-exit for VC push, pull and async checkin commands * lisp/vc/vc-bzr.el (vc-bzr--pushpull): * lisp/vc/vc-git.el (vc-git--checkin, vc-git--pushpull): * lisp/vc/vc-hg.el (vc-hg--checkin, vc-hg--pushpull): Set query-on-exit flag for async processes. diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index fb7361120fb..1a4afc6ec90 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -385,6 +385,7 @@ If PROMPT is non-nil, prompt for the Bzr command to run." args (cddr args))) (require 'vc-dispatcher) (let ((buf (apply #'vc-bzr-async-command command args))) + (set-process-query-on-exit-flag (get-buffer-process buf) t) (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index eede3955d7e..7ac4255f132 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1320,16 +1320,18 @@ It is an error to supply both or neither." (and (not patch-string) (if only (list "--only" "--") '("-a"))))) (if vc-async-checkin - (progn (vc-wait-for-process-before-save - (apply #'vc-do-async-command buffer root - vc-git-program (nconc args files)) - "Finishing checking in files...") - (with-current-buffer buffer - (vc-run-delayed - (vc-compilation-mode 'git) - (funcall post))) - (vc-set-async-update buffer) - (list 'async (get-buffer-process buffer))) + (let ((proc (apply #'vc-do-async-command buffer root + vc-git-program (nconc args files)))) + (set-process-query-on-exit-flag proc t) + (vc-wait-for-process-before-save + proc + "Finishing checking in files...") + (with-current-buffer buffer + (vc-run-delayed + (vc-compilation-mode 'git) + (funcall post))) + (vc-set-async-update buffer) + (list 'async (get-buffer-process buffer))) (apply #'vc-git-command nil 0 files args) (funcall post))))) @@ -1527,6 +1529,7 @@ If PROMPT is non-nil, prompt for the Git command to run." vc-filter-command-function)) (proc (apply #'vc-do-async-command buffer root git-program command extra-args))) + (set-process-query-on-exit-flag proc t) ;; "git pull" includes progress output that uses ^M to move point ;; to the beginning of the line. Just translate these to newlines ;; (but don't do anything with the CRLF sequence). diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 7bbd5d778b6..6f38747e8b0 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1291,9 +1291,12 @@ It is an error to supply both or neither." (vc-hg-command nil 0 nil "update" "--merge" "--tool" "internal:local" "tip"))))) (if vc-async-checkin - (let ((buffer (vc-hg--async-buffer))) + (let* ((buffer (vc-hg--async-buffer)) + (proc (apply #'vc-hg--async-command buffer + (nconc args files)))) + (set-process-query-on-exit-flag proc t) (vc-wait-for-process-before-save - (apply #'vc-hg--async-command buffer (nconc args files)) + proc (if patch-file "Finishing checking in patch...." "Finishing checking in files...")) @@ -1613,7 +1616,9 @@ revisions, fetch only those revisions." (setq hg-program (car args) command (cadr args) args (cddr args))) - (apply #'vc-do-async-command buffer root hg-program command args) + (set-process-query-on-exit-flag + (apply #'vc-do-async-command buffer root hg-program command args) + t) (with-current-buffer buffer (vc-run-delayed (dolist (cmd post-processing) commit 02afd1305b4921d209aa95c1728768e514d37f8a Author: Paul Nelson Date: Mon Dec 1 09:04:04 2025 +0100 Use dedicated minibuffer history for mairix-search * lisp/net/mairix.el (mairix-search-history): New variable. (mairix-search): Use it (bug#79926). diff --git a/etc/NEWS b/etc/NEWS index d8510814913..5b064108606 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1748,6 +1748,11 @@ This contains the list of regular expressions used to match "Re:" and international variants of it when modifying the Subject field in replies. +** mairix + +--- +*** 'mairix-search' now keeps its own minibuffer history. + ** Imap --- diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index a976c4fa8a4..9f63c289936 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -200,6 +200,8 @@ Currently there are `threads' and `flags'.") ;;;; Internal variables +(defvar mairix-search-history nil + "Minibuffer history for `mairix-search'.") (defvar mairix-last-search nil) (defvar mairix-searches-changed nil) @@ -334,7 +336,7 @@ If THREADS is non-nil, also display whole threads of found messages. Results will be put into the default search file." (interactive (list - (read-string "Query: ") + (read-string "Query: " nil 'mairix-search-history) (y-or-n-p "Include threads? "))) (when (mairix-call-mairix (split-string search) commit 7d4e2107b33e27b07f5f3c3a4614eff66f5b11ba Author: Sean Whitton Date: Wed Dec 3 11:22:08 2025 +0000 ; * etc/NEWS: Update annotation. diff --git a/etc/NEWS b/etc/NEWS index ed5efced52c..d8510814913 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2539,7 +2539,7 @@ bindings: - 'C-x v O L' is bound to 'vc-log-outgoing' - 'C-x v O D' is bound to 'vc-root-diff-outgoing'. ---- ++++ *** New display of outgoing revisions count in VC-Dir. If there are outgoing revisions, VC-Dir now includes a count of how many in its headers, to remind you to push them. commit b8cefd6c436dcab09dcc939777880edd40c8a203 Author: Sean Whitton Date: Wed Dec 3 11:20:00 2025 +0000 * lisp/vc/vc.el (vc-pull): Clear cached incoming revisions. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index ea8581cd4e1..14509281694 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4236,10 +4236,14 @@ tip revision are merged into the working file." (cond ;; If a pull operation is defined, use it. ((vc-find-backend-function backend 'pull) - (vc-call-backend backend 'pull arg)) + (vc-call-backend backend 'pull arg) + ;; FIXME: Ideally we would only clear out the stored value for the + ;; REMOTE-LOCATION from which we are pulling. + (vc-run-delayed + (vc--repo-setprop backend 'vc-incoming-revision nil))) ;; If VCS has `merge-news' functionality (CVS and SVN), use it. ((vc-find-backend-function backend 'merge-news) - (save-some-buffers ; save buffers visiting files + (save-some-buffers ; save buffers visiting files nil (lambda () (and (buffer-modified-p) (let ((file (buffer-file-name))) commit 34331ae6f9c1e05160526b3ff661fb4863b7225d Author: Sean Whitton Date: Wed Dec 3 11:19:12 2025 +0000 Pass the VC backend down through fns called by vc--count-revisions * lisp/vc/vc-hooks.el (vc--repo-setprop, vc--repo-getprop) (vc--repo-clearprops): * lisp/vc/vc.el (vc-root-dir): New BACKEND parameter. (vc--incoming-revision, vc-push): Pass it. (vc-default-log-incoming, vc-default-log-outgoing): Pass down BACKEND provided by caller, instead of ignoring it and always calling vc-deduce-backend (bug#79929). diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index f275e792ccc..d4d8ef816a0 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -259,17 +259,17 @@ VC commands are globally reachable under the prefix \\[vc-prefix-map]: (kill-local-variable 'vc-parent-buffer)) (setplist (intern (expand-file-name file) vc-file-prop-obarray) nil)) -(defun vc--repo-setprop (property value) +(defun vc--repo-setprop (backend property value) "Set per-repository VC PROPERTY to VALUE and return the value." - (vc-file-setprop (vc-root-dir) property value)) + (vc-file-setprop (vc-root-dir backend) property value)) -(defun vc--repo-getprop (property) +(defun vc--repo-getprop (backend property) "Get per-repository VC PROPERTY." - (vc-file-getprop (vc-root-dir) property)) + (vc-file-getprop (vc-root-dir backend) property)) -(defun vc--repo-clearprops () +(defun vc--repo-clearprops (backend) "Clear all VC whole-repository properties." - (vc-file-clearprops (vc-root-dir))) + (vc-file-clearprops (vc-root-dir backend))) ;; We keep properties on each symbol naming a backend as follows: diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 15982067829..ea8581cd4e1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3239,17 +3239,17 @@ saving the buffer." (called-interactively-p 'interactive)))))) ;;;###autoload -(defun vc-root-dir () +(defun vc-root-dir (&optional backend) "Return the root directory for the current VC tree. -Return nil if the root directory cannot be identified." - (let ((backend (vc-deduce-backend))) - (if backend - (condition-case err - (vc-call-backend backend 'root default-directory) - (vc-not-supported - (unless (eq (cadr err) 'root) - (signal (car err) (cdr err))) - nil))))) +Return nil if the root directory cannot be identified. +BACKEND is the VC backend." + (and-let* ((backend (or backend (vc-deduce-backend)))) + (condition-case err + (vc-call-backend backend 'root default-directory) + (vc-not-supported + (unless (eq (cadr err) 'root) + (signal (car err) (cdr err))) + nil)))) ;;;###autoload (defun vc-revision-other-window (rev) @@ -4032,14 +4032,15 @@ The command prompts for the branch whose change log to show." ;; determine and so should be remembered. (if-let* ((_ (not refresh)) (record (assoc upstream-location - (vc--repo-getprop 'vc-incoming-revision)))) + (vc--repo-getprop backend 'vc-incoming-revision)))) (cdr record) (let ((res (vc-call-backend backend 'incoming-revision upstream-location refresh))) - (if-let* ((alist (vc--repo-getprop 'vc-incoming-revision))) + (if-let* ((alist (vc--repo-getprop backend 'vc-incoming-revision))) (setf (alist-get upstream-location alist nil nil #'equal) res) - (vc--repo-setprop 'vc-incoming-revision + (vc--repo-setprop backend + 'vc-incoming-revision `((,upstream-location . ,res)))) (or res (user-error "No incoming revision -- local-only branch?"))))) @@ -4056,12 +4057,13 @@ can be a remote branch name." (vc-incoming-outgoing-internal backend upstream-location "*vc-incoming*" 'log-incoming))) -(defun vc-default-log-incoming (_backend buffer upstream-location) - (vc--with-backend-in-rootdir "" - (let ((incoming (vc--incoming-revision backend upstream-location 'refresh))) - (vc-call-backend backend 'print-log (list rootdir) buffer t - incoming - (vc-call-backend backend 'mergebase incoming))))) +(defun vc-default-log-incoming (backend buffer upstream-location) + (let ((incoming (vc--incoming-revision backend upstream-location + 'refresh)) + (default-directory (vc-root-dir backend))) + (vc-call-backend backend 'print-log (list default-directory) + buffer t incoming + (vc-call-backend backend 'mergebase incoming)))) ;;;###autoload (defun vc-log-outgoing (&optional upstream-location) @@ -4075,12 +4077,12 @@ can be a remote branch name." (vc-incoming-outgoing-internal backend upstream-location "*vc-outgoing*" 'log-outgoing))) -(defun vc-default-log-outgoing (_backend buffer upstream-location) - (vc--with-backend-in-rootdir "" - (let ((incoming (vc--incoming-revision backend upstream-location))) - (vc-call-backend backend 'print-log (list rootdir) buffer t - "" - (vc-call-backend backend 'mergebase incoming))))) +(defun vc-default-log-outgoing (backend buffer upstream-location) + (let ((incoming (vc--incoming-revision backend upstream-location)) + (default-directory (vc-root-dir backend))) + (vc-call-backend backend 'print-log (list default-directory) + buffer t "" + (vc-call-backend backend 'mergebase incoming)))) (defun vc--count-outgoing (backend) "Return number of changes that will be sent with a `vc-push'." @@ -4278,7 +4280,7 @@ It also signals an error in a Bazaar bound branch." ;; FIXME: Ideally we would only clear out the ;; REMOTE-LOCATION to which we are pushing. (vc-run-delayed - (vc--repo-setprop 'vc-incoming-revision nil))) + (vc--repo-setprop backend 'vc-incoming-revision nil))) (user-error "VC push is unsupported for `%s'" backend)))) ;;;###autoload commit f15e98afb6c491c2555a64533b1ffb74b098926b Author: Sean Whitton Date: Wed Dec 3 11:16:02 2025 +0000 ; (emacs)VC Directory Buffer: Document outgoing revisions count. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index db1e81d62e6..7286886db76 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1499,11 +1499,11 @@ the current VC fileset @end ifnottex The above example is typical for a decentralized version control -system like Bazaar, Git, or Mercurial. Other systems can show other -statuses. For instance, CVS shows the @samp{needs-update} status if -the repository has changes that have not been applied to the work -file. RCS and SCCS show the name of the user locking a file as its -status. +system like Bazaar, Git, or Mercurial (@pxref{VCS Repositories}). Other +systems can show other statuses. For instance, CVS shows the +@samp{needs-update} status if the repository has changes that have not +been applied to the work file. RCS and SCCS show the name of the user +locking a file as its status. @ifnottex On CVS, the @code{vc-dir} command normally contacts the repository, @@ -1520,6 +1520,14 @@ are working offline or the network is slow. @code{vc-directory-exclusion-list}. Its default value contains directories that are used internally by version control systems. + At the top of the buffer Emacs displays some information about the +repository, such as the name of the backend in use and the working +directory. In addition, for decentralized VCS, if you have outgoing +commits (@pxref{VC Change Log}), Emacs displays a line @w{"Outgoing : N +unpushed revisions"} where @var{N} is a number. You can click on this +text to execute the @code{vc-log-outgoing} command (@pxref{VC Change +Log}). + @node VC Directory Commands @subsubsection VC Directory Commands