1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00
Commit Graph

4727 Commits

Author SHA1 Message Date
Michael Albinus
41e62df73a Fix extended attributes for Tramp's sudoedit method (bug#49724)
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Remove compat code for `{set-}file-extended-attributes'.
(tramp-sudoedit-handle-write-region): Handle extended attributes.
(Bug#49724)

* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Fix test for sudoedit method.
2021-07-25 14:14:49 +02:00
Mattias Engdegård
c52e26df30 Keep track of match extents in occur-mode (bug#39121)
Use the `occur-target` text property to keep track of the extents of
all matches on each line instead of just the start of the first match.
Doing so allows us to highlight all matches when jumping to a matching
line instead of just the first one, and it works in a more principled
way.  It also removes compatibility problems that were introduced with
occur-highlight-regexp.

For compatibility with code that populate their own occur-mode
buffers, we still accept `occur-target` properties with a single
marker as value.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
Remove.
(occur-highlight-overlays): New.
(occur--targets-start): New.
* lisp/replace.el (occur-after-change-function):
(occur-mode-find-occurrence): Replace with...
(occur-mode--find-occurrences): ...this function that returns the
whole `occur-target` property value.
(occur-mode-goto-occurrence, occur-mode-goto-occurrence-other-window)
(occur-goto-locus-delete-o, occur-mode-display-occurrence)
(occur-engine): Adjust to new property format.
(occur--highlight-occurrence): Replace with...
(occur--highlight-occurrences): ...this function that takes
the `occur-target` property value as argument.
(occur-1): Don't use `occur-highlight-regexp`.
* test/lisp/replace-tests.el (occur-highlight-occurrence):
Adapt to new property format.
2021-07-25 10:29:09 +02:00
Lars Ingebrigtsen
f04f8126f0 Rename directory-append to file-name-concat
* src/fileio.c (Ffile_name_concat):
* lisp/files.el (move-file-to-trash):
* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Rename
`directory-append' to `file-name-concat'.
2021-07-25 08:54:20 +02:00
Lars Ingebrigtsen
aa9cba6587 Allow empty elements in directory-append
* doc/lispref/files.texi (Directory Names): Document it.
* src/fileio.c (Fdirectory_append): Allow empty elements.
2021-07-25 08:00:50 +02:00
Mattias Engdegård
03f844249c Disable delay and ding in replace-tests
* test/lisp/replace-tests.el (replace-tests-with-undo):
When testing the "U" (undo all changes) option, the code will delay
and ding which is obnoxious in an automated test.
Disabling that makes the test quiet and about 150 times faster.
2021-07-24 19:30:39 +02:00
Lars Ingebrigtsen
42d4537ed2 Really convert to multibyte in Fdirectory_append
* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
(Fdirectory_append):
2021-07-24 18:53:43 +02:00
Lars Ingebrigtsen
b4543dfa9e Extend directory-append to take an arbitrary number of components
* doc/lispref/files.texi (Directory Names): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Add new example.

