commit 041c8c4c5d451a6bc6db73419fd5ffca3d09231f (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Wed Feb 21 21:00:23 2018 -0500 * admin/automerge (merge): Report no. of commits if too few. diff --git a/admin/automerge b/admin/automerge index 76c1596f3f..ba608d1090 100755 --- a/admin/automerge +++ b/admin/automerge @@ -161,10 +161,8 @@ merge () return 0 else - grep -qE "Nothing to merge|Number of missing commits" $tempfile && { - echo "Fewer than $nmin commits to merge" + grep -E "Nothing to merge|Number of missing commits" $tempfile && \ exit 0 - } cat "$tempfile" 1>&2 commit 3267763e6ba1787c702a42a131d6e466b1aa42d7 Author: Glenn Morris Date: Wed Feb 21 20:49:40 2018 -0500 Speed up parallel make check by testing slower files first * test/Makefile.in (SLOW_TESTS): New variable. (ELFILES): Move slow tests to the front. diff --git a/test/Makefile.in b/test/Makefile.in index a85d491d2d..1653263e7a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -96,6 +96,7 @@ TEST_LOCALE = C # Whether to run tests from .el files in preference to .elc, we do # this by default since it gives nicer stacktraces. +# If you just want a pass/fail, setting this to no is much faster. TEST_LOAD_EL ?= yes # Maximum length of lines in ert backtraces; nil for no limit. @@ -174,11 +175,18 @@ else maybe_exclude_module_tests := -name emacs-module-tests.el -prune -o endif +## To speed up parallel builds, put these slow test files (which can +## take longer than all the rest combined) at the start of the list. +SLOW_TESTS = ${srcdir}/lisp/net/tramp-tests.el + ELFILES := $(sort $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \ -path "${srcdir}/data" -prune -o \ -name "*resources" -prune -o \ ${maybe_exclude_module_tests} \ -name "*.el" ! -name ".*" -print)) + +$(foreach slow,${SLOW_TESTS},$(eval ELFILES:= ${slow} $(filter-out ${slow},${ELFILES}))) + ## .log files may be in a different directory for out of source builds LOGFILES := $(patsubst %.el,%.log, \ $(patsubst $(srcdir)/%,%,$(ELFILES))) commit 56161254838e759243ccaab50c80327316a99979 Author: Glenn Morris Date: Wed Feb 21 20:44:37 2018 -0500 * admin/automerge: Speed up check phase. diff --git a/admin/automerge b/admin/automerge index 18f8c759eb..76c1596f3f 100755 --- a/admin/automerge +++ b/admin/automerge @@ -213,7 +213,8 @@ echo "Build finished ok" echo "Testing..." -make "$@" check || die "check error" +## We just want a fast pass/fail, we don't want to debug. +make "$@" check TEST_LOAD_EL=no || die "check error" echo "Tests finished ok" commit d48e07aaed0baf81baf377a9f2745678c9a5d41b Author: Juri Linkov Date: Wed Feb 21 23:30:18 2018 +0200 * lisp/simple.el (next-error-find-buffer-function): New defcustom. (next-error-last-buffer): Make variable buffer-local. (next-error-buffer-on-selected-frame): New function. (next-error-find-buffer): Use next-error-find-buffer-function at the first step instead of ad-hoc logic of using one window on the selected frame. (next-error, next-error-internal): Set default value of next-error-last-buffer. Display message with the name of last next-error buffer. (next-error-select-buffer): New command. (Bug#20489) diff --git a/etc/NEWS b/etc/NEWS index 8db638e5ed..848b66d20d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -203,6 +203,13 @@ styles as configured by the variable 'completion-styles'. These macros are analogue to 'let' and 'let*', but create bindings that are evaluated lazily. +** next-error + +*** New customizable variable next-error-find-buffer-function +defines the logic of finding a next-error capable buffer. +It has an option to use a single such buffer on selected frame, or +by default use the last buffer that navigated to the current buffer. + ** Eshell --- diff --git a/lisp/simple.el b/lisp/simple.el index 0c54c8f292..2101cfe833 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -121,6 +121,7 @@ If non-nil, the value is passed directly to `recenter'." A buffer becomes most recent when its compilation, grep, or similar mode is started, or when it is used with \\[next-error] or \\[compile-goto-error].") +(make-variable-buffer-local 'next-error-last-buffer) (defvar next-error-function nil "Function to use to find the next error in the current buffer. @@ -169,6 +170,31 @@ rejected, and the function returns nil." (and extra-test-inclusive (funcall extra-test-inclusive)))))) +(defcustom next-error-find-buffer-function nil + "Function called to find a `next-error' capable buffer." + :type '(choice (const :tag "Single next-error capable buffer on selected frame" + next-error-buffer-on-selected-frame) + (const :tag "No default" nil) + (function :tag "Other function")) + :group 'next-error + :version "27.1") + +(defun next-error-buffer-on-selected-frame (&optional avoid-current + extra-test-inclusive + extra-test-exclusive) + "Return a single visible next-error buffer on the selected frame." + (let ((window-buffers + (delete-dups + (delq nil (mapcar (lambda (w) + (if (next-error-buffer-p + (window-buffer w) + avoid-current + extra-test-inclusive extra-test-exclusive) + (window-buffer w))) + (window-list)))))) + (if (eq (length window-buffers) 1) + (car window-buffers)))) + (defun next-error-find-buffer (&optional avoid-current extra-test-inclusive extra-test-exclusive) @@ -185,18 +211,11 @@ The function EXTRA-TEST-EXCLUSIVE, if non-nil, is called in each buffer that would normally be considered usable. If it returns nil, that buffer is rejected." (or - ;; 1. If one window on the selected frame displays such buffer, return it. - (let ((window-buffers - (delete-dups - (delq nil (mapcar (lambda (w) - (if (next-error-buffer-p - (window-buffer w) - avoid-current - extra-test-inclusive extra-test-exclusive) - (window-buffer w))) - (window-list)))))) - (if (eq (length window-buffers) 1) - (car window-buffers))) + ;; 1. If a customizable function returns a buffer, use it. + (when next-error-find-buffer-function + (funcall next-error-find-buffer-function avoid-current + extra-test-inclusive + extra-test-exclusive)) ;; 2. If next-error-last-buffer is an acceptable buffer, use that. (if (and next-error-last-buffer (next-error-buffer-p next-error-last-buffer avoid-current @@ -261,11 +280,20 @@ To control which errors are matched, customize the variable (when buffer ;; We know here that next-error-function is a valid symbol we can funcall (with-current-buffer buffer + ;; Allow next-error to be used from the next-error capable buffer. + (setq next-error-last-buffer buffer) (funcall next-error-function (prefix-numeric-value arg) reset) ;; Override possible change of next-error-last-buffer in next-error-function (setq next-error-last-buffer buffer) + (setq-default next-error-last-buffer buffer) (when next-error-recenter (recenter next-error-recenter)) + (message "%s error from %s" + (cond (reset "First") + ((eq (prefix-numeric-value arg) 0) "Current") + ((< (prefix-numeric-value arg) 0) "Previous") + (t "Next")) + next-error-last-buffer) (run-hooks 'next-error-hook))))) (defun next-error-internal () @@ -273,13 +301,26 @@ To control which errors are matched, customize the variable (let ((buffer (current-buffer))) ;; We know here that next-error-function is a valid symbol we can funcall (with-current-buffer buffer + ;; Allow next-error to be used from the next-error capable buffer. + (setq next-error-last-buffer buffer) (funcall next-error-function 0 nil) ;; Override possible change of next-error-last-buffer in next-error-function (setq next-error-last-buffer buffer) + (setq-default next-error-last-buffer buffer) (when next-error-recenter (recenter next-error-recenter)) + (message "Current error from %s" next-error-last-buffer) (run-hooks 'next-error-hook)))) +(defun next-error-select-buffer (buffer) + "Select a `next-error' capable buffer and set it as the last used." + (interactive + (list (get-buffer + (read-buffer "Select next-error buffer: " nil nil + (lambda (b) (next-error-buffer-p (cdr b))))))) + (setq next-error-last-buffer buffer) + (setq-default next-error-last-buffer buffer)) + (defalias 'goto-next-locus 'next-error) (defalias 'next-match 'next-error) commit 465207221d44e4774b2df3db8fa570de92daf456 Author: Juri Linkov Date: Wed Feb 21 22:37:33 2018 +0200 * lisp/vc/vc-dispatcher.el (vc-do-command): Bind message-truncate-lines to t to keep entire commands in *Messages* but avoid resizing the echo area. Rephrase messages in a such way that the important parts are at the beginning. (Bug#19045) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index b0d2221b25..da9d34644c 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -290,16 +290,16 @@ case, and the process object in the asynchronous case." (let* ((files (mapcar (lambda (f) (file-relative-name (expand-file-name f))) (if (listp file-or-list) file-or-list (list file-or-list)))) + ;; Keep entire commands in *Messages* but avoid resizing the + ;; echo area. Messages in this function are formatted in + ;; a such way that the important parts are at the beginning, + ;; due to potential truncation of long messages. + (message-truncate-lines t) (full-command - ;; What we're doing here is preparing a version of the command - ;; for display in a debug-progress message. If it's fewer than - ;; 20 characters display the entire command (without trailing - ;; newline). Otherwise display the first 20 followed by an ellipsis. (concat (if (string= (substring command -1) "\n") (substring command 0 -1) command) - " " - (vc-delistify (mapcar (lambda (s) (if (> (length s) 20) (concat (substring s 0 2) "...") s)) flags)) + " " (vc-delistify flags) " " (vc-delistify files)))) (save-current-buffer (unless (or (eq buffer t) @@ -324,7 +324,7 @@ case, and the process object in the asynchronous case." (apply 'start-file-process command (current-buffer) command squeezed)))) (when vc-command-messages - (message "Running %s in background..." full-command)) + (message "Running in background: %s" full-command)) ;; Get rid of the default message insertion, in case we don't ;; set a sentinel explicitly. (set-process-sentinel proc #'ignore) @@ -332,10 +332,11 @@ case, and the process object in the asynchronous case." (setq status proc) (when vc-command-messages (vc-run-delayed - (message "Running %s in background... done" full-command)))) + (let ((message-truncate-lines t)) + (message "Done in background: %s" full-command))))) ;; Run synchronously (when vc-command-messages - (message "Running %s in foreground..." full-command)) + (message "Running in foreground: %s" full-command)) (let ((buffer-undo-list t)) (setq status (apply 'process-file command nil t nil squeezed))) (when (and (not (eq t okstatus)) @@ -345,13 +346,14 @@ case, and the process object in the asynchronous case." (pop-to-buffer (current-buffer)) (goto-char (point-min)) (shrink-window-if-larger-than-buffer)) - (error "Running %s...FAILED (%s)" full-command - (if (integerp status) (format "status %d" status) status))) + (error "Failed (%s): %s" + (if (integerp status) (format "status %d" status) status) + full-command)) (when vc-command-messages - (message "Running %s...OK = %d" full-command status)))) + (message "Done (status=%d): %s" status full-command)))) (vc-run-delayed - (run-hook-with-args 'vc-post-command-functions - command file-or-list flags)) + (run-hook-with-args 'vc-post-command-functions + command file-or-list flags)) status)))) (defun vc-do-async-command (buffer root command &rest args) commit 5209e9b45b72eb8f02aade19d75792e16e4c638d Author: Eli Zaretskii Date: Wed Feb 21 20:11:22 2018 +0200 Another fix for cross-references * doc/emacs/package.texi (Package Installation): Fix references to "Early Init". (Bug#30552) diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 6c7493790d..be74934872 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -252,16 +252,14 @@ consult the package's help buffer. After a package is installed, it is automatically made available by Emacs in all subsequent sessions. This happens at startup, before processing the init file but after processing the early init file -(@pxref{Early Init File,,, elisp, The Emacs Lisp Reference Manual}). -As an exception, Emacs does not make packages available at startup if -invoked with the @samp{-q} or @samp{--no-init-file} options -(@pxref{Initial Options}). +(@pxref{Early Init File}). As an exception, Emacs does not make +packages available at startup if invoked with the @samp{-q} or +@samp{--no-init-file} options (@pxref{Initial Options}). @vindex package-enable-at-startup To keep Emacs from automatically making packages available at startup, change the variable @code{package-enable-at-startup} to -@code{nil}. You must do this in the early init file (@pxref{Early -Init File,,, elisp, The Emacs Lisp Reference Manual}), as the variable +@code{nil}. You must do this in the early init file, as the variable is read before loading the regular init file. Currently this variable cannot be set via Customize.