1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-04 20:27:45 +00:00

4105 Commits

Author SHA1 Message Date
Michael Albinus
34c17cd8d6 Implement Tramp direct async processes fallback for multi-hops
* doc/misc/tramp.texi (Remote processes): Precise restrictions for direct
async processes.

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-direct-async-process-p'.

* lisp/net/tramp.el (tramp-direct-async-process-p): New defun.
(tramp-handle-make-process): Adapt handling of :stderr.  Simplify.
2020-08-12 12:45:45 +02:00
Michael Albinus
119a9ecfe1 * lisp/net/tramp.el: Make last change backward compatible. 2020-08-11 16:46:41 +02:00
Glenn Morris
aaa7ce585e ; Copyright fix
Author has assignment on file
2020-08-10 12:28:27 +01:00
Tino Calancha
2ed502d2a7 Add constants for shell command output buffer names
Buffers `*Shell Command Output*' and `*Async Shell Command*'
have been around since a long time; used across several libraries,
they are de facto output buffers for shell commands.

* lisp/simple.el (shell-command-buffer-name)
(shell-command-buffer-name-async): New variables.
* lisp/dired-aux.el
* lisp/gnus/gnus-sum.el
* lisp/gnus/gnus-win.el
* lisp/ibuf-ext.el
* lisp/net/tramp.el: Use them.

* etc/NEWS (Changes in Emacs 28.1): Announce this change.

