Commit graph

4332 commits

Author SHA1 Message Date
Michael Albinus
c8d4af8637 Support remote file names in `browse-url-of-buffer'
* lisp/net/browse-url.el (browse-url-of-buffer): Use temporary
file in case of remote `file-name'.  (Bug#48397)
2021-06-07 13:45:38 +02:00
Michael Albinus
218d2d1509 * lisp/net/tramp.el (tramp-error): Make it a defun. 2021-06-06 08:38:40 +02:00
Tassilo Horn
a488716961 Allow opening buttonized URL with secondary browser in rcirc
* lisp/net/browse-url.el (browse-url-button-open-url): Add autoload
cookie.
* lisp/net/rcirc.el (rcirc-markup-urls): Use
`browse-url-button-open-url' instead of just `browse-url' in order to
be able to use the secondary browser by giving a prefix arg.
2021-06-02 23:04:51 +02:00
Lars Ingebrigtsen
85e17196fa Add a new command `mailcap-view-file'
* doc/misc/emacs-mime.texi (mailcap): Document it (bug#12972).

* lisp/net/mailcap.el (mailcap-view-file): New command.
2021-06-01 08:55:06 +02:00
Alex Bochannek
0eef929cbf Mention the -e switch in an ange-ftp doc string
* lisp/net/ange-ftp.el (ange-ftp-ftp-program-args): Mention the -e
switch (bug#48494).
2021-05-28 01:24:37 +02:00
Michael Albinus
fc87cdf959 Adapt tramp-archive-autoload-file-name-handler
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Bind `default-directory' to safe value.
2021-05-23 12:34:36 +02:00
Michael Albinus
4db69b32b8 Fix bug#48476
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
Add implementation.

* lisp/net/tramp-integration.el (tramp-rename-files)
(tramp-rename-these-files): Declare them.

* lisp/net/tramp.el (tramp-autoload-file-name-handler):
Load tramp-archive.el if needed.  (Bug#48476)

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load):
Extend test.

Use #' syntax for function symbols.
2021-05-22 17:51:07 +02:00
Stefan Monnier
25bb250e29 * lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures 2021-05-18 19:23:54 -04:00
Stefan Monnier
26041ec8d5 * lisp/net/shr.el (shr-image-displayer): Use proper closures 2021-05-18 19:15:04 -04:00
Stefan Monnier
5e7b57ad8f * lisp/net/imap.el (imap-mailbox-close): Use proper closures
Also, remove redundant `:group` args, and prefer #' to quote function names
2021-05-18 19:12:11 -04:00
Stefan Monnier
db8266b0b2 * lisp/net/eudc.el (eudc-menu): Use proper closures 2021-05-18 19:06:54 -04:00
Stefan Monnier
e61bb6f6fe * lisp/net/browse-url.el: Avoid `(lambda ..)
(browse-url-netscape, browse-url-mozilla, browse-url-galeon)
(browse-url-epiphany, browse-url-elinks): Use proper closures.
2021-05-18 19:05:29 -04:00
Michael Albinus
4f510f63a8 Fix handling of stderr buffer in Tramp's make-process (Bug#47861)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Reimplement stderr buffer handling.  (Bug#47861)
(tramp-maybe-open-connection): Improve traces.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process):
Rework for stderr buffer.
2021-05-16 12:08:09 +02:00
Eli Zaretskii
248ec838aa Fix launching net-utils on MS-Windows
* lisp/net/net-utils.el (net-utils-run-simple): Bind
coding-system-for-read around the code which starts the process.
(Bug#48375)
2021-05-15 12:38:01 +03:00
Daniel Semyonov
b00796ee36 Mairix: use 'mairix-search-options' as documented
* lisp/net/mairix.el (mairix-call-mairix): Append
'mairix-search-options' to the arguments passed to mairix.

Copyright-paperwork-exempt: yes
2021-05-15 11:12:00 +03:00
Daniel Semyonov
b1ac6797c5 Mairix: autoload main interactive functions
* lisp/net/mairix.el (mairix-search, mairix-use-saved-search)
(mairix-edit-saved-searches-customize, mairix-search-from-this-article)
(mairix-search-thread-this-article, mairix-widget-search-based-on-article)
(mairix-edit-saved-searches, mairix-widget-search, mairix-update-database):
Add magic autoload comment.

Copyright-paperwork-exempt: yes
2021-05-15 11:11:49 +03:00
Michael Albinus
c9773379c1 Improve Tramp traces
* lisp/net/tramp-cmds.el (tramp-list-tramp-buffers):
List also trace buffers.

* lisp/net/tramp.el (tramp-buffer-name):
Add `tramp-suppress-trace' property.
(tramp-get-debug-file-name): Fix docstring.
(tramp-trace-buffer-name): New defun.
(tramp-trace-functions): New defvar.
(tramp-debug-message): Obey also `tramp-trace-functions'.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Handle trace buffer accordingly.
2021-05-13 16:46:17 +02:00
Michael Albinus
515cac0dc0 Cleanups for Tramp out-of-band methods on MS Windows
* doc/misc/tramp.texi (Frequently Asked Questions):
tramp-use-ssh-controlmaster-options is nil on MS Windows.

* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
change, it worked (not as expected but) properly.

* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Don't skip on MS Windows.
(tramp--test-windows-nt-and-scp-p): Remove.
(tramp--test-special-characters): Skip for out-of-band methods on
MS Windows, sometimes.
2021-05-09 15:37:37 +02:00
Michael Albinus
9457d4f20f Tramp: Fix file name quoting on MS Windows
* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
Use `tramp-unquote-shell-quote-argument'.

