commit 08bc407a228796b64e321cb28b38b39062ab1732 (HEAD, refs/remotes/origin/master) Merge: 49e253a0f8 b94d767527 Author: Glenn Morris Date: Wed Jan 30 09:12:15 2019 -0800 Merge from origin/emacs-26 b94d767 (origin/emacs-26) Minor copyedits in last manual change 73508e6 Improve documentation of face numbers bf235ce * doc/emacs/custom.texi (Authentication): Refer to the "Help ... ceccb3c New node Authentication in the Emacs manual 9078f34 Fix a loop in c-fl-decl-start. This fixes bug #34186. a177fe7 Fix LaTeX output of month and day from cal-tex.el 90177d7 Avoid elisp crash for OpenPGP User IDs with no e-mail address 68e55a0 image-mode: Do not use default scaling (bug#33990) b6c762a create-image: Expand documentation (bug#33990) 928d342 Improve documentation of 'isearch-filter-predicate' 9034dd6 Fix cursor column positioning on Grep hits # Conflicts: # doc/emacs/custom.texi commit 49e253a0f803b497ee3177c1c346d4e0ac70fdae Author: Michael Albinus Date: Wed Jan 30 15:30:04 2019 +0100 Fix problem in filenotify-tests * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Adapt `accept-process-output' argument. * test/lisp/filenotify-tests.el (file-notify--deftest-remote): Remove :unstable tag. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5ed7513275..404fae9197 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3647,7 +3647,7 @@ Fall back to normal file name handler if no Tramp handler exists." (set-process-filter p filter) ;; There might be an error if the monitor is not supported. ;; Give the filter a chance to read the output. - (while (tramp-accept-process-output p)) + (while (tramp-accept-process-output p 0)) (unless (process-live-p p) (tramp-error p 'file-notify-error "Monitoring not supported for `%s'" file-name)) diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index ef1271dac4..50036209b0 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -266,7 +266,7 @@ This returns only for the local case and gfilenotify; otherwise it is nil. (declare (indent 1)) `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) () ,docstring - :tags '(:expensive-test :unstable) + :tags '(:expensive-test) :expected-result (or ,expected :passed) (skip-unless (not ,skip)) (let* ((temporary-file-directory commit 4563d1b9fa532d08b4d2b6c0015199d1b552092c Author: Michael Albinus Date: Wed Jan 30 15:29:29 2019 +0100 * lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Fix thinko. diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 3db8f1d8af..77ff6d59a5 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -467,19 +467,19 @@ file names." (when (tramp-get-connection-process vec) ;; We cannot use `with-connection-property', because we don't want ;; to cache a nil result. - (unless (tramp-get-connection-property - (tramp-get-connection-process vec) "mounted" nil) - (let* ((default-directory temporary-file-directory) - (mount (shell-command-to-string "mount -t fuse.rclone"))) - (tramp-message vec 6 "%s" "mount -t fuse.rclone") - (tramp-message vec 6 "\n%s" mount) - (tramp-set-connection-property - (tramp-get-connection-process vec) "mounted" - (when (string-match - (format - "^\\(%s:\\S-*\\)" (regexp-quote (tramp-file-name-host vec))) - mount) - (match-string 1 mount))))))) + (or (tramp-get-connection-property + (tramp-get-connection-process vec) "mounted" nil) + (let* ((default-directory temporary-file-directory) + (mount (shell-command-to-string "mount -t fuse.rclone"))) + (tramp-message vec 6 "%s" "mount -t fuse.rclone") + (tramp-message vec 6 "\n%s" mount) + (tramp-set-connection-property + (tramp-get-connection-process vec) "mounted" + (when (string-match + (format + "^\\(%s:\\S-*\\)" (regexp-quote (tramp-file-name-host vec))) + mount) + (match-string 1 mount))))))) (defun tramp-rclone-flush-directory-cache (vec) "Flush directory cache of VEC mount." commit 16d614bbae25f2bc6b49b575b6da61ea301520bb Author: Michael Albinus Date: Wed Jan 30 10:51:48 2019 +0100 ; Fix previous commit diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 92ad41b19a..129ffe9eee 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -5229,6 +5229,7 @@ process sentinels. They shall not disturb each other." ;; infrequently hangs for hours until killed by the infrastructure. (with-timeout (300 (tramp--test-timeout-handler)) (define-key special-event-map [sigusr1] 'tramp--test-timeout-handler) + (tramp--test-instrument-test-case (if (getenv "EMACS_HYDRA_CI") 10 0) (let* (;; For the watchdog. (default-directory (expand-file-name temporary-file-directory)) (watchdog commit b94d76752776cca4d1652cfe715a60f4a36f14a3 Author: Eli Zaretskii Date: Tue Jan 29 18:49:50 2019 +0200 Minor copyedits in last manual change * doc/emacs/custom.texi (Authentication): Improve markup, indexing, and wording. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index b4623fbef8..3f660fe9a2 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2614,37 +2614,37 @@ Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. @node Authentication @section Keeping Persistent Authentication Information -@cindex ~/.authinfo file -@cindex ~/.authinfo.gpg file -@cindex ~/.netrc file Some Emacs packages, which connect to other services, require -authentication (@pxref{Passwords}), e.g., @ref{Top, Gnus,, gnus, The +authentication (@pxref{Passwords}), e.g., see @ref{Top, Gnus,, gnus, The Gnus Manual}, or @ref{Top, Tramp,, tramp, The Tramp Manual}. Because it might be annoying to provide the same user name and password again and again, Emacs offers to keep this information persistent via the -auth-source library. +@file{auth-source} library. - Per default, this information is taken from the file +@cindex @file{~/.authinfo} file +@cindex @file{~/.authinfo.gpg} file +@cindex ~/.netrc file + By default, the authentication information is taken from the file @file{~/.authinfo} or @file{~/.authinfo.gpg} or @file{~/.netrc}. -These files have a syntax similar to netrc files as known from the ftp -program, like +These files have a syntax similar to netrc files as known from the +@command{ftp} program, like this: @example machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport} @end example - Similarly, the auth-source library supports multiple storage + Similarly, the @file{auth-source} library supports multiple storage backend, currently either the classic netrc backend, JSON files, the Secret Service API, and pass, the standard unix password manager. @vindex auth-sources - All these alternatives are customized via the user option -@code{auth-sources}, @ref{Help for users, Emacs auth-source,, auth, -Emacs auth-source}. + All these alternatives can be customized via the user option +@code{auth-sources}, see @ref{Help for users, Emacs auth-source,, +auth, Emacs auth-source}. @vindex auth-source-save-behavior When a password is entered interactively, which is not found via the configured backend, some of the backends offer to save it -persistently. This can be changed by the customizing user option +persistently. This can be changed by customizing the user option @code{auth-source-save-behavior}. commit 73508e62459113be4c7c101648afbe541dd18558 Author: Eli Zaretskii Date: Tue Jan 29 18:28:13 2019 +0200 Improve documentation of face numbers * doc/lispref/display.texi (Face Functions): Mention where the face number is used and that it depends on the 'face' property of the face symbol. Improve indexing. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index b3ce7fbf6a..921d58a1f3 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3038,10 +3038,17 @@ value, which inherits from @var{face}'s global definition. This function returns a list of all defined face names. @end defun +@cindex face number +@cindex face property of face symbols @defun face-id face This function returns the @dfn{face number} of face @var{face}. This is a number that uniquely identifies a face at low levels within Emacs. It is seldom necessary to refer to a face by its face number. +However, functions that manipulate glyphs, such as +@code{make-glyph-code} and @code{glyph-face} (@pxref{Glyphs}) access +the face numbers internally. Note that the face number is stored as +the value of the @code{face} property of the face symbol, so we +recommend not to set that property of a face to any value of your own. @end defun @defun face-documentation face commit bf235ce339bbeabfd183f06857dbb4eb4a0119db Author: Michael Albinus Date: Sun Jan 27 18:14:44 2019 +0100 * doc/emacs/custom.texi (Authentication): Refer to the "Help for users" node. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 32706f3868..b4623fbef8 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2640,7 +2640,8 @@ Secret Service API, and pass, the standard unix password manager. @vindex auth-sources All these alternatives are customized via the user option -@code{auth-sources}, @ref{Top, Emacs auth-source,, auth, Emacs auth-source}. +@code{auth-sources}, @ref{Help for users, Emacs auth-source,, auth, +Emacs auth-source}. @vindex auth-source-save-behavior When a password is entered interactively, which is not found via the commit ceccb3c8c4461cfb69b64d94a57709393b8c39fd Author: Michael Albinus Date: Sat Jan 26 16:46:54 2019 +0100 New node Authentication in the Emacs manual * doc/emacs/custom.texi (Customization): * doc/emacs/emacs.texi (Top): Add node Authentication. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 4aaf58cc26..32706f3868 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -32,6 +32,8 @@ Reference Manual}. By changing them, you can redefine keys. * Init File:: How to write common customizations in the initialization file. +* Authentication:: Keeping persistent authentication information. + @end menu @node Easy Customization @@ -2609,3 +2611,39 @@ instance: @noindent Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. + +@node Authentication +@section Keeping Persistent Authentication Information +@cindex ~/.authinfo file +@cindex ~/.authinfo.gpg file +@cindex ~/.netrc file + + Some Emacs packages, which connect to other services, require +authentication (@pxref{Passwords}), e.g., @ref{Top, Gnus,, gnus, The +Gnus Manual}, or @ref{Top, Tramp,, tramp, The Tramp Manual}. Because +it might be annoying to provide the same user name and password again +and again, Emacs offers to keep this information persistent via the +auth-source library. + + Per default, this information is taken from the file +@file{~/.authinfo} or @file{~/.authinfo.gpg} or @file{~/.netrc}. +These files have a syntax similar to netrc files as known from the ftp +program, like + +@example +machine @var{mymachine} login @var{myloginname} password @var{mypassword} port @var{myport} +@end example + + Similarly, the auth-source library supports multiple storage +backend, currently either the classic netrc backend, JSON files, the +Secret Service API, and pass, the standard unix password manager. + +@vindex auth-sources + All these alternatives are customized via the user option +@code{auth-sources}, @ref{Top, Emacs auth-source,, auth, Emacs auth-source}. + +@vindex auth-source-save-behavior + When a password is entered interactively, which is not found via the +configured backend, some of the backends offer to save it +persistently. This can be changed by the customizing user option +@code{auth-source-save-behavior}. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index d501db7191..5b16d5034f 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1114,6 +1114,7 @@ Customization By changing them, you can redefine keys. * Init File:: How to write common customizations in the initialization file. +* Authentication:: Keeping persistent authentication information. Easy Customization Interface commit 9078f34e84178553cd59bc03ac1b58cb56038436 Author: Alan Mackenzie Date: Fri Jan 25 16:14:00 2019 +0000 Fix a loop in c-fl-decl-start. This fixes bug #34186. * lisp/progmodes/cc-mode.el (c-fl-decl-start) In the pair of operations c-syntactic-skip-backward and c-forward-syntactic-ws, ensure the latter doesn't come back to the position before the former, and break out of the enclosing loop if it does. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 8cbb4e8612..5283cfea6e 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1487,6 +1487,7 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") ;; lock context (etc.) fontification. (goto-char pos) (let ((lit-start (c-literal-start)) + old-pos (new-pos pos) capture-opener bod-lim bo-decl) @@ -1509,12 +1510,14 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") (while ;; Go to a less nested declaration each time round this loop. (and + (setq old-pos (point)) (c-syntactic-skip-backward "^;{}" bod-lim t) (> (point) bod-lim) (progn (c-forward-syntactic-ws) ;; Have we got stuck in a comment at EOB? (not (and (eobp) (c-literal-start)))) + (< (point) old-pos) (progn (setq bo-decl (point)) (or (not (looking-at c-protection-key)) (c-forward-keyword-clause 1))) commit a177fe754db3919c1515bdfcd1c2ea28543da8e8 Author: Eli Zaretskii Date: Fri Jan 25 10:45:25 2019 +0200 Fix LaTeX output of month and day from cal-tex.el * lisp/calendar/cal-tex.el (cal-tex-cursor-week-iso) (cal-tex-week-hours): Escape a lone blank, to make it through LaTeX. (Bug#34148) diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 469430b2a4..30429b6d59 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -927,7 +927,7 @@ argument EVENT specifies a different buffer position." (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) (insert ", ") (cal-tex-large-bf (cal-tex-month-name month)) - (insert " ") + (insert "\\ ") (cal-tex-large-bf (number-to-string day)) (unless (string-equal "" (setq s (cal-tex-latexify-list holidays date "; "))) @@ -978,7 +978,7 @@ shown are hard-coded to 8-12, 13-17." (cal-tex-large-bf (cal-tex-LaTeXify-string (calendar-day-name date))) (insert ", ") (cal-tex-large-bf (cal-tex-month-name month)) - (insert " ") + (insert "\\ ") (cal-tex-large-bf (number-to-string day)) (unless (string-equal "" (setq s (cal-tex-latexify-list holidays date "; "))) commit 90177d7f12d25e403abc6f1bdf242aed308a7bb8 Author: Daniel Kahn Gillmor Date: Fri Jan 18 03:12:07 2019 -0500 Avoid elisp crash for OpenPGP User IDs with no e-mail address * lisp/gnus/mml-sec.el (mml-secure-check-user-id): Verify that there is an e-mail address in the current User ID before trying to downcase it. (Bug#34121) Copyright-paperwork-exempt: yes diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 8c485fec37..4fca4ce67b 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -658,6 +658,8 @@ The passphrase is read and cached." (catch 'break (dolist (uid uids nil) (if (and (stringp (epg-user-id-string uid)) + (car (mail-header-parse-address + (epg-user-id-string uid))) (equal (downcase (car (mail-header-parse-address (epg-user-id-string uid)))) (downcase (car (mail-header-parse-address commit 68e55a0bfc15d6b39ae7aa5650f375ff6784246d Author: Benjamin Riefenstahl Date: Mon Jan 14 23:37:03 2019 +0100 image-mode: Do not use default scaling (bug#33990) * lisp/image-mode.el (image-toggle-display-image): Set :scale == 1 so that create-image does not apply additional scaling. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 7dfa691065..3666009c7e 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -761,9 +761,11 @@ was inserted." (type (if (fboundp 'imagemagick-types) 'imagemagick (image-type file-or-data nil data-p))) + ;; :scale 1: If we do not set this, create-image will apply + ;; default scaling based on font size. (image (if (not edges) - (create-image file-or-data type data-p) - (create-image file-or-data type data-p + (create-image file-or-data type data-p :scale 1) + (create-image file-or-data type data-p :scale 1 :max-width (- (nth 2 edges) (nth 0 edges)) :max-height (- (nth 3 edges) (nth 1 edges))))) (inhibit-read-only t) commit b6c762a520c041d8c69a8557b9ee5ffdd3004b1f Author: Benjamin Riefenstahl Date: Tue Jan 15 17:00:04 2019 +0100 create-image: Expand documentation (bug#33990) * lisp/image.el (create-image): Discuss default for :scale in the doc string. diff --git a/lisp/image.el b/lisp/image.el index b49f1b3aa5..3019da556b 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -413,13 +413,20 @@ must be available." (defun create-image (file-or-data &optional type data-p &rest props) "Create an image. FILE-OR-DATA is an image file name or image data. + Optional TYPE is a symbol describing the image type. If TYPE is omitted or nil, try to determine the image type from its first few bytes of image data. If that doesn't work, and FILE-OR-DATA is a file name, use its file extension as image type. + Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. + Optional PROPS are additional image attributes to assign to the image, -like, e.g. `:mask MASK'. +like, e.g. `:mask MASK'. If the property `:scale' is not given and the +display has a high resolution (more exactly, when the average width of a +character in the default font is more than 10 pixels), the image is +automatically scaled up in proportion to the default font. + Value is the image created, or nil if images of type TYPE are not supported. Images should not be larger than specified by `max-image-size'. commit 928d342c81c4d442e3125ddc463d141029d6898f Author: Eli Zaretskii Date: Mon Jan 21 18:20:33 2019 +0200 Improve documentation of 'isearch-filter-predicate' * lisp/isearch.el (isearch-filter-predicate) (isearch-filter-visible): Doc fixes. (Bug#34150) diff --git a/lisp/isearch.el b/lisp/isearch.el index 7ee71b4979..25d6ad591e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -188,11 +188,14 @@ or to the end of the buffer for a backward search.") to the search status stack.") (defvar isearch-filter-predicate #'isearch-filter-visible - "Predicate that filters the search hits that would normally be available. -Search hits that dissatisfy the predicate are skipped. The function -has two arguments: the positions of start and end of text matched by -the search. If this function returns nil, continue searching without -stopping at this match. + "Predicate to filter hits of Isearch and replace commands. +Isearch hits that don't satisfy the predicate will be skipped. +The value should be a function of two arguments; it will be +called with the the positions of the start and the end of the +text matched by Isearch and replace commands. If this function +returns nil, Isearch and replace commands will continue searching +without stopping at resp. replacing this match. + If you use `add-function' to modify this variable, you can use the `isearch-message-prefix' advice property to specify the prefix string displayed in the search message.") @@ -3009,10 +3012,13 @@ Optional third argument, if t, means if fail just return nil (no error). (setq isearch-hidden t))))))) (defun isearch-filter-visible (beg end) - "Test whether the current search hit is visible at least partially. -Return non-nil if the text from BEG to END is visible to Isearch as -determined by `isearch-range-invisible' unless invisible text can be -searched too when `search-invisible' is t." + "Return non-nil if text between BEG and END is deemed visible by Isearch. +This function is intended to be used as `isearch-filter-predicate'. +It returns non-nil if the text between BEG and END is visible to +Isearch, at least partially, as determined by `isearch-range-invisible'. +If `search-invisible' is t, which allows Isearch matches inside +invisible text, this function will always return non-nil, regardless +of what `isearch-range-invisible' says." (or (eq search-invisible t) (not (isearch-range-invisible beg end)))) commit 9034dd6c703975e9da3a269b84d8b756b997a4d8 Author: Trevor Spiteri Date: Mon Jan 14 23:10:34 2019 +0100 Fix cursor column positioning on Grep hits * lisp/progmodes/grep.el (grep-match-face): Move before first use, to avoid byte-compilation warning. (grep-regexp-alist): Don't quote grep-match-face. (Bug#34068) Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index df8cb3da7e..8b9a2d86c7 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -366,6 +366,9 @@ A grep buffer becomes most recent when you select Grep mode in it. Notice that using \\[next-error] or \\[compile-goto-error] modifies `compilation-last-buffer' rather than `grep-last-buffer'.") +(defvar grep-match-face 'match + "Face name to use for grep matches.") + ;;;###autoload (defconst grep-regexp-alist `((,(concat "^\\(?:" @@ -389,7 +392,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) + (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) . @@ -397,7 +400,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) + (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) @@ -421,9 +424,6 @@ See `compilation-error-regexp-alist' for format details.") (defvar grep-error-face 'compilation-error "Face name to use for grep error messages.") -(defvar grep-match-face 'match - "Face name to use for grep matches.") - (defvar grep-context-face 'shadow "Face name to use for grep context lines.")