* doc/emacs/misc.texi (Single Shell)
* doc/misc/tramp.texi (Remote processes):
Update manual (bug#39138).
2020-08-09 14:18:09 +02:00
Lars Ingebrigtsen
54770707ad Add a command line (and MIME handler) function to start eww
* lisp/net/eww.el (eww-browse): New command (bug#42768) to be used
from the command line.

* doc/misc/eww.texi (Command Line): Document it.
2020-08-09 13:05:37 +02:00
Simen Heggestøyl
7196abecb5 Use lexical-binding in browse-url.el and add tests
* lisp/net/browse-url.el: Turn on lexical-binding.
(browse-url--mailto, browse-url--man, browse-url--browser): Use
imperative form in docstrings.
(browse-url-delete-temp-file): Turn comment into a proper docstring.

* test/lisp/net/browse-url-tests.el: New file with tests for
browse-url.el.
2020-08-07 17:37:06 +02:00
Stefan Kangas
3e39aa6cfa Remove support for Mosaic from browse-url
* lisp/net/browse-url.el (browse-url-mosaic-program)
(browse-url-mosaic-arguments, browse-url-mosaic-pidfile)
(browse-url-CCI-port, browse-url-CCI-host)
(browse-url-default-browser, browse-url-mosaic, browse-url-cci):
Remove support for the Mosaic browser, which saw its last release in
1997, or 23 years ago.

* etc/NEWS: Announce its removal.
2020-08-07 14:52:21 +02:00
Michael Albinus
83b1db043b Add Tramp support of direct asynchronous process invocation
* doc/misc/tramp.texi (Predefined connection information):
Add "direct-async-process".
(Remote processes): New subsection "Improving performance of
asynchronous remote processes".

* lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-login-program'
and `tramp-login-args'.
(tramp-adb-handle-make-process): Use `tramp-handle-make-process'.
(tramp-adb-maybe-open-connection): Add "set +o vi +o emacs" command.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-handle-make-process'.
(tramp-sh-file-name-handler-p, tramp-multi-hop-p): New defuns.
(tramp-compute-multi-hops): Use `tramp-multi-hop-p'.

* lisp/net/tramp.el (tramp-dissect-file-name, tramp-dissect-hop-name):
Use `tramp-multi-hop-p'.
(tramp-handle-insert-file-contents, tramp-local-host-p):
Use `tramp-sh-file-name-handler-p'.
(tramp-handle-make-process): New defun.

* test/README: Add another example how to use SELECTOR.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules):
Adapt test.
(tramp--test-sh-p): Use `tramp-sh-file-name-handler-p'.
2020-08-04 14:19:51 +02:00
Michael Albinus
dc8aa15472 Fix Tramp portability issues
* lisp/net/tramp-sh.el (tramp-set-remote-path): Replace "echo -n" by
"printf", it isn't portable.

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables)
(tramp-test33-environment-variables-and-port-numbers): Do not use
"echo -n", it isn't portable.
(tramp--test-utf8): Filter out not displayable characters.
2020-08-02 13:26:00 +02:00
Lars Ingebrigtsen
eab636c7eb Try to fix mailcap parsing again to respect Emacs defaults
* lisp/net/mailcap.el (mailcap--computed-mime-data): New variable.
(mailcap-parse-mailcaps): Don't delete Emacs-distributed fallback
values (bug#40247).
(mailcap-add-mailcap-entry): Extend to allow working on different
variables.
(mailcap-add): Store data in mailcap-user-mime-data, since it
should be heeded first.
2020-08-02 09:04:31 +02:00
Michael Albinus
b04d391d79 Implement alternative for Tramp's signal return string
* lisp/net/tramp-adb.el (process-file-return-signal-string): Declare.
(tramp-adb-get-signal-strings): New defun.
(tramp-adb-handle-process-file): Use it.

* lisp/net/tramp-sh.el (process-file-return-signal-string): Declare.
(tramp-sh-get-signal-strings): New defun.
(tramp-sh-handle-process-file): Use it.

* lisp/net/tramp.el (tramp-get-signal-strings): Remove function.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file):
Accept alternative signal return string.
2020-08-01 20:08:44 +02:00
Stefan Kangas
7899fa4309 Declare some ancient compat aliases obsolete (Bug#41328)
* lisp/comint.el (comint-read-noecho):
* lisp/emacs-lisp/edebug.el (edebug-all-defuns):
* lisp/man.el (manual-entry):
* lisp/vc/log-edit.el (vc-log-mode-map, vc-log-entry-mode): Declare
ancient backwards-compatibility aliases and functions obsolete.  The
oldest in this list was added in 1992, and the most recent in 2004.

* lisp/net/telnet.el (telnet-initial-filter): Don't use
`comint-read-noecho'.
2020-07-31 06:02:30 +02:00
Lars Ingebrigtsen
f7a916a618 Minor dns.el clean up
* lisp/net/dns.el (dns-query-asynchronous, dns-query): Adjust some
parameter names to not end with "p", as these are not predicates.
2020-07-31 04:24:49 +02:00
Michael Albinus
50ea5b871d Fix Tramp bug#42538
* lisp/net/tramp-sh.el (tramp-set-remote-path): Send the command
in several chunks if it is too large.  (Bug#42538)
2020-07-30 13:46:22 +02:00
Lars Ingebrigtsen
ef7f569cbd Add the new function dns-query-asynchronous
* lisp/net/dns.el (dns-query-asynchronous): New function.
(dns--lookup, dns--filter): New internal functions.
(dns-query): Reimplement on top of dns-query-asynchronous.
2020-07-30 05:32:16 +02:00
Lars Ingebrigtsen
789197049c Use lexical binding in dns.el
* lisp/net/dns.el: Use lexical-binding.
(dns-write-bytes, dns-read): Adjust for lexical-binding.
2020-07-30 05:32:16 +02:00
Lars Ingebrigtsen
18a5e52eed Small dns.el code cleanup
* lisp/net/dns.el (dns-query): Clean up code slightly by removing
a macro and moving the code into the function itself.
2020-07-30 05:32:16 +02:00
Lars Ingebrigtsen
76f71e39f5 Make eww use the XDG download directory
* lisp/net/eww.el (erc--download-directory): New function (bug#41030).
(eww-download-directory): Use it.
(eww-download): Use it.
(eww-download-callback): Adjust parameters.
2020-07-29 07:13:56 +02:00
Michael Albinus
1b2fed81e1 Apply simpler fix for Tramp bug#39399
* lisp/net/tramp-sh.el (tramp-open-shell): Remove "~/.editrc" editing.
(tramp-open-connection-setup-interactive-shell): Move up "set +o
vi +o emacs" command.   (Bug#39399)
2020-07-28 09:21:01 +02:00
Glenn Morris
fe2d0ede28 Merge from origin/emacs-27
cd93debc60 (origin/emacs-27) Merge branch 'emacs-27' of git.savannah....
2c0c613ec5 Document prefix arg effects for 'epa-mail-{sign,encrypt}'
551123e0b2 * etc/NEWS: Correct description of :client-certificate change
05c4329cf5 Revert "Fix filename completion in shell mode buffers"
de68572742 Improve documentation of 'bookmark-bmenu-mode'
fd85e70be7 Update systems using GnuTLS certificate files
0d4ba1c2b2 Improve documentation of 'kill-emacs'
b3bbd4fd00 Improve documentation of 'display-raw-bytes-as-hex'
f50d79af6b Correct descriptions of init file
e325d2638c Fix interrupt-process on MS-Windows
d24e56a5e4 Revert "* doc/misc/flymake.texi (An annotated example back...

# Conflicts:
#	etc/NEWS
2020-07-20 07:50:44 -07:00
Michael Albinus
0cbafc236b Fix problem with Tramp progress reporter
* lisp/net/tramp.el (with-tramp-progress-reporter): Do not span a
new progress reporter if there's already another one.
2020-07-20 16:29:38 +02:00
Michael Albinus
13ca719a68 * lisp/net/tramp-adb.el (tramp-adb-prompt): Further simplification.
Suggested by Mattias Engdegård <mattiase@acm.org>.
2020-07-19 19:34:16 +02:00
Lars Ingebrigtsen
17f646128f Allow open-network-stream to use different TLS capability commands
* doc/lispref/processes.texi (Network): Document non-string
capability command.
* lisp/gnus/nntp.el (nntp-open-connection): Use HELP for Typhoon
and CAPABILITIES for everything else (bug#41960).

* lisp/net/network-stream.el (open-network-stream): Document
function variety of :capability-command.
(network-stream-open-starttls): Use it.
(network-stream-open-tls): Ditto.
(network-stream-open-shell): Ditto.
(network-stream--capability-command): New helper function.
2020-07-19 02:56:40 +02:00
Lars Ingebrigtsen
c45c1e8c43 Make eww-open-file work with Tramp file names
* lisp/net/eww.el (eww-open-file): Allow opening non-local Tramp
files (bug#40425).
(eww): Adjust calling convention to allow passing in data directly
via a buffer.
2020-07-18 18:02:43 +02:00
Eli Zaretskii
58c7dc69db Fix documentation of a recent change in shr.el
* lisp/net/shr.el (shr-max-width, shr-width): Fix typo and wording
of the doc strings.

* etc/NEWS: Fix the wording of the 'shr-max-width's entry, and
move it to the SHR section.
2020-07-18 17:40:44 +03:00
Eli Zaretskii
fd85e70be7 Update systems using GnuTLS certificate files
* lisp/net/gnutls.el (gnutls-trustfiles): Update the names of the
systems in the comments.  Reported by Richard Stallman <rms@gnu.org>
in
https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00455.html.
2020-07-18 10:02:28 +03:00
Xu Chunyang
92609aad38 Fix <textarea> default texts in eww
* lisp/net/eww.el (eww-tag-textarea): <textarea> default text
comes from the contents, not a value attribute (bug#39867).
2020-07-17 16:43:57 +02:00
Lars Ingebrigtsen
02bad11288 Add support for a shr-max-width variable
* doc/misc/eww.texi (Advanced): Document it.

* lisp/net/shr.el (shr-max-width): Add new variable (bug#40909).
(shr-insert-document): Use it.
2020-07-17 15:45:04 +02:00
Lars Ingebrigtsen
c7b112b13f Clarify shr width computation
* lisp/net/shr.el (shr-insert-document): Clarify width
computation: shr-width was checked again in the `else' part where
we already knew it was nil.
2020-07-17 15:30:29 +02:00
Basil L. Contovounesios
bcb58180c7 ; Simplify last change in shr.el
* lisp/net/shr.el (shr-max-columns): Simplify some function calls.
2020-07-17 12:04:09 +01:00
Stefan Kangas
3cf9176d9d Show eww bookmarks buffer only if it's not empty
* lisp/net/eww.el (eww-list-bookmarks): Don't show buffer if there
are no bookmarks.  (Bug#41385)
(eww-bookmark-prepare): Move signalling an error if there are no
bookmarks from here...
(eww-read-bookmarks): ...to here.  Add new argument `error-out' to
control this.
(eww-next-bookmark, eww-previous-bookmark): Call
`eww-read-bookmarks'.
2020-07-17 03:23:15 +02:00
Lars Ingebrigtsen
510da73b4a Fix problems with not rendering shr tables with rowspan
* lisp/net/shr.el (shr-max-columns): When rowspans were in effect,
columns would go missing from subsequent lines (bug#42194).
2020-07-17 03:13:05 +02:00
Michael Albinus
7ee32966a9 More Tramp code cleanup
* lisp/net/tramp.el (tramp-process-actions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info)
(tramp-adb-handle-set-file-times)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files)
(tramp-reporter-dump-variable):
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-stat)
(tramp-sh-handle-file-selinux-context)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-write-region)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-sh-handle-file-system-info, tramp-find-executable)
(tramp-open-shell, tramp-find-shell):
* lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat)
(tramp-smb-handle-file-system-info):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context)
(tramp-sudoedit-handle-file-system-info): Remove superfluous
`eval-when-compile', `concat' creates the string during byte
compilation.  Reported by Mattias Engdegård <mattiase@acm.org>.