* lisp/net/tramp.el (tramp-unquote-shell-quote-argument):
Adapt for MS Windows.

* test/lisp/net/tramp-tests.el (tramp--test-special-characters):
Adapt for MS Windows.
2021-05-07 17:25:49 +02:00
Michael Albinus
f50577ea07 Fix some annoyances wrt file-name-non-special
* lisp/files.el (file-name-non-special): Do not expand `file-truename'.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use local `default-directory' for `start-process'.
2021-05-07 14:31:17 +02:00
Michael Albinus
70bfcbcdd3 Tune Tramp traces
* doc/misc/tramp.texi (Traces and Profiles): Describe call traces.

* lisp/net/tramp-compat.el: Add `tramp-suppress-trace' property for all
functions.

* lisp/net/tramp.el (tramp-verbose): Adapt docstring.
(tramp-file-name-method, tramp-file-name-user)
(tramp-file-name-domain, tramp-file-name-host)
(tramp-file-name-port, tramp-file-name-localname)
(tramp-file-name-hop, tramp-file-name-user-domain)
(tramp-file-name-host-port, tramp-file-name-port-or-default)
(tramp-tramp-file-p, tramp-find-method, tramp-find-user)
(tramp-find-host, tramp-dissect-file-name)
(tramp-dissect-hop-name, tramp-debug-buffer-name)
(tramp-debug-outline-level, tramp-get-debug-buffer)
(tramp-get-debug-file-name, tramp-read-passwd)
(tramp-clear-passwd): Add `tramp-suppress-trace' property.
(tramp-debug-message): Activate call traces.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Simplify.
2021-05-07 13:04:28 +02:00
Michael Albinus
b6f5da3240 In Tramp, use scp "-T" argument if available
* lisp/net/tramp-sh.el (tramp-scp-strict-file-name-checking): New defvar.
(tramp-scp-strict-file-name-checking): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Use it.
(tramp-methods) <scp, scpx>: Use "%x".
(tramp-make-copy-program-file-name): Use local quoting.
(tramp-sh-handle-make-process): Don't call
`tramp-maybe-open-connection', this happens implicitly by
`tramp-send-command'.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.