* src/fileio.c (Fdirectory_append): Change the function to take an
arbitrary number of components.
2021-07-24 17:22:43 +02:00
Lars Ingebrigtsen
5431a58e86 Add new function `directory-append'
* doc/lispref/files.texi (Directory Names): Document it, and
remove the concat-based file concatenation description.
* lisp/emacs-lisp/shortdoc.el (file-name): Add.  And add more
expand-file-name examples.

* src/fileio.c (Fdirectory_append): New function.
2021-07-24 13:30:58 +02:00
Lars Ingebrigtsen
9ac6ff53b1 Make the test for auto-mode-alist from .dir-local.el stricter
* lisp/files.el (set-auto-mode--dir-local-valid-p): New function.
(set-auto-mode--apply-alist): Use it as a stricter test.
2021-07-24 11:16:15 +02:00
Tom Tromey
ad5faa424a Add auto-mode-alist functionality to .dir-locals.el
* doc/emacs/custom.texi (Directory Variables): Document
auto-mode-alist in .dir-locals.el (Bug#18721)
* doc/emacs/modes.texi (Choosing Modes): Update.
* lisp/files.el (set-auto-mode--apply-alist): New function,
from set-auto-mode.
(set-auto-mode): Check directory locals for auto-mode-alist.
(dir-locals-collect-variables): Add "predicate" parameter.
(hack-dir-local--get-variables): New function, from
hack-dir-local-variables.
(hack-dir-local-variables): Call hack-dir-local--get-variables.
* test/lisp/files-resources/.dir-locals.el: New file.
* test/lisp/files-resources/whatever.quux: New file.
* test/lisp/files-tests.el (files-tests-data-dir): New variable.
(files-test-dir-locals-auto-mode-alist): New test.
2021-07-23 15:51:11 +02:00
Jean Forget
6a3b89f9df Add more support for the French Revolutionary Calendar
* lisp/calendar/cal-french.el (calendar-french-feasts-array): New
variable (bug#19174).
(calendar-french-trim-feast): New function.
(calendar-french-date-string, calendar-french-goto-date):
(calendar-french-goto-date): Use them.

http://datetime.mongueurs.net/Histoire/s-c/01-g.en.html
https://metacpan.org/pod/DateTime::Calendar::FrenchRevolutionary#Internet
2021-07-23 15:26:45 +02:00
Mattias Engdegård
aa5437493b Off-by-one error in compilation rule end-column function (bug#49624)
* lisp/progmodes/compile.el (compilation-error-properties):
When the end-column parameter of a compilation message rule
(in compilation-error-regexp-alist[-alist]) is a function, treat its
return value as if it were matched by the regexp, which is how it is
documented to work, and how all other parameters work.
2021-07-23 15:20:44 +02:00
Mattias Engdegård
109ca1bd00 Warn about arity errors in inlining calls (bug#12299)
Wrong number of arguments in inlining function calls (to `defsubst` or
explicitly using `inline`) did not result in warnings, or in very
cryptic ones.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Add calls
to `byte-compile--check-arity-bytecode`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile--check-arity-bytecode): New functions.
(byte-compile-callargs-warn): Use factored-out function.
* test/lisp/emacs-lisp/bytecomp-resources/warn-callargs-defsubst.el:
* test/lisp/emacs-lisp/bytecomp-tests.el ("warn-callargs-defsubst.el"):
New test case.
2021-07-23 15:19:01 +02:00
Lars Ingebrigtsen
4357d595ee Adjust time-tests.el to bug#30056
* test/lisp/time-tests.el (time-tests-display-time-update): Adjust
test (bug#30056).
2021-07-23 14:46:12 +02:00
Eli Zaretskii
c8a1af6d37 Avoid byte-compilation warning
* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks):
Avoid byte-compiler warning.  (Bug#49667)
2021-07-22 12:14:50 +03:00
Lars Ingebrigtsen
bc0aca059d Fix dired-guess-default logic after previous change
* lisp/dired-x.el (dired-guess-default): Restore previous logic --
require matches for all files (bug#48071).
2021-07-21 13:04:06 +02:00
Michael Albinus
6bea195db5 Fix Bug#49636
* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Let-bind `auto-save-default'.  (Bug#49636)
2021-07-20 17:28:29 +02:00
Lars Ingebrigtsen
c175ad52fa Make dired-guess-default return all matching programs
* lisp/dired-x.el (dired-guess-default): Return all matching
programs (bug#48071).
2021-07-20 16:16:09 +02:00
Ioannis Kappas
606b783acb Allow installing packages with DOS line endings
* lisp/emacs-lisp/package.el (package-install-from-buffer): Allow
installing files with different line ending conventions (Unix, DOS
and Macos) (bug#48137).
2021-07-20 15:53:34 +02:00
Lars Ingebrigtsen
06ee8ac36c Mention overlays-in' in the overlays-at' doc string
* src/buffer.c (Foverlays_at): Mention `overlays-in' in the doc
string (bug#459).
2021-07-20 13:32:39 +02:00
Lars Ingebrigtsen
514398c665 Add inhibit-buffer-hooks to `make-indirect-buffer'
* doc/lispref/buffers.texi (Indirect Buffers): Document it (bug#49160).

* src/buffer.c (Fmake_indirect_buffer): Allow controlling whether
to inhibit buffer hooks.
2021-07-19 18:23:11 +02:00
dickmao
95e31a1a32 Make make-indirect-buffer inherit inhibit-buffer-hook from base buffer
* src/buffer.c (Fmake_indirect_buffer):
Match base buffer's inhibit-buffer-hooks.
* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks-indirect):
Add a test (bug#49160).
2021-07-19 18:23:11 +02:00
Mattias Engdegård
014a67200c ; * test/lisp/progmodes/compile-tests.el: simplify end-col
The internal representation of columns uses half-open intervals but
don't expose that in the test cases, where we want to use the same
numbers as in the compilation messages.
2021-07-18 20:40:56 +02:00
Stephen Gildea
87a432455d Add doc string to time-stamp-tests that didn't have one
* test/lisp/time-stamp-tests.el (formatz-generate-tests,
  formatz-%z-spotcheck): Add doc strings to tests.
2021-07-18 08:44:18 -07:00
Michael Albinus
7075ebbf5b Make remote file locks more robust
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Make file locks more robust.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Rename and extend.
2021-07-18 16:58:52 +02:00
Michael Albinus
12a193f876 Fix problem in `shadow-define-literal-group' (Bug#49596)
* lisp/shadowfile.el (shadow-make-fullname): HOST can also be a
remote file name.  Bug#49596.

* test/lisp/shadowfile-tests.el (auth-source-save-behavior)
(tramp-cache-read-persistent-data, tramp-persistency-file-name):
Set them globally.
(shadow-test06-literal-groups): Extend test.
2021-07-18 15:57:41 +02:00
akater
109c27341e EIEIO: Prevent excessive evaluation of :initform
* lisp/emacs-lisp/eieio.el (initialize-instance):
Do not evaluate initform of a slot when initarg for the slot is provided,
according to the following secitons of CLHS:
- Object Creation and Initialization
- Initialization Arguments
- Defaulting of Initialization Arguments
- Rules for Initialization Arguments

* test/lisp/emacs-lisp/eieio-etests/eieio-tests.el:
Add corresponding tests
Fix a typo
2021-07-16 15:40:08 -04:00
Remington Furman
865535a24c Make `number-at-point' work for more hex numbers
* lisp/thingatpt.el (number-at-point): Rewrite to actually catch
the hex numbers (bug#49588).

Copyright-paperwork-exempt: yes
2021-07-16 11:47:36 +02:00
Lars Ingebrigtsen
1cd278bfcd Add a couple more shell-tests-split-string tests 2021-07-16 01:42:55 +02:00
Eli Zaretskii
acf583b209 Fix 'shell-tests-split-string' on MS-Windows
* test/lisp/shell-tests.el (shell-tests-split-string): Skip test
that always fails on MS-Windows/MS-DOS.
2021-07-15 12:37:26 +03:00
Lars Ingebrigtsen
28e7b51041 Rename shell-split-string to split-string-shell-command
* lisp/shell.el (split-string-shell-command):
* doc/lispref/processes.texi (Shell Arguments): Rename from
shell-split-string.
2021-07-15 10:29:04 +02:00
Lars Ingebrigtsen
4fb6cf3f38 Add a new function 'shell-split-string'
* doc/lispref/processes.texi (Shell Arguments): Document it.
* lisp/shell.el (shell-split-string): New function.
2021-07-15 10:25:41 +02:00
Michael Albinus
525d5cab36 Preserve backward compatibility in Tramp
* lisp/net/tramp-crypt.el (tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): Preserve backward compatibility.

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Do not
create lock file twice.

* lisp/net/tramp.el (tramp-handle-make-lock-file-name): Move lock
file security check ...
(tramp-handle-lock-file): ... here.
(tramp-handle-unlock-file): Preserve backward compatibility.

* test/lisp/net/tramp-tests.el (lock-file-name-transforms)
(remote-file-name-inhibit-locks): Declare.
(tramp-allow-unsafe-temporary-files): Set to t.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Move binding of
`tramp-allow-unsafe-temporary-files' up.
(tramp-test39-lock-file): Bind `tramp-allow-unsafe-temporary-files'.
Preserve backward compatibility.  Extend test.
2021-07-14 18:36:14 +02:00
Michael Albinus
cce84822f7 Add remote-file-name-inhibit-locks
* doc/emacs/files.texi (Interlocking):
* doc/lispref/files.texi (File Locks):
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Add remote-file-name-inhibit-locks.

* etc/NEWS: New user option 'remote-file-name-inhibit-locks'.

* lisp/files.el (remote-file-name-inhibit-locks): New defcustom.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Use `tramp-handle-make-lock-file-name'.

* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): Fix docstring.
(tramp-handle-make-lock-file-name): New defun.

* test/lisp/net/tramp-tests.el (tramp-test39-lock-file): Extend test.
2021-07-13 19:50:05 +02:00
Mattias Engdegård
7a803ecd3d Block TLS handshake until TCP connection established
If a TLS handshake is attempted before the completion of an
asynchronous TCP connection has been ascertained, our local state will
not be set up correctly for further progress and the sentinel "open"
event will never be sent.  This can occur if sufficient time passes
after the initiation of an async TCP connection so that by the time
`wait_reading_process_output` is called, the connection has already
been established on the TCP level.

This somewhat timing-sensitive bug has plagued HTTPS connections on
some platforms, notably macOS, for a long time (bug#49449).

* src/process.c (wait_reading_process_output): Gate the TLS handshake
by the NON_BLOCKING_CONNECT_FD flag.  The flag will be cleared as soon
as the TCP socket is found to be writable.
* test/src/process-tests.el (process-async-https-with-delay):
New test.
2021-07-13 19:07:41 +02:00
Paul Eggert
a79c578f3d Port test module to glibc 2.33
* test/Makefile.in (REPLACE_FREE, FREE_SOURCE_0, FREE_SOURCE_1):
New macros.
($(test_module)): Improve accuracy of test as to whether free.c
should be compiled; glibc 2.33 does not need it compiled and the
compilation breaks if you try, if you build with
--enable-gcc-warnings.
2021-07-12 00:12:21 -07:00
Paul Eggert
1a0fe2a518 Pacify gcc 11.1.1 -Wanalyzer-possible-null-dereference
* oldXMenu/Create.c (XMenuCreate):
* oldXMenu/Internal.c (_XMRecomputePane, _XMRecomputeSelection):
* oldXMenu/XMakeAssoc.c (XMakeAssoc):
* test/src/emacs-module-resources/mod-test.c (Fmod_test_userptr_make):
Don’t assume that malloc and calloc succeed.
2021-07-12 00:12:21 -07:00
Eric Abrahamsen
d93ff9459f Rewrite gnus-search-query-expand-key
* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): There was a
misunderstanding about how completion-all-completion works (if the
test string can't be completed, the whole table is returned). Simplify
to use try-completion.
* test/lisp/gnus/gnus-search-tests.el (gnus-s-expand-keyword): Ensure
that an unknown/uncompletable keyword is returned unmolested.
2021-07-10 20:22:35 -07:00
Ken Brown
3fa711c11d Skip a process test on Cygwin to avoid hang
* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-network-process): Skip
test on Cygwin to avoid hang due to connect/accept handshake.
(Bug#49496)
2021-07-09 16:37:52 -04:00
Michael Albinus
9ce6541ac9 Further cleanup for file locks
* doc/misc/tramp.texi (Top, Configuration): Adapt node name for
file locks.
(Auto-save File Lock and Backup): Rename node name and section
title.  Add file-lock to @cindex.  Describe file locks.

* lisp/dired.el (dired-trivial-filenames): Add lock files.
(dired-font-lock-keywords): Move files suffixed with
`completion-ignored-extensions' up.  Add lock files to these checks.

* lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
Use `when-let'
(tramp-lock-file-info-regexp): Rename from
`tramp-lock-file-contents-regexp'.
(tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
(tramp-handle-lock-file): Set file modes of lockname.

* src/buffer.c (Frestore_buffer_modified_p):
* src/fileio.c (write_region):
* src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.

* src/filelock.c (Qmake_lock_file_name): Declare symbol.
(make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
work for interned symbols.
(lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
Remove MSDOS version of the function.
(Flock_file): Check create_lockfiles.
(Flock_buffer): Call Flock_file.

* src/lisp.h (lock_file): Remove.

* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.

* test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
globally.
(tramp-test39-lock-file): Check also for `set-visited-file-name'.
2021-07-09 18:14:19 +02:00
Michael Albinus
6d580b00e4 Some further adaptions wrt Tramp file name locks
* lisp/files.el (files--transform-file-name): Rename from
`auto-save--transform-file-name'.  Wrap with `save-match-data'.
(make-auto-save-file-name): Use it.
(make-lock-file-name): Use it.  Call file name handler.

* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Suppress file lock for temporary file.

* lisp/net/tramp-compat.el (tramp-compat-make-lock-file-name):
New defalias.

* lisp/net/tramp.el (tramp-get-lock-file)
(tramp-handle-lock-file, tramp-handle-unlock-file): Use it.
(tramp-make-lock-name): Remove.

* test/lisp/filenotify-tests.el (file-notify-test03-events-remote):
Tag it :unstable temporarily.
2021-07-08 07:48:40 +02:00
Lars Ingebrigtsen
2ad34bcea4 Add new user option lock-file-name-transforms
* doc/emacs/files.texi (Interlocking): Mention
lock-file-name-transforms.

* doc/lispref/files.texi (File Locks): Document
lock-file-name-transforms.

* doc/misc/efaq.texi (Not writing files to the current directory):
Mention all the three variables needed to not having Emacs writing
files to the current directory in one place.

* lisp/files.el (lock-file-name-transforms): New user option (bug#49261).
(make-auto-save-file-name): Factor out the main logic...
(auto-save--transform-file-name): ... to this new function.
(make-lock-file-name): New function that also calls the
factored-out function.

* src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name.
(make_lock_file_name): New utility function that calls out to Lisp
to heed `lock-file-name-transforms'.
(lock_file): Use it.  Also remove likely buggy call to
dostounix_filename.
(unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.
2021-07-07 21:39:20 +02:00
Michael Albinus
d35868bec9 Implement file locks for remote files (Bug#49261)
* doc/lispref/files.texi (Magic File Names): Add file-locked-p,
lock-file and unlock-file.

* etc/NEWS: Tramp supports file locks now.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-adb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): New defun.

* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
(tramp-fuse-unmount): New defun.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sh-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-smb-handle-copy-directory): Use `sleep-for'.
(tramp-smb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sshfs-handle-write-region): Handle LOCKNAME.
(tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sudoedit-maybe-open-connection):
Set "lock-pid" connection property.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
(tramp-handle-file-locked-p, tramp-handle-lock-file)
(tramp-handle-unlock-file): New defuns.
(tramp-lock-file-contents-regexp): New regexp.
(tramp-handle-write-region): Handle LOCKNAME.

* src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
Call handler if exists.
(Flock_file, Funlock_file): New defuns.
(Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
(Slock_file, Sunlock_file): Declare subroutines.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test40-make-nearby-temp-file)
(tramp-archive-test43-file-system-info): Rename.

* test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
(tramp--test-fuse-p): New defun.
(tramp-test14-delete-directory): Use it.
(tramp-test39-lock-file): New test.
(tramp-test40-make-nearby-temp-file)
(tramp-test41-special-characters)
(tramp-test41-special-characters-with-stat)
(tramp-test41-special-characters-with-perl)
(tramp-test41-special-characters-with-ls, tramp-test42-utf8)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
(tramp-test44-asynchronous-requests, tramp-test45-auto-load)
(tramp-test45-delay-load, tramp-test45-recursive-load)
(tramp-test45-remote-load-path, tramp-test46-unload): Rename.
(tramp--test-special-characters, tramp--test-utf8)
(tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 18:36:53 +02:00
Philipp Stephani
f2896fdb6a ; * test/lisp/subr-tests.el (subr-tests-add-hook-depth): Fix a typo. 2021-07-05 20:34:55 +02:00
Lars Ingebrigtsen
a111978de8 Count zero-length matches in `count-matches' correctly
* lisp/replace.el (how-many): Count zero-length matches correctly
(bug#27359).
2021-07-05 16:30:43 +02:00
Michael Albinus
579b0c006e Don't use LOCKNAME for temp files in Tramp (Bug#49406)
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Don't use LOCKNAME for temp file.  (Bug#49406)

* test/lisp/shadowfile-tests.el (password-cache-expiry):
Set `shadow-debug' also on emba.
2021-07-05 12:09:28 +02:00
Michael Albinus
ddf6226350 Fix newly introduced error in tramp-tests.el (Bug#49406)
* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Filter out empty strings.  (Bug#49406)
2021-07-05 10:24:31 +02:00
Tino Calancha
9eadcfdfe6 lisp/auth-source-pass.el: Keep legitimate spaces inside data
Users should be able to store a field as follows:
message: remember: Destroy the image and you will break the enemy

and later, recover the message untouched, i.e.:
"remember: Destroy the image and you will break the enemy"

* lisp/auth-source-pass.el (auth-source-pass--parse-data): Preserve
inner spaces at data.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-parse-with-colons-in-data): Add test.
2021-07-02 12:53:35 +02:00
Iku Iwasa
b09ee14062 lisp/auth-source-pass.el: Support multiple hosts in search spec
* lisp/auth-source-pass.el (auth-source-pass-search): Accept a list of
strings for argument HOST.
(auth-source-pass--build-result): Rename argument HOST to HOSTS. Also
return value "host" from entry if it exists.
(auth-source-pass--find-match): Rename argument HOST to HOSTS. Iterate
over each host in HOSTS.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests
2021-07-02 12:53:35 +02:00
Michael Albinus
527bab054f Handle test environment variables
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Check also for EMACS_EMBA_CI.

* test/README (SELECTOR): Mention EMACS_TEST_VERBOSE.

* test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_VERBOSE.
2021-07-01 13:43:44 +02:00