* lisp/net/tramp-adb.el (tramp-adb-prompt): Simplify.
(tramp-adb-send-command):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-string-to-byte-array):
Use `string-match-p'.

* lisp/net/tramp-sh.el (tramp-sunos-unames): New defconst.
(tramp-find-executable, tramp-find-shell, tramp-get-remote-stat): Use it.
2020-07-12 15:02:56 +02:00
Michael Albinus
af4f3a873f Fix multibyte chars of file names in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-execute-adb-command): Revert return
value meaning.  Insert the result into the connection buffer.
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-copy-file)
(tramp-adb-get-device): Adapt calls.
(tramp-adb-send-command): Use "adb shell ..." in case the command
contains multibyte chars.

* test/lisp/net/tramp-tests.el (tramp--test-utf8): Extend test.
2020-07-11 14:46:18 +02:00
Michael Albinus
7caf570662 Tramp code cleanup
* lisp/net/tramp.el (tramp-shell-prompt-pattern)
(tramp-wrong-passwd-regexp, tramp-method-regexp-alist)
(tramp-domain-regexp, tramp-host-regexp, tramp-ipv6-regexp)
(tramp-port-regexp, tramp-debug-outline-regexp)
(tramp-drop-volume-letter, tramp-parse-shostkeys)
(tramp-handle-file-name-case-insensitive-p):
* lisp/net/tramp-adb.el (tramp-adb-send-command-and-check):
* lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp):
* lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter):
* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp)
(tramp-device-escape-sequence-regexp):
* lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat)
(tramp-smb-handle-set-file-acl, tramp-smb-read-file-entry):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context):
Use character classes in regexp.

* lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp)
(tramp-adb-ls-date-time-regexp): New defconst.
(tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp)
(tramp-adb-sh-fix-ls-output): Use them.
(tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection):
Apply `eval-when-compile' on constant concat data.
(tramp-do-parse-file-attributes-with-ls):
Suppress `signal-hook-function'.
(tramp-adb--gnu-switches-to-ash): Remove unused function.
(tramp-adb-handle-set-file-modes): Qhote argument.
(tramp-adb-maybe-open-connection): Set file property rather than flush.

* lisp/net/tramp-cmds.el (tramp-rename-these-files):
Apply `eval-when-compile' on constant concat data.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes)
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in
`eval-and-compile'.
(tramp-gvfs-get-directory-attributes): Apply `eval-when-compile'
on constant concat data.
2020-07-10 10:45:14 +02:00
Alexander Adolf
814e3b0b17 EUDC: Add macOS Contacts backend
* lisp/net/eudcb-macos-contacts.el: New file.
* doc/misc/eudc.texi (macOS Contacts): New section.
(macOS Contacts Configuration): Likewise.
* etc/NEWS: Mention new macOS Contacts backend.
2020-07-09 15:32:14 -04:00
Michael Albinus
35e881c530 Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-directory-files):
Use `directory-file-name'.

* test/lisp/net/tramp-tests.el (trace): Require it.
(tramp--test-instrument-test-case): Print also function traces.
(tramp--test-smb-p): New defun.
(tramp-test03-file-name-method-rules)
(tramp-test05-expand-file-name-relative)
(tramp-test21-file-links, tramp--test-windows-nt-or-smb-p)
(tramp--test-check-files): Use it.
2020-06-23 21:18:08 +02:00
Michael Albinus
f18b035763 Fix remaining problems with tramp-crypt.el
* lisp/net/tramp-compat.el (tramp-compat-make-temp-file):
Simplify implementation.

* lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-file)
(tramp-crypt-handle-file-attributes, tramp-crypt-handle-file-system-info)
(tramp-crypt-handle-make-directory): Let-bind `tramp-crypt-enabled' to nil.