* test/lisp/net/tramp-tests.el (tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls): Don't skip for
`tramp--test-windows-nt-and-scp-p'.
2021-05-06 17:15:30 +02:00
Mattias Engdegård
12bab20920 Tidy file-matching regexps and remove some ineffective backslashes
* lisp/emacs-lisp/package.el (package--delete-directory):
* lisp/net/tramp-cmds.el (tramp-recompile-elpa):
Escape dot; replace $ with \'.
* lisp/help.el (help-for-help):
* lisp/transient.el (transient-font-lock-keywords):
Remove useless backslashes.
2021-05-06 15:53:48 +02:00
Michael Albinus
a8aa217bff Some Tramp corrections, Bug#48067
* doc/misc/tramp.texi (Frequently Asked Questions): Rephrase GNU
ELPA warnings.

* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
Improve handling of gio warning.  (Bug#48067)
2021-04-29 15:04:51 +02:00
Michael Albinus
cccdea7e23 Tramp code cleanup
* lisp/net/tramp-archive.el (tramp-archive-handle-insert-file-contents):
Code cleanup.

* lisp/net/tramp.el: Reload `tramp-compat' when we reload
`tramp-autoloads'.
(with-tramp-file-property, with-tramp-connection-property):
Use `tramp-cache-undefined'.
(tramp-autoload-file-name-handler): Do not load tramp-compat.el.
(tramp-handle-insert-file-contents): Code cleanup.
2021-04-28 22:00:55 +02:00
Michael Albinus
0c7f1e2e42 Fix gio warning in Tramp
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
Improve handling of gio warning.  (Bug#48067)
2021-04-28 19:29:36 +02:00
Michael Albinus
1ee62ac5bd Fix loading problem in Tramp
* lisp/net/tramp.el (tramp-autoload-file-name-handler): Load also
tramp-compat.el.
2021-04-27 20:56:07 +02:00
Dario Gjorgjevski
a9560a2b51 Fix typo in tramp-get-remote-gid
* lisp/net/tramp.el (tramp-get-remote-gid): Pass the correct
operation to find-file-name-handler.  (Bug#48026)
2021-04-26 09:57:23 +02:00
Michael Albinus
5d287b4605 * lisp/net/tramp-cmds.el (tramp-recompile-elpa-command-completion-p):
Check, whether Tramp has a package description.
2021-04-23 19:57:50 +02:00
Michael Albinus
4da7b2dfee Fix localization problem in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use localized
quotation characters for check.
2021-04-20 13:35:26 +02:00
Stefan Kangas
0a4dc70830 ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
Michael Albinus
518312346d Add Tramp recompilation
* doc/misc/tramp.texi (Frequently Asked Questions): Refer to GNU
ELPA Tramp README.

* lisp/net/tramp-cmds.el (tramp-recompile-elpa-command-completion-p)
(tramp-recompile-elpa): New defuns.  Add property `completion-predicate'.
2021-04-19 11:52:48 +02:00
Philip K
869e437c10 Don't hard-code "~/.emacs.d/" in rcirc.el
* lisp/net/rcirc.el (rcirc-log-directory): Use
locate-user-emacs-file.  (Bug#47880)
2021-04-19 09:30:58 +02:00
Michael Albinus
3430c12154 Make stderr in Tramp's make-process more robust
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Wrap about
error in inserting stderr file.

* lisp/net/tramp.el (tramp-handle-make-process): Fix docstring.
2021-04-17 16:39:14 +02:00
Stefan Kangas
289ec2d911 ; Remove some useless comments 2021-04-16 14:54:02 +02:00
Michael Albinus
8aaf13eae6 Rearrange argument handling in Tramp scp calls.
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use `start-process' instead of `start-process-shell-command'.
(tramp-make-copy-program-file-name): Do not quote `localname'.

* test/lisp/net/tramp-tests.el (tramp-method-out-of-band-p): Declare.
(tramp--test-windows-nt-and-batch-p)
(tramp--test-windows-nt-and-pscp-psftp-p): Remove, and also all callees.
(tramp--test-windows-nt-and-out-of-band-p)
(tramp--test-windows-nt-and-scp-p): New defuns.
(tramp-test17-dired-with-wildcards)
(tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls, tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Use them.
2021-04-14 13:25:36 +02:00
Ralph Schleicher
9dc28e1fca Add command in eww to toggle images
* lisp/net/eww.el (eww-toggle-images): New function.
(eww-mode-map): Add key binding and menu entry.
* lisp/net/shr.el (shr-inhibit-images): Make it customizable.
* doc/misc/eww.texi (Basics): Document eww-toggle-images.
Fix index entries for shr-use-fonts and shr-use-colors.
(Advanced): Document shr-inhibit-images
(bug#47705).
2021-04-12 10:31:46 +02:00
Stefan Monnier
c45bfd3c4a * lisp/**/*.el: Avoid positional args to define-minor-mode
Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to
replace its old positional arguments.  Let's make sure we don't use
the old-style any more.

* lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/textmodes/tildify.el (tildify-mode):
* lisp/textmodes/sgml-mode.el (html-autoview-mode):
* lisp/textmodes/rst.el (rst-minor-mode):
* lisp/textmodes/remember.el (remember-notes-mode):
* lisp/textmodes/ispell.el (ispell-minor-mode):
* lisp/tar-mode.el (tar-subfile-mode):
* lisp/strokes.el (strokes-mode):
* lisp/so-long.el (so-long-minor-mode):
* lisp/shell.el (shell-dirtrack-mode):
* lisp/scroll-all.el (scroll-all-mode):
* lisp/ruler-mode.el (ruler-mode):
* lisp/rect.el (rectangle-mark-mode):
* lisp/progmodes/sh-script.el (sh-electric-here-document-mode):
* lisp/outline.el (outline-minor-mode):
* lisp/org/org.el (org-cdlatex-mode):
* lisp/org/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org/org-src.el (org-src-mode):
* lisp/org/org-list.el (org-list-checkbox-radio-mode):
* lisp/org/org-indent.el (org-indent-mode):
* lisp/org/org-capture.el (org-capture-mode):
* lisp/obsolete/pc-select.el (pc-selection-mode):
* lisp/obsolete/iswitchb.el (iswitchb-mode):
* lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode)
(rcirc-track-minor-mode):
* lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode):
* lisp/image-mode.el (image-minor-mode):
* lisp/ibuf-ext.el (ibuffer-auto-mode):
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode):
* lisp/font-core.el (font-lock-mode):
* lisp/erc/erc.el (define-erc-module):
* lisp/erc/erc-track.el (erc-track-minor-mode):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/epa-mail.el (epa-mail-mode):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode):
* lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode):
* lisp/dired-aux.el (dired-isearch-filenames-mode):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode):
* lisp/autoarg.el (autoarg-mode, autoarg-kp-mode):
* lisp/vc/pcvs.el (cvs-minor-mode):
Avoid old-style positional args to `define-minor-mode`.
2021-04-11 23:47:14 -04:00
Eli Zaretskii
0f494760d3 ; * lisp/net/shr.el (shr-insert-document): Fix last change. 2021-04-11 09:35:09 +03:00
Stefan Monnier
d55d07af70 * lisp/net/shr.el (shr-insert-document): Explain why bidi-display-reordering 2021-04-10 20:06:35 -04:00
Michael Albinus
ca1ddef262 Tramp: fix location of files on W32
* lisp/net/tramp.el:
* lisp/net/tramp-sh.el: Use (eq system-type 'windows-nt) where appropriate.
(tramp-completion-function-alist-ssh): Fix location of files on W32.
2021-04-10 14:46:58 +02:00
Jim Porter
c975258abf Further fix of hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-simplified)
(tramp-completion-file-name-regexp-separate): Fix W32 hostname/method
completion for simplified and separate syntaxes (same as the previous change
to default syntax).

Copyright-paperwork-exempt: yes
2021-04-10 13:16:13 +02:00
Jim Porter
1d42f4800b Fix hostname completion on MS Windows
* lisp/net/tramp.el (tramp-completion-file-name-regexp-default):
Handle volume letter being added to paths for file name completion on W32
systems.  This fixes hostname (and method) autocomplete on W32.

Copyright-paperwork-exempt: yes
2021-04-09 09:57:06 +02:00
Michael Albinus
9e8ac1f5be Revert use of powershell in Tramp, there are collateral damages
* lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Fix quoting
for MS Windows.
(tramp-connection-properties): Don't set "encoding-shell".
(tramp-actions-before-shell): Remove `tramp-no-job-control-regexp'.
(tramp-maybe-open-connection): Revert changes for "encoding-shell".

* lisp/net/tramp.el (tramp-no-job-control-regexp): Remove.
2021-04-08 12:24:42 +02:00
Stefan Kangas
5d45613616 Update whois-server-tld
* lisp/net/net-utils.el (whois-server-tld): Update and add some
missing entries.
2021-04-07 14:33:10 +02:00
Michael Albinus
738266240d Fix Bug#47601 in Tramp
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Use `tramp-handle-file-newer-than-file-p'.  (Bug#47601)
(tramp-sh-handle-file-newer-than-file-p, tramp-run-test2): Remove.
2021-04-06 09:50:07 +02:00
Michael Albinus
14d295871a Use powershell for Tramp on MS Windows
* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Nil on MS Windows.
(tramp-connection-properties): Add "encoding-shell".
(tramp-maybe-open-connection): Use it.  Change exit handling.
(tramp-actions-before-shell): Add `tramp-no-job-control-regexp'.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-no-job-control-regexp): New defcustom.
(tramp-get-debug-buffer): Set coding system.
2021-04-05 19:37:30 +02:00
Stefan Kangas
1760029b09 Replace local intersection functions with seq-intersection
* lisp/doc-view.el (doc-view-intersection):
* lisp/gnus/gnus-range.el (gnus-intersection):
* lisp/htmlfontify.el (hfy-interq):
* lisp/loadhist.el (file-set-intersect):
* lisp/mail/smtpmail.el (smtpmail-intersection): Make obsolete in
favor of seq-intersection.  Update all callers.

* lisp/url/url-dav.el (url-intersection): Redefine as obsolete
function alias for seq-intersection.  Update callers.

* lisp/mpc.el (mpc-intersection, mpc-cmd-list, mpc-reorder):
Use seq-intersection.
2021-04-05 11:14:34 +02:00
Michael Albinus
4eca3bd8df * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Fix code finding //DIRED//.
2021-04-03 18:25:27 +02:00
Michael Albinus
860bc0db1c * test/lisp/filenotify-tests.el (file-notify--test-timeout): Change timing.
; * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
; Remove test message.
2021-04-03 12:26:14 +02:00