1. 29 Jul, 2019 4 commits
  2. 08 Jul, 2019 9 commits
  3. 06 Jul, 2019 2 commits
    • Stefan Kangas's avatar
      Add tests for text-property-search to check prop-match-value · cfcaf06f
      Stefan Kangas authored
      * test/lisp/emacs-lisp/text-property-search-tests.el
      (with-match-test): New macro.
      (text-property-search-forward-prop-match-match-face-nil-nil)
      (text-property-search-forward-prop-match-match-face-bold-t)
      (text-property-search-forward-prop-match-match-face-bold-nil)
      (text-property-search-backward-prop-match-match-face-nil-nil)
      (text-property-search-backward-prop-match-match-face-italic-t)
      (text-property-search-backward-prop-match-match-face-italic-nil):
      Add test cases to also verify the value of prop-match-value
      (bug#36486).
      cfcaf06f
    • Noam Postavsky's avatar
      ; Add thing-at-point-looking-at test (Bug#35708) · e6608010
      Noam Postavsky authored
      * test/lisp/thingatpt-tests.el (thing-at-point-looking-at): New test.
      e6608010
  4. 04 Jul, 2019 2 commits
    • Juri Linkov's avatar
      * lisp/char-fold.el (char-fold-to-regexp): Implement arg LAX (bug#36398). · 19b1cefa
      Juri Linkov authored
      * test/lisp/char-fold-tests.el (char-fold--test-multi-lax): New test.
      19b1cefa
    • Mattias Engdegård's avatar
      Optimise more inputs to `regexp-opt' (bug#36444) · 3fd74915
      Mattias Engdegård authored
      Use a more precise test to determine whether the input to `regexp-opt'
      is safe to optimise when KEEP-ORDER is non-nil, permitting more inputs
      to be optimised than before.  For example, ("good" "goal" "go") is now
      accepted.
      
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt):
      More precise test for whether the list is safe w.r.t. KEEP-ORDER.
      (regexp-opt--contains-prefix): Remove.
      
      * test/lisp/emacs-lisp/regexp-opt-tests.el: Use lexical-binding.
      (regexp-opt-test--permutation, regexp-opt-test--factorial)
      (regexp-opt-test--permutations, regexp-opt-test--match-all)
      (regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
      (regexp-opt-keep-order): Test KEEP-ORDER.
      3fd74915
  5. 03 Jul, 2019 2 commits
    • Stefan Kangas's avatar
      Add tests for bookmark.el (Bug#36452) · 22760ab3
      Stefan Kangas authored
      * test/lisp/bookmark-resources/example.txt:
      * test/lisp/bookmark-resources/test.bmk:
      * test/lisp/bookmark-tests.el: New files.
      * lisp/bookmark.el: Minor cleanups.
      (bookmark-insert-annotation): Signal error on invalid bookmark.
      (bookmark-write-file): Add newline at end of file.
      22760ab3
    • Michael Albinus's avatar
      Change expected result of a flymake test on emba · 14563dc1
      Michael Albinus authored
      * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
      Test is now passing on emba.gnu.org, too.
      14563dc1
  6. 02 Jul, 2019 2 commits
    • Glenn Morris's avatar
      Change expected result of a flymake test on hydra · 20c1406c
      Glenn Morris authored
      * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
      Test is now passing on hydra.nixos.org, since today.
      20c1406c
    • João Távora's avatar
      Correctly reindent previous line in electric-indent-mode · 5e88b50d
      João Távora authored
      Fixes: bug#35254
      
      Do this even when electric-indent-inhibit is t, except when the
      newline insertion is being performed by electric-layout-mode.
      
      * lisp/electric.el (electric-indent-post-self-insert-function):
      Reindent previous line unless operating under
      electric-layout-mode.
      (electric-layout-post-self-insert-function-1): Bind
      electric-indent-inhibit to 'electric-layout-mode.
      
      * test/lisp/electric-tests.el
      (electric-layout-control-reindentation): New test.
      5e88b50d
  7. 30 Jun, 2019 1 commit
    • Michael Albinus's avatar
      Release Tramp 2.4.2 · 10af8c58
      Michael Albinus authored
      * lisp/net/tramp.el: Bump version.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
      Add `add-name-to-file' error message.
      (tramp--test-ignore-add-name-to-file-error): Make error handler
      more explicit about the error.
      10af8c58
  8. 29 Jun, 2019 1 commit
  9. 28 Jun, 2019 2 commits
    • Michael Albinus's avatar
      Tramp requires Emacs 24.4 · aae5bf44
      Michael Albinus authored
      * doc/misc/tramp.texi (Frequently Asked Questions):
      Use `with-eval-after-load'. in example.
      
      * doc/misc/trampver.texi: Set variable emacsver.
      
      * lisp/net/tramp.el (tramp-send-string, tramp-call-process)
      (tramp-call-process-region, tramp-process-lines):
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename)
      (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes)
      (tramp-gvfs-handle-file-notify-add-watch)
      * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
      (tramp-do-copy-or-rename-file-out-of-band)
      (tramp-sh-handle-file-notify-add-watch, tramp-find-executable)
      (tramp-set-remote-path)
      (tramp-open-connection-setup-interactive-shell)
      (tramp-maybe-open-connection, tramp-send-command):
      * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
      (tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
      (tramp-smb-handle-set-file-acl)
      (tramp-smb-handle-start-file-process)
      (tramp-smb-maybe-open-connection):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl):
      (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'.
      
      * lisp/net/tramp-adb.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-integration.el:
      * lisp/net/tramp-ftp.el: Use `with-eval-after-load'.
      
      * lisp/net/tramp-cmds.el (tramp-cleanup-connection)
      (tramp-cleanup-all-connections): Cancel timer.
      
      * lisp/net/tramp-compat.el (subr-x): Require.
      (default-toplevel-value): Don't make it a defalias.
      
      * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'.  Do
      not special handle `split-string'.
      
      * lisp/net/tramp.el: Require Emacs 24.4.
      (tramp-password-prompt-regexp): Use `password-word-equivalents'.
      (tramp-user-error): Use `user-error'.
      (tramp-replace-environment-variables): Use `substitute-env-vars'.
      (tramp-wait-for-regexp): Rearrange `with-current-buffer' call.
      (tramp-get-local-gid): Use `group-gid'.
      
      * lisp/net/trampver.el: Check for Emacs 24.4.
      
      * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
      (tramp-test02-file-name-dissect-simplified)
      (tramp-test02-file-name-dissect-separate)
      (tramp-test03-file-name-host-rules)
      (tramp-test03-file-name-method-rules): Don't check for `user-error'.
      aae5bf44
    • Juanma Barranquero's avatar
  10. 26 Jun, 2019 6 commits
  11. 25 Jun, 2019 2 commits
  12. 24 Jun, 2019 6 commits
    • Michael Albinus's avatar
      Improve error handling in Tramp · 18a7e541
      Michael Albinus authored
      * lisp/net/tramp-compat.el (ls-lisp): Require.
      
      * lisp/net/tramp.el (ls-lisp-use-insert-directory-program):
      Don't declare.
      (tramp-current-connection): Adapt docstring.
      (tramp-debug-message): Adapt function names.
      (tramp-error, tramp-run-real-handler): Let-bind `signal-hook-function'.
      (tramp-signal-hook-function): New defun.
      (tramp-debug-on-error, tramp-condition-case-unless-debug): Remove.
      (tramp-file-name-handler): Handle `tramp-current-connection'.
      Let-bind `signal-hook-function'.  Use `unwind-protect' instead of
      `tramp-condition-case-unless-debug'.
      (tramp-handle-insert-directory): Don't require ls-lisp.
      (tramp-process-actions): Check, that
      `tramp-password-save-function' is non-nil.
      (tramp-equal-remote): Handle the case both files are local.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
      Do not bind `tramp-debug-on-error'.
      (tramp--test-ignore-make-symbolic-link-error): Make error handler
      more explicit about the error.
      18a7e541
    • Damien Cassou's avatar
      Refactoring of auth-source-pass · 7022e3fd
      Damien Cassou authored
      * lisp/auth-source-pass.el (auth-source-pass--find-match): Refactor by
      moving some code to auth-source-pass--disambiguate.
      (auth-source-pass--disambiguate)
      (auth-source-pass--entries-matching-suffix): New function.
      (auth-source-pass--find-match-unambiguous)
      (auth-source-pass--select-from-entries)
      (auth-source-pass--entry-reducer): Refactor to simplify and improve
      logging.
      (auth-source-pass--matching-entries)
      (auth-source-pass--accumulate-matches): Remove.
      * test/lisp/auth-source-pass-tests.el: Complete rewrite to facilitate
      maintenance.
      (auth-source-pass--have-message-containing): Remove.
      (auth-source-pass--have-message-matching)
      (auth-source-pass--explain--have-message-matching)
      (auth-source-pass--explain-match-entry-p)
      (auth-source-pass--includes-sorted-entries)
      (auth-source-pass--explain-includes-sorted-entries)
      (auth-source-pass--explain-match-any-entry-p)
      (auth-source-pass--matching-entries)
      (auth-source-pass-match-entry-p)
      (auth-source-pass-match-any-entry-p): New function.
      7022e3fd
    • Keith Amidon's avatar
      Minimize entry parsing in auth-source-pass · 0a580c18
      Keith Amidon authored
      Prior to this commit, while searching for the most applicable entry
      password-store entries were decrypted and parsed to ensure they were
      valid.  The entries were parsed in the order they were found on the
      filesystem and all applicable entries would be decrypted and parsed,
      which varied based on the contents of the password-store and the entry
      to be found.
      
      This is fine when the GPG key is cached and each entry can be
      decrypted without user interaction.  However, for security some people
      have their GPG on a hardware token like a Yubikey setup so that they
      have to touch a sensor on the toke for every cryptographic operation,
      in which case it becomes inconvenient as each attempt to find an entry
      requires a variable number of touches of the hardware token.
      
      The implementation already assumes that names which contain more of
      the information in the search key should be preferred so there is an
      ordering of preference of applicable entries.  If the decrypt and
      parsing is removed from the initial identification of applicable
      entries in the store then in most cases a single decrypt and parse of
      the most preferred entry will suffice, improving the experience for
      hardware token users that require interaction with the token.
      
      This commit implements that strategy.  It is in spirit a refactor of
      the existing code.
      
      * lisp/auth-source-pass.el (auth-source-pass--matching-entries): New
      function, generate an ordered list of regular expression matchers for
      all possible names that could be in the password-store for the entry
      to be found and then makes a pass over the password-store entry names
      accumulating the matching entries in a list after the regexp that
      matched.  This implementation ensures the password-store entry list
      still only has to be scanned once.
      (auth-source-pass--find-match-unambiguous): Use it to obtain candidate
      entries and then parse them one by one until an entry containing the
      desired information is located.  When complete, return the parsed data
      of the entry instead of the entry name so that the information can be
      used directly to construct the auth-source response.
      (auth-source-pass--build-result): Update accordingly.
      (auth-source-pass--find-match): Update docstring accordingly.
      (auth-source-pass--select-one-entry)
      (auth-source-pass--entry-valid-p)
      (auth-source-pass--find-all-by-entry-name)
      (auth-source-pass--find-one-by-entry-name): Remove.
      (auth-source-pass--select-from-entries)
      (auth-source-pass--accumulate-matches)
      (auth-source-pass--entry-reducer)
      (auth-source-pass--generate-entry-suffixes)
      (auth-source-pass--domains)
      (auth-source-pass--name-port-user-suffixes): New functions.
      
      * test/lisp/auth-source-pass-tests.el: One test case was added to the
      test suite to verify that only the minimal number of entries are
      parsed in common cases.  The
      auth-source-pass-only-return-entries-that-can-be-open test case had to
      be re-implemented because the function it was used eliminated as the
      functionality is provided elsewhere.  All the other fairly substantial
      changes to the test suite are the result of mechanical changes that
      were required to adapt to auth-source-pass--find-match returning the
      data from a parsed password-store entry instead of the entry name.
      0a580c18
    • Keith Amidon's avatar
      Fix auth-source-pass to search for hostname:port/username · 94c9eb81
      Keith Amidon authored
      auth-source-pass supports entries with username either prefixed to the
      hostname with an @ as separator or in a subdirectory under the
      hostname.  This was true when there was no port or service included in
      the name, but got broken with the introduction of
      auth-source-pass-port-separator.
      
      * lisp/auth-source-pass.el (auth-source-pass--find-match-unambiguous): Fix
      to match hostname:port/username.
      * test/lisp/auth-source-pass-tests.el: Add corresponding tests.
      94c9eb81
    • Iku Iwasa's avatar
      Add auth-source-pass-port-separator option · 2a0a0578
      Iku Iwasa authored
      * lisp/auth-source-pass.el (auth-source-pass-port-separator): New
      option to specify separator between host and port, default to
      colon (":").
      (auth-source-pass--find-match-unambiguous): Adapt to make use of the
      new variable.
      * test/lisp/auth-source-pass-tests.el: Add corresponding tests.
      2a0a0578
    • Magnus Henoch's avatar
      Fix auth-source-pass to return nil if no entry found · 527efaf7
      Magnus Henoch authored
      * lisp/auth-source-pass.el (auth-source-pass-search): If there is no
      matching entry, auth-source-pass-search should return nil, not (nil).
      This lets auth-source fall back to other backends in the auth-sources
      list.
      * test/lisp/auth-source-pass-tests.el: Add corresponding test.
      
      Copyright-paperwork-exempt: yes
      527efaf7
  13. 23 Jun, 2019 1 commit
    • Mattias Engdegård's avatar
      Optional space and unit in `file-size-human-readable' (bug#35756) · 866f527d
      Mattias Engdegård authored
      To improve readability of strings produced by
      `file-size-human-readable', add two optional arguments:
      
      - SPACE, to provide a string (typically a space or non-breaking space)
      to put between the number and unit.  For compatibility, the default is
      an empty string.
      
      - UNIT, a string to use as unit.  For compatibility, the default is
      "B" in `iec' mode and the empty string otherwise.
      
      Also fix a glitch with small numbers in `iec' mode which caused a
      stray "i" in the result.
      
      * lisp/files.el (file-size-human-readable):
      Add optional SPACE and UNIT arguments and handle small numbers correctly.
      (files--ask-user-about-large-file, warn-maybe-out-of-memory):
      Call with `iec' and space.
      * test/lisp/files-tests.el (files-test-file-size-human-readable): New test.
      * lisp/url/url-http.el (url-http-simple-after-change-function)
      (url-http-content-length-after-change-function): Call with `iec' and space.
      * etc/NEWS (Lisp Changes): Mention the change.
      866f527d