* lisp/net/tramp.el (tramp-file-name-for-operation): Fix for operations
with two arguments.
(tramp-handle-load): Suppress `signal-hook-function' when NOERROR
is non-nil.

* test/lisp/net/tramp-tests.el (tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Skip if needed.
2020-06-21 15:19:51 +02:00
Michael Albinus
3e7499c838 Fix various problems in Tramp
* lisp/net/tramp-compat.el (tramp-temp-name-prefix): Declare.
(tramp-compat-make-temp-name):
* lisp/net/tramp.el (tramp-make-tramp-temp-name): New defuns.

* lisp/net/tramp.el (tramp-make-tramp-temp-file):
* lisp/net/tramp-sh.el (tramp-find-inline-encoding)
(tramp-maybe-open-connection, tramp-get-remote-touch)
(tramp-get-remote-chmod-h):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory): Use them.

* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-stat):
Simplify shell command.  Suppress errors (interpret as nil).
(tramp-sh-handle-make-process): Do not visit with
`insert-file-contents'.  Delete tmp file only if exists.
(tramp-send-command-and-read): Suppress `signal-hook-function'
when reading expression.
2020-06-19 15:12:31 +02:00
Michael Albinus
70ac80d756 Fix newly introduced errors in Tramp
* lisp/net/tramp-gvfs.el (tramp-gvfs-unload-hook):
Remove `tramp-gvfs-dbus-event-error' from `dbus-event-error-functions'.

* lisp/net/tramp.el (tramp-autoload-file-name-handler): Revert patch.
2020-06-19 09:24:27 +02:00
Michael Albinus
7a37460f92 Some Tramp cleanups, mainly in tramp-crypt.el
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `add-name-to-file', `make-directory-internal',
`make-nearby-temp-file', `temporary-file-directory' and
`unhandled-file-name-directory'.
(tramp-crypt-file-name-for-operation):
Use `tramp-compat-temporary-file-directory'.
(tramp-crypt-do-encrypt-or-decrypt-file-name)
(tramp-crypt-do-encrypt-or-decrypt-file): Fix syntax error in
`tramp-error'.

* lisp/net/tramp.el (tramp-autoload-file-name-handler):
* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p)
(tramp-rclone-flush-directory-cache):
Use `tramp-compat-temporary-file-directory'.
2020-06-18 20:00:26 +02:00
Basil L. Contovounesios
3dd6b23cdf Propertize all shr fragment IDs as shr-target-id
* lisp/net/shr.el (shr-target-id): Add docstring.
(shr-descend, shr-tag-a): Display dummy anchor characters as the
empty string.  Give all relevant 'id' or 'name' fragment identifier
attributes the shr-target-id text property.  This ensures that
cached content, such as tables, retains the property across
renders.  (Bug#40532)

* lisp/net/eww.el: (eww-display-html): Adapt shr-target-id property
search accordingly.
2020-06-18 16:16:49 +01:00
Basil L. Contovounesios
0185d76e74 Fix and extend format-spec (bug#41758)
* lisp/format-spec.el: Use lexical-binding.  Remove dependence on
subr-x.el.
(format-spec-make): Clarify docstring.
(format-spec--parse-modifiers): Rename to...
(format-spec--parse-flags): ...this and simplify.  In particular,
don't bother parsing :space-pad which is redundant and unused.
(format-spec--pad): Remove, replacing with...
(format-spec--do-flags): ...this new helper function which performs
more of format-spec's supported text manipulation.
(format-spec): Autoload.  Allow optional argument to take on special
values 'ignore' and 'delete' for more control over what happens when
a replacement for a format specification isn't provided.  Bring back
proper support for a precision modifier similar to that of 'format'.

* lisp/battery.el (battery-format): Rewrite in terms of format-spec.
(battery-echo-area-format, battery-mode-line-format): Mention
support of format-spec syntax in docstrings.

* doc/lispref/strings.texi (Custom Format Strings):
* etc/NEWS: Document and announce these changes.

* lisp/dired-aux.el (dired-do-compress-to):
* lisp/erc/erc-match.el (erc-log-matches):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/gnus/gnus-sieve.el (gnus-sieve-update):
* lisp/gnus/gssapi.el (open-gssapi-stream):
* lisp/gnus/mail-source.el (mail-source-fetch-file)
(mail-source-fetch-directory, mail-source-fetch-pop)
(mail-source-fetch-imap):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/image-dired.el:
* lisp/net/eww.el:
* lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
(imap-shell-open):
* lisp/net/network-stream.el (network-stream-open-shell):
* lisp/obsolete/tls.el (open-tls-stream):
* lisp/textmodes/tex-mode.el:
Remove extraneous loads and autoloads of format-spec now that it is
autoloaded and simplify its uses where possible.

* test/lisp/battery-tests.el (battery-format): Test new format-spec
support.
* test/lisp/format-spec-tests.el (test-format-spec): Rename to...
(format-spec) ...this, extending test cases.
(test-format-unknown): Rename to...
(format-spec-unknown): ...this, extending test cases.
(test-format-modifiers): Rename to...
(format-spec-flags): ...this.
(format-spec-make, format-spec-parse-flags, format-spec-do-flags)
(format-spec-do-flags-truncate, format-spec-do-flags-pad)
(format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
2020-06-18 12:46:21 +01:00
Basil L. Contovounesios
97d1f672ac Various dbus.el cleanups (bug#41744)
* etc/NEWS: Announce removal of aliases obsolete since Emacs 24.3.

* lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el.  Quote
function symbols as such.
(dbus-ignore-errors): Don't add macro name to font-lock keywords, as
emacs-lisp-mode now dynamically fontifies new macro definitions.
(dbus-event-error-hooks, dbus-call-method-non-blocking): Remove
aliases obsolete since Emacs 24.3.
(dbus-register-signal, dbus-escape-as-identifier): Simplify.  Use
regexp \` and \' in place of ^ and $.
(dbus--parse-xml-buffer): New function for libxml2 compatibility.
(dbus-introspect-xml): Use it.

(dbus-string-to-byte-array, dbus-byte-array-to-string)
(dbus-unescape-from-identifier, dbus-list-known-names)
(dbus-introspect-get-all-nodes, dbus-get-all-properties)
(dbus-get-all-managed-objects): Simplify.

(dbus--introspect-names, dbus--introspect-name): New convenience
functions.
(dbus-introspect-get-node-names)
(dbus-introspect-get-interface-names)
(dbus-introspect-get-interface, dbus-introspect-get-method-names)
(dbus-introspect-get-method, dbus-introspect-get-signal-names)
(dbus-introspect-get-signal, dbus-introspect-get-property-names)
(dbus-introspect-get-property)
(dbus-introspect-get-annotation-names)
(dbus-introspect-get-annotation)
(dbus-introspect-get-argument-names, dbus-introspect-get-argument):
Use them to DRY.

* test/lisp/net/dbus-tests.el (dbus-test-all): Quote function
symbols as such.
2020-06-18 12:20:48 +01:00
Glenn Morris
21b03faed4 Merge from origin/emacs-27
229995ba2c (origin/emacs-27) Fix some Texinfo markup
01e86b9fdf Fix recentf typo in Emacs manual
cd4f75bb86 Rename default function to next-error-buffer-unnavigated-c...
1dff0a8949 * lisp/image-mode.el (image-toggle-display-image): Fix fit...
a71d1787f1 * doc/misc/tramp.texi (Predefined connection information):...
079b0dc430 Delete, don't kill, dir dir fragments in icomplete-fido-ba...
6cdecc2659 Revert markup change in with-coding-priority docs
22f4fba8a9 * lisp/emulation/cua-rect.el (cua--rectangle-region-insert...
6b9eac6759 * lisp/simple.el (shell-command-on-region): Fix docstring.
43ad7dc1af Clean up D-Bus documentation (bug#41744)
c43e5ed60d * lisp/image-mode.el (image-transform-original): New comma...
6eb18a950d Move tab-bar and tab-line faces to faces.el (part of bug#4...

# Conflicts:
#	etc/NEWS
#	lisp/simple.el
2020-06-17 08:47:53 -07:00
Michael Albinus
4503dcf635 Fix some Tramp problems seen during tests
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `access-file'.
(tramp-crypt-file-name-for-operation): Rewrite.  Take second
argument into account.
(tramp-crypt-file-name-handler): Use it.
(tramp-crypt-send-command): Set buffer multibyte (but utf8 files
still don't work).
(tramp-crypt-handle-access-file): New defun.
(tramp-crypt-do-copy-or-rename-file): Short track if both files
are on a crypted remote dir.

* lisp/net/tramp.el (file-notify-rm-watch): Declare.
(tramp-inhibit-progress-reporter): New defvar.
(tramp-message): Display message only if not suppressed by
progress reporter.
(with-tramp-progress-reporter): Suppress concurrent progress
reporter messages.
(tramp-file-notify-process-sentinel): Simplify.
2020-06-15 16:24:22 +02:00
Michael Albinus
b3e7d046c3 Rearrange detecting remote uid and gid in Tramp
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-ownership-preserved-p'.
(tramp-crypt-add-directory): Check, that NAME is not quoted.
(tramp-crypt-handle-file-ownership-preserved-p): New defun.
(tramp-crypt-handle-insert-directory): Fix docstring.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'.
(tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Rename from
`tramp-gvfs-get-remote-{uid,gid}'.  Do not cache result.
(tramp-gvfs-maybe-open-connection): No special handling for remote
uid and gid.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid):
Rename from `tramp-get-remote-{uid,gid}'.  Do not cache result.
(tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP
when caching.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-sudoedit-handle-get-remote-uid)
(tramp-sudoedit-handle-get-remote-gid): Rename from
`tramp-sudoedit-get-remote-{uid,gid}'.  Do not cache result.
(tramp-sudoedit-handle-set-file-uid-gid)
(tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid'
and `tramp-get-remote-gid'.
(tramp-sudoedit-maybe-open-connection): No special handling for
remote uid and gid.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-handle-write-region, tramp-check-cached-permissions):
Call `tramp-get-remote-uid' and `tramp-get-remote-gid'.
(tramp-get-remote-uid, tramp-get-remote-gid): New defuns.
(tramp-local-host-p): Simplify `tramp-get-remote-uid' call.

* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards)
Skip if needed.
2020-06-14 15:31:17 +02:00
Michael Albinus
459bd56f46 Further fixes while testing tramp-crypt
* doc/misc/tramp.texi (External methods): Remove experimental note
for rclone.
(Keeping files encrypted): Mark file encryption as experimental.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-file-truename'.
(tramp-adb-handle-file-truename): Remove.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-writable-p'.
(tramp-crypt-send-command): Return t if no error.
(tramp-crypt-do-encrypt-or-decrypt-file-name)
(tramp-crypt-do-encrypt-or-decrypt-file): Raise an error if it fails.
(tramp-crypt-do-copy-or-rename-file): Flush file properties also
when copying a directory.
(tramp-crypt-handle-file-writable-p): New defun.
(tramp-crypt-handle-insert-directory): Check for library
`text-property-search'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-uid-gid):
Rename from `tramp-gvfs-set-file-uid-gid'.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Use `tramp-handle-file-truename' as fallback.

* lisp/net/tramp.el (tramp-handle-file-truename):
Let-bind `tramp-crypt-enabled' to nil.
(tramp-handle-write-region): Set also file ownership.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Skip if needed.
2020-06-12 20:17:02 +02:00
Michael Albinus
b19259c841 Futher tramp-crypt implementation and documentation
* doc/misc/tramp.texi (Top, Configuration): Insert section
`Keeping files encrypted' in menu.
(Keeping files encrypted): New node.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `tramp-set-file-uid-gid'.
(tramp-crypt-maybe-open-connection): Simplify.
(tramp-crypt-do-encrypt-or-decrypt-file): Use `binary' coding system.
(tramp-crypt-handle-set-file-uid-gid): New defun.

* test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents):
Adapt test.
2020-06-10 19:36:53 +02:00
Michael Albinus
4b21759b6f Continue implementation of tramp-crypt.el
* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file):
Add leading "/" to infile.
(tramp-crypt-add-directory): Fix docstring.  Expand NAME.
(tramp-crypt-remove-directory)
(tramp-crypt-handle-file-name-all-completions)
(tramp-crypt-handle-set-file-times): New defuns.
(tramp-crypt-handle-file-executable-p)
(tramp-crypt-handle-file-readable-p)
(tramp-crypt-handle-file-system-info)
(tramp-crypt-handle-set-file-modes): Fix implementation.

* test/lisp/net/tramp-tests.el: Adapt call convention
for (tramp--test-crypt-p).
2020-06-09 13:43:30 +02:00