commit 6a311d2072b8a4ea530d9a541e661a8ad11bb1d7 Author: Eli Zaretskii Date: Tue Jan 5 20:21:03 2016 +0200 Fix fallout from merging emacs-25 branch in test/ * .gitignore: Update for the new place of biditest.txt. * test/automated/: Directory removed. All files moved to their proper places. * test/etags/: Directory removed. All files moved to their proper places. * test/automated/url-parse-tests.el: File removed; it was an exact copy of the same file in test/lisp/url/. * test/automated/url-expand-tests.el: Moved to test/lisp/url/. diff --git a/.gitignore b/.gitignore index a8f0e9a..94c4ba8 100644 --- a/.gitignore +++ b/.gitignore @@ -152,7 +152,7 @@ src/*.map # Tests. test/indent/*.new -test/biditest.txt +test/manual/biditest.txt test/manual/etags/srclist test/manual/etags/regexfile test/manual/etags/ETAGS diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-aux.el b/test/automated/data/package/macro-problem-package-1.0/macro-aux.el deleted file mode 100644 index f432322..0000000 --- a/test/automated/data/package/macro-problem-package-1.0/macro-aux.el +++ /dev/null @@ -1,12 +0,0 @@ -;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- - -;; Author: Artur Malabarba - -;;; Code: - -(defun macro-aux-1 ( &rest forms) - "Description" - `(progn ,@forms)) - -(provide 'macro-aux) -;;; macro-aux.el ends here diff --git a/test/automated/data/package/macro-problem-package-1.0/macro-problem.el b/test/automated/data/package/macro-problem-package-1.0/macro-problem.el deleted file mode 100644 index 0533b1b..0000000 --- a/test/automated/data/package/macro-problem-package-1.0/macro-problem.el +++ /dev/null @@ -1,21 +0,0 @@ -;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- - -;; Author: Artur Malabarba -;; Keywords: tools -;; Version: 1.0 - -;;; Code: - -(require 'macro-aux) - -(defmacro macro-problem-1 ( &rest forms) - "Description" - `(progn ,@forms)) - -(defun macro-problem-func () - "" - (macro-problem-1 'a 'b) - (macro-aux-1 'a 'b)) - -(provide 'macro-problem) -;;; macro-problem.el ends here diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-aux.el b/test/automated/data/package/macro-problem-package-2.0/macro-aux.el deleted file mode 100644 index 6a55a40..0000000 --- a/test/automated/data/package/macro-problem-package-2.0/macro-aux.el +++ /dev/null @@ -1,16 +0,0 @@ -;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- - -;; Author: Artur Malabarba - -;;; Code: - -(defmacro macro-aux-1 ( &rest forms) - "Description" - `(progn ,@forms)) - -(defmacro macro-aux-3 ( &rest _) - "Description" - 90) - -(provide 'macro-aux) -;;; macro-aux.el ends here diff --git a/test/automated/data/package/macro-problem-package-2.0/macro-problem.el b/test/automated/data/package/macro-problem-package-2.0/macro-problem.el deleted file mode 100644 index cad4ed9..0000000 --- a/test/automated/data/package/macro-problem-package-2.0/macro-problem.el +++ /dev/null @@ -1,30 +0,0 @@ -;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- - -;; Author: Artur Malabarba -;; Keywords: tools -;; Version: 2.0 - -;;; Code: - -(require 'macro-aux) - -(defmacro macro-problem-1 ( &rest forms) - "Description" - `(progn ,(cadr (car forms)))) - - -(defun macro-problem-func () - "" - (list (macro-problem-1 '1 'b) - (macro-aux-1 'a 'b))) - -(defmacro macro-problem-3 (&rest _) - "Description" - 10) - -(defun macro-problem-10-and-90 () - "" - (list (macro-problem-3 haha) (macro-aux-3 hehe))) - -(provide 'macro-problem) -;;; macro-problem.el ends here diff --git a/test/automated/url-expand-tests.el b/test/automated/url-expand-tests.el deleted file mode 100644 index 2bd2868..0000000 --- a/test/automated/url-expand-tests.el +++ /dev/null @@ -1,105 +0,0 @@ -;;; url-expand-tests.el --- Test suite for relative URI/URL resolution. - -;; Copyright (C) 2012-2015 Free Software Foundation, Inc. - -;; Author: Alain Schneble -;; Version: 1.0 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Test cases covering URI reference resolution as described in RFC3986, -;; section 5. Reference Resolution and especially the relative resolution -;; rules specified in section 5.2. Relative Resolution. - -;; Each test calls `url-expand-file-name', typically with a relative -;; reference URI and a base URI as string and compares the result (Actual) -;; against a manually specified URI (Expected) - -;;; Code: - -(require 'url-expand) -(require 'ert) - -(ert-deftest url-expand-file-name/relative-resolution-normal-examples () - "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.1. Normal Examples" - (should (equal (url-expand-file-name "g:h" "http://a/b/c/d;p?q") "g:h")) - (should (equal (url-expand-file-name "g" "http://a/b/c/d;p?q") "http://a/b/c/g")) - (should (equal (url-expand-file-name "./g" "http://a/b/c/d;p?q") "http://a/b/c/g")) - (should (equal (url-expand-file-name "g/" "http://a/b/c/d;p?q") "http://a/b/c/g/")) - (should (equal (url-expand-file-name "/g" "http://a/b/c/d;p?q") "http://a/g")) - (should (equal (url-expand-file-name "//g" "http://a/b/c/d;p?q") "http://g")) - (should (equal (url-expand-file-name "?y" "http://a/b/c/d;p?q") "http://a/b/c/d;p?y")) - (should (equal (url-expand-file-name "g?y" "http://a/b/c/d;p?q") "http://a/b/c/g?y")) - (should (equal (url-expand-file-name "#s" "http://a/b/c/d;p?q") "http://a/b/c/d;p?q#s")) - (should (equal (url-expand-file-name "g#s" "http://a/b/c/d;p?q") "http://a/b/c/g#s")) - (should (equal (url-expand-file-name "g?y#s" "http://a/b/c/d;p?q") "http://a/b/c/g?y#s")) - (should (equal (url-expand-file-name ";x" "http://a/b/c/d;p?q") "http://a/b/c/;x")) - (should (equal (url-expand-file-name "g;x" "http://a/b/c/d;p?q") "http://a/b/c/g;x")) - (should (equal (url-expand-file-name "g;x?y#s" "http://a/b/c/d;p?q") "http://a/b/c/g;x?y#s")) - (should (equal (url-expand-file-name "" "http://a/b/c/d;p?q") "http://a/b/c/d;p?q")) - (should (equal (url-expand-file-name "." "http://a/b/c/d;p?q") "http://a/b/c/")) - (should (equal (url-expand-file-name "./" "http://a/b/c/d;p?q") "http://a/b/c/")) - (should (equal (url-expand-file-name ".." "http://a/b/c/d;p?q") "http://a/b/")) - (should (equal (url-expand-file-name "../" "http://a/b/c/d;p?q") "http://a/b/")) - (should (equal (url-expand-file-name "../g" "http://a/b/c/d;p?q") "http://a/b/g")) - (should (equal (url-expand-file-name "../.." "http://a/b/c/d;p?q") "http://a/")) - (should (equal (url-expand-file-name "../../" "http://a/b/c/d;p?q") "http://a/")) - (should (equal (url-expand-file-name "../../g" "http://a/b/c/d;p?q") "http://a/g"))) - -(ert-deftest url-expand-file-name/relative-resolution-absolute-examples () - "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.2. Abnormal Examples" - (should (equal (url-expand-file-name "../../../g" "http://a/b/c/d;p?q") "http://a/g")) - (should (equal (url-expand-file-name "../../../../g" "http://a/b/c/d;p?q") "http://a/g")) - - (should (equal (url-expand-file-name "/./g" "http://a/b/c/d;p?q") "http://a/g")) - (should (equal (url-expand-file-name "/../g" "http://a/b/c/d;p?q") "http://a/g")) - (should (equal (url-expand-file-name "g." "http://a/b/c/d;p?q") "http://a/b/c/g.")) - (should (equal (url-expand-file-name ".g" "http://a/b/c/d;p?q") "http://a/b/c/.g")) - (should (equal (url-expand-file-name "g.." "http://a/b/c/d;p?q") "http://a/b/c/g..")) - (should (equal (url-expand-file-name "..g" "http://a/b/c/d;p?q") "http://a/b/c/..g")) - - (should (equal (url-expand-file-name "./../g" "http://a/b/c/d;p?q") "http://a/b/g")) - (should (equal (url-expand-file-name "./g/." "http://a/b/c/d;p?q") "http://a/b/c/g/")) - (should (equal (url-expand-file-name "g/./h" "http://a/b/c/d;p?q") "http://a/b/c/g/h")) - (should (equal (url-expand-file-name "g/../h" "http://a/b/c/d;p?q") "http://a/b/c/h")) - (should (equal (url-expand-file-name "g;x=1/./y" "http://a/b/c/d;p?q") "http://a/b/c/g;x=1/y")) - (should (equal (url-expand-file-name "g;x=1/../y" "http://a/b/c/d;p?q") "http://a/b/c/y")) - - (should (equal (url-expand-file-name "g?y/./x" "http://a/b/c/d;p?q") "http://a/b/c/g?y/./x")) - (should (equal (url-expand-file-name "g?y/../x" "http://a/b/c/d;p?q") "http://a/b/c/g?y/../x")) - (should (equal (url-expand-file-name "g#s/./x" "http://a/b/c/d;p?q") "http://a/b/c/g#s/./x")) - (should (equal (url-expand-file-name "g#s/../x" "http://a/b/c/d;p?q") "http://a/b/c/g#s/../x")) - - (should (equal (url-expand-file-name "http:g" "http://a/b/c/d;p?q") "http:g")) ; for strict parsers - ) - -(ert-deftest url-expand-file-name/relative-resolution-additional-examples () - "Reference Resolution Examples / Arbitrary Examples" - (should (equal (url-expand-file-name "" "http://host/foobar") "http://host/foobar")) - (should (equal (url-expand-file-name "?y" "http://a/b/c/d") "http://a/b/c/d?y")) - (should (equal (url-expand-file-name "?y" "http://a/b/c/d/") "http://a/b/c/d/?y")) - (should (equal (url-expand-file-name "?y#fragment" "http://a/b/c/d;p?q") "http://a/b/c/d;p?y#fragment")) - (should (equal (url-expand-file-name "#bar" "http://host") "http://host#bar")) - (should (equal (url-expand-file-name "#bar" "http://host/") "http://host/#bar")) - (should (equal (url-expand-file-name "#bar" "http://host/foo") "http://host/foo#bar")) - (should (equal (url-expand-file-name "foo#bar" "http://host/foobar") "http://host/foo#bar")) - (should (equal (url-expand-file-name "foo#bar" "http://host/foobar/") "http://host/foobar/foo#bar"))) - -(provide 'url-expand-tests) - -;;; url-expand-tests.el ends here diff --git a/test/automated/url-parse-tests.el b/test/automated/url-parse-tests.el deleted file mode 100644 index 443034a..0000000 --- a/test/automated/url-parse-tests.el +++ /dev/null @@ -1,167 +0,0 @@ -;;; url-parse-tests.el --- Test suite for URI/URL parsing. - -;; Copyright (C) 2012-2015 Free Software Foundation, Inc. - -;; Author: Alain Schneble -;; Version: 1.0 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Test cases covering generic URI syntax as described in RFC3986, -;; section 3. Syntax Components and 4. Usage. See also appendix -;; A. Collected ABNF for URI, as the example given here are all -;; productions of this grammar. - -;; Each tests parses a given URI string - whether relative or absolute - -;; using `url-generic-parse-url' and compares the constructed -;; URL-struct (Actual) against a manually `url-parse-make-urlobj'- -;; constructed URL-struct (Expected). - -;;; Code: - -(require 'url-parse) -(require 'ert) - -(ert-deftest url-generic-parse-url/generic-uri-examples () - "RFC 3986, section 1.1.2. Examples / Example illustrating several URI schemes and variations in their common syntax components" - (should (equal (url-generic-parse-url "ftp://ftp.is.co.za/rfc/rfc1808.txt") (url-parse-make-urlobj "ftp" nil nil "ftp.is.co.za" nil "/rfc/rfc1808.txt" nil nil t))) - (should (equal (url-generic-parse-url "http://www.ietf.org/rfc/rfc2396.txt") (url-parse-make-urlobj "http" nil nil "www.ietf.org" nil "/rfc/rfc2396.txt" nil nil t))) - (should (equal (url-generic-parse-url "ldap://[2001:db8::7]/c=GB?objectClass?one") (url-parse-make-urlobj "ldap" nil nil "[2001:db8::7]" nil "/c=GB?objectClass?one" nil nil t))) - (should (equal (url-generic-parse-url "mailto:John.Doe@example.com") (url-parse-make-urlobj "mailto" nil nil nil nil "John.Doe@example.com" nil nil nil))) - (should (equal (url-generic-parse-url "news:comp.infosystems.www.servers.unix") (url-parse-make-urlobj "news" nil nil nil nil "comp.infosystems.www.servers.unix" nil nil nil))) - (should (equal (url-generic-parse-url "tel:+1-816-555-1212") (url-parse-make-urlobj "tel" nil nil nil nil "+1-816-555-1212" nil nil nil))) - (should (equal (url-generic-parse-url "telnet://192.0.2.16:80/") (url-parse-make-urlobj "telnet" nil nil "192.0.2.16" 80 "/" nil nil t))) - (should (equal (url-generic-parse-url "urn:oasis:names:specification:docbook:dtd:xml:4.1.2") (url-parse-make-urlobj "urn" nil nil nil nil "oasis:names:specification:docbook:dtd:xml:4.1.2" nil nil nil)))) - -(ert-deftest url-generic-parse-url/generic-uri () - "RFC 3986, section 3. Syntax Components / generic URI syntax" - ;; empty path - (should (equal (url-generic-parse-url "http://host#") (url-parse-make-urlobj "http" nil nil "host" nil "" "" nil t))) - (should (equal (url-generic-parse-url "http://host#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host?#") (url-parse-make-urlobj "http" nil nil "host" nil "?" "" nil t))) - (should (equal (url-generic-parse-url "http://host?query#") (url-parse-make-urlobj "http" nil nil "host" nil "?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "?query" "fragment" nil t))) - ;; absolute path / - (should (equal (url-generic-parse-url "http://host/#") (url-parse-make-urlobj "http" nil nil "host" nil "/" "" nil t))) - (should (equal (url-generic-parse-url "http://host/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/?" "" nil t))) - (should (equal (url-generic-parse-url "http://host/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" "fragment" nil t))) - ;; absolute path /foo - (should (equal (url-generic-parse-url "http://host/foo#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" "fragment" nil t))) - ;; absolute path /foo/ - (should (equal (url-generic-parse-url "http://host/foo/#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" "fragment" nil t))) - ;; absolute path /foo/bar - (should (equal (url-generic-parse-url "http://host/foo/bar#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" "fragment" nil t))) - ;; absolute path /foo/bar/ - (should (equal (url-generic-parse-url "http://host/foo/bar/#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?query#") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" "fragment" nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?query#fragment") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" "fragment" nil t))) - ;; for more examples of URIs without fragments, see tests covering section 4.3. Absolute URI - ) - -(ert-deftest url-generic-parse-url/network-path-reference () - "RFC 3986, section 4.2. Relative Reference / network-path reference: a relative reference that begins with two slash characters" - (should (equal (url-generic-parse-url "//host") (url-parse-make-urlobj nil nil nil "host" nil "" nil nil t))) - (should (equal (url-generic-parse-url "//host/") (url-parse-make-urlobj nil nil nil "host" nil "/" nil nil t))) - (should (equal (url-generic-parse-url "//host/foo") (url-parse-make-urlobj nil nil nil "host" nil "/foo" nil nil t))) - (should (equal (url-generic-parse-url "//host/foo/bar") (url-parse-make-urlobj nil nil nil "host" nil "/foo/bar" nil nil t))) - (should (equal (url-generic-parse-url "//host/foo/bar/") (url-parse-make-urlobj nil nil nil "host" nil "/foo/bar/" nil nil t)))) - -(ert-deftest url-generic-parse-url/absolute-path-reference () - "RFC 3986, section 4.2. Relative Reference / absolute-path reference: a relative reference that begins with a single slash character" - (should (equal (url-generic-parse-url "/") (url-parse-make-urlobj nil nil nil nil nil "/" nil nil nil))) - (should (equal (url-generic-parse-url "/foo") (url-parse-make-urlobj nil nil nil nil nil "/foo" nil nil nil))) - (should (equal (url-generic-parse-url "/foo/bar") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar" nil nil nil))) - (should (equal (url-generic-parse-url "/foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar/" nil nil nil))) - (should (equal (url-generic-parse-url "/foo/bar#") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar" "" nil nil))) - (should (equal (url-generic-parse-url "/foo/bar/#") (url-parse-make-urlobj nil nil nil nil nil "/foo/bar/" "" nil nil)))) - -(ert-deftest url-generic-parse-url/relative-path-reference () - "RFC 3986, section 4.2. Relative Reference / relative-path reference: a relative reference that does not begin with a slash character" - (should (equal (url-generic-parse-url "foo") (url-parse-make-urlobj nil nil nil nil nil "foo" nil nil nil))) - (should (equal (url-generic-parse-url "foo/bar") (url-parse-make-urlobj nil nil nil nil nil "foo/bar" nil nil nil))) - (should (equal (url-generic-parse-url "foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "foo/bar/" nil nil nil))) - (should (equal (url-generic-parse-url "./foo") (url-parse-make-urlobj nil nil nil nil nil "./foo" nil nil nil))) - (should (equal (url-generic-parse-url "./foo/bar") (url-parse-make-urlobj nil nil nil nil nil "./foo/bar" nil nil nil))) - (should (equal (url-generic-parse-url "./foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "./foo/bar/" nil nil nil))) - (should (equal (url-generic-parse-url "../foo") (url-parse-make-urlobj nil nil nil nil nil "../foo" nil nil nil))) - (should (equal (url-generic-parse-url "../foo/bar") (url-parse-make-urlobj nil nil nil nil nil "../foo/bar" nil nil nil))) - (should (equal (url-generic-parse-url "../foo/bar/") (url-parse-make-urlobj nil nil nil nil nil "../foo/bar/" nil nil nil))) - (should (equal (url-generic-parse-url "./this:that") (url-parse-make-urlobj nil nil nil nil nil "./this:that" nil nil nil))) - ;; for more examples of relative-path references, see tests covering section 4.4. Same-Document Reference - ) - -(ert-deftest url-generic-parse-url/absolute-uri () - "RFC 3986, section 4.3. Absolute URI / absolute URI: absolute form of a URI without a fragment identifier" - ;; empty path - (should (equal (url-generic-parse-url "http://host") (url-parse-make-urlobj "http" nil nil "host" nil "" nil nil t))) - (should (equal (url-generic-parse-url "http://host?") (url-parse-make-urlobj "http" nil nil "host" nil "?" nil nil t))) - (should (equal (url-generic-parse-url "http://host?query") (url-parse-make-urlobj "http" nil nil "host" nil "?query" nil nil t))) - ;; absolute path / - (should (equal (url-generic-parse-url "http://host/") (url-parse-make-urlobj "http" nil nil "host" nil "/" nil nil t))) - (should (equal (url-generic-parse-url "http://host/?") (url-parse-make-urlobj "http" nil nil "host" nil "/?" nil nil t))) - (should (equal (url-generic-parse-url "http://host/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/?query" nil nil t))) - ;; absolute path /foo - (should (equal (url-generic-parse-url "http://host/foo") (url-parse-make-urlobj "http" nil nil "host" nil "/foo" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo?query" nil nil t))) - ;; absolute path /foo/ - (should (equal (url-generic-parse-url "http://host/foo/") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/?query" nil nil t))) - ;; absolute path /foo/bar - (should (equal (url-generic-parse-url "http://host/foo/bar") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar?query" nil nil t))) - ;; absolute path /foo/bar/ - (should (equal (url-generic-parse-url "http://host/foo/bar/") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?" nil nil t))) - (should (equal (url-generic-parse-url "http://host/foo/bar/?query") (url-parse-make-urlobj "http" nil nil "host" nil "/foo/bar/?query" nil nil t))) - ;; example mentioned in RFC3986, section 5.4. Reference Resolution Examples - (should (equal (url-generic-parse-url "http://a/b/c/d;p?q") (url-parse-make-urlobj "http" nil nil "a" nil "/b/c/d;p?q" nil nil t)))) - -(ert-deftest url-generic-parse-url/same-document-reference () - "RFC 3986, section 4.4. Same-Document Reference / same-document reference: empty or number sign (\"#\") followed by a fragment identifier" - (should (equal (url-generic-parse-url "") (url-parse-make-urlobj nil nil nil nil nil "" nil nil nil))) - (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil nil nil nil "" "" nil nil))) - (should (equal (url-generic-parse-url "#foo") (url-parse-make-urlobj nil nil nil nil nil "" "foo" nil nil)))) - -(provide 'url-parse-tests) - -;;; url-parse-tests.el ends here diff --git a/test/etags/lua-src/test.lua b/test/etags/lua-src/test.lua deleted file mode 100644 index 405eb5f..0000000 --- a/test/etags/lua-src/test.lua +++ /dev/null @@ -1,36 +0,0 @@ -Rectangle = {} -function Rectangle.getPos () -end - -Circle = {} -function Circle.getPos () -end - -Cube = {} -function Cube.data.getFoo () -end - -Square = {} -function Square.something:Bar () -end - --- Comment line - -- Indented comment line - -test = {} - - function test.me_22a(one, two) - print"me_22a" - end - local function test.me22b (one) - print"me_22b" - end - - - test.i_123 = function (x) - print"i_123" -end - - -test.me_12a(1,2) -test.i_123(1) diff --git a/test/etags/ruby-src/test.rb b/test/etags/ruby-src/test.rb deleted file mode 100644 index 9254c5b..0000000 --- a/test/etags/ruby-src/test.rb +++ /dev/null @@ -1,54 +0,0 @@ -module ModuleExample - class ClassExample - def class_method - puts "in class_method" - end - def ClassExample.singleton_class_method - puts "in singleton_class_method" - end - def class_method_exclamation! - puts "in class_method_exclamation!" - end - def class_method_question? - puts "in class_method_question?" - end - def class_method_equals= - puts "in class_method_equals=" - end - def `(command) - return "just testing a backquote override" - end - def +(y) - @x + y - end - def [](y) - @ary[y] - end - def []=(y, val) - @ary[y] = val - end - def <<(y) - @x << y - end - def ==(y) - @ary.length == y.ary.length - end - def <=(y) - '@ary.length < y.ary.length' - end - def <=>(y) - nil - end - def ===(y) - self == y - end - end - def module_method - puts "in module_method" - end - def ModuleExample.singleton_module_method - puts "in singleton_module_method" - end -end - -ModuleExample::ClassExample.singleton_class_method diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby deleted file mode 100644 index 43b1a14..0000000 --- a/test/etags/ruby-src/test1.ruby +++ /dev/null @@ -1,7 +0,0 @@ -class A - def a() - super(" do ") - end - def b() - end -end diff --git a/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-aux.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-aux.el new file mode 100644 index 0000000..f432322 --- /dev/null +++ b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-aux.el @@ -0,0 +1,12 @@ +;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba + +;;; Code: + +(defun macro-aux-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(provide 'macro-aux) +;;; macro-aux.el ends here diff --git a/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-problem.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-problem.el new file mode 100644 index 0000000..0533b1b --- /dev/null +++ b/test/lisp/emacs-lisp/package-resources/macro-problem-package-1.0/macro-problem.el @@ -0,0 +1,21 @@ +;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba +;; Keywords: tools +;; Version: 1.0 + +;;; Code: + +(require 'macro-aux) + +(defmacro macro-problem-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(defun macro-problem-func () + "" + (macro-problem-1 'a 'b) + (macro-aux-1 'a 'b)) + +(provide 'macro-problem) +;;; macro-problem.el ends here diff --git a/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-aux.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-aux.el new file mode 100644 index 0000000..6a55a40 --- /dev/null +++ b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-aux.el @@ -0,0 +1,16 @@ +;;; macro-aux.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba + +;;; Code: + +(defmacro macro-aux-1 ( &rest forms) + "Description" + `(progn ,@forms)) + +(defmacro macro-aux-3 ( &rest _) + "Description" + 90) + +(provide 'macro-aux) +;;; macro-aux.el ends here diff --git a/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-problem.el b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-problem.el new file mode 100644 index 0000000..cad4ed9 --- /dev/null +++ b/test/lisp/emacs-lisp/package-resources/macro-problem-package-2.0/macro-problem.el @@ -0,0 +1,30 @@ +;;; macro-problem.el --- laksd -*- lexical-binding: t; -*- + +;; Author: Artur Malabarba +;; Keywords: tools +;; Version: 2.0 + +;;; Code: + +(require 'macro-aux) + +(defmacro macro-problem-1 ( &rest forms) + "Description" + `(progn ,(cadr (car forms)))) + + +(defun macro-problem-func () + "" + (list (macro-problem-1 '1 'b) + (macro-aux-1 'a 'b))) + +(defmacro macro-problem-3 (&rest _) + "Description" + 10) + +(defun macro-problem-10-and-90 () + "" + (list (macro-problem-3 haha) (macro-aux-3 hehe))) + +(provide 'macro-problem) +;;; macro-problem.el ends here diff --git a/test/lisp/url/url-expand-tests.el b/test/lisp/url/url-expand-tests.el new file mode 100644 index 0000000..2bd2868 --- /dev/null +++ b/test/lisp/url/url-expand-tests.el @@ -0,0 +1,105 @@ +;;; url-expand-tests.el --- Test suite for relative URI/URL resolution. + +;; Copyright (C) 2012-2015 Free Software Foundation, Inc. + +;; Author: Alain Schneble +;; Version: 1.0 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Test cases covering URI reference resolution as described in RFC3986, +;; section 5. Reference Resolution and especially the relative resolution +;; rules specified in section 5.2. Relative Resolution. + +;; Each test calls `url-expand-file-name', typically with a relative +;; reference URI and a base URI as string and compares the result (Actual) +;; against a manually specified URI (Expected) + +;;; Code: + +(require 'url-expand) +(require 'ert) + +(ert-deftest url-expand-file-name/relative-resolution-normal-examples () + "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.1. Normal Examples" + (should (equal (url-expand-file-name "g:h" "http://a/b/c/d;p?q") "g:h")) + (should (equal (url-expand-file-name "g" "http://a/b/c/d;p?q") "http://a/b/c/g")) + (should (equal (url-expand-file-name "./g" "http://a/b/c/d;p?q") "http://a/b/c/g")) + (should (equal (url-expand-file-name "g/" "http://a/b/c/d;p?q") "http://a/b/c/g/")) + (should (equal (url-expand-file-name "/g" "http://a/b/c/d;p?q") "http://a/g")) + (should (equal (url-expand-file-name "//g" "http://a/b/c/d;p?q") "http://g")) + (should (equal (url-expand-file-name "?y" "http://a/b/c/d;p?q") "http://a/b/c/d;p?y")) + (should (equal (url-expand-file-name "g?y" "http://a/b/c/d;p?q") "http://a/b/c/g?y")) + (should (equal (url-expand-file-name "#s" "http://a/b/c/d;p?q") "http://a/b/c/d;p?q#s")) + (should (equal (url-expand-file-name "g#s" "http://a/b/c/d;p?q") "http://a/b/c/g#s")) + (should (equal (url-expand-file-name "g?y#s" "http://a/b/c/d;p?q") "http://a/b/c/g?y#s")) + (should (equal (url-expand-file-name ";x" "http://a/b/c/d;p?q") "http://a/b/c/;x")) + (should (equal (url-expand-file-name "g;x" "http://a/b/c/d;p?q") "http://a/b/c/g;x")) + (should (equal (url-expand-file-name "g;x?y#s" "http://a/b/c/d;p?q") "http://a/b/c/g;x?y#s")) + (should (equal (url-expand-file-name "" "http://a/b/c/d;p?q") "http://a/b/c/d;p?q")) + (should (equal (url-expand-file-name "." "http://a/b/c/d;p?q") "http://a/b/c/")) + (should (equal (url-expand-file-name "./" "http://a/b/c/d;p?q") "http://a/b/c/")) + (should (equal (url-expand-file-name ".." "http://a/b/c/d;p?q") "http://a/b/")) + (should (equal (url-expand-file-name "../" "http://a/b/c/d;p?q") "http://a/b/")) + (should (equal (url-expand-file-name "../g" "http://a/b/c/d;p?q") "http://a/b/g")) + (should (equal (url-expand-file-name "../.." "http://a/b/c/d;p?q") "http://a/")) + (should (equal (url-expand-file-name "../../" "http://a/b/c/d;p?q") "http://a/")) + (should (equal (url-expand-file-name "../../g" "http://a/b/c/d;p?q") "http://a/g"))) + +(ert-deftest url-expand-file-name/relative-resolution-absolute-examples () + "RFC 3986, Section 5.4 Reference Resolution Examples / Section 5.4.2. Abnormal Examples" + (should (equal (url-expand-file-name "../../../g" "http://a/b/c/d;p?q") "http://a/g")) + (should (equal (url-expand-file-name "../../../../g" "http://a/b/c/d;p?q") "http://a/g")) + + (should (equal (url-expand-file-name "/./g" "http://a/b/c/d;p?q") "http://a/g")) + (should (equal (url-expand-file-name "/../g" "http://a/b/c/d;p?q") "http://a/g")) + (should (equal (url-expand-file-name "g." "http://a/b/c/d;p?q") "http://a/b/c/g.")) + (should (equal (url-expand-file-name ".g" "http://a/b/c/d;p?q") "http://a/b/c/.g")) + (should (equal (url-expand-file-name "g.." "http://a/b/c/d;p?q") "http://a/b/c/g..")) + (should (equal (url-expand-file-name "..g" "http://a/b/c/d;p?q") "http://a/b/c/..g")) + + (should (equal (url-expand-file-name "./../g" "http://a/b/c/d;p?q") "http://a/b/g")) + (should (equal (url-expand-file-name "./g/." "http://a/b/c/d;p?q") "http://a/b/c/g/")) + (should (equal (url-expand-file-name "g/./h" "http://a/b/c/d;p?q") "http://a/b/c/g/h")) + (should (equal (url-expand-file-name "g/../h" "http://a/b/c/d;p?q") "http://a/b/c/h")) + (should (equal (url-expand-file-name "g;x=1/./y" "http://a/b/c/d;p?q") "http://a/b/c/g;x=1/y")) + (should (equal (url-expand-file-name "g;x=1/../y" "http://a/b/c/d;p?q") "http://a/b/c/y")) + + (should (equal (url-expand-file-name "g?y/./x" "http://a/b/c/d;p?q") "http://a/b/c/g?y/./x")) + (should (equal (url-expand-file-name "g?y/../x" "http://a/b/c/d;p?q") "http://a/b/c/g?y/../x")) + (should (equal (url-expand-file-name "g#s/./x" "http://a/b/c/d;p?q") "http://a/b/c/g#s/./x")) + (should (equal (url-expand-file-name "g#s/../x" "http://a/b/c/d;p?q") "http://a/b/c/g#s/../x")) + + (should (equal (url-expand-file-name "http:g" "http://a/b/c/d;p?q") "http:g")) ; for strict parsers + ) + +(ert-deftest url-expand-file-name/relative-resolution-additional-examples () + "Reference Resolution Examples / Arbitrary Examples" + (should (equal (url-expand-file-name "" "http://host/foobar") "http://host/foobar")) + (should (equal (url-expand-file-name "?y" "http://a/b/c/d") "http://a/b/c/d?y")) + (should (equal (url-expand-file-name "?y" "http://a/b/c/d/") "http://a/b/c/d/?y")) + (should (equal (url-expand-file-name "?y#fragment" "http://a/b/c/d;p?q") "http://a/b/c/d;p?y#fragment")) + (should (equal (url-expand-file-name "#bar" "http://host") "http://host#bar")) + (should (equal (url-expand-file-name "#bar" "http://host/") "http://host/#bar")) + (should (equal (url-expand-file-name "#bar" "http://host/foo") "http://host/foo#bar")) + (should (equal (url-expand-file-name "foo#bar" "http://host/foobar") "http://host/foo#bar")) + (should (equal (url-expand-file-name "foo#bar" "http://host/foobar/") "http://host/foobar/foo#bar"))) + +(provide 'url-expand-tests) + +;;; url-expand-tests.el ends here diff --git a/test/manual/etags/lua-src/test.lua b/test/manual/etags/lua-src/test.lua new file mode 100644 index 0000000..405eb5f --- /dev/null +++ b/test/manual/etags/lua-src/test.lua @@ -0,0 +1,36 @@ +Rectangle = {} +function Rectangle.getPos () +end + +Circle = {} +function Circle.getPos () +end + +Cube = {} +function Cube.data.getFoo () +end + +Square = {} +function Square.something:Bar () +end + +-- Comment line + -- Indented comment line + +test = {} + + function test.me_22a(one, two) + print"me_22a" + end + local function test.me22b (one) + print"me_22b" + end + + + test.i_123 = function (x) + print"i_123" +end + + +test.me_12a(1,2) +test.i_123(1) diff --git a/test/manual/etags/ruby-src/test.rb b/test/manual/etags/ruby-src/test.rb new file mode 100644 index 0000000..9254c5b --- /dev/null +++ b/test/manual/etags/ruby-src/test.rb @@ -0,0 +1,54 @@ +module ModuleExample + class ClassExample + def class_method + puts "in class_method" + end + def ClassExample.singleton_class_method + puts "in singleton_class_method" + end + def class_method_exclamation! + puts "in class_method_exclamation!" + end + def class_method_question? + puts "in class_method_question?" + end + def class_method_equals= + puts "in class_method_equals=" + end + def `(command) + return "just testing a backquote override" + end + def +(y) + @x + y + end + def [](y) + @ary[y] + end + def []=(y, val) + @ary[y] = val + end + def <<(y) + @x << y + end + def ==(y) + @ary.length == y.ary.length + end + def <=(y) + '@ary.length < y.ary.length' + end + def <=>(y) + nil + end + def ===(y) + self == y + end + end + def module_method + puts "in module_method" + end + def ModuleExample.singleton_module_method + puts "in singleton_module_method" + end +end + +ModuleExample::ClassExample.singleton_class_method diff --git a/test/manual/etags/ruby-src/test1.ruby b/test/manual/etags/ruby-src/test1.ruby new file mode 100644 index 0000000..43b1a14 --- /dev/null +++ b/test/manual/etags/ruby-src/test1.ruby @@ -0,0 +1,7 @@ +class A + def a() + super(" do ") + end + def b() + end +end commit 22d1a175aa4b33296a7f2fe0cde9a22333f4031d Author: Eli Zaretskii Date: Tue Jan 5 20:03:38 2016 +0200 ; * etc/NEWS: Mention 2 newly introduced variables. diff --git a/etc/NEWS b/etc/NEWS index d23c7fa..38b0d95 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -29,6 +29,24 @@ otherwise leave it unmarked. and Mac OS X machines. +* Changes in Emacs 25.2 + +** It is possible to disable attempted recovery on fatal signals + +Two new variables allow to disable attempts to recover from stack +overflow and to avoid automatic auto-save when Emacs is delivered a +fatal signal. `attempt-stack-overflow-recovery', if set to `nil', +will disable attempts to recover from C stack overflows; Emacs will +then crash as with any other fatal signal. +`attempt-orderly-shutdown-on-fatal-signal', if set to `nil', will +disable attempts to auto-save the session and shut down in an orderly +fashion when Emacs receives a fatal signal; instead, Emacs will +terminate immediately. Both variables are non-`nil' by default. +These variables are for users who would like to avoid the small +probability of data corruption due to techniques Emacs uses to recover +in these situations. + + * Changes in Specialized Modes and Packages in Emacs 25.2 ** File Notifications commit 61e83e902b388490b609677a76f3d49740439f24 Author: Paul Eggert Date: Mon Jan 4 14:46:35 2016 -0800 Spelling fixes diff --git a/admin/notes/triage b/admin/notes/triage index bc91b6c..5b0e35c 100644 --- a/admin/notes/triage +++ b/admin/notes/triage @@ -57,7 +57,7 @@ For each new bug, ask the following questions: 1. Is the bug report written in a way to be easy to reproduce (starts from emacs -Q, etc.)? If not, ask the reporter to try and reproduce it on an emacs without customization. - 2. Is the bug report written against the lastest emacs? If not, try to + 2. Is the bug report written against the latest emacs? If not, try to reproduce on the latest version, and if it can't be reproduced, ask the reporter to try again with the latest version. 3. Is the bug the same as another bug? If so, merge the bugs. diff --git a/configure.ac b/configure.ac index 2baafb9..0aa863a 100644 --- a/configure.ac +++ b/configure.ac @@ -365,7 +365,7 @@ AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB], g | gf | gfi | gfil | gfile ) val=gfile ;; w | w3 | w32 ) val=w32 ;; * ) AC_MSG_ERROR(['--with-file-notification=$withval' is invalid; -this option's value should be 'yes', 'no', 'inotify', 'kqeue', 'gfile' or 'w32'. +this option's value should be 'yes', 'no', 'inotify', 'kqueue', 'gfile' or 'w32'. 'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep, otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.]) ;; diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 164df25..ca69c0a 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -185,7 +185,7 @@ $(lisp)/loaddefs.el: $(LOADDEFS) --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ -f batch-update-autoloads ${SUBDIRS_ALMOST} -# autoloads only runs when loaddefs.el is non-existant, although it +# autoloads only runs when loaddefs.el is nonexistent, although it # generates a number of different files. Provide a force option to enable # regeneration of all these files. autoloads-force .PHONY: diff --git a/lisp/linum.el b/lisp/linum.el index 4e0bc56..903586a 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -121,7 +121,7 @@ Linum mode is a buffer-local minor mode." (setq linum-overlays nil) (dolist (w (get-buffer-window-list (current-buffer) nil t)) ;; restore margins if needed FIXME: This still fails if the - ;; "other" mode has incidently set margins to exactly what linum + ;; "other" mode has incidentally set margins to exactly what linum ;; had: see bug#20674 for a similar workaround in nlinum.el (let ((set-margins (window-parameter w 'linum--set-margins)) (current-margins (window-margins w))) diff --git a/lisp/net/puny.el b/lisp/net/puny.el index f2fa346..b3a82a2 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -30,7 +30,7 @@ (require 'seq) (defun puny-encode-domain (domain) - "Encode DOMAIN according to the IDNA/punycode algorith. + "Encode DOMAIN according to the IDNA/punycode algorithm. For instance, \"fśf.org\" => \"xn--ff-2sa.org\"." ;; The vast majority of domain names are not IDNA domain names, so ;; add a check first to avoid doing unnecessary work. @@ -54,7 +54,7 @@ For instance, \"bücher\" => \"xn--bcher-kva\"." (puny-encode-complex (length ascii) string))))) (defun puny-decode-domain (domain) - "Decode DOMAIN according to the IDNA/punycode algorith. + "Decode DOMAIN according to the IDNA/punycode algorithm. For instance, \"xn--ff-2sa.org\" => \"fśf.org\"." (mapconcat 'puny-decode-string (split-string domain "[.]") ".")) @@ -215,12 +215,12 @@ using homographs." #x058A ; ARMENIAN HYPHEN #x05F3 ; HEBREW PUNCTUATION GERESH #x05F4 ; HEBREW PUNCTUATION GERSHAYIM - #x0F0B ; IBETAN MARK INTERSYLLABIC TSHEG - #x200C ; ERO WIDTH NON-JOINER* - #x200D ; ERO WIDTH JOINER* - #x2010 ; YPHEN - #x2019 ; IGHT SINGLE QUOTATION MARK - #x2027 ; YPHENATION POINT + #x0F0B ; TIBETAN MARK INTERSYLLABIC TSHEG + #x200C ; ZERO WIDTH NON-JOINER* + #x200D ; ZERO WIDTH JOINER* + #x2010 ; HYPHEN + #x2019 ; RIGHT SINGLE QUOTATION MARK + #x2027 ; HYPHENATION POINT #x30A0 ; KATAKANA-HIRAGANA DOUBLE HYPHEN #x30FB)) ; KATAKANA MIDDLE DOT t diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1 index 35e6ef1..2c78ce0 100644 --- a/lisp/org/ChangeLog.1 +++ b/lisp/org/ChangeLog.1 @@ -5285,7 +5285,7 @@ * ox-html.el (org-html-link): Don't skip the link description when it matches the name of the headline it targets. - * ox-ascii.el (ascii): Remove inexistant function. + * ox-ascii.el (ascii): Remove nonexistent function. * ox-icalendar.el (icalendar): Ignore footnotes. (org-icalendar--combine-files): Small refactoring. diff --git a/src/kqueue.c b/src/kqueue.c index 1830040..e0ee5fb 100644 --- a/src/kqueue.c +++ b/src/kqueue.c @@ -257,7 +257,7 @@ kqueue_compare_dir_list /* At this point, old_dl, new_dl and pending_dl shall be empty. deleted_dl might not be empty when there was a rename to a - nonexisting file. Let's make a check for this (might be removed + nonexistent file. Let's make a check for this (might be removed once the code is stable). */ if (! NILP (old_dl)) report_file_error ("Old list not empty", old_dl); diff --git a/test/file-organisation.org b/test/file-organisation.org index b754000..226e12d 100644 --- a/test/file-organisation.org +++ b/test/file-organisation.org @@ -50,5 +50,5 @@ directory as the feature. Hence, the lisp file ~flymake.el~ should have test files in ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a directory called ~/test/automated/lisp/progmodes/flymake-resources~. -No guidance is given for the organisation of resource files inside the -~-resource~ directory; files can be organised at the author's discretion. +No guidance is given for the organization of resource files inside the +~-resource~ directory; files can be organized at the author's discretion. diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index d6322c2..376904d 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -136,7 +136,7 @@ being the result.") (cdr file-notify--test-remote-enabled-checked)) (defun file-notify--test-library () - "The used libray for the test, as string. + "The used library for the test, as a string. In the remote case, it is the process name which runs on the remote host, or nil." (if (null (file-remote-p temporary-file-directory)) diff --git a/test/lisp/url/url-parse-tests.el b/test/lisp/url/url-parse-tests.el index 154e091..443034a 100644 --- a/test/lisp/url/url-parse-tests.el +++ b/test/lisp/url/url-parse-tests.el @@ -156,7 +156,7 @@ ;; example mentioned in RFC3986, section 5.4. Reference Resolution Examples (should (equal (url-generic-parse-url "http://a/b/c/d;p?q") (url-parse-make-urlobj "http" nil nil "a" nil "/b/c/d;p?q" nil nil t)))) -(ert-deftest url-generic-parse-url/same-decument-reference () +(ert-deftest url-generic-parse-url/same-document-reference () "RFC 3986, section 4.4. Same-Document Reference / same-document reference: empty or number sign (\"#\") followed by a fragment identifier" (should (equal (url-generic-parse-url "") (url-parse-make-urlobj nil nil nil nil nil "" nil nil nil))) (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil nil nil nil "" "" nil nil))) commit 989bcc77ab576d7a83cb0194a9fc73ce51939042 Author: Daniel Colascione Date: Mon Jan 4 14:12:01 2016 -0800 Let users disable unsafe signal handling code * src/keyboard.c (syms_of_keyboard): New user variables `attempt-stack-overflow-recovery' and `attempt-orderly-shutdown-on-fatal-signal'. * src/sysdep.c (stack_overflow): Check `attempt-stack-overflow-recovery'. * src/emacs.c (terminate_due_to_signal): Check `attempt-orderly-shutdown-on-fatal-signal'. diff --git a/src/emacs.c b/src/emacs.c index 926aa98..d13413d 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -370,17 +370,20 @@ terminate_due_to_signal (int sig, int backtrace_limit) { signal (sig, SIG_DFL); - /* If fatal error occurs in code below, avoid infinite recursion. */ - if (! fatal_error_in_progress) + if (attempt_orderly_shutdown_on_fatal_signal) { - fatal_error_in_progress = 1; + /* If fatal error occurs in code below, avoid infinite recursion. */ + if (! fatal_error_in_progress) + { + fatal_error_in_progress = 1; - totally_unblock_input (); - if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) - Fkill_emacs (make_number (sig)); + totally_unblock_input (); + if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT) + Fkill_emacs (make_number (sig)); - shut_down_emacs (sig, Qnil); - emacs_backtrace (backtrace_limit); + shut_down_emacs (sig, Qnil); + emacs_backtrace (backtrace_limit); + } } /* Signal the same code; this time it will really be fatal. diff --git a/src/keyboard.c b/src/keyboard.c index 6fa38aa..eb2c756 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11659,6 +11659,25 @@ Currently, the only supported values for this variable are `sigusr1' and `sigusr2'. */); Vdebug_on_event = intern_c_string ("sigusr2"); + DEFVAR_BOOL ("attempt-stack-overflow-recovery", + attempt_stack_overflow_recovery, + doc: /* If non-nil, attempt to recover from C stack +overflow. This recovery is unsafe and may lead to deadlocks or data +corruption, but it usually works and may preserve modified buffers +that would otherwise be lost. If nil, treat stack overflow like any +other kind of crash. */); + attempt_stack_overflow_recovery = true; + + DEFVAR_BOOL ("attempt-orderly-shutdown-on-fatal-signal", + attempt_orderly_shutdown_on_fatal_signal, + doc: /* If non-nil, attempt to perform an orderly +shutdown when Emacs receives a fatal signal (e.g., a crash). +This cleanup is unsafe and may lead to deadlocks or data corruption, +but it usually works and may preserve modified buffers that would +otherwise be lost. If nil, crash immediately in response to fatal +signals. */); + attempt_orderly_shutdown_on_fatal_signal = true; + /* Create the initial keyboard. Qt means 'unset'. */ initial_kboard = allocate_kboard (Qt); } diff --git a/src/sysdep.c b/src/sysdep.c index 1af323e..a29155c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1622,6 +1622,9 @@ static unsigned char sigsegv_stack[SIGSTKSZ]; static bool stack_overflow (siginfo_t *siginfo) { + if (!attempt_stack_overflow_recovery) + return false; + /* In theory, a more-accurate heuristic can be obtained by using GNU/Linux pthread_getattr_np along with POSIX pthread_attr_getstack and pthread_attr_getguardsize to find the location and size of the commit e94b1799d4f4c57266bdbc4801b26fe0121b7c7a Author: Bill Wohler Date: Sun Jan 3 16:05:37 2016 -0800 ; * .gitignore: Add lisp/mh-e/mh-autoloads.el. diff --git a/.gitignore b/.gitignore index e544b10..a8f0e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Files that Git should ignore in the Emacs source directory. -# Copyright 2009-2015 Free Software Foundation, Inc. +# Copyright 2009-2016 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -116,6 +116,7 @@ lisp/leim/quail/quick-b5.el lisp/leim/quail/quick-cns.el lisp/leim/quail/tsang-b5.el lisp/leim/quail/tsang-cns.el +lisp/mh-e/mh-autoloads.el lisp/subdirs.el # Dependencies. commit 9bb557c30fde79f21cbab7a0793ae37edbdbac9f Author: Eli Zaretskii Date: Sun Jan 3 19:25:19 2016 +0200 ; * configure.ac: Improve wording of last commit. diff --git a/configure.ac b/configure.ac index cddebd4..2baafb9 100644 --- a/configure.ac +++ b/configure.ac @@ -2747,7 +2747,7 @@ dnl GNU/Linux only. case $with_file_notification,$NOTIFY_OBJ in gfile,* | yes,) if test "${HAVE_NS}" = yes; then - AC_MSG_ERROR(['--with-file-notification=gfile' is not supported. + AC_MSG_ERROR(['--with-file-notification=gfile' is not supported in NextStep builds. Consider kqueue instead.]) else EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24]) commit 21ad7279e47f0bc33acf36f0ac27f92808232dbd Author: Michael Albinus Date: Sun Jan 3 16:34:32 2016 +0000 * configure.ac: Add error message for gfile on Nextstep. diff --git a/configure.ac b/configure.ac index 94007a4..cddebd4 100644 --- a/configure.ac +++ b/configure.ac @@ -2746,7 +2746,10 @@ dnl has been added in glib 2.24. It has been tested under dnl GNU/Linux only. case $with_file_notification,$NOTIFY_OBJ in gfile,* | yes,) - if test "${HAVE_NS}" != yes; then + if test "${HAVE_NS}" = yes; then + AC_MSG_ERROR(['--with-file-notification=gfile' is not supported. +Consider kqueue instead.]) + else EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24]) if test "$HAVE_GFILENOTIFY" = "yes"; then AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.]) commit ef069ca8cc5377ed745bd2ad2521e544c57974cd Author: Glenn Morris Date: Sun Jan 3 06:25:27 2016 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index 6a8f539..1169ab4 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,4874 @@ +2016-01-03 John Wiegley + + Merge branch 'emacs-25-merge' + +2016-01-02 Vincent Belaïche + + Align textually on fix done for emacs-25 branch for bug#21054 + + * lisp/ses.el (ses-check-curcell): Suppress ``temporary fix'' comment, + and useless `(if t ...)' in order to align textually on fix done for + emacs-25 branch for bug#21054. + +2016-01-02 K. Handa + + support rendering of wider range of combinging characters by ftfont backend + + * lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend + supports rendering of combining characters, call + font-shape-gstring. + + * src/font.c (Ffont_get): Handle `combining-capability' property. + (syms_of_font): New symbol ":combining-capability'. + + * src/font.h (struct font_driver): New member combining_capability. + + * src/ftfont.c: Include "category.h". + (ftfont_driver): Initialize combining_capability to + ftfont_combining_capability. + (ftfont_shape_by_flt): If OTF is null, try to find a suitable + FLT in advance. + (ftfont_combining_capability): New function. + +2016-01-01 Andrew Hyatt + + Add notes on bug triage procedure + + * CONTRIBUTE: In section on the issue tracker, point to new triage file. + * admin/notes/triage: New file explaining triage procedure. + +2015-12-30 Vincent Belaïche + + Correct ses-rename-cell cursor-intangible text prop updating. + + There were two problems: + + - First ses-rename-cell has to work when called non interactively + (with non-nil CELL argument), so in this case the start pos of + put-text-property cannot be plainly (point), you need a + ses-goto-print call before + + - Second, the range itself was computed erronously, only the first + char was affected instead of the full cell width. This was not + noticeable prior to changes (Deprecate `intangible' and + `point-entered' properties) made by Stefan on 2015-04-13T19:51:15Z + + * lisp/ses.el (ses-rename-cell): Correct computation of position range + to which the 'cursor-intangible text property has to be set to cell + new name. + +2015-12-30 Vincent Belaïche + + Don't fake empty cells value by "" when printing with a lambda. + + When using a lambda expression printer function the user should be + free to format differently a really empty cell, ie. containing nil, + from a cell containing an empty string "". + + * ses.el (ses-call-printer): Replace `(or value "")' by just `value' + in the case of a lambda expression printer function. + + * ses.texi (Printer functions): Add example and description about + lambda expression printer function handling all the possible values, + including unexpected ones. + +2015-12-30 Vincent Belaïche + + Quick temporary hack to fix curcell refreshing. + + The problem was caused by change: 2015-04-13 Deprecate `intangible' + and `point-entered' properties. The problem is that this change has + removed the (setq ses--curcell t) setting in the ses-command-hook + function. + + * ses.el (ses-check-curcell): replace `(eq ses--curcell t)' by just `t' as + a condition to call function `ses-set-curcell'. Comment this as a quick + temporary hack to make it work, as I don't know yet whether a definite + correction would be to make the ses-set-curcell at every ses-check-curcell, + or to revert to the previous approach, ie marking ses--curcell as out-of-date + at every potentially cursor motion command. + +2015-12-30 Lars Magne Ingebrigtsen + + Restrictive URL checking tweaks + + * lisp/net/eww.el (eww): Check whether the domain is + restrictive instead of the string + (http://македонија.icom.museum is restrictive even if each + part is from a different script). + +2015-12-30 Lars Magne Ingebrigtsen + + New function `puny-highly-restrictive-domain-p' + + * lisp/net/puny.el (puny-highly-restrictive-string-p): Rename. + (puny-highly-restrictive-domain-p): New function. + +2015-12-30 Lars Magne Ingebrigtsen + + eww build fix (require puny) + +2015-12-30 Lars Magne Ingebrigtsen + + Transform non-restrictive domains to punycode for display + + * lisp/net/eww.el (eww): Check whether the domain is Highly + Restrictive in the Unicode IDNA sense. + +2015-12-30 John Wiegley + + Merge emacs-25 into master (using imerge) + +2015-12-29 Eli Zaretskii + + Fix typos in CC Mode manual + + * doc/misc/cc-mode.texi (c-offsets-alist, Style Variables): Fix + typos. (Bug#22267) + +2015-12-29 Eli Zaretskii + + Avoid assertion violations in compact_font_cache_entry + + * src/alloc.c (compact_font_cache_entry): Don't use VECTORP to + avoid assertion violation in ASIZE. (Bug#22263) + +2015-12-29 Eli Zaretskii + + Fix filling text with bidirectional characters in shr.el + + * lisp/net/shr.el (shr-insert-document): Bind + bidi-display-reordering to nil while filling lines. This is + required for when a line includes characters whose bidi + directionality is opposite to the base paragraph direction, + because columns are counted in the logical order. (Bug#22250) + +2015-12-29 Lars Ingebrigtsen + + Further Unicode restrictive fixups + + * puny.el (puny-highly-restrictive-p): Include the extra + identifier characters from table 3. + +2015-12-29 Martin Rudalics + + * src/xfns.c (x_create_tip_frame): Process alpha parameter. + +2015-12-29 Michael Albinus + + Sync with Tramp 2.2.13 + + * doc/misc/trampver.texi: Change version to "2.2.13.25.1". + + * lisp/net/tramp-compat.el (tramp-compat-delete-dups): + Use `tramp-compat-funcall'. + + * lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names): + Make `split-string' call compatible with older Emacsen. + + * lisp/net/trampver.el: Change version to "2.2.13.25.1". + +2015-12-29 Lambda Coder + + * doc/misc/tramp.texi: Editorial revisions to the Tramp manual + +2015-12-29 Lars Ingebrigtsen + + Mention that tls.el is secure by default, and will fail + +2015-12-29 Lars Ingebrigtsen + + Make tls.el use trustfiles by default + + * lisp/net/tls.el (tls-program): Add a certfile by default (bug#21227). + (open-tls-stream): Insert the trustfile by looking at + `gnutls-trustfiles'. + +2015-12-29 Lars Ingebrigtsen + + Refactor out gnutls-trustfiles + + * lisp/net/gnutls.el (gnutls-trustfiles): Refactor out for reuse by tls.el. + +2015-12-29 Lars Ingebrigtsen + + Remove --insecure from gnutls-cli invocation + + * tls.el (tls-program): Default to using secure TLS + connections (bug#19284). + +2015-12-29 Lars Ingebrigtsen + + Add a new function to say whether a string is restrictive + + * puny.el (puny-highly-restrictive-p): New function. + +2015-12-28 Paul Eggert + + Spelling fix + +2015-12-28 Paul Eggert + + Port report-emacs-bug to deterministic builds + + * lisp/mail/emacsbug.el (report-emacs-bug): Future-proof the + recent "built on" change to deterministic builds where + emacs-build-system will be nil. See: + http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01369.html + +2015-12-28 Jose A. Ortega Ruiz (tiny change) + + Fix URL auth error message + + * lisp/url/url-http.el (url-http-handle-authentication): Make the error + message more correct (bug#20069). + +2015-12-28 Lars Ingebrigtsen + + Mention the new puny.el library + +2015-12-28 Lars Ingebrigtsen + + IDNA-related fixes for the URL library + + * lisp/url/url-http.el (url-http-create-request): IDNA-encode + the Host: header. + + * lisp/url/url-util.el (url-encode-url): Don't hex-encode + domain names, but leave them as UTF-8, so that they can be + IDNA-encoded later when contacting the host. + +2015-12-28 Lars Ingebrigtsen + + IDNA-encode all domain names in `open-network-stream' + + * network-stream.el (open-network-stream) + (network-stream-open-plain, network-stream-open-starttls): + IDNA-encode all domain names, if needed. + +2015-12-28 Lars Ingebrigtsen + + Fix puny-encoding all-non-ASCII domains + + * puny.el (puny-encode-string): Fix the all-non-ASCII encoding case. + +2015-12-28 Lars Ingebrigtsen + + shr link traversal fixup + + * shr.el (shr-next-link): Don't bug out on adjacent links. + + Backport: + + (cherry picked from commit 1efc5f8b09273c359683ce13be95fb5df7a84311) + +2015-12-28 Lars Ingebrigtsen + + shr link traversal fixup + + * shr.el (shr-next-link): Don't bug out on adjacent links. + +2015-12-28 Tom Tromey + + set :safe on css-indent-offset + + * lisp/textmodes/css-mode.el (css-indent-offset): Add :safe 'integerp. + +2015-12-28 Lars Ingebrigtsen + + * eww.el (eww-mode): Remove superfluous bidi reset. + +2015-12-28 James Stout (tiny change) + + Make chunked encoding trailer detection more compliant + + * lisp/url/url-http.el + (url-http-chunked-encoding-after-change-function): Make + trailer detection more compliant (bug#16345). + +2015-12-28 Lars Ingebrigtsen + + Reconnect erc even on server errors + + * lisp/erc/erc-backend.el (erc-server-reconnect-p): Try to + reconnect even if a server error has occurred (bug#18527). + +2015-12-28 Lars Ingebrigtsen + + Fix punycode short circuit logic + + * puny.el (puny-encode-domain): Fix short-circuit logic. + +2015-12-28 Martin Rudalics + + Fix Bug#10873 in `report-emacs-bug' + + * lisp/mail/emacsbug.el (report-emacs-bug): If + `report-emacs-bug-no-explanations' is nil, make sure we can show + mail and warnings buffer on this frame (Bug#10873). + +2015-12-28 Lars Ingebrigtsen + + IDNA speed up + + * puny.el (puny-encode-domain): Make the common non-IDNA case faster + +2015-12-28 Lars Ingebrigtsen + + Add IDNA domain encode/decode functions + + * puny.el (puny-decode-domain): New function. + (puny-encode-domain): Ditto. + (puny-decode-digit): Fix digit decoding error. + +2015-12-28 Lars Ingebrigtsen + + Rename idna.el to puny.el + + * puny.el: Renamed from idna.el to avoid name collisions with + the external idna.el library. + +2015-12-28 Lars Ingebrigtsen + + Always reset the bidi direction + + * eww.el (eww-display-html): Always reset the bidi direction + to `left-to-right' (bug#22257). + +2015-12-28 Alan Mackenzie + + Allow line comments ending with escaped NL to be continued to the next line. + + Use this in C, C++, and Objective C Modes. Fixes bug#22246 + + * src/syntax.c (comment-end-can-be-escaped): New buffer local variable. + (forw-comment, back-comment): On encountering an end of comment character, + test whether it is escaped when `comment-end-can-be-escaped' is non-nil. + + * doc/lispref/syntax.texi (Control Parsing): Describe + `comment-end-can-be-escaped'. + + * etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'. + + * lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'. + +2015-12-28 Katsumi Yamaoka + + lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Keep old Emacsen compatibility + + * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): + Don't use split-string with 4th arg for old Emacsen compatibility. + +2015-12-27 Dmitry Gutov + + Rename project-library-roots to project-external-roots + + * lisp/progmodes/project.el (project-library-roots): Rename to + project-external-roots. + (project-library-roots-function): Rename to + project-vc-external-roots-function. Only use it in the VC + backend, for now. Update project-external-roots accordingly. + (project-vc-library-roots): Remove. + (project-or-libraries-find-regexp): + Rename to project-or-external-find-regexp. + + * lisp/progmodes/elisp-mode.el (elisp-library-roots): + Rename to elisp-load-path-roots. + + * lisp/progmodes/etags.el (etags-library-roots): Remove. Use + an anonymous function for the default value of + project-vc-external-roots-function. + +2015-12-27 Lars Ingebrigtsen + + * idna.el (idna-decode-string-internal): Implement decoding. + +2015-12-27 Lars Ingebrigtsen + + Further IDNA tweaks + + (idna-encode-string): Make idna-encode-string safe for + non-ASCII use. + +2015-12-27 Lars Ingebrigtsen + + Clean up the code slightly + +2015-12-27 Lars Ingebrigtsen + + Added basic idna encoding support + + * lisp/net/idna.el: New file. + +2015-12-27 Vivek Dasmohapatra + + Disconnection fixes for erc + + * lisp/erc/erc-backend.el (erc-server-reconnect-p): Don't + reconnect if the user has disconnected explicitly (bug#4589). + +2015-12-27 Thomas Riccardi (tiny change) + + Further erc asynch fixes + + * lisp/erc/erc-backend.el (erc-process-sentinel-2): Make + erc-server-connect to return even if the connection is not + ready. Then erc-open and erc-server-reconnect do the + same. (bug#5650). + +2015-12-27 Vivek Dasmohapatra + + Make erc connect asynchronously + + * lisp/erc/erc-backend.el (erc-server-reconnect): Use it to + reconnect asynchronously. + + * lisp/erc/erc-backend.el (erc-open-network-stream): New function (bug#5650). + +2015-12-27 Deniz Dogan + + Clear erc user list upon disconnection + + * lisp/erc/erc-backend.el (erc-process-sentinel): Clear channel user + lists upon disconnection. This prevents invalid channel + user lists when reconnecting (bug#10947). + +2015-12-27 Lars Ingebrigtsen + + Don't bug out in erc after waking from sleep + + * erc-backend.el (erc-server-send-ping): If the server has + closed connection, this may already have been detected and + `erc-server-last-received-time' has been set to nil (bug#13608). + +2015-12-27 David Edmondson + + Proxy error in erc with multiple clients + + * lisp/erc/erc.el (erc-channel-receive-names): Fix errors + generated when multiple IRC clients talk to a single IRC proxy + (bug#19034). + + Backport: + + (cherry picked from commit 507e98a54d1aa37823c64993d6b59257a82fe8f4) + +2015-12-27 David Edmondson + + Proxy error in erc with multiple clients + + * lisp/erc/erc.el (erc-channel-receive-names): Fix errors + generated when multiple IRC clients talk to a single IRC proxy + (bug#19034). + +2015-12-27 Dima Kogan + + Ensure that we don't have several timers in erc + + * lisp/erc/erc-backend.el (erc-server-setup-periodical-ping): Checks + for existing timers in the alist before adding new ones. If a + timer already exists, it is cancelled and + overwritten. (bug#19292). + +2015-12-27 Jens Lechtenboerger + + Fix mml-sec build warnings + + * lisp/gnus/mml-sec.el: Fix warnings by adding autoloads + (bug#18718). + + Backport: + + (cherry picked from commit 3603097f62f5f4aa5451716e9ac380161f6829e2) + +2015-12-27 Jens Lechtenboerger + + Fix mml-sec build warnings + + * lisp/gnus/mml-sec.el: Fix warnings by adding autoloads + (bug#18718). + +2015-12-27 Lars Ingebrigtsen + + Don't insert erc logs at the end + + * erc-log.el (erc-log-setup-logging): Insert the previous log + at the start of the buffer, not at the end (bug#20496). + +2015-12-27 Lars Ingebrigtsen + + (eww-setup-buffer): Restore left-to-right defaults + + * eww.el (eww-setup-buffer): Restore left-to-right defaults. + + Backport: + + (cherry picked from commit 96c874b96b617c124d500a94de761a61f2a08685) + +2015-12-27 Lars Ingebrigtsen + + (eww-setup-buffer): Restore left-to-right defaults + + * eww.el (eww-setup-buffer): Restore left-to-right defaults. + +2015-12-27 Lars Ingebrigtsen + + Don't join erc channels doubly + + * erc-join.el (erc-autojoin-channels): Don't join channels + more than once (if you have several nicks) (bug#20695). + +2015-12-27 Eli Zaretskii + + Avoid leaving "ghost" of mouse pointer on MS-Windows + + * src/w32term.c (frame_set_mouse_pixel_position): + * src/w32fns.c (Fw32_mouse_absolute_pixel_position): Momentarily + disable "mouse trails" when moving the mouse pointer. (Bug#22247) + * src/w32term.c (frame_set_mouse_pixel_position): Include + w32common.h. + +2015-12-27 Lars Ingebrigtsen + + * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Fix typo in last check-in. + +2015-12-27 Jens Lechtenboerger + + Identify unsafe combinations of Bcc and encryption + + * lisp/gnus/gnus-util.el (gnus-subsetp): New function + * lisp/gnus/mml-sec.el (mml-secure-safe-bcc-list): New variable + * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): New function + +2015-12-27 Krzysztof Jurewicz (tiny change) + + Fix auth source lookups from erc with port numbers + + * lisp/erc/erc.el (erc-open): `auth-source' wants strings, not port + numbers (bug#20541). + +2015-12-27 Fran Litterio + + Run erc-kill-channel-hook always on exit + + * lisp/erc/erc.el (erc-kill-buffer-function): Run erc-kill-channel-hook + when erc-kill-queries-on-quit is set (bug#21187). + +2015-12-26 Paul Eggert + + Spelling fix + + * test/automated/url-parse-tests.el: + (url-generic-parse-url/same-document-reference): + Rename from url-generic-parse-url/same-decument-reference. + +2015-12-26 Paul Eggert + + Reword initial *scratch* for brevity, appearance + + * lisp/startup.el (initial-scratch-message): + Reword to avoid apostrophes, and to make it shorter. + See the thread starting in: + http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01241.html + +2015-12-26 Leo Liu + + Add ert-deftest to lisp-mode.el + + * lisp-mode.el (lisp-imenu-generic-expression, + lisp-el-font-lock-keywords-1): Add ert-deftest. + +2015-12-26 Lars Ingebrigtsen + + Mark imap changes as not needing doc changes + + * imap.el (imap-ssl-open): Remove + +2015-12-26 Lars Ingebrigtsen + + Use built-in encryption in imap.el + + * lisp/net/imap.el (imap-ssl-program): Remove (bug#21134). + (imap-starttls-open): Use open-network-stream instead of starttls.el. + (imap-tls-open): Use open-network-stream instead of tls.el. + +2015-12-26 Eli Zaretskii + + Don't try using /bin/sh in artist.el on MS-Windows + + * lisp/textmodes/artist.el (artist-figlet-get-font-list-windows): + New function. + (artist-figlet-choose-font): Use it on MS-Windows and MS-DOS. + (Bug#20167) + +2015-12-26 Wolfgang Jenkner + + Always define gmalloc etc. in src/gmalloc.c + + This is a work-around to prevent the compiler from using semantic + knowledge about malloc for optimization purposes. E.g., gcc 5.2 + with -O2 replaces most of calloc's definition by a call to calloc; + see Bug#22085. + * src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc) + (aligned_alloc, free): Do not undef. Instead, define these as + functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc. + +2015-12-26 Eli Zaretskii + + Fix documentation of browse-url browser-related functions + + * lisp/net/browse-url.el (browse-url) + (browse-url-default-browser, browse-url-default-windows-browser) + (browse-url-default-macosx-browser, browse-url-chromium) + (browse-url-kde, browse-url-text-xterm): Clarify the usage of ARGS + and NEW-WINDOW arguments in these functions. (Bug#19421) + +2015-12-26 Paul Eggert + + Propagate Bug#14412 fix to backtrace_eval_unrewind + + * src/eval.c (unbind_to): Redo so that the FALLTHROUGH!! comment + becomes accurate again. This shouldn’t affect behavior. + (backtrace_eval_unrewind): Apply the recent unbind_to fix here, too. + +2015-12-26 Eli Zaretskii + + Don't produce non-ASCII characters in *scratch* + + * lisp/startup.el (initial-scratch-message): Quote apostrophes to + avoid producing non-ASCII characters in the *scratch* buffer's + commentary. + +2015-12-26 Eli Zaretskii + + Document changes in 'compare-windows' + + * lisp/vc/compare-w.el (compare-windows-removed) + (compare-windows-added): Doc fix. + + * doc/emacs/files.texi (Comparing Files): Document the changes in + window selection by 'compare-windows'. + +2015-12-26 Eli Zaretskii + + Document 'vc-annotate-background-mode' + + * doc/emacs/maintaining.texi (Old Revisions): Document + 'vc-annotate-background-mode'. + +2015-12-26 Eli Zaretskii + + Document 'vc-region-history' + + * doc/emacs/maintaining.texi (VC Change Log): Document + 'vc-region-history'. + +2015-12-26 Eli Zaretskii + + Improve documentation of 'vc-push' + + * doc/emacs/maintaining.texi (Pulling / Pushing): Expand and + improve the documentation of 'vc-push'. + + * lisp/vc/vc.el (vc-pull, vc-push): Doc fix. + +2015-12-26 Alain Schneble + + Include the tests for the URL parsing fixes + +2015-12-26 Alain Schneble + + Make relative URL parsing and resolution consistent with RFC 3986 (bug#22044) + + * test/lisp/url/url-parse-tests.el: Add tests covering url-generic-parse-url. + * test/lisp/url/url-expand-tests.el: Add tests covering url-expand-file-name. + * lisp/url/url-parse.el (url-generic-parse-url): Keep empty fragment + information in URL-struct. + * lisp/url/url-parse.el (url-path-and-query): Do not artificially turn empty + path and query into nil path and query, respectively. + * lisp/url/url-expand.el (url-expander-remove-relative-links): Do not turn + empty path into an absolute ("/") path. + * lisp/url/url-expand.el (url-expand-file-name): Properly resolve + fragment-only URIs. Do not just return them unchanged. + * lisp/url/url-expand.el (url-default-expander): An empty path in the relative + reference URI should not drop the last segment. + + Backport: + + (cherry picked from commit b792ecea1715e080ad8e232d3d154b8a25d2edfb) + +2015-12-26 Eli Zaretskii + + Document 'url-user-agent'. + + * lisp/url/url-http.el (url-user-agent): Move from here... + * lisp/url/url-vars.el (url-user-agent): ...to here. This is to + keep all the URL defcustoms in one place, and also have it defined + whenever the URL library is loaded. + + * doc/misc/url.texi (Customization): Document 'url-user-agent'. + +2015-12-26 Eli Zaretskii + + Document protocols supported by URL library via Tramp + + * doc/misc/url.texi (Tramp): New node, describes the URL schemes + supported via Tramp. + (Supported URL Types, file/ftp, rlogin/telnet/tn3270): Mention + Tramp. + +2015-12-26 Eli Zaretskii + + Document changes in Shell-script mode + + * lisp/progmodes/sh-script.el (sh-mode, sh-set-shell): Document + the 'sh-shell' file-local variable. + (top level): Add an auto-load form to avoid byte-compiler warning + about 'comint-send-string'. + +2015-12-26 Eli Zaretskii + + Fix documentation of 'ses-define-local-printer' + + * doc/misc/ses.texi (Printer functions): Fix whitespace between + sentences and punctuation. Add an index entry for + 'ses-define-local-printer'. + +2015-12-26 Shakthi Kannan + + Document 'ert-summarize-tests-batch-and-exit' + + * doc/misc/ert.texi (Running Tests in Batch Mode): Document + 'ert-summarize-tests-batch-and-exit'. + +2015-12-26 Eli Zaretskii + + Avoid assertion violation in unbind_to + + * src/eval.c (unbind_to) : Avoid assertion violation + if we get here with an object that is not a symbol. (Bug#14412) + +2015-12-25 Andreas Schwab + + Don't treat /foo/bar:mumble as ange-ftp address + + * lisp/net/browse-url.el (browse-url-filename-alist): Match colons + only in the first component. (bug#5362) + +2015-12-25 Lars Ingebrigtsen + + Follow redirects in eww + + Merge conflict, but I think I resolved it. + + Follow meta refresh tags in eww + + * eww.el (eww-tag-meta): Follow meta refresh tags (bug#22234). + + Backport: + +2015-12-25 Lars Ingebrigtsen + + Allow http://user:pass@foo/ URLs again + + * lisp/url/url-auth.el (url-basic-auth): Allow explicit + user/passwords in URLs (bug#19046). + + Backport: + + (cherry picked from commit b563715a2db265517d5a77f165a42afa1e233fdd) + +2015-12-25 Samer Masterson + + Autoload url-insert-buffer-contents + + * lisp/url/url-handlers.el: Add autoload cookie so that + `package-list-packages' doesn't bug out (bug#21927) (tiny change) + + Backport: + + (cherry picked from commit 7a7b5b492ff9929eecd90c4564db6fbf3b192323) + +2015-12-25 Eli Zaretskii + + Make sure *scratch* etc. use forward slashes in its default-directory + + * lisp/startup.el (normal-top-level): On MS-Windows, convert + backslashes to forward slashes while decoding default-directory + of the initially-created buffers. + +2015-12-25 Lars Ingebrigtsen + + More eww file name coding fixes + + * eww.el (eww-decode-url-file-name): Use the base coding + system to check for encodability. + + Backport: + + (cherry picked from commit a8627008abe4ab339df19b417776da28b3ce0fc7) + +2015-12-25 Lars Ingebrigtsen + + Always save eww history + + * eww.el (eww-setup-buffer): Always save history, even when + called from outside the eww buffer (bug#19638). + + Backport: + + (cherry picked from commit 2a0f18d9b6ce0ccce3d9c4a4a3b5743bae71b41e) + +2015-12-25 Lars Ingebrigtsen + + Default web pages to right-to-left + + * eww.el (eww-mode): Most web pages are left-to-right, so make + that the default (bug#19801). + + * shr.el (shr-tag-html): Respect "dir" attributes + (left-to-right, right-to-left). + + Backport: + + (cherry picked from commit 9e089ec8a380ec3758fcf1564c5f86dc92c68c2a) + +2015-12-25 Lars Ingebrigtsen + + Make toggling checkboxes work again + + * eww.el (eww-update-field): Make toggling checkboxes work + again (bug#21881). + + Backport: + + (cherry picked from commit 5e56f606952e5e81b4d3a93ea70e791b74b33041) + +2015-12-25 Lars Ingebrigtsen + + Don't store cookies with empty names + + * lisp/url/url-cookie.el (url-cookie-store): Refuse to store + cookies with empty names (bug#21936). + + Backport: + + (cherry picked from commit 9f0fd7cb1aec3eb9e2e0f7b8854c30870286d96c) + +2015-12-25 Lars Ingebrigtsen + + Stop rendering HTML before specdlr exhaustion + + Fixes: 22117 + + * shr.el (shr-descend): Stop rendering before we run out of + specpdl room (bug#22117). + + Backport: + + (cherry picked from commit 248da292fe46224b0b5a79b632c89cf4de2c2081) + +2015-12-25 Lars Ingebrigtsen + + Use cl-reduce, not reduce. + + Backport: + + (cherry picked from commit fe4606f93b91ff3d046aee0cf21ecc277af7a786) + +2015-12-25 Lars Ingebrigtsen + + Allow several tags in shr + + * shr.el (shr-table-body): New function to find the real body + of a table. + (shr-tag-table): Use it to render several tags in a + table (bug#22170). + + Backport: + + (cherry picked from commit cdaf33029d6620073833876d76056045ecfbc7c4) + +2015-12-25 Lars Ingebrigtsen + + Make prettier unique file names in eww + + (eww-make-unique-file-name): Make unique file names by making + files like foo(2).jpg instead of foo(1)(2).jpg. + + Backport: + + (cherry picked from commit edfdd0a6cbdfa9e5e4bd0553e2b489401ca39266) + +2015-12-25 Lars Ingebrigtsen + + Decode hex-encoded URLs before using them as file names + + * eww.el (eww-decode-url-file-name): New function. + (eww-download-callback): Use it to decode file names before + saving them. + + Backport: + + (cherry picked from commit af22a010d87516c2a646572fb27512c03057784f) + +2015-12-25 Ashish SHUKLA + + Add FreeBSD cert bundle + + * doc/misc/emacs-gnutls.texi (Help For Users): Document + FreeBSD bundle. + + * lisp/net/gnutls.el (gnutls-trustfiles): Add FreeBSD cert bundle. + + Backport: + + (cherry picked from commit 60c0f1a18ad88d6dc1a8f4ee5d9d18940eaeb6f7) + +2015-12-25 Lars Ingebrigtsen + + Ignore invalid SVG images + + * shr.el (shr-tag-svg): Ignore SVG images that have no width + or height, because these can't be displayed by ImageMagick, + anyway. + + Backport: + + (cherry picked from commit 821107d53c2e390240d25c036b99ebbf9b4a93b6) + +2015-12-25 Lars Ingebrigtsen + + shr table rendering fix + + * shr.el (shr-tag-table): Allow rendering body-less tables + that have headers. + + Backport: + + (cherry picked from commit b05471e42c17e02c56c87d7599ada0c124a5fe09) + +2015-12-25 Eli Zaretskii + + Restore info about the build host in bug reports + + * lisp/mail/emacsbug.el (report-emacs-bug): Report the system on + which Emacs was built. This is important information for + investigating bug reports reported by users who don't build their + Emacs. + +2015-12-25 Eli Zaretskii + + Fix bootstrap broken by changes related to OS X file-name encoding + + * lisp/international/ucs-normalize.el (eval-when-compile): Make + sure char-code-property-alist includes elements that allow access + to 'decomposition' and 'canonical-combining-class' Unicode + properties, as compiling ucs-normalize.el requires that. + * lisp/loadup.el (featurep 'ns): Load ucs-normalize and ns-win + only of charprop.el was already loaded. + + * src/Makefile.in ($(lispsource)/international/ucs-normalize.elc): + New order-only dependency. + +2015-12-25 Leo Liu + + * ido.el (ido-add-virtual-buffers-to-list): Use bookmark-get-filename. + +2015-12-25 Michael Albinus + + Make tramp-test29-vc-registered more robust + + * test/automated/tramp-tests.el (tramp-test29-vc-registered): + Move `bzr' case down. Skip test when `vc-create-repo' fails. + Remove instrumentation. + +2015-12-24 YAMAMOTO Mitsuharu + + * lisp/term/x-win.el (x-gtk-stock-map): Fix typo. + +2015-12-23 Katsumi Yamaoka + + Fix `gnus-union' so as to behave like `cl-union' + + * lisp/gnus/gnus-group.el (gnus-group-prepare-flat): + Make gnus-union use `equal' to compare items in lists. + + * lisp/gnus/gnus-util.el (gnus-union): + Make it behave like cl-union partially. + +2015-12-23 Paul Eggert + + Fix dired.c typo with ptrdiff_t vs Lisp_Object + + * src/dired.c (file_name_completion): Don't assume Lisp_Object is + an integer type, fixing a problem introduced in the recent fix for + Bug#22169. + +2015-12-23 Eli Zaretskii + + Document default process sentinel more prominently + + * doc/lispref/processes.texi (Asynchronous Processes): Mention the + defaults for process filter and sentinel. Provide cross-references. + (Process Information): Provide cross-references to where filters + and sentinels are described. + (Filter Functions): Add an index entry for "default filter". + (Sentinels): Add a few status messages not documented previously. + Resolve the "killed" confusion. Document and describe the default + sentinel. (Bug#22220) + +2015-12-23 Eli Zaretskii + + Fix file-name completion on OS X + + * src/dired.c (file_name_completion): Reject false matches due to + file-name-coding-systems that decompose characters when encoding + file names, by comparing decoded file names as well. (Bug#22169) + (syms_of_dired) : New DEFSYM. + + * lisp/international/ucs-normalize.el (utf-8-hfs): Give it a + non-nil 'decomposed-characters' property. + +2015-12-23 Anders Lindgren + + File-name completion of non-ASCII characters on OS X (bug#22169) + + The coding system `utf-8-nfd', locally defined in ns-win.el, + didn't provide a :pre-write-conversion method, causing file name + completion of non-ASCII characters to fail. Solved by using the + `utf-8-hfs' coding system provided by `ucs-normalize'. + + * lisp/loadup.el: Load international/ucs-normalize (when building + for ns). + + * lisp/term/ns-win.el (utf-8-nfd): Made `utf-8-nfd' as alias for + `utf-8-hfs' and removed the old implementation. Set `utf-8-hfs' + as the file name coding system. + + * src/nsfns.c (ns-convert-utf8-nfd-to-nfc): Removed. + +2015-12-22 Tom Tromey + + Fix bug #18588 by making bug-reference-bug-regexp more lenient + + * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Accept + "bug NNNN". (Bug #18588) + +2015-12-22 Tom Tromey + + add some cl-* aliases to lisp-mode imenu + + * (lisp-imenu-generic-expression): Add cl-define-compiler-macro, + cl-defgeneric, and cl-defmethod. + +2015-12-22 Tom Tromey + + Make a variable buffer-local + + * lisp/generic-x.el (generic-rul-mode-setup-function): Make + font-lock-syntax-table buffer-local. (Bug #21627) + +2015-12-22 Eli Zaretskii + + Fix decoding of text in URLs retrieved by EWW + + * lisp/net/eww.el (eww-render): Pass 'charset' to + 'eww-display-raw'. Use the value of 'last-coding-system-used', if + non-nil, to set 'buffer-file-coding-system' of the buffer where we + show the URL. + (eww-display-html, eww-display-raw): Decode the text correctly, + using the charset found in the headers, and defaulting to UTF-8. + If the user told us to use a specific encoding, override the + charset from the headers. (Bug#22222) + +2015-12-22 Alan Mackenzie + + Fix a coding error in c-forward-<>-arglist-recur. Fixes bug#22156 + + * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): Remove unused + variable `tmp'. + After a failed search for a matching ">", restore point before continuing. + +2015-12-22 Michael Albinus + + Instrument Tramp tests + + * test/automated/tramp-tests.el (tramp-test29-vc-registered) + (tramp--test-utf8): Instrument tests. + +2015-12-22 Martin Rudalics + + Fix `display-buffer' call in `display-message-or-buffer' (Bug#22221) + + * lisp/simple.el (display-message-or-buffer): Call + `display-buffer' with ACTION instead of NOT-THIS-WINDOW + (Bug#22221). + +2015-12-21 Juri Linkov + + * lisp/saveplace.el (toggle-save-place, save-place-to-alist) + + (save-places-to-alist, save-place-dired-hook): + Check for dired-subdir-alist. (Bug#19851) + +2015-12-21 Paul Eggert + + Add FIXME comment re stack overflow and modules + +2015-12-20 Paul Eggert + + Revert some recent emacs-module commentary + + Most of the recently-added commentary was incorrect, due to the + possibility of stack overflow. + +2015-12-20 Paul Eggert + + Spelling fix: prefer "cooperate" to "co-operate" + +2015-12-20 Paul Eggert + + Port undo fixes to -fno-common + + Port recent fix for Bug#21968 to platforms like 'gcc -fno-common'. + * src/keyboard.c, src/keyboard.h (point_before_last_command_or_undo) + (buffer_before_last_command_or_undo): + Declare in keyboard.h, and define in keyboard.c, + instead of assuming the traditional Unix relaxed ref-def linkage. + +2015-12-20 Philipp Stephani + + Improve commentary for emacs-module.c + + * src/lisp.h: Document emacs-module.c assumptions about EQ and NILP. + * src/emacs-module.c (module_non_local_exit_get): Document that we + cannot use the current implementation. + (module_is_not_nil, module_eq): Document assumptions about EQ and + NILP. + +2015-12-20 Michael Albinus + + Suppress test on Mac OS X + + * test/automated/tramp-tests.el (tramp--test-darwin-p): New defun. + (tramp--test-utf8): Use it. + +2015-12-20 Alan Mackenzie + + Merge branch 'scratch/follow' into emacs-25 + + This allows Isearch, etc., to work well when Follow Mode is active. + +2015-12-19 Michael Albinus + + * tramp-sh.el (tramp-get-ls-command-with-w-option): Improve check. + +2015-12-19 Eli Zaretskii + + Fix last commit + + * doc/emacs/rmail.texi (Rmail Deletion): Document new behavior of 'u' + with numeric argument. + +2015-12-19 Eli Zaretskii + + Document new features of Rmail + + * doc/emacs/rmail.texi (Rmail Summary Edit, Rmail Deletion): + Document new behavior of 'd' and 'C-d' with numeric argument. + (Rmail Display): Document the rendering of HTML MIME parts. + +2015-12-19 Eli Zaretskii + + Improve documentation of new cl-lib functions + + * doc/misc/cl.texi (Predicates on Numbers, Numerical Functions): + Fix wording. + +2015-12-19 Eli Zaretskii + + Document the new feature of 'minibuffer-with-setup-hook' + + * lisp/files.el (minibuffer-with-setup-hook): Clarify how FUN is + added to `minibuffer-setup-hook'. + +2015-12-19 Eli Zaretskii + + Document new features of Font Lock + + * doc/lispref/modes.texi (Other Font Lock Variables): Document + 'font-lock-flush-function' and 'font-lock-ensure-function'. + (Font Lock Basics): Document the basic fontification functions + referenced in "Other Font Lock Variables". + + * lisp/font-lock.el (font-lock-flush, font-lock-ensure): Doc fix. + +2015-12-19 Eli Zaretskii + + Document new features of Rectangle mode + + * doc/emacs/killing.texi (Rectangles): Document "C-x C-x" in + rectangle-mark-mode. + +2015-12-19 Eli Zaretskii + + Manual followup to last change + + * doc/lispref/display.texi (Displaying Messages): Sync with the + doc string. (Bug#22210) + +2015-12-19 Eli Zaretskii + + Clarify doc string of 'display-message-or-buffer' + + * lisp/simple.el (display-message-or-buffer): Doc fix. Suggested + by Sebastian Wiesner . (Bug#22210) + +2015-12-19 Eli Zaretskii + + * doc/emacs/emacs.texi (Top): Update top-level menus. + + * doc/lispref/elisp.texi (Top): Update top-level menus. + +2015-12-19 Eli Zaretskii + + Document how to avoid file-local variables that aren't + + * doc/emacs/custom.texi (Specifying File Variables): Describe how + to prevent Emacs from interpreting unrelated text as file-local + variables. (Bug#22166) + +2015-12-19 Dave Thomas (tiny change) + + Fix a typo in eterm-color's termcap entry + + * lisp/term.el (term-termcap-format): Fix a typo in the "ue=" + entry. (Bug#22184) + +2015-12-19 Eli Zaretskii + + Allow 'browse-url-emacs' visit non-existent URLs + + * lisp/url/url-handlers.el (url-insert-file-contents): Don't + signal an error if VISIT is non-nil, to more faithfully emulate + the behavior of 'insert-file-contents'. (Bug#22160) + +2015-12-18 Paul Eggert + + Remove SunOS 4.x cruft + + Support for SunOS 4.x was removed in Emacs 23 but some cruft was left behind. + * lib-src/pop.c [sun]: Remove no-longer-needed include. + * lwlib/xlwmenu.c (SUNSO41): Remove. + +2015-12-18 Paul Eggert + + Merge from gnulib + + This mostly commentary fixes. + * doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib. + * lib/gnulib.mk: Regenerate with new gnulib-tool. + +2015-12-18 Michael Albinus + + Minor fixes in Tramp + + * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls): + Reorder ls arguments. + + * lisp/net/tramp.el (tramp-dissect-file-name): Fix docstring. + +2015-12-18 Michael Albinus + + Make tramp a built-in package + + * lisp/finder.el (finder-compile-keywords): Update + `package--builtins' also when Version: keyword is available. + + * lisp/net/trampver.el: Add Version: keyword. + (tramp-version): Change it to "2.2.13.25.1", in order to be + compatible with `version-to-list'. + +2015-12-18 Lele Gaifax + + * etc/tutorials/TUTORIAL.it: Update and fix typos. + +2015-12-18 Alan Mackenzie + + Rename `recenter-group' to `recenter-window-group' + + * doc/lispref/windows.texi (Textual Scrolling) + * lisp/window.el (top level, recenter-group) + * lisp/follow.el (follow-mode) + * lisp/isearch.el (isearch-back-into-window): Rename `recenter-group' to + `recenter-window-group' and `recenter-group-function' to + `recenter-window-group-function'. + +2015-12-18 Eli Zaretskii + + Fix vertical-motion in tabulated-list mode + + * src/indent.c (Fvertical_motion): When moving from line beginning + to point under line truncation, assume overshoot by one line only + if point actually lies beyond the window's right margin. + (Bug#22194) + +2015-12-18 Martin Rudalics + + Don't have help functions call x-display-pixel-width/-height on ttys + + * lisp/help.el (temp-buffer-max-height, temp-buffer-max-width): + Don't call x-display-pixel-width/-height on ttys. + +2015-12-17 Dmitry Gutov + + Use 'hg id' in vc-hg-previous-revision + + * lisp/vc/vc-hg.el (vc-hg-previous-revision): + Use 'hg id' to retrieve it (bug#22032). + +2015-12-17 Alan Mackenzie + + * lisp/follow.el (follow-sit-for): Remove (it's redundant). + +2015-12-17 Eli Zaretskii + + Fix a typo in the Emacs manual + + * doc/emacs/trouble.texi (Sending Patches): Fix a typo. Reported + by Lele Gaifax . (Bug#22193) + +2015-12-17 Eli Zaretskii + + Fix parsing netrc entries with ports + + * lisp/gnus/auth-source.el (auth-source-ensure-strings): Don't + make a list out of 't'. (Bug#22188) + + * test/automated/auth-source-tests.el + (auth-source-test-netrc-parse-entry): New test. + +2015-12-17 Paul Eggert + + Fix typo in Doug Lea malloc configure log + + * configure.ac (emacs_cv_var_doug_lea_malloc): + Fix typo that confused the log output of 'configure'. + +2015-12-16 Nicolas Petton + + * etc/NEWS: Mention the new pcase patterns `seq' and `map'. + +2015-12-16 Alan Mackenzie + + * etc/NEWS: Move entry on pcase to correct section + + (Accidentally omitted from previous commit) + +2015-12-16 Alan Mackenzie + + Add documentation for changes to Show Paren mode. + + * lisp/paren.el (show-paren-highlight-openparen): Enhance doc string. + + * doc/emacs/programs.texi (Matching): Add descriptions of some pertinent user + options, including the new show-paren-when-point-inside-paren and + show-paren-when-point-in-periphery. + + * etc/NEWS (.. Specialized Modes ...): Add an entry for Show Paren mode. + Move an entry on pcase to the Lisp Changes section. + +2015-12-16 Eli Zaretskii + + Document Eldoc changes + + * doc/emacs/programs.texi (Lisp Doc): Document Global Eldoc mode. + +2015-12-16 Eli Zaretskii + + Fix invocation of Python and Guile interpreters from gdb-mi + + * lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): Add + commands for interactive Python and Guile interpreters. + (gdb-send): Recognize various ways of exiting from Python and + Guile interpreters and returning to GDB. For details, see + http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00693.html + and http://stackoverflow.com/questions/31514741. + +2015-12-16 Paul Eggert + + Remove attempt to use C11 threads + + C11 threads are not needed for Emacs now, and their use is causing + hassles on FreeBSD 10.x. Problem reported by Ashish SHUKLA in: + http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00648.html + * configure.ac: Do not check for C11 threads. Remove unnecessary + fiddling with CPPFLAGS when configuring pthreads. + * src/emacs-module.c (main_thread, check_main_thread) + (module_init): Do not worry about C11 threads. + +2015-12-15 Michael Albinus + + Set utf8 encoding with stty in Tramp + + * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Move up uname check. Handle Mac OS X eol encoding. Set utf8 + encoding with stty. + +2015-12-15 Alan Mackenzie + + Tidy up documentation associated with window groups. + + * doc/lispref/windows.texi (Basic Windows): Add an @anchor for "Window + Groups". Correct example function to `window-group-start'. + (Window Start and End, Textual scrolling): Point to the new anchor. State + that (most of) the args in window group functions have the same meaning as for + the corresponding window primitives. + + * doc/lispref/positions.texi (Screen Lines). Same as above. + +2015-12-15 Michael Albinus + + Complete last commit + + * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Move uname check up. Handle Mac OS X eol encoding. + +2015-12-15 Michael Albinus + + Handle Mac OS X eol encoding in Tramp + + * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Handle Mac OS X eol encoding. + +2015-12-15 YAMAMOTO Mitsuharu + + Fix variable name typo in compute_tip_xy + + * src/w32fns.c (compute_tip_xy): + * src/xfns.c (compute_tip_xy): Modify *root_x instead of *root_y + when `right' is integer. + +2015-12-14 foudfou + + * lisp/ibuffer.el: Add ability to (un-)mark or delete buffers in the region. + +2015-12-14 Tassilo Horn + + Revert "Fix rx matcher overflow without limiting" + + This reverts commit fe27e037663d36be3e5741c2ce86ab4ee8017db1. + +2015-12-14 Alan Mackenzie + + Ispell: Bind isearch-regexp-function to nil around call to isearch..-new-loop + + * lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay): bind + isearch-regexp-function to nil around call to isearch-lazy-highligh-new-loop. + +2015-12-14 Tassilo Horn + + Fix rx matcher overflow without limiting + + * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve last + change to the regexp without imposing a limit on the length of the + options. + +2015-12-14 Alan Mackenzie + + Enhance ispell-skip-region-alist by generating part of it at runtime. + + * lisp/textmodes/ispell.el (ispell--\\w-filter, ispell--make-\\w-expression) + (ispell--make-filename-or-URL-re): New functions which generate a regexp. + (ispell-skip-region-alist): Remove the bit that matches a filename/URL, etc. + (ispell-begin-skip-region-regexp, ispell-skip-region-list, ispell-message): + Include the result of ispell--make-filename-or-URL-re in regexps. + +2015-12-14 Glenn Morris + + * build-aux/gitlog-to-emacslog: Ignore more pointless merge commits. + +2015-12-14 Alan Mackenzie + + Replace GROUP argument in six window primitives by new functions. + + * doc/lispref/windows.texi (Window Start and End, Textual Scrolling) + * doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument + from description of six window functions. Add in description of new functions + window-group-start, window-group-end, set-window-group-start, + pos-visible-in-window-group-p, recenter-group and move-to-window-group-line, + together with the six variables indirecting to the pertinent group + functions. + + * src/window.c + * src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it + applies to these two files, which added the GROUP argument to six window + primitives. + + * lisp/follow.el (follow-mode): Use updated variable names for the indirected + functions. + + * lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window) + (isearch-back-into-window, isearch-lazy-highlight-new-loop) + (isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls + to window primitives (e.g. window-start) with a GROUP argument by calls to + new functions (e.g. window-group-start). + + * lisp/ispell.el (ispell-command-loop): Replace call to + pos-visible-in-window-p with pos-visible-in-window-group-p. + + * lisp/window.el (window-group-start, window-group-end) + (set-window-group-start, recenter-group, pos-visible-in-window-group-p) + (selected-window-group, move-to-window-group-line): New functions. + (window-group-start-function, window-group-end-function) + (set-window-group-start-function, recenter-group-function) + (pos-visible-in-window-group-p-function, selected-window-group-function) + (move-to-window-group-line-function): New variables. + +2015-12-14 Vitorio Miguel (tiny change) + + * etc/tutorials/TUTORIAL.pt_BR: Fix a typo. (Bug#22165) + +2015-12-13 Eli Zaretskii + + Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25 + +2015-12-13 Tassilo Horn + + Improve regex to not trigger stack overflow + + * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regex in + order not to trigger a stack overflow in regex matcher with unbalanced + brackets (bug#22146). + +2015-12-13 Eli Zaretskii + + Fix visiting files with raw-text + + * src/fileio.c (Finsert_file_contents): Fix setting buffer unibyte + when some stuff was actually read. (Bug#22162) + +2015-12-13 Tassilo Horn + + Fix regex matching keyval labels + + * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Fix regexp + matching keyval labels. + +2015-12-13 Michael Albinus + + * lisp/ido.el (ido-file-name-all-completions-1): Do not raise an error + + ... in case of Tramp. (Bug#20821) + +2015-12-12 Paul Eggert + + Fix performance regression with gcc -O0 + + This fixes the smaller performance hit that I noted in: + https://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00357.html + * src/alloc.c (macro_XPNTR_OR_SYMBOL_OFFSET, macro_XPNTR): + * src/puresize.h (puresize_h_PURE_P) + (puresize_h_CHECK_IMPURE): + New macros, with the old contents of the functions. + * src/alloc.c (XPNTR_OR_SYMBOL_OFFSET, XPNTR): + * src/puresize.h (PURE_P, CHECK_IMPURE): + Use the new macros. Also macros, if DEFINE_KEY_OPS_AS_MACROS. + * src/conf_post.h (ATTRIBUTE_UNUSED): + * src/lisp.h (DEFINE_KEY_OPS_AS_MACROS): New macros. + +2015-12-12 Artur Malabarba + + * lisp/emacs-lisp/package.el (package-unpack): Security check + + Check that we received the package we were offered. + +2015-12-12 Artur Malabarba + + * lisp/emacs-lisp/package.el (package--compile): Don't activate + + `package-unpack' takes care of all activations now (other than + `package-initialize). `package--compile' now only compiles. + +2015-12-12 Eli Zaretskii + + Document the new bindings of and in the minibuffer + + * doc/emacs/mini.texi (Minibuffer History): Describe the new + bindings of and in the minibuffer. + +2015-12-12 Eli Zaretskii + + Document new features of Ido + + * doc/misc/ido.texi (Misc): Document 'C-S-b'. + +2015-12-12 Martin Rudalics + + Fix frame height calculations with added menu bar on Windows (Bug#22105) + + * doc/lispref/frames.texi (Parameter Access): Mention pitfalls + when simultaneously specifying multiple parameters for + `modify-frame-parameters' that all may change the frame's size. + * src/w32fns.c (x_set_menu_bar_lines): Don't set + windows_or_buffers_changed here. + (my_create_tip_window, Fx_show_tip): Call AdjustWindowRect + with third argument false. + * src/w32menu.c (set_frame_menubar): Set + windows_or_buffers_changed here. + * src/w32term.c (x_set_window_size): Determine third argument of + AdjustWindowRect from whether the frame has a menu bar and not + from whether it wants one. + +2015-12-12 Eli Zaretskii + + Document the change in interactive shell mode + + * doc/emacs/misc.texi (Interactive Shell): Document that the + '*shell*' buffer by default displays in a new window. + +2015-12-12 Eli Zaretskii + + Document new features of package.el + + * doc/emacs/package.texi (Package Menu): Document the 'external' + status and the new menu commands. + (Package Installation): Document archive priorities. + + * lisp/emacs-lisp/package.el (package-archive-priorities): Doc fix. + (package-menu-hide-low-priority): Doc fix. + +2015-12-12 Eli Zaretskii + + Update and document new features of xterm support + + * doc/emacs/frames.texi (Text-Only Mouse): Document that + track-mouse is supported by newer xterm versions. + +2015-12-12 Eli Zaretskii + + Document new features of Prettify Mode + + * doc/emacs/programs.texi (Misc for Programs): Document + 'prettify-symbols-compose-predicate' and + 'prettify-symbols-unprettify-at-point'. + + * lisp/progmodes/prog-mode.el (prettify-symbols-alist) + (prettify-symbols-default-compose-p) + (prettify-symbols-compose-predicate) + (prettify-symbols--compose-symbol): Doc fixes. + +2015-12-12 Eli Zaretskii + + Document multi-mode indentation facilities + + * doc/lispref/text.texi (Mode-Specific Indent): Document + 'prog-indentation-context', 'prog-first-column', and 'prog-widen'. + + * lisp/progmodes/prog-mode.el (prog-indentation-context) + (prog-widen): Doc fixes. + +2015-12-12 Eli Zaretskii + + Document 'vc-refresh-state' + + * doc/emacs/maintaining.texi (Version Control): Document + 'vc-refresh-state'. + + * lisp/vc/vc-hooks.el (vc-refresh-state): Doc fix. + +2015-12-12 Eli Zaretskii + + Fix echo for "C-u" + + * src/keyboard.c (command_loop_1): Undo last change. It caused + duplicate echo of C-u. (Bug#22107) + +2015-12-11 Eli Zaretskii + + Avoid errors when creating files under SVN in new directory + + * lisp/vc/vc-svn.el (vc-svn-registered): Use + file-accessible-directory-p, to avoid cd'ing to a non-existing + directory, which signals an error on some systems. (Bug#21984) + (vc-svn-checkin): Call log-edit-extract-headers with 2 arguments. + Use declare-function to avoid byte-compiler warnings. + +2015-12-11 Eli Zaretskii + + Improve Lua support in etags + + * lib-src/etags.c (Lua_functions): Skip spaces before looking for + "function". + + * etc/NEWS: Mention improved Lua support by 'etags'. + + * test/etags/lua-src/test.lua (test): Add tests for indented + function definitions. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to the modified Lua tests. + +2015-12-11 Eli Zaretskii + + Fix 'this-command-keys' wrt prefix argument + + * src/keyboard.c (command_loop_1): Restore the feature whereby C-u + was part of this-command-keys, but not of this-single-command-keys. + (Bug#22107) + + * lisp/simple.el (internal-echo-keystrokes-prefix): Add + commentary about the function's return value. + +2015-12-11 Eli Zaretskii + + * lisp/files.el (load-library): Doc fix. (Bug#22140) + +2015-12-11 Eli Zaretskii + + Improve and document Ruby support in 'etags' + + * lib-src/etags.c (Ruby_suffixes): Add ".ruby". + (Ruby_functions): Support "module" and overloaded operators. + (Ruby_help): Mention "module". + + * test/etags/ruby-src/test.rb: + * test/etags/ruby-src/test1.ruby: New files. + * test/etags/Makefile (RBSRC): New tests. + (SRCS): Add ${RBSRC}. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to the new Ruby tests. + + * doc/man/etags.1: Mention Ruby support. + * etc/NEWS: Mention Ruby support. + +2015-12-11 Xi Lu + + Initial support for Ruby in 'etags' + + * lib-src/etags.c : New variable. + (lang_names): Add an entry for Ruby. + (Ruby_functions): New function. (Bug#22116) + +2015-12-11 Eli Zaretskii + + Clarify documentation of 'modify-frame-parameters' + + * doc/lispref/frames.texi (Parameter Access): Clarify what "ignored + PARMs" mean for 'modify-frame-parameters'. + + * src/frame.c (Fmodify_frame_parameters): Clarify what "ignored + PARMs" mean for this function. (Bug#22104) + +2015-12-11 Eli Zaretskii + + Fix setting buffer unibyte when reading from a device + + * src/fileio.c (Finsert_file_contents): Call Fset_buffer_multibyte + to make a (possibly non-empty) buffer unibyte. (Bug#22096) + +2015-12-11 Eli Zaretskii + + Clarify documentation of 'values' + + * doc/lispref/eval.texi (Eval): Clarify that 'values' are not + updated by any evaluation commands in 'lisp-interaction-mode'. + (Bug#22056) + +2015-12-11 Anders Lindgren + + Fixed subversion vc error when opening file in new directory (bug#21984). + + * lisp/vc/vc-svn.el (vc-svn-registered): Check if directory exists. + +2015-12-09 Eli Zaretskii + + Yet another fix for when point ends up in invisible text + + * src/xdisp.c (redisplay_window): When someone forced + window-start, and honoring that failed to show the cursor, try + moving out of invisible text, before falling back to the middle of + the window. (Bug#22098) + +2015-12-09 Michael Albinus + + Fix error in Tramp perl script for cygwin + + * lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not raise an + error if file doesn't exist. + +2015-12-09 YAMAMOTO Mitsuharu + + Remove font workaround for limited outdated versions + + * src/macfont.m (mac_font_descriptor_get_adjusted_weight): Remove + workaround for HiraginoSans-W7 on OS X 10.11 and 10.11.1. + +2015-12-09 Anders Lindgren + + Don't add "." to load path (bug#21104) + + When configured with --enable-locallisppath=no, which is the + default for OS X, the load-path incorrectly was populated with ".". + + * src/lread.c (init_lread): Don't call `decode_env_path' when + PATH_SITELOADSEARCH is empty. + +2015-12-08 Artur Malabarba + + * lisp/emacs-lisp/package.el (package--with-response-buffer): + + Search for the blank-line in the right buffer. + +2015-12-08 Glenn Morris + + * test/automated/simple-test.el (undo-auto-boundary-timer): Update + for recent change. + +2015-12-08 Glenn Morris + + Fix some display-warning usage. + + * lisp/files.el (hack-local-variables, hack-dir-local-variables): + * lisp/calendar/diary-lib.el (diary-include-files, diary-sexp-entry): + * lisp/calendar/holidays.el (calendar-holiday-list): + * lisp/mail/rmailout.el (rmail-output-read-file-name): + Fix display-warning usage. + +2015-12-07 Glenn Morris + + * lisp/calendar/cal-html.el: Require diary-lib. + + (cal-html-list-diary-entries): Handle no diary. (Bug#21994) + +2015-12-07 Thomas Fitzsimmons + + Add Obsolete-since header to eudcb-ph.el + + * eudcb-ph.el: Add Obsolete-since header. + +2015-12-07 Paul Eggert + + Spelling fixes + + * doc/misc/calc.texi (Predefined Units): Use the bland modern + scientific style for spelling the units “ampere” and + “angstrom” rather than the older style “Ampere” and + “Ångstrom”. The latter spelling was wrong anyway (it should + have been “Ångström”). + * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): + Fix misspelling of ‘atom’ in code. + +2015-12-07 Eli Zaretskii + + Improve documentation of kill commands + + * lisp/simple.el (region-extract-function, delete-backward-char) + (delete-forward-char, kill-region, copy-region-as-kill) + (kill-ring-save): Better document the optional argument REGION in + the doc strings. Mention in the doc strings that text put in the + kill-ring can be filtered by 'filter-buffer-substring'. + + * doc/lispref/text.texi (Kill Functions): Mention that functions + described in this subsection can filter text they put in the + kill-ring. Add a cross-reference to "Buffer Contents" and an + index entry. Document the optional argument 'region' and its + effect. + (Bug#21315) + +2015-12-07 Alan Mackenzie + + Further progress making Isearch, Ispell, Replace work with Follow Mode. + + * lisp/follow.el: (follow-mode): Remove references to sit*-for-function, which + no longer exists. Add follow-post-command-hook to three special purpose + hooks at setup, and remove them at tear down. + + * lisp/isearch.el: (isearch-update): invoke isearch-update-post-hook before + isearch-lazy-highlight-new-loop. + (isearch-lazy-highlight-new-loop): Restore this function to what it previously + was, merging the functionality of isearch-lazy-highlight-maybe-new-loop into + it. + (isearch-lazy-highlight-maybe-new-loop): function removed. + + * lisp/replace.el: (replace-update-post-hook): New hook variable. + (perform-replace): Add second (nil) argument to looking-back. Invoke + replace-update-post-hook before calling replace-highlight. + + * lisp/textmodes/ispell.el: (ispell-update-post-hook): New hook variable. + (ispell-command-loop): invoke ispell-update-post-hook. Add GROUP argument to + call of pos-visible-in-window-p. + (ispell-display-buffer): Place *Choices* window at the top of the last window + in a window group. + +2015-12-07 Alan Mackenzie + + Amend doc of `mapconcat': it can take sequences, not merely strings. + + * doc/lispref/functions.texi (Mapping Functions): Amend the doc of `mapconcat' + to say that SEPARATOR and the results from FUNCTION may be any character + sequences, not just strings. Add an @xref to "Sequences Arrays Vectors". + +2015-12-07 Michael Albinus + + Fix an utf8 problem for Tramp on BSD + + * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Make lax check for utf8. + (tramp-get-remote-locale): Add "en_US.UTF-8" as candidate. + +2015-12-06 Thomas Fitzsimmons + + Make eudcb-ph.el obsolete + + * doc/misc/eudc.texi: Bump version to 1.40.0. + Remove PH/QI sections and mentions. + * lisp/obsolete/eudcb-ph.el: Make obsolete. + * lisp/net/eudc-vars.el (eudc-known-protocols): Remove ph. + (eudc-ph-bbdb-conversion-alist): Make obsolete. + * etc/NEWS: Mention this. (Bug#21191) + +2015-12-06 Paul Eggert + + Remove overenthusiastic eassert + + * src/lisp.h (XSYMBOL): Remove eassert incorrectly added in + previous change. It breaks on MS-Windows --with-wide-int. + Problem reported by Eli Zaretskii in: + http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00275.html + +2015-12-06 Paul Eggert + + Pacify gcc -Wparentheses + + * src/xdisp.c (row_containing_pos): Reparenthesize. + +2015-12-06 Paul Eggert + + Port mod-test to 32-bit Emacs --without-wide-int + + * modules/mod-test/test.el (mod-test-sum-test): + Bring back the 2**29 tests, but port them to 32-bit Emacs + --without-wide-int. + +2015-12-06 Michael Albinus + + Fix minor Tramp problems found on BSD + + * lisp/net/tramp-sh.el (tramp-perl-file-truename): Do not append + trailing slash. Quote apostrophes. + (tramp-sh-handle-file-truename): Do not append trailing slash in + the "ls" case. + (tramp-get-ls-command-with-w-option): New defun. + (tramp-do-file-attributes-with-ls) + (tramp-do-directory-files-and-attributes-with-stat): Use it. + + * test/automated/tramp-tests.el + (tramp-test31-special-characters-with-perl) + (tramp-test31-special-characters-with-ls) + (tramp-test32-utf8-with-perl, tramp-test32-utf8-with-ls): + Suppress also readlink. + +2015-12-06 Eli Zaretskii + + Fix cursor display when invisible text is at line beginning + + * src/xdisp.c (redisplay_window): When scrolling fails to show + point, prefer using the desired matrix if possible for finding the + fallback glyph row for displaying the cursor. (Bug#22098) + (row_containing_pos): Exit the loop as soon as we hit the first + disabled glyph row. Otherwise we risk accessing garbled data and + departing to the no-no land. + +2015-12-06 Paul Eggert + + Improve module interface when WIDE_EMACS_INT + + * src/emacs-module.c (plain_values): New constant. + (module_nil): Now a constant. + (Finternal_module_call, value_to_lisp_bits, lisp_to_value_bits) + (syms_of_module): Use if, not #ifdef, so that both sides are + checked at compile-time, and so that GCC doesn’t complain + about an unused var in the typical case. Also, depend on + plain_values, not on WIDE_EMACS_INT; the code shouldn’t assume + that WIDE_EMACS_INT implies !USE_LSB_TAG. + (value_to_lisp_bits, lisp_to_value_bits): New functions. + Sign-extend integers rather than zero-extending them, as small + negative integers are more likely. + (value_to_lisp, lisp_to_value): Rewrite in terms of the new *_bits + functions. + (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Define to 0 if not already defined. + (mark_modules): Remove. All uses removed. + (lisp_to_value): Don’t assume Fcons returns a pointer aligned + to GCALIGNMENT. + (syms_of_module): Check that module_nil converts to Qnil. + * src/lisp.h (lisp_h_XSYMBOL, XSYMBOL): Use signed conversion, since + we prefer signed to unsigned when either will do. + (TAG_PTR): Sign-extend pointers when USE_LSB_TAG, as this is + a bit better for emacs-module.c. + +2015-12-06 Paul Eggert + + Port mod-test to x86-64 GNU/Linux running 32-bit + + * modules/mod-test/test.el (mod-test-sum-test): + Don’t attempt to match descriptions to operating systems. + It didn’t work on Fedora x86-64 running a 32-bit executable, + and it’s not worth the trouble anyway. + Port to 32-bit platforms by removing an assumption about + fixnum widths. + +2015-12-06 Michael Albinus + + Fix auto-revert-tests.el when filenotify isn't used + + * test/automated/auto-revert-tests.el (auto-revert--wait-for-revert): + Make it working also when filenotify isn't used. + +2015-12-05 Juri Linkov + + * lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay): + + Let-bind isearch-regexp-function to nil. (Bug#22097) + +2015-12-05 Artur Malabarba + + * lisp/emacs-lisp/package.el: Don't install bad signatures (bug#22089) + + (package--with-response-buffer): NOERROR and ERROR-FORM only + handle connection errors. + (bad-signature): New error type. + (package--check-signature-content): Use it. + (package--check-signature): Properly distinguish connection errors + from bad-signature errors. Do the check for + `package-check-signature' `allow-unsigned' here instead of forcing + the callbacks to do it. Add a new argument, UNWIND. + (package--download-one-archive, package-install-from-archive): + Update usage of `package--check-signature'. + +2015-12-05 Ulf Jasper + + Fix Bug#22092. + + * lisp/calendar/icalendar.el (icalendar--get-unfolded-buffer): + Clean up inconsistent line endings. (Bug#22092) + (icalendar--clean-up-line-endings): New. + * test/automated/icalendar-tests.el (icalendar-real-world): Add test + for Bug#22092. + +2015-12-05 Eli Zaretskii + + Document 'bookmark-set-no-overwrite' + + * doc/emacs/regs.texi (Bookmarks): Document the new command + 'bookmark-set-no-overwrite' and its keybinding. + +2015-12-05 Eli Zaretskii + + Document new binding of 'mouse-buffer-menu' + + * doc/emacs/buffers.texi (Buffer Menus): 'mouse-buffer-menu' is + now also on C-F10. + +2015-12-05 Eli Zaretskii + + Initial documentation of dynamic modules + + * doc/lispref/loading.texi (Dynamic Modules): New section with + initial documentation for dynamic modules. + * doc/lispref/elisp.texi (Top): Add "Dynamic Modules" to the + detailed menu + + * etc/NEWS: Fix typos in dynamic modules' entry. + +2015-12-05 Artur Malabarba + + Remove copyright statements from trivial test files + +2015-12-05 Eli Zaretskii + + Add "Preliminaries" section to etc/DEBUG + + * etc/DEBUG: Add the "Preliminaries" section for GDB beginners. + Most of the content was suggested by Phillip Lord + . Remove the section about debugging + with the Visual Studio, as building Emacs with the Microsoft + compilers is no longer supported. Minor fixes in some other + sections. + +2015-12-05 Alex Dunn (tiny change) + + Improve parsing of version strings + + * lisp/subr.el (version-regexp-alist): Allow "." as priority separator + (version-to-list): More helpful error messages. + (version-to-list): ".5" is valid (update docstring). Make + "22.8X3" invalid, as the doc string says. + + * test/automated/subr-tests.el (ert-test-version-parsing): New + tests for version string processing. + +2015-12-05 Eli Zaretskii + + Fix documentation of 'undo' changes + + * doc/lispref/text.texi (Undo): Minor wording changes. Use US + English conventions for spelling and whitespace between sentences. + + * etc/NEWS: Fix wording and spelling of undo-related entries. + Mark them as documented. + +2015-12-04 Glenn Morris + + * lisp/net/net-utils.el: Small improvements. + + (net-utils--executable-find-sbin): New function. + (ifconfig-program): Check sbin directories. + Fallback to "ip". (Bug#22091) + (ifconfig-program-options): Check the actual program in use. + (arp-program): Check sbin directories. + +2015-12-04 (tiny change) Arash Esbati (tiny change) + + Fix wrong-type-argument integer-or-marker-p nil error + + * lisp/textmodes/reftex-auc.el (reftex-what-index-tag): + Fix (wrong-type-argument integer-or-marker-p nil) error (bug#22077). + +2015-12-04 Alan Mackenzie + + Merge branch 'scratch/follow' of /home/acm/emacs/emacs.git/emacs-25 into scratch/follow + + Merge necessitated by a rebase operation. + +2015-12-04 Alan Mackenzie + + lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall. + +2015-12-04 Alan Mackenzie + + First commit to scratch/follow. Make Isearch work with Follow Mode, etc. + + doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of + Windows" and new @defun selected-window-group. + (Window Start and End): Describe new &optional parameter GROUP and + ...-group-function for window-start, window-end, set-window-start, and + pos-visible-in-window-p. + (Textual Scrolling) Describe the same for recenter. + doc/lispref/positions.texi (Screen Lines): Describe the same for + move-to-window-line. + + src/window.c (Fwindow_start, Fwindow_end, Fset_window_start) + (Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar + new optional parameter "group". At the beginning of each, check whether the + corresponding ...-group-function is set to a function, and if so execute this + function in place of the normal processing. + (syms_of_window): Define symbols for the six new variables below. + (window-start-group-function, window-end-group-function) + (set-window-start-group-function, recenter-group-function) + (pos-visible-in-window-p-group-function, move-to-window-line-group-function): + New permanent local buffer local variables. + src/keyboard.c (Fposn_at_point): Add extra parameter in call to + Fpos_visible_in_window_p. + + lisp/window.el (selected-window-group-function): New permanent local buffer + local variable. + (selected-window-group): New function. + + lisp/follow.el (follow-mode): Set the ...-group-function variables at mode + enable, kill them at mode disable. Add/remove follow-after-change to/from + after-change-functions. + (follow-start-end-invalid): New variable. + (follow-redisplay): Manipulate follow-start-end-invalid. + (follow-after-change, follow-window-start, follow-window-end) + (follow-set-window-start, follow-pos-visible-in-window-p) + (follow-move-to-window-line, follow-sit-for): New functions. + + lisp/isearch.el (isearch-call-message): New macro. + (isearch-update, with-isearch-suspended, isearch-del-char) + (isearch-search-and-update, isearch-ring-adjust): Invoke above new macro. + (with-isearch-suspended): Rearrange code such that isearch-call-message is + invoked before point is moved. + (isearch-message): Add comment about where point must be at function call. + (isearch-search): Remove call to isearch-message. + (isearch-lazy-highlight-window-group): New variable. + (isearch-lazy-highlight-new-loop): Unconditionally start idle timer. Move + the battery of tests to ... + (isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer. + Note: (sit-for 0) is still called. + (isearch-lazy-highlight-update): Check membership of + isearch-lazy-highlight-window-group. Don't set the `window' overlay + property. + (isearch-update, isearch-done, isearch-string-out-of-window) + (isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop) + (isearch-lazy-highlight-search, isearch-lazy-highlight-update) + (isearch-lazy-highlight-update): Call the six amended primitives (see + src/window.c above) with the new `group' argument set to t, to cooperate + with Follow Mode. + +2015-12-04 Stefan Monnier + + * lisp/emacs-lisp/ert.el: Prefer pcase over cl-typecase + + * lisp/emacs-lisp/ert.el (ert--should-error-handle-error) + (ert--explain-format-atom, ert--explain-equal-rec) + (ert--print-backtrace, ert-test-result-type-p, ert-select-tests) + (ert--insert-human-readable-selector): Prefer pcase over cl-typecase. + +2015-12-04 Artur Malabarba + + * lisp/character-fold.el: Remove special case-folding support + + (character-fold-to-regexp): Remove special code for + case-folding. Char-fold search still respects the + `case-fold-search' variable (i.e., f matches F). This only + removes the code that was added to ensure that f also matched + all chars that F matched. For instance, after this commit, f + no longer matches 𝔽. + + This was necessary because the logic created a regexp with + 2^(length of the string) redundant paths. So, when a very + long string "almost" matched, Emacs took a very long time to + figure out that it didn't. This became particularly relevant + because isearch's lazy-highlight does a search bounded by (1- + match-end) (which, in most circumstances, is a search that + almost matches). A recipe for this can be found in bug#22090. + +2015-12-04 Stefan Monnier + + * lisp/emacs-lisp/cl-macs.el (character): Can't be negative + + Fixes (bug#21701) + +2015-12-04 Daiki Ueno + + lisp/gnus/qp.el: Don't replace "from " at bol + + * lisp/gnus/qp.el (quoted-printable-encode-region): Bind `case-fold-search' + to nil when looking for "^From ". Problem reported by Simon Josefsson. + +2015-12-03 Phillip Lord + + Externalize some symbols in undo-auto + + * doc/lispref/text.texi: Update symbols. + * lisp/simple.el (undo-auto--amalgamate, + undo-auto--current-boundary-timer): Make symbols public. + * src/cmds.c (Fself_insert_command,Fdelete_char): Call + updated symbol. + +2015-12-03 Stefan Monnier + + * lisp/emacs-lisp/smie.el (smie-next-sexp): Fix BOB "token" + +2015-12-03 Michael Albinus + + Some error message improvements in tramp-sh.el + + * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Suppress error messages for "mesg" and "biff" calls. + (tramp-get-remote-path): Ignore errors when expanding + `tramp-own-remote-path'. Raise a warning instead. + +2015-12-03 Eli Zaretskii + + Document 'nacl' value for 'system-type' + + * doc/lispref/os.texi (System Environment): Document the 'nacl' + value of 'system-type'. + +2015-12-03 Eli Zaretskii + + Document 'window-max-chars-per-line' + + * doc/lispref/windows.texi (Window Sizes): Document + 'window-max-chars-per-line'. + +2015-12-03 Artur Malabarba + + Fix some file headers for the purpose of `package--builtins' + + * lisp/emacs-lisp/cl-preloaded.el + * lisp/emacs-lisp/eieio-compat.el + * lisp/net/sasl-scram-rfc.el: Add a "Package:" header + + * lisp/ielm.el: Fix summary line. + +2015-12-03 Artur Malabarba + + * lisp/emacs-lisp/package.el (package-unpack): Load before compiling + + Reload any previously loaded package files before compiling + the package (also reload the same files after compiling). + This ensures that we have the most recent definitions during + compilation, and avoids generating bad elc files when a macro + changes and it is used in a different file from the one it's + defined in. + +2015-12-03 Artur Malabarba + + * lisp/emacs-lisp/package.el: Refactor package activation code + + (package-activate): Move code that activates dependencies into + package-activate-1. + (package--load-files-for-activation): New function. + (package-activate-1): Add code for (optionally) activating + dependencies, and move file-loading code into + `package--load-files-for-activation'. + +2015-12-03 Eli Zaretskii + + Document new font-related functionality + + * doc/lispref/display.texi (Low-Level Font): Document + 'default-font-width', 'default-font-height', 'window-font-width', + and 'window-font-height'. + + * etc/NEWS: Move entries for 'default-font-width', + 'default-font-height', 'window-font-width', and 'window-font-height' + to their place and mark them documented. + +2015-12-03 Eli Zaretskii + + Fix documentation and implementation of 'directory-name-p' + + * lisp/files.el (directory-name-p): Modify to recognize + backslashes on MS-Windows and MS-DOS. Adjust the doc string + accordingly. Use '=', not char-equal, for comparison, as + letter-case cannot possibly be an issue here. + + * doc/lispref/files.texi (Directory Names): Move the documentation + of directory-name-p here from "Relative File Names". Update the + description per the changes in implementation. + + * etc/NEWS: Move the entry for 'directory-name-p' to its proper + place and mark it documented. + +2015-12-02 Eli Zaretskii + + Minor copyedit in Emacs manual + + * doc/emacs/search.texi (Lax Search): Make wording about character + folding by default less definitive. (Bug#22043) + +2015-12-02 Eli Zaretskii + + More emacs-module.c fixes for wide ints + + * src/emacs-module.c (value_to_lisp) [WIDE_EMACS_INT]: Use + unsigned data types to manipulate pointers, to avoid sign + extension coming after us with a vengeance. + + * modules/mod-test/test.el (mod-test-sum-test): Add tests for + Emacs with wide ints that verify integer values near the critical + value that requires us to switch to a cons cell. + +2015-12-02 Stephen Leake + + Fix bug#22069 in cl-generic.el + + * lisp/emacs-lisp/cl-generic.el (cl-no-method): Remove %S; this string is + not run thru `format'. + +2015-12-01 Dmitry Gutov + + APPEND etags--xref-backend to xref-backend-functions + + * lisp/progmodes/xref.el (xref-backend-functions): + Use APPEND when adding the default element + (http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00061.html). + +2015-12-01 Eli Zaretskii + + More accurate documentation of lax whitespace matching + + * lisp/isearch.el (isearch-forward-word, isearch-forward-symbol) + (word-search-backward, word-search-forward) + (word-search-backward-lax, word-search-forward-lax): Mention in + doc strings that toggling lax whitespace matching has no effect on + these commands. + + * doc/emacs/search.texi (Word Search, Symbol Search): Clarify that + lax whitespace matching has no effect on these commands. + +2015-12-01 Eli Zaretskii + + Fix emacs-module.c for wide ints + + * src/emacs-module.c (lisp_to_value): Compare the produced value + with the original Lisp object, not with the one potentially + converted into a Lisp_Cons. Fixes assertion violations when + working with integers larger than fit into a 32-bit value. + + * modules/mod-test/test.el (mod-test-sum-test): Add tests for + large integers, to test --with-wide-int. + +2015-12-01 Eli Zaretskii + + Document 'directory-files-recursively' + + * lisp/files.el (directory-files-recursively): Doc fix. Rename + the argument MATCH to REGEXP, to be more explicit about its form. + + * doc/lispref/files.texi (Contents of Directories): Improve the + documentation of 'directory-files-recursively'. Add + cross-references. + + * etc/NEWS: Move the entry for 'directory-files-recursively' to + its place and mark it documented. + +2015-12-01 Eli Zaretskii + + Document 'inhibit-read-only' property + + * doc/lispref/text.texi (Special Properties): Describe the new + 'inhibit-read-only' text property. Add cross-reference to where + read-only buffers are described. + * doc/lispref/buffers.texi (Read Only Buffers): Mention that + 'inhibit-read-only' property exempts text from being read-only. + Add cross-reference to "Special Properties". + + * etc/NEWS: Move the entry about 'inhibit-read-only' property to + its place and mark it documented. + +2015-12-01 Artur Malabarba + + * lisp/emacs-lisp/package.el: Update header comments + +2015-12-01 Artur Malabarba + + * lisp/character-fold.el: Add back multi-char matching + + (character-fold-to-regexp): Uncomment recently commented code + and make the algorithm "dummer" by not checking every possible + combination. This will miss some possible matches, but it + greatly reduces regexp size. + + * test/automated/character-fold-tests.el + (character-fold--test-fold-to-regexp): Comment out test of + functionality no longer supported. + +2015-12-01 Xue Fuqiao + + * doc/emacs/ack.texi (Acknowledgments): Update. + +2015-12-01 Michael Albinus + + Check `file-remote-p' over absolute files names in files.el + + * lisp/files.el (directory-files-recursively) + (get-free-disk-space): Check `file-remote-p' over absolute files names. + +2015-12-01 Andreas Schwab + + * src/lread.c (syms_of_lread): Doc fix. + +2015-11-30 Dmitry Gutov + + Don't mistake certain JS method calls for keywords + + * lisp/progmodes/js.el (js--ctrl-statement-indentation): + Braceless keyword can't come after a period (bug#22063). + +2015-11-30 David Reitter + + Read frame_title_format from buffer-local variable for NS port + + * nsfns.m (x_implicitly_set_name): Read frame-title-format and + icon-title-format variables from buffer in appropriate window. + (Bug#22048) + +2015-11-30 Juri Linkov + + * lisp/replace.el (occur-engine): Count matches in empty lines. + + (Bug#22062) + +2015-11-30 Aurélien Aptel + + * src/emacs-module.h: Fix finalizer typedef for C++11 + + C++11 standard doesn't allow exception-specification in typedef. + The workaround is to declare a dummy function prototype and use + decltype on it. + +2015-11-30 Eli Zaretskii + + Fix last change + + * src/emacs-module.c (lisp_to_value, value_to_lisp) + [WIDE_EMACS_INT]: Avoid compiler warnings. + +2015-11-30 Stefan Monnier + + Rely on conservative stack scanning to find "emacs_value"s + + * src/emacs-module.c (struct emacs_value_tag) + (struct emacs_value_frame, struct emacs_value_storage): Remove. + (value_frame_size): Remove constant. + (struct emacs_env_private): Use Lisp_Object for non_local_exit info. + (lisp_to_value): Remove first arg. + (module_nil): New constant. + Use it instead of NULL when returning an emacs_value. + (module_make_function): Adjust to new calling convention of + Qinternal_module_call. + (DEFUN): Receive args in an array rather than a list. + Use SAFE_ALLOCA rather than xnmalloc. Skip the lisp_to_value loop when + we don't have WIDE_EMACS_INT. Adjust to new type of non_local_exit info. + (module_non_local_exit_signal_1, module_non_local_exit_throw_1): + Adjust to new type of non_local_exit info. + (ltv_mark) [WIDE_EMACS_INT]: New constant. + (value_to_lisp, lisp_to_value): Rewrite. + (initialize_frame, initialize_storage, finalize_storage): Remove functions. + (allocate_emacs_value): Remove function. + (mark_modules): Gut it. + (initialize_environment): Don't initialize storage any more. + Keep the actual env object on Vmodule_environments. + (finalize_environment): Don't finalize storage any more. + (syms_of_module): Initialize ltv_mark and module_nil. + + * src/emacs-module.h (emacs_value): Make it more clear that this type + is really opaque, including the fact that NULL may not be valid. + + * modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw): + Don't assume that NULL is a valid emacs_value. + +2015-11-30 Eli Zaretskii + + Yet another doc improvement for search commands + + * doc/emacs/search.texi (Word Search, Symbol Search) + (Regexp Search): Document commands that don't support lax + whitespace matching or character folding. + (Nonincremental Search): Mention the search commands that can be + invoked from the menu bar. + + * lisp/isearch.el (isearch-define-mode-toggle-word) + (isearch-define-mode-toggle-symbol) + (isearch-define-mode-toggle-character-fold): Note in the doc + string that turning these on exits the regexp mode. + (isearch-forward-regexp, isearch-forward-word) + (isearch-forward-symbol, isearch-backward-regexp) + (word-search-backward, word-search-forward) + (word-search-backward-lax, word-search-forward-lax): State in the + doc string which commands don't support character folding and/or + lax-whitespace matching. + +2015-11-30 Martin Rudalics + + Run `window-size-change-functions' also when reading from minibuffer + + * src/xdisp.c (redisplay_internal): Run `window-size-change-functions' + also when reading from minibuffer. + +2015-11-30 Ulf Jasper + + Fix scrambling of html-rendered item buffers + + * net/newst-treeview.el (newsticker--treeview-render-text): Fix + scrambling of contents by wrapping call to html-renderer in + save-selected-window. + +2015-11-30 Paul Eggert + + Fix font typo in previous doc fix. + +2015-11-30 Paul Eggert + + A bit more security doc, esp. file local vars + + * doc/emacs/emacs.texi (Top): + * doc/emacs/misc.texi (Miscellaneous Commands): + Refer to new Host Security section. + (Host Security): New section. + * doc/lispref/os.texi (Security Considerations): + Mention file local variables. + +2015-11-30 Artur Malabarba + + * lisp/character-fold.el: Comment out branching code + + (character-fold-to-regexp): Comment out code that uses multi-char + table. The branching caused by this induces absurdly long regexps, + up to 10k chars for as little as 25 input characters. + +2015-11-30 Paul Eggert + + Spelling and grammar fixes + +2015-11-29 Dmitry Gutov + + Make lisp-completion-at-point a wrapper instead of an alias + + * lisp/progmodes/elisp-mode.el (lisp-completion-at-point): + Turn into an obsolete wrapper around elisp-completion-at-point + (bug#20455). + +2015-11-29 Artur Malabarba + + * lisp/isearch.el (isearch-search-fun-default): Nicer error + + message when the search fails. + +2015-11-29 Dmitry Gutov + + Update menu-bar-goto-uses-etags-p for the current xref API + + * lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Consult + xref-backend-functions, instead of now-nonexistent + xref-find-function. + +2015-11-29 Artur Malabarba + + * lisp/isearch.el (isearch-define-mode-toggle): Advertise binding + +2015-11-29 Artur Malabarba + + * lisp/menu-bar.el: Use folding in searches + + (nonincremental-search-forward): Use `isearch-search-fun-default' + to determine the search function. + (nonincremental-search-backward) + (nonincremental-repeat-search-forward) + (nonincremental-repeat-search-backward): Use it. + +2015-11-29 Artur Malabarba + + * lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Fix a warning + +2015-11-29 Artur Malabarba + + * lisp/character-fold.el (character-fold-to-regexp): Be careful + + not to return huge regexps. + +2015-11-29 Eli Zaretskii + + Improve documentation of string-collate-* functions + + * doc/lispref/strings.texi (Text Comparison): Improve wording and + indexing of 'string-collate-equalp' and 'string-collate-lessp'. + + * etc/NEWS: Move the entry of 'string-collate-equalp' and + 'string-collate-lessp' to "Lisp Changes" section and mark it as + documented. + +2015-11-29 Eli Zaretskii + + Document truncate-string-ellipsis + + * doc/lispref/display.texi (Size of Displayed Text): Document + 'truncate-string-ellipsis'. + + * lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix. + (truncate-string-to-width): Mention in the doc string that the + default for ELLIPSIS comes from 'truncate-string-ellipsis'. + + * etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp + Changes" section. + +2015-11-29 Eli Zaretskii + + Fix confusion wrt character folding in the Emacs manual + + * doc/emacs/search.texi (Nonincremental Search, Regexp Search): + Document that invoking search-forward/backward and + re-search-forward/backward supports only case folding, but not the + rest of the lax-search features. Reported by Mike Kupfer + . + +2015-11-29 Ken Brown + + Update mod-test-sum-test + + * modules/mod-test/test.el (mod-test-sum-test): Update to + accommodate the lack of dladdr on Cygwin. + +2015-11-29 Alan Mackenzie + + Byte compiler: Catch missing argument to `funcall'. Fixes bug#22051. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-funcall): When there's no argument + to `funcall', (i) Output an error message; (ii) Generate code to signal a + `wrong-number-of-arguments' error. + +2015-11-29 Martin Rudalics + + * lisp/window.el (split-window): Don't sanitize sizes when SIZE is non-nil. + +2015-11-28 Artur Malabarba + + * lisp/character-fold.el (character-fold-to-regexp) + + Warn about using long strings. + + * test/automated/character-fold-tests.el + (character-fold--test-lax-whitespace) + (character-fold--test-consistency): Reduce string size for tests. + +2015-11-28 Eli Zaretskii + + Document renaming of x-select-enable-* variables + + * doc/emacs/killing.texi (Clipboard): Rename + x-select-enable-clipboard to select-enable-clipboard and + x-select-enable-primary to select-enable-primary. Update index + entries. + + * etc/NEWS: Mark entry as documented. + +2015-11-28 Eli Zaretskii + + Document the shorthand hints displayed by M-x + + * doc/emacs/m-x.texi (M-x): Document the numeric meaning of + suggest-key-bindings. Document the shorthand hints for commands + that have no key bindings. Document that M-x completion ignores + obsolete commands. + + * etc/NEWS: Move the M-x entry to "Editing Changes" and mark it as + documented. + +2015-11-28 Eli Zaretskii + + Update docs of character folding + + * doc/emacs/search.texi (Lax Search): Update the description of + character folding for the latest changes. + +2015-11-28 Artur Malabarba + + * lisp/character-fold.el: Also play nice with case-folding + + (character-fold-to-regexp): Take `case-fold-search' into account. + +2015-11-28 Artur Malabarba + + * lisp/character-fold.el: Add support for multi-char matches + + (character-fold-table): Now has an extra-slot. This is a second + char-table that holds multi-character matches. See docstring for + details. + (character-fold-to-regexp): Can build branching regexps when a + character's entry the extra slot of `character-fold-table' matches the + characters that succeed it. + +2015-11-28 Artur Malabarba + + * lisp/character-fold.el: Code simplifications + + (character-fold-table): Reduce the scope of a variable. + (character-fold-to-regexp): Change logic to work directly on the + input string. It's a little easier to understand, probably + faster, and sets us up for implementing multi-char matches. + + * test/automated/character-fold-tests.el + (character-fold--test-fold-to-regexp): New test. + +2015-11-28 Eli Zaretskii + + Document changes in "C-h l" + + * doc/emacs/help.texi (Misc Help): Document the changes in "C-h l". + + * etc/NEWS: mark "C-h l" changes as documented. + +2015-11-28 Eli Zaretskii + + Finalize documentation of 'custom-prompt-customize-unsaved-options' + + * doc/emacs/custom.texi (Saving Customizations): Index the new + function 'custom-prompt-customize-unsaved-options'. + + * etc/NEWS: Mention when 'custom-prompt-customize-unsaved-options' + is useful. + +2015-11-28 Eli Zaretskii + + Document 'comment-line' + + * doc/emacs/programs.texi (Comment Commands): Document + 'comment-line'. + + * etc/NEWS: Move the entry for 'comment-line' into "Editing Changes". + +2015-11-28 Eli Zaretskii + + Document new checkdoc features + + * doc/lispref/tips.texi (Tips, Library Headers): Document the + keyword-checking features of checkdoc and the commands + 'checkdoc-file' and 'checkdoc-current-buffer'. + + * etc/NEWS: Move the checkdoc-related entries to their own + section. + +2015-11-28 Philipp Stephani + + Simplify the prologue of emacs-module.c functions + + * emacs-module.c (MODULE_FUNCTION_BEGIN): New macro. + (module_make_global_ref) + (module_free_global_ref, module_make_function, module_funcall) + (module_intern, module_type_of, module_extract_integer) + (module_make_integer, module_extract_float, module_make_float) + (module_copy_string_contents, module_make_string) + (module_make_user_ptr, module_get_user_ptr, module_set_user_ptr) + (module_get_user_finalizer, module_set_user_finalizer) + (module_vec_set, module_vec_get, module_vec_size): Use new helper + macro MODULE_FUNCTION_BEGIN. + +2015-11-28 Eli Zaretskii + + Don't reject module calls with no arguments + + * src/emacs-module.c (Finternal_module_call): Allow ARGLIST be nil. + +2015-11-28 Philipp Stephani + + Make module-call be visible from Lisp + + * src/emacs-module.c (module_make_function): Use internal--module-call. + (Finternal_module_call): Renamed from Fmodule_call. Add safety + checks. + (syms_of_module): DEFSYM save-value-p and save-pointer-p. Do + defsubr internal--module-call. + +2015-11-28 Eli Zaretskii + + Add etags tests for the recent Lua-related bugfix + + * test/etags/lua-src/test.lua: New file, tests the issues raised + by bug#21934. + * test/etags/Makefile (LUASRC): Add test.lua. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to the new Lua test. Also, an old + regression fix, resolved around 25 May 2015, required changes to + the "good" ETAGS files. + +2015-11-28 Eli Zaretskii + + Fix Lua tags when a function name includes '.' or ':' + + * lib-src/etags.c (Lua_functions): Add a tag for the last element + of a function name after a dot or a colon. (Bug#21934) + +2015-11-28 Eli Zaretskii + + Improve documentation of search and replace commands + + * doc/emacs/search.texi (Replacement and Lax Matches): Document + which commands are affected by 'replace-character-fold'. + (Lax Search): Add a cross reference to "Replacement and Lax + Matches". Improve wording. Fix lost extra whitespace. + (Search Customizations): Improve wording. (Bug#22036) + See also comments in + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02376.html. + + * lisp/replace.el (query-replace, query-replace-regexp) + (query-replace-regexp-eval, replace-string, replace-regexp): + Mention 'replace-character-fold' in the doc strings. + +2015-11-28 Paul Eggert + + Fix minor problems found by static checking + + * src/undo.c (prepare_record): Add proper prototype for C. + +2015-11-27 Stefan Monnier + + * src/emacs-module.c (struct env_storage): Delete + + (struct emacs_runtime_private): Keep an emacs_env instead. + (Fmodule_load, Fmodule_call): Declare emacs_env_private separately. + (initialize_environment): Split the arg in two. Adjust all callers. + Only store the private part in Vmodule_environments. + (finalize_environment): Change the arg to only be the private env. + Adjust all callers. + +2015-11-27 Eli Zaretskii + + Improve documentation of 'replace-character-fold' + + * lisp/replace.el (replace-character-fold): Clarify which commands + are affected by this variable. + +2015-11-27 Mark Oteiza + + Backport: Add interactive seek command. + + * lisp/mpc.el (mpc-cmd-seekcur): New function. + (mpc-seek-current): New command. + (mpc-mode-menu): Add entry for mpc-seek-current + (mpc-mode-map): Bind mpc-seek-current to "g" + +2015-11-27 Dmitry Gutov + + Autoload etags when using its xref backend + + * lisp/progmodes/xref.el (xref--etags-backend): + Rename to etags--xref-backend. Move to etags.el. Autoload. + (Bug#22026) + +2015-11-27 Artur Malabarba + + * lisp/character-fold.el: Allow complex chars to match their decomposition + + (character-fold-table): When a character's decomposition does not + involve a formatting tag (i.e., if it has an "exact" description via + other characters), then this character is allowed to match the + decomposition. + +2015-11-27 Artur Malabarba + + * lisp/character-fold.el: More descriptive variable names + + (character-fold-table): Rename a lot of the lexical variables to + make the code easier to read. + +2015-11-27 Artur Malabarba + + * lisp/isearch.el: Ensure we still support `isearch-new-word' + + (isearch-new-regexp-function): Define variable. + (isearch-new-word): Define as an obsolete alias. (Bug#22018) + +2015-11-27 Eli Zaretskii + + Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25 + +2015-11-27 Lee Bochicchio + + * test/lisp/abbrev-tests.el: Define more tests + + (abbrev-table-name-test, kill-all-abbrevs-test) + (clear-abbrev-table-test): New tests. + +2015-11-27 Eli Zaretskii + + Add module tests for wrong-type-argument + + * modules/mod-test/test.el (mod-test-sum-test): Add tests for + wrong-type-argument. + +2015-11-27 Eli Zaretskii + + Improve handling of signals and 'throw' in modules + + * src/emacs-module.c: Add commentary explaining how to write + functions in this file. + (module_make_global_ref, module_free_global_ref) + (module_non_local_exit_signal, module_non_local_exit_throw) + (module_make_function, module_funcall, module_intern) + (module_type_of, module_is_not_nil, module_eq) + (module_extract_integer, module_make_integer) + (module_extract_float, module_make_float) + (module_copy_string_contents, module_make_string) + (module_make_user_ptr, module_get_user_ptr, module_set_user_ptr) + (module_get_user_finalizer, module_set_user_finalizer) + (module_vec_set, module_vec_get, module_vec_size) + (module_non_local_exit_signal_1, module_non_local_exit_throw_1): + Do nothing and return with failure indication immediately, if some + previous module call signaled an error or wants to throw. See + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02133.html + for the relevant discussions. + +2015-11-27 Eli Zaretskii + + Add ':version' tag to 'checkdoc-package-keywords-flag' + + * lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag): + Add a ':version' tag. + +2015-11-27 Eli Zaretskii + + Improve documentation of 'eval-buffer' and 'eval-region' + + * src/lread.c (Feval_buffer, Feval_region): Doc fixes. (Bug#22023) + + * doc/lispref/eval.texi (Eval): Mention narrowing to clarify + "accessible portion of buffer". + +2015-11-27 Eli Zaretskii + + Unbreak the Cygwin w32 build + + * src/emacs.c (main): Call w32_init_main_thread in the Cygwin w32 + build as well. Reported by Andy Moreton . + +2015-11-27 Eli Zaretskii + + Improve commentary in character-fold.el + + * lisp/character-fold.el (character-fold-to-regexp): Move detailed + description from commit log message to comments. (Bug#22019) + +2015-11-26 Alan Mackenzie + + Byte Compiler: generate code to adjust stack count after call to `signal'. + + Corrects change from earlier today. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): supply the current value of + `byte-compile--for-effect' as argument to `byte-compile-form'. + +2015-11-26 Eli Zaretskii + + Improve commentary of prepare_to_modify_buffer_1 + + * src/insdel.c (prepare_to_modify_buffer_1): Mention in commentary + that this function runs Lisp. Suggested by Richard Stallman + . + +2015-11-26 Phillip Lord + + Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25 + +2015-11-26 Phillip Lord + + Fix regression after merge. + + * undo.c (prepare_record): Remove call to run_undoable_change. + +2015-11-26 Phillip Lord + + After delete, record point location in undo. + + Addresses Bug #21968. + + * lisp/simple.el (undo-auto--add-boundary): Clean up code to + better support intercalating calls. + * src/keyboard.c,src/keyboard.h (command_loop_1): Store value of + point and current buffer before each command. + * src/undo.c (record_point): Now only record the point. + * src/undo.c (prepare_record): Functionality removed form + record_point. + * src/undo.c (record_delete): Check if point needs recording. + * src/undo.c (undo-boundary): Record value of point before each + boundary. + * test/automated/simple-test.el: New tests. + + Conflicts: + src/undo.c + +2015-11-26 Eli Zaretskii + + Fix compiler warnings in w32.c + + * src/w32.c (sys_socket): In case of error, use -1 as return + value, not INVALID_SOCKET, which causes compiler warnings. + (maybe_load_unicows_dll): Cast the return value of GetProcAddress + to the appropriate function signature, to avoid compiler errors. + Reported by Andy Moreton . (Bug#21953) + +2015-11-26 Dmitry Gutov + + Check if the file exists on disk before producing the revert diff + + * lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check if the file + exists on disk (bug#20558). + +2015-11-26 Alan Mackenzie + + Byte compiler: on setq with an odd number of arguments, generate a `signal' + + * lisp/emacs-lisp/cconv.el (cconv-convert): Don't transform `setq' form when + it has an odd number of arguments, to allow bytecomp to handle the error. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): In a `setq' form with an + odd number of arguments, generate a `signal' instead of the normal code. + +2015-11-25 Dmitry Gutov + + Use find-tag-default for xref-backend-identifier-at-point + + * lisp/progmodes/etags.el (find-tag-tag) + (tags-completion-at-point-function): Extract common code as + find-tag--default. + (xref-backend-identifier-at-point): Define in terms of the new + function. + +2015-11-25 Paul Eggert + + * src/undo.c (record_property_change): Remove now-unused local. + +2015-11-25 Phillip Lord + + run_undoable_changes now called from insdel. + + The original calls from inside undo.c are not always at a safe position + to call lisp, as they originate in varied positions within insdel.c. + Calling them directly from prepare_to_modify_buffer_1 ensures that they + are always run at the same point. + + * undo.c (run_undoable_changes,syms_of_undo): Remove function + and symbol used. + * insdel.c (run_undoable_changes): Add function and symbol. + +2015-11-25 Eli Zaretskii + + Improve and update documentation of search commands + + * doc/emacs/search.texi (Lax Search): Renamed from "Search Case"; + all references changed. Move the description of lax-whitespace + here. Add description of the new character folding features and + additional customizable options. + (Isearch Yank): Move before "Error in Search". + (Basic Isearch): Improve wording. Add index entries. Add short + description of how to abandon search, making this subsection a + complete introduction to search basics. + (Repeat Isearch): Add index entries. Describe additional + customizable options. Describe mouse clicks. + (Isearch Yank): Add index entries. Describe mouse-2 click in echo + area. Describe more customizable options. + (Error in Isearch): Add index entries. + (Special Isearch): Move actual description of some isearch + commands to other sections, leaving here just the summary of the + commands. Add command that toggles character folding. Describe + commands, like "C-h C-h", that were previously omitted for some + reason. + (Not Exiting Isearch): Describe search-exit-option. Add index + entries. + (Word Search): Describe eww-search-word and eww-search-prefix. + (Symbol Search): Add index entries. + (Regexp Search): Describe regexp-search-ring-max. + (Replacement and Lax Matches): Renamed from "Replacement and + Case"; all references changed. Describe lax-whitespace matching + in replace commands and related options. Describe character + folding in replace commands and related options. + (Query Replace): Describe query-replace-from-to-separator and the + new history features. Add index entries for highlighted text. + Describe query-replace-skip-read-only. Describe more keys + accepted by query-replace. + (Other Repeating Search): More index entries for Occur. Describe + list-matching-lines-default-context-lines. + (Search Customizations): New section, documents customizable + options that were not documented until now. + * doc/emacs/glossary.texi (Glossary): Add "Case Folding" and + "Character Folding". + + * etc/NEWS: Move search- and replace-related entries to a single + parent section. + + * lisp/replace.el (query-replace-show-replacement): Doc fix. + * lisp/isearch.el (search-nonincremental-instead) + (isearch-hide-immediately): Doc fixes. + +2015-11-25 Katsumi Yamaoka + + Remove nnml-retrieve-groups that is unnecessary and somewhat problematic + + * lisp/gnus/nnml.el (nnml-retrieve-groups): Remove. See: + and + + +2015-11-25 Paul Eggert + + Fix module_format_fun_env when dynlib_addr fails + + * src/emacs-module.c (module_format_fun_env): + exprintf doesn’t support %p, so use %x. Reported by Eli Zaretskii in: + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02122.html + +2015-11-25 Paul Eggert + + Disambiguate variable help a bit better + + * lisp/help-fns.el (describe-variable): Quote the + variable’s value if it is a symbol other than t or nil. + See: T.V Raman in: + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02147.html + +2015-11-24 Dmitry Gutov + + Pass SVN commit message through log-edit-extract-headers + + * lisp/vc/vc-svn.el (vc-svn-checkin): Pass COMMENT through + log-edit-extract-headers (bug#18954). + +2015-11-24 Alan Mackenzie + + CC Mode: Eliminate compiler warning messages. + + * lisp/progmodes/cc-mode.el (top level): remove compile time declaration of + `font-lock-syntactic-keywords' (which CC Mode doesn't use). + * lisp/progmodes/cc-awk.el (awk-mode-syntax-table) + (c-awk-set-syntax-table-properties): Clarify comments about + `font-lock-syntactic-keywords'. + + * lisp/progmodes/cc-bytecomp.el (cc-bytecomp-load): Create a dummy declaration + of this before the real (interpreted) one, to satisfy the byte compiler. + +2015-11-24 Simen Heggestøyl + + Extend the test suite for json.el + + * lisp/json.el (json-plist-p): Clarify docstring. + + * test/automated/json-tests.el (json-tests--with-temp-buffer): New + macro. + (test-json-join, test-json-alist-p) + (test-json-plist-p, test-json-advance, test-json-peek) + (test-json-pop, test-json-skip-whitespace) + (test-json-read-keyword, test-json-encode-keyword) + (test-json-read-number, test-json-encode-number) + (test-json-read-escaped-char, test-json-read-string) + (test-json-encode-string, test-json-encode-key) + (test-json-new-object, test-json-add-to-object) + (test-json-read-object, test-json-encode-list) + (test-json-read-array, test-json-encode-array) + (test-json-read, test-json-read-from-string) + (test-json-encode): New tests. + (json-read-simple-alist): Merged into `test-json-read-object'. + (json-encode-string-with-special-chars): Merged into + `test-json-encode-string'. + (json-read-string-with-special-chars): Split into + `test-json-encode-string' and `test-json-read-from-string'. + +2015-11-24 Anders Lindgren + + Fixed bug#18283: Enable applescript in NextStep. + + * nextstep/templates/Info.plist.in: Set NSAppleScriptEnabled to YES. + +2015-11-24 Eli Zaretskii + + Allow completion on dynamic module files in load-library + + * lisp/files.el (load-library): Bind completion-ignored-extensions + to nil, to allow completion on dynamic modules typed as file + names. Reported by Andy Moreton . + +2015-11-24 Alan Mackenzie + + CC Mode: eliminate almost all byte compilation warnings + + * lisp/progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): Remove. + (cc-require): Remove the crude hack that saved and restored + byte-compile-noruntime-functions. + (cc-conditional-require, cc-conditional-require-after-load): New macros. + + * lisp/progmodes/cc-defs.el (top level): Reformulate code which loaded + cc-fix.el using the new macros in cc-bytecomp.el. + + * lisp/progmodes/cc-langs.el (c++-template-syntax-table) + (c-no-parens-syntax-table): Add extra "(eval ..)"s around "'(lambda ..)" + forms to remove the superflous quotes. + +2015-11-24 Eli Zaretskii + + Add one more mod-test test + + * modules/mod-test/test.el (mod-test-sum-test): Test the error + signaled when the function is invoked with a wrong number of + arguments. + +2015-11-24 Philipp Stephani + + * modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args. + +2015-11-24 Eli Zaretskii + + Implement dynlib_addr for MS-Windows + + * src/dynlib.c [WINDOWSNT]: Include w32common.h. + [WINDOWSNT]: New static variable. + (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS) + (GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT) [WINDOWSNT]: Define + if undefined. + (dynlib_reset_last_error): Reset g_b_init_get_module_handle_ex to + zero. + (dynlib_addr) [WINDOWSNT]: Non-trivial implementation to report + the full file name of the module for a given address. + +2015-11-24 Alan Mackenzie + + Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25 + +2015-11-24 Alan Mackenzie + + Squashed commit of the following: + + commit e1ecf76585bef2eb87995f7a7f92cc12003a6f70 + Author: Alan Mackenzie + Date: Tue Nov 24 16:50:09 2015 +0000 + + Byte compile: minor amendments. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): + add a comment to explain the binding of variables around a subsidiary + compilation. + (byte-compile-new-defuns): Amend the doc string. + + commit c537bfed1dda1593d218956ff00c6105a3ff0316 + Author: Alan Mackenzie + Date: Sat Nov 21 18:43:57 2015 +0000 + + Byte compiler: fix spurious warnings "might not be defined at runtime". + + Also initialize byte-compile-noruntime-functions between runs. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-new-defuns): New variable. + (byte-compile-initial-macro-environment): For eval-when-compile: bind + byte-compile-unresolved-functions and byte-compile-new-defuns around + byte-compile-top-level, to prevent spurious entries being made. + (byte-compile-warn-about-unresolved-functions): Check whether function is + in byte-compile-new-defuns before emitting a warning about it. + (byte-compile-from-buffer): Initialize new variable and + byte-compile-noruntime-functions to nil. + (byte-compile-file-form-require): record all new functions defined by a + `require' in byte-compile-new-defuns. + (byte-compile-file-form-defmumble): record the new alias in + byte-compile-new-defuns. + +2015-11-24 Eli Zaretskii + + Fix crash at startup related to GC of font entities + + * src/font.h (GC_FONT_SPEC_P, GC_FONT_ENTITY_P) + (GC_FONT_OBJECT_P, GC_XFONT_SPEC, GC_XFONT_ENTITY) + (GC_XFONT_OBJECT): New macros, for use in garbage collector. + * src/alloc.c (compact_font_cache_entry, compact_font_caches): + Don't ifdef away font cache compaction on NT_GUI, as the problems + which led to that seem to have been solved. + (compact_font_cache_entry): Use GC_FONT_SPEC_P, GC_XFONT_SPEC, + GC_XFONT_ENTITY, and GC_XFONT_OBJECT, instead of their non-GC_ + cousins. (Bug#21999) + +2015-11-24 Alan Mackenzie + + Byte compile: Output an error, not a warning, for odd number of args to setq + + * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Amend. + +2015-11-24 Ken Raeburn + + Fix kbd_buffer iteration loop in readable_events + + * src/keyboard.c (readable_events): Wrap the event pointer back to the + start of the kbd_buffer array inside the top of the loop instead of + right before checking the loop condition, since kbd_fetch_ptr and + kbd_store_ptr point past the end of the array to mean that element 0 + is next. (bug#21935) + +2015-11-24 Paul Eggert + + Improve text-quoting-style doc again + + * doc/lispref/help.texi (Keys in Documentation): + Omit overkill discussion of ‘setq’. Mention Emacs versions + where ‘grave’ style was standard. + +2015-11-23 Paul Eggert + + Improve text-quoting-style doc + +2015-11-23 Paul Eggert + + Simplify module_make_function + + * src/emacs-module.c (module_make_function): + Simplify by calling build_unibyte_string. + +2015-11-23 Paul Eggert + + Port better to FreeBSD’s dlfunc vs dlsym + + This avoids warnings when converting between void * and + function pointers, which strict C11 does not allow. + * configure.ac (dlfunc): Check for existence. + * src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro. + (dynlib_func): New function. + * src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls. + * src/emacs-module.c (Fmodule_load): Use dynlib_func, not + dynlib_sym, for function pointers. + +2015-11-23 Paul Eggert + + Simplify use of emacs_finalizer_function type + + * src/emacs-module.h (emacs_finalizer_function): + Now EMACS_NOEXCEPT. All users simplified to omit EMACS_NOEXCEPT. + (struct emacs_env_25): Use emacs_finalizer_function where applicable. + +2015-11-23 Paul Eggert + + module_format_fun_env fixes + + * src/doprnt.c (exprintf) [HAVE_MODULES]: Also define in this case. + * src/emacs-module.c (module_format_fun_env): + Convert path and sym to UTF-8. + Don’t use VLAs, as the C11 standard says they’re optional, + and anyway they can cause core dumps with large allocations. + Use exprintf rather than snprintf, as exprintf handles arbitrarily + long strings. Simplify the code a bit. + +2015-11-23 Dmitry Gutov + + Don't use package-user-dir in elisp-library-roots if it's not bound + + * lisp/progmodes/elisp-mode.el (elisp-library-roots): Don't + use package-user-dir if it's not bound (bug#19759). + +2015-11-23 Anders Lindgren + + New visible-bell for NextStep (OS X El Capitan compatible). + + Instead of inverting a rectangle in the middle of the frame, use + the standard NextStep image "caution", represented using an + warning sign with an exclamation mark. (Bug#21662) + + Implemented based on a suggestion drafted by Mustafa Kocaturk. + + * src/nsterm.m (EmacsBell): New class for managing the caution + image. Support multiple active bells, the image is removed once + all bells have timed out. + (ns_timeout): Removed, no longer used. + (ns_ring_bell): Reimplemented to use EmacsBell. + +2015-11-23 Johan Bockgård + + * lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec. + + (remove-function): Ditto. (Bug#20376) + +2015-11-23 Mark Oteiza + + * lisp/leim/quail/tamil-dvorak.el: Add necessary escapes. + +2015-11-23 Eli Zaretskii + + Improve how non-ASCII strings are accepted from modules + + * src/emacs-module.c (module_make_function, module_make_string): + Build a unibyte Lisp string and then decode it by UTF-8, instead + of building a multibyte string without decoding. This is more + tolerant to deviations from UTF-8. + +2015-11-23 Paul Eggert + + Port recent module changes to pickier compilers + + * src/emacs-module.c (module_make_function) + (module_make_string): Add casts to fix pointer signedness issues. + +2015-11-23 Philipp Stephani + + Fix how strings are accepted from modules + + * emacs-module.c (module_make_function, module_make_string): Use + make_multibyte_string. + (module_copy_string_contents): Encode before reading the byte + size. Return false if and only if an error occurred. + +2015-11-23 Eli Zaretskii + + Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25 + +2015-11-23 Shakthi Kannan + + Add the tamil-dvorak input method + + * lisp/leim/quail/tamil-dvorak.el: New file. (Bug#21768) + + * etc/NEWS: Mention the new input method. + +2015-11-23 Martin Rudalics + + Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows. + + * src/frame.c (adjust_frame_size): Don't set + FRAME_WINDOW_SIZES_CHANGED here ... + * src/window.c (resize_frame_windows): ... but here, as suggested + by Stefan Monnier. Also remove some dead code along the way. + +2015-11-23 Alan Mackenzie + + * /etc/NEWS (Incompatible Lisp Changes): Also `setf' needs an even # of args. + +2015-11-23 Alan Mackenzie + + Signal an error when `setf' gets an odd number of arguments. + + * lisp/emacs-lisp/gv.el (setf): Amend. + +2015-11-23 Stefan Monnier + + * lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better. + +2015-11-23 Alan Mackenzie + + * etc/NEWS (Incompatible Lisp Changes): Document new restriction on `setq'. + +2015-11-23 Alan Mackenzie + + Expunge occurrences of `setq' with an odd number of arguments. + + * lisp/apropos.el (apropos-documentation): + * lisp/obsolete/complete.el (PC-include-file-all-completions): + * lisp/progmodes/compile.el (compilation-goto-locus): + * lisp/vc/vc-cvs.el (vc-cvs-parse-root): (twice) + Insert missing nil at end of `setq' forms. + + * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Remove an + erroneous trailing variable name from a setq, thus allowing a compilation + properly to track functions not defined at runtime. + +2015-11-23 John Wiegley + + Add a note about a questionable use of bool in xdisp.c + +2015-11-23 Alan Mackenzie + + Issue a warning from the byte compiler on a malformed `setq' form. + + Partly fixes bug#20241. + * lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Issue a warning when a + `setq' form with an odd number of arguments is compiled. + +2015-11-23 Alan Mackenzie + + Don't let cconv_convert insert a nil argument into a `setq' form. + + Fixes bug#21983. + * lisp/emacs-lisp/cconv.el (cconv-convert): Don't silently insert a nil last + argument into a `setq' when there're an odd number of args. This enables the + byte compiler to issue a message in this case. + +2015-11-23 Alan Mackenzie + + Signal an error when `setq' has an odd number of arguments. Fixes bug#20241. + + * src/eval.c (Fsetq): Signal an error on an odd number of arguments. + (syms_of_eval): Add a DEFSYM for Qsetq. + +2015-11-23 Martin Rudalics + + * doc/lispref/windows.texi (Window Sizes): Fix indices and references. + + * src/frame.c (adjust_frame_size): Set FRAME_WINDOW_SIZES_CHANGED (Bug#21975). + +2015-11-22 Thomas Fitzsimmons + + Add EUDC BBDB 3 entry in NEWS + + * NEWS: Mention EUDC BBDB backend support for BBDB 3. + +2015-11-22 Thomas Fitzsimmons + + Improve EUDC to BBDB 3 export + + * eudc-vars.el (eudc-ldap-bbdb-conversion-alist): Change phone + entry to single item. Add company conversion. + * eudc-export.el (eudc-bbdbify-company): New function. + (bbdb-parse-phone): Declare function. + (eudc-bbdbify-phone): Add BBDB 3 support. + (Bug#21971) + +2015-11-22 Thomas Fitzsimmons + + Add BBDB 3 support for EUDC export + + * eudc.el: Add bbdb-version defvar. + (eudc--using-bbdb-3-or-newer-p): New function. + * eudc-export.el (eudc-create-bbdb-record): Add support for + bbdb-create-internal argument list changes introduced in BBDB 3. + * eudcb-bbdb.el: Remove bbdb-version defvar. + (eudc-bbdb-field): Call eudc--using-bbdb-3-or-newer-p. + (Bug#21971) + +2015-11-22 Eli Zaretskii + + Allow loading modules by 'load-file' + + * src/lread.c (Fload): Call 'unbind_to' with 'Fmodule_load' as the + 2nd arg, to avoid the "binding stack not balanced" error. + (syms_of_lread) : New Lisp variable. + + * lisp/files.el (module-file-suffix): Declare. + (load-file): Remove 'module-file-suffix' from + 'completion-ignored-extensions', to allow completion on modules. + + * etc/NEWS: Mention 'module-file-suffix'. + +2015-11-22 Eli Zaretskii + + Fix unoptimized builds + + * src/lisp.h (XTYPE): Move before XSYMBOL, to fix unoptimized + builds. + +2015-11-22 Dmitry Gutov + + Work around the asynchronous-empty-diff problem + + * lisp/vc/vc-rcs.el (vc-rcs-diff): + * lisp/vc/vc-mtn.el (vc-mtn-diff): + * lisp/vc/vc-hg.el (vc-hg-diff): + * lisp/vc/vc-git.el (vc-git-diff): Ignore the ASYNC argument, + do a synchronous process call (bug#21969). + +2015-11-21 Karl Fogel + + Finish excising electric indent from `open-line' + + * lisp/simple.el (open-line): Remove INTERACTIVE argument. + + * test/automated/simple-test.el (open-line-indent, open-line-hook): + Adjust accordingly. + + This change finishes what my commit of Thu Nov 19 17:32:37 2015 -0600 + (git commit c59353896) started. It turns out that having INTERACTIVE + cause `post-self-insert-hook' to run (via `newline') meant `open-line' + still had the electric indent behavior, as `post-self-insert-hook' + normally contains `electric-indent-post-self-insert-function' ever + since `electric-indent-mode' has been on by default. Tracing the code + change in `open-line' is mildly twisty, because Artur Malabarba's + earliest two commits of 24 Oct 2015 first removed the `interactive' + form entirely (git commit 6939896e2) and then restored it with the new + extra "p" already added (git commit bd4f04f86), such that there is no + single-commit diff in which one sees the second "p" appear. Thus this + change is effectively a reversion of parts of each of those commits. + + This could close bug#21884, at least until further discussion. + +2015-11-21 Dmitry Gutov + + Adhere closer to the "implicit tag name" definition + + * lisp/progmodes/etags.el (etags-tags-completion-table): + Adhere closer to the "implicit tag name" definition. Simplify + the regexp. Search for the explicit tag name first, and when + not found, search locally for the implicit one. (Bug#21934) + +2015-11-21 Stefan Monnier + + Unrevert most of regexp reentrancy abort patch + + The problem was in: + * src/syntax.c (update_syntax_table_forward): Propertize even when truncated + which is hence not unreverted. + The rest is: + * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST): + (UPDATE_SYNTAX_TABLE_FAST): Re-introduce. + All callers in regex.c changed back to the _FAST versions. + + * test/automated/message-mode-tests.el: Tweak the test to rely on auto + propertization in backward-sexp. + +2015-11-21 Paul Eggert + + Revert regexp reentrancy abort patch + + Although the patch does fix Bug#21688 and prevents a core dump, + it also makes the message-mode-propertize test fail; see: + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01667.html + Perhaps someone else can come up with a better fix some day. + * src/syntax.c (update_syntax_table_forward): + Propertize even when truncated. + * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST): + (UPDATE_SYNTAX_TABLE_FAST): Remove. + All callers changed back to the non-_FAST versions. + +2015-11-21 Paul Eggert + + Add a few safety checks when ENABLE_CHECKING + + This was motivated by the recent addition of module code, + which added some ENABLE_CHECKING-enabled checks that are + useful elsewhere too. + * src/alloc.c (compact_font_cache_entry): + * src/fns.c (sweep_weak_table): + * src/lread.c (oblookup): + Use gc_asize rather than doing it by hand. + * src/emacs-module.c (module_make_global_ref) + (module_free_global_ref, module_vec_size): + Omit assertions that lisp.h now checks. + * src/lisp.h (XFASTINT, ASIZE): In functional implementations, + check that the result is nonnegative. Use eassume, as this + info can help a bit when optimizing production code. + (XSYMBOL) [!USE_LSB_TAG]: Assert that argument is a symbol, + to be consistent with the USE_LSB_TAG case. + (gc_asize): New function, when ASIZE is needed in the gc. + (gc_aset): Use it. + (HASH_TABLE_P): Move definition up, so that it can be used ... + (XHASH_TABLE): ... here, to assert that the arg is a hash table. + +2015-11-21 Eli Zaretskii + + Simplify recording of main thread's ID on MS-Windows + + * src/w32term.c (w32_initialize): + * src/w32console.c (initialize_w32_display): + * src/w32fns.c (globals_of_w32fns): Don't record the main thread + ID independently for each type of session (GUI, TTY, batch). + * src/w32term.c (w32_init_main_thread): New function, records the + main thread's thread ID. + * src/w32term.h: Add prototype for w32_init_main_thread. + * src/emacs.c (main) [WINDOWSNT]: Call w32_init_main_thread. + + * src/emacs-module.c [WINDOWSNT]: Rename main_thread_id to + main_thread, for consistency with other threading libraries. All + users changed. Include w32term.h. + (check_main_thread) [WINDOWSNT]: Simplify the test: no need to + make sure the main thread is alive, as we hold a handle on it + opened by w32_init_main_thread. + (module_init) [WINDOWSNT]: Reuse the thread ID recorded by + w32_init_main_thread, instead of calling the requisite APIs once + more. + +2015-11-21 Mark Oteiza + + Backport: Fix issue where a new tempfile was created every refresh + + * lisp/mpc.el (mpc-format): Leave dir as relative path + +2015-11-21 Eli Zaretskii + + Call 'window-size-change-functions' for mini-windows + + * src/window.c (grow_mini_window, shrink_mini_window): Set the + frame's 'window_sizes_changed' flag. + * src/xdisp.c (redisplay_internal): Call the hooks on + 'window-size-change-functions' if the call to 'echo_area_display' + sets the frame's 'window_sizes_changed' flag. + (syms_of_xdisp) : + Update doc string to indicate the mini-window resizes trigger a + call to the hooks, and don't promise that will happen "before + redisplay". (Bug#19576, Bug#21333) + + * doc/lispref/windows.texi (Window Hooks): Update the description + of 'window-size-change-functions'. + +2015-11-21 Eli Zaretskii + + Improve documentation of dynamic modules + + * src/fns.c (Frequire): Doc fix to include the dynamic module + support. + * src/lread.c (Fload, Vload_suffixes): Doc fixes to include the + dynamic module support. + (Fload): Treat the module suffix the same as '*.el' and '*.elc' + wrt the MUST-SUFFIX argument. + + * etc/NEWS: Expand documentation of dynamically loaded modules. + +2015-11-21 Philipp Stephani (tiny change) + + Initial documentation for dynamic modules + + * etc/NEWS: Mention the new support for dynamically loaded modules. + +2015-11-20 Dmitry Gutov + + Add xref--etags-backend to xref-backing-functions using add-hook + + * lisp/progmodes/xref.el (xref-backend-functions): Move the + default value into a separate `add-hook' call (bug#21964). + + * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): + Don't declare the xref-backend-functions variable. + It doesn't make any difference. + +2015-11-20 Paul Eggert + + Fix double-decrement bug when freeing global refs + + * src/emacs-module.c (module_free_global_ref): Add a FIXME + comment about error reporting. Fix a recently-introduced typo + that double-decremented the refcount. + +2015-11-20 Paul Eggert + + Declare emacs_module_init in the module API + + * src/emacs-module.h (emacs_module_init): New decl. + Without it, GCC might complain about a module that defines + emacs_module_init without using it. This also checks the + API better. + +2015-11-20 Paul Eggert + + Fix module test to use ptrdiff_t nargs too + + * modules/mod-test/mod-test.c (Fmod_test_return_t) + (Fmod_test_sum, Fmod_test_signal, Fmod_test_throw) + (Fmod_test_non_local_exit_funcall, Fmod_test_globref_make) + (Fmod_test_string_a_to_b, Fmod_test_userptr_make) + (Fmod_test_userptr_get, Fmod_test_vector_fill) + (Fmod_test_vector_eq): Arg counts are ptrdiff_t, not int. + (finalizer): Remove; no longer used. + +2015-11-20 Paul Eggert + + Fix reindent-introduced typo in module code + + * src/emacs-module.c (MODULE_SETJMP_1): Fix typo that I + introduced while reindenting the code earlier, and add a + comment explaining the unusual use of do-while here. + +2015-11-20 Anders Lindgren + + Fixed bug#19576: `write-file' saves wrong buffer. + + If a function on the hook `window-size-change-functions' doesn't + restore the current buffer, functions that save and restore the + current window configuration (like `y-or-no-p') could silently + change the current buffer. When `write-file' asked the user + confirmation to overwrite a file, `y-or-no-p' changed the current + buffer, and the wrong buffer was saved to the file. + + * lisp/follow.el (follow-windows-start-end): Call `select-frame' + using the `norecord' parameter. + (follow-window-size-change): Restore current buffer. Call + `select-frame' using the `norecord' parameter. Cleanup. + +2015-11-20 John Wiegley + + Correct a documentation error in frames.texi + +2015-11-20 Stephen Leake + + * lisp/cedet/mode-local.el: Delete obsolete comment + +2015-11-20 Paul Eggert + + Module function arg counts are ptrdiff_t, not int + + * src/emacs-module.c (struct module_fun_env) + (module_make_function, module_funcall, Fmodule_call): + * src/emacs-module.h (struct emacs_runtime, struct emacs_env_25): + Use ptrdiff_t, not int, for arg counts. + * src/emacs-module.c (module_make_function): Don’t bother + checking arity against MOST_POSITIVE_FIXNUM, as that’s + unnecessary here. Make the checking clearer by negating it. + (module_make_function, Fmodule_call): No need to use xzalloc + since the storage doesn’t need to be cleared. + (module_funcall): Don’t use VLA, since C11 doesn’t guarantee support + for it, and many implementations are buggy with large VLAs anyway. + Use SAFE_ALLOCA_LISP instead. + (module_vec_set): Don’t crash if i < 0. + (module_vec_get): Don’t crash if i < MOST_NEGATIVE_FIXNUM. + (module_vec_set, module_vec_get): Do fixnum checks only when + i is out of array bounds, for efficiency in the usual case. + (Fmodule_load): Simplify fixnum range check. + (Fmodule_call): Simplify arity check. Use xnmalloc to detect + integer overflow in array allocation size. + +2015-11-20 Eli Zaretskii + + Minor improvements in module test + + * modules/mod-test/mod-test.c: Include stdlib.h, to avoid warnings + about missing prototype of malloc. + * modules/mod-test/Makefile (CFLAGS): Add -std=gnu99, to avoid + compiler warnings. + +2015-11-20 Eli Zaretskii + + Improve MS-Windows implementation in dynlib.c + + * src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h. + No need to include windows.h, as w32.h already does that. + : New static variable. + (dynlib_reset_last_error): New function. + (dynlib_open): Convert forward slashes to backslashes. Convert + file names from UTF-8 to either UTF-16 or the current ANSI + codepage, and call either LoadLibraryW or LoadLibraryA. If the + argument is NULL, return a handle to the main module, like + 'dlopen' does. Record the error, if any, for use by dynlib_error. + (dynlib_sym): Check the handle for validity. Record the error, if + any, for use by dynlib_error. + (dynlib_error): Call w32_strerror to produce the error string, and + zero out the last error code, like dlerror does. + (dynlib_close): Check the handle for validity. Record the error, + if any, for use by dynlib_error. Don't call FreeLibrary with a + handle for the main module. + * src/w32.c (globals_of_w32): Call dynlib_reset_last_error. + +2015-11-20 Paul Eggert + + Include-file tweaks for modules + + * src/dynlib.c, src/emacs-module.c: Include first. + * src/dynlib.h: Do not include config.h. + It’s every .c file’s responsibility to include config.h first. + * src/emacs-module.c: Include emacs-module.h immediately after + config.h, to test that emacs-module.h doesn’t depend on + include files other than config.h. + +2015-11-19 Paul Eggert + + Simplify push_handler and profile its malloc + + * src/lisp.h (PUSH_HANDLER): Remove. + All callers changed to use push_handler directly. + * src/eval.c (internal_condition_case) + (internal_condition_case_1, internal_condition_case_2) + (internal_condition_case_n): + Use same pattern as for other invokers of push_handler. + (push_handler, push_handler_nosignal): Use call-by-value + instead of call-by-reference. All uses changed. + (push_handler): Simplify by rewriting in terms of + push_handler_nosignal. + (push_handler_nosignal): Profile any newly allocated memory. + +2015-11-19 Paul Eggert + + * src/emacs-module.h: Include stddef.h, not stdlib.h. + +2015-11-19 Juanma Barranquero + + Discover repository version in linked worktrees (bug#21930) + + * lisp/version.el (emacs-repository--version-git-1): Do not assume + HEAD is at .git/HEAD, it can also be at .git/worktrees//HEAD. + (emacs-repository-get-version): Grok linked worktrees when EXTERNAL + is nil too. + +2015-11-19 Juri Linkov + + * lisp/replace.el (occur-regexp-descr): New function. + (occur-1, occur-engine): Use it. + + * lisp/isearch.el (isearch-occur): Propertize regexp with + isearch-string and isearch-regexp-function-descr for + occur-regexp-descr to display the correct description + message in the header (bug#21176, bug#21180). + +2015-11-19 Karl Fogel + + Revert `open-line' electric-indent sensitivity + + * lisp/simple.el (open-line): Remove electric indent code. + (electric-indent-just-newline): Don't declare. + + * test/automated/simple-test.el (open-line-indent): Adjust test. + + This partly reverts Artur Malabarba's change that added electric + indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git + commit bd4f04f86), and adjusts a new test he added right afterwards + (Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e3) accordingly. + However, the new INTERACTIVE argument to `open-line', which he also + added in the first commit, is not reverted here. + + See the thread "Questioning the new behavior of `open-line'." on the + Emacs Devel mailing list, and in particular this message: + + From: Artur Malabarba + Subject: Re: Questioning the new behavior of `open-line'. + To: Karl Fogel + Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel + Date: Wed, 18 Nov 2015 21:03:58 +0000 + Message-ID: \ + + + https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html + +2015-11-19 Paul Eggert + + Omit unnecessary clear in Fmodule_load + + * src/emacs-module.c (Fmodule_load): + Simplify and avoid unnecessary initialization of priv member to 0. + + * src/emacs-module.c: (module_vec_set, module_vec_get, module_vec_size) + +2015-11-19 Paul Eggert + + Prefer signed integer types in module code + + Generally speaking, at the C level the Emacs source code prefers + signed types like ‘ptrdiff_t’ to unsigned types like ‘size_t’, + partly to avoid the usual signedness confusion when comparing values. + Change the module API to follow this convention. + Use ‘int’ for small values that can’t exceed INT_MAX. + * modules/mod-test/mod-test.c (Fmod_test_globref_make) + (Fmod_test_string_a_to_b, Fmod_test_vector_fill) + (Fmod_test_vector_eq): + * src/emacs-module.c (struct emacs_value_frame) + (module_make_global_ref, module_free_global_ref) + (module_copy_string_contents, module_make_string) + (module_vec_set, module_vec_get, module_vec_size): + * src/emacs-module.h (struct emacs_runtime, struct emacs_env_25): + * src/lread.c (suffix_p): + Prefer signed to unsigned integer types. + +2015-11-19 Paul Eggert + + Omit ‘const’ on locals + + Remove ‘const’ qualifier from locals that were newly added. + We don’t normally bother declaring locals with ‘const’ even + though they are not modified, for the same reason we don’t + bother declaring them with ‘register’ even though their + addresses are not taken; the advantage in compile-time + checking isn’t worth the loss of readability. + * modules/mod-test/mod-test.c (Fmod_test_non_local_exit_funcall) + (Fmod_test_vector_fill, Fmod_test_vector_eq): + * src/emacs-module.c (MODULE_SETJMP_1) + (module_make_global_ref, module_free_global_ref) + (module_non_local_exit_get, module_make_function) + (module_extract_integer, module_extract_float) + (module_get_user_ptr, module_set_user_ptr) + (module_get_user_finalizer, module_set_user_finalizer) + (module_vec_get, Fmodule_call) + (module_non_local_exit_signal_1) + (module_non_local_exit_throw_1, lisp_to_value) + (finalize_storage, allocate_emacs_value, mark_modules) + (module_handle_signal, module_handle_throw) + (module_format_fun_env): + * src/eval.c (push_handler, push_handler_nosignal) + (init_handler): + * src/lread.c (suffix_p): + Omit unnecessary ‘const’. + +2015-11-19 Paul Eggert + + Prefer intmax_t to int64_t in module code + + * modules/mod-test/mod-test.c (sum, Fmod_test_sum): + * src/emacs-module.c (module_extract_integer) + (module_make_integer): + * src/emacs-module.h (struct emacs_env_25): + Prefer intmax_t to int64_t. This doesn’t change the generated + code on any of the machines Emacs currently ports to, but it’s + at least in theory more future-proof as C99 doesn’t guarantee + that int64_t exists. + +2015-11-19 Paul Eggert + + Rename module.c to emacs-module.c, etc. + + * src/emacs-module.c: Rename from src/module.c. + * src/emacs-module.h: Rename from src/module.h. + All uses changed. + +2015-11-19 Paul Eggert + + Fix minor module problems found by static checking + + * src/dynlib.c (dynlib_close): #ifdef out for now, as it’s not used. + * src/eval.c, src/lisp.h (lisp_eval_depth): Now static. + * src/module.c (Fmodule_load): Fix pointer signedness bug. + (Fmodule_call): Tell GCC that the default case is unreachable. + +2015-11-19 Paul Eggert + + Style fixes for indenting etc. in module code + + This is mostly indenting and spacing changes. Also, remove + some unnecessary static decls instead of bothering to reindent them. + * src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline, + as most other Emacs files do for this sort of thing. + +2015-11-19 Eli Zaretskii + + Minor improvements in modules testing Makefile + + * modules/mod-test/Makefile (EMACS, SO): New variables. + (CFLAGS): When SO = dll, don't use -fPIC. + (check): New target, runs the test. + +2015-11-19 Eli Zaretskii + + * .gitignore: Add "*.dll". + +2015-11-19 Paul Eggert + + Migrate modules/.gitignore into .gitignore + + * .gitignore: Add former contents of modules/.gitignore. + * modules/.gitignore: Remove. + +2015-11-19 Paul Eggert + + Add copyright notices to module code + + Put them in the usual format for GNU Emacs copyright notices. + +2015-11-19 Paul Eggert + + Rename emacs_module.h to module.h + + * src/module.h: Rename from src/emacs_module.h. + All uses changed. + +2015-11-19 Juanma Barranquero + + * src/module.c (Fmodule_load): Remove unused vars `doc_name', `args' + + * src/lread.c (Fload): Remove unused variable `size' + +2015-11-19 Alan Mackenzie + + src/keyboard.c (pre-command-hook): Fix typo in doc string: "pre" -> "post". + +2015-11-18 Dmitry Gutov + + Prioritize looking inside vc-parent-buffer over log-view-mode fallback + + * lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside + vc-parent-buffer over log-view-mode fallback (bug#21955). + +2015-11-18 Alan Mackenzie + + lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall. + +2015-11-18 Ken Brown + + * configure.ac (LIBMODULES): Don’t define on Cygwin + +2015-11-18 Eli Zaretskii + + Fix MS-Windows build --with-modules + + * src/module.c: Reformat copyright commentary. + (module_vec_get): Use explicit cast to size_t to avoid compiler + warning in 32-bit builds. + (check_main_thread) [WINDOWSNT]: Fix letter-case in Windows APIs. + Compare thread IDs directly, as GetThreadId is not available + before Windows Vista. + (check_main_thread) [WINDOWSNT]: Duplicate the thread handle + without using APIs and constants not available on XP and older + systems. Obtain and store the thread ID as well. + +2015-11-18 Aurélien Aptel + Philipp Stephani + + Add dynamic module test and helper script + + Add 'modhelp.py' script (python2) to automate module testing and + module generation. + + To build and test all modules in the modules/ dir + $ ./modhelp.py test + + To generate a module from template code (good starting point) + $ ./modhelp init mynewtestmodule + + See the script -h option for more documentation. + + * modules/modhelp.py: New module helper script. + * modules/mod-test/Makefile: New file. Makefile for the test module. + * modules/mod-test/mod-test.c: New file. Test module source file. + * modules/mod-test/test.el: New file. ert test suite for the test module. + * modules/.gitignore: New file. Local .gitignore file. + +2015-11-18 Aurélien Aptel + + Make 'Fload' look for modules + + 'Fload' can now load dynamic modules. This also makes 'require' work. + + * src/lread.c: + (suffix_p): New function. + (Fload): Use 'suffix_p'. Call 'Fmodule_load' when we try to load a file + with a module suffix. + (syms_of_lread): Append module suffix to 'Vload_suffixes'. + +2015-11-18 Aurélien Aptel + Philipp Stephani + + Add dynamic module module support + + * configure.ac: Add '--with-modules' option. Conditionally add + dynlib.o and module.o to the list of objects. Add any system + specific flags to the linker flags to support dynamic libraries. + * m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc + attributes. + * src/Makefile.in: Conditionally add module objects and linker flags. + * src/alloc.c (garbage_collect_1): protect module local values from + GC. + * src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes. + * src/emacs_module.h: New header file included by modules. Public + module API. + * src/module.c: New module implementation file. + +2015-11-18 Aurélien Aptel + + Add new User Pointer (User_Ptr) type + + * src/lisp.h: Add new Lisp_Misc_User_Ptr type. + (XUSER_PTR): New User_Ptr accessor. + * src/alloc.c (make_user_ptr): New function. + (mark_object, sweep_misc): Handle Lisp_Misc_User_Ptr. + * src/data.c (Ftype_of): Return 'user-ptr' for user pointer. + (Fuser-ptrp): New user pointer type predicate function. + (syms_of_data): New 'user-ptrp', 'user-ptr' symbol. New 'user-ptrp' + subr. + * src/print.c (print_object): Add printer for User_Ptr type. + +2015-11-18 Aurélien Aptel + Philipp Stephani + + Add portable layer for dynamic loading + + * src/dynlib.h: New file. + * src/dynlib.c: New file. + +2015-11-18 Philipp Stephani + + Add catch-all & no-signal version of PUSH_HANDLER + + Ground work for modules. Add a non-signaling version of PUSH_HANDLER and + a new "catch-all" handler type. + + * src/eval.c (init_handler, push_handler, push_handler_nosignal): New + functions. + * src/fns.c (hash_remove_from_table): Expose function public. + * src/lisp.h: New handler type, define macro to push_handler call. + +2015-11-18 Ken Brown + + Silence byte-compiler warning + + * lisp/server.el (server-process-filter): Silence byte-compiler + warning. + +2015-11-18 Paul Eggert + + Quote symbols in docstrings using `' + + Be more systematic about quoting symbols `like-this' rather than + `like-this or 'like-this' in docstrings. This follows up Artur + Malabarba's email in: + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01647.html + +2015-11-18 Peder O. Klingenberg + + Fix savegames in dunnet + + * lisp/play/dunnet.el (dun-rot13): Use the standard rot13-region instead + of separate implementation. + +2015-11-18 Artur Malabarba + + * lisp/emacs-lisp/package.el (package--with-response-buffer): + + Ensure we're at the start of the buffer before searching for + the end of headers. + +2015-11-17 Xue Fuqiao + + * admin/release-process: Improve wording. + +2015-11-17 Xue Fuqiao + + Backport: * CONTRIBUTE: Remove information about feature freeze. + + (cherry picked from commit ae0653b5ab9ee223751ec389b87011963e1cbbef) + +2015-11-17 Xue Fuqiao + + Backport: Document the release process + + * admin/notes/versioning: Add information about RC releases. + * admin/release-process: Document the release process. + * admin/authors.el (authors-ignored-files): + * admin/README: Change FOR-RELEASE to release-process. + * CONTRIBUTE: + * admin/notes/bugtracker: Don't mention FOR-RELEASE. + + (cherry picked from commit 9a4aa0f5945a03611ae29c516025dbd353bd26ab) + +2015-11-17 Xue Fuqiao + + Backport: * admin/release-process: Rename from admin/FOR-RELEASE. + + (cherry picked from commit f8cc14b59700e51a4e31139c0a65c8154995e055) + +2015-11-17 Xue Fuqiao + + Backport: Mention CONTRIBUTE in README + + Mention CONTRIBUTE in README, since it was moved from etc/ to root. + * etc/TODO: Remove the reference to `etc/CONTRIBUTE'. + * README: Mention CONTRIBUTE. + + (cherry picked from commit ed2e7e20ae0945288c98091f308f5460c3453873) + +2015-11-17 Paul Eggert + + Fix docstring quoting problems with ‘ '’ + + Problem reported by Artur Malabarba in: + http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html + Most of these fixes are to documentation; many involve fixing + longstanding quoting glitches that are independent of the + recent substitute-command-keys changes. The changes to code are: + * lisp/cedet/mode-local.el (mode-local-augment-function-help) + (describe-mode-local-overload): + Substitute docstrings before displaying them. + * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): + Quote the generated docstring for later substitution. + +2015-11-17 Eli Zaretskii + + Improve configure --help text for wide ints + + * configure.ac (wide-int): Clarify user-level advantages and + disadvantages. + +2015-11-17 Stephen Leake + + Improve doc string + + * lisp/progmodes/xref.el (xref-backend-references): Improve doc string. + +2015-11-17 Paul Eggert + + eval_sub followed dangling pointer when debugging + + Problem reported by Pip Cet (Bug#21245). + This bug could occur in eval_sub if the C compiler reused + storage associated with the ‘argvals’ local after ‘argvals’ + went out of scope, and if the Elisp debugger stopped on Elisp + function exit and accessed ‘argvals’. It could also occur if + a variadic function was called with so many arguments (over + 2048 args on x86-64) that SAFE_ALLOCA_LISP called malloc, then + SAFE_FREE freed the arguments, then the memory manager used + the storage for other purposes, then the debugger accessed the + arguments. + * src/eval.c (eval_sub): Declare ‘argvals’ at top level of + function body. Simplify local decls. + When allocating args via SAFE_ALLOCA, call + debugger before invoking SAFE_FREE, as the debugger needs + access to the args. + (eval_sub, apply_lambda): Rework to avoid need for + set_backtrace_debug_on_exit hack. This is cleaner, + and should work better with buggy custom debuggers. + +2015-11-16 Daiki Ueno + + * lisp/image-mode.el: Support encrypted file + + (image-toggle-display-image): Read content from the buffer instead + of the file, if the buffer holds a decrypted data. (Bug#21870) + +2015-11-16 Paul Eggert + + ELF unexec: align section header + + This ports the recent unexelf.c changes to Fedora x86-64 + when configured with GCC’s -fsanitize=undefined option. + * src/unexelf.c (unexec): Align new_data2_size to a multiple + of ElfW (Shdr)’s alignment, so that NEW_SECTION_H returns a + pointer aligned appropriately for its type. + +2015-11-16 Andreas Schwab + + Do more checks on bytecode objects (Bug#21929) + + * src/eval.c (funcall_lambda): Check size of compiled function + object. + (Ffetch_bytecode): Likewise. + +2015-11-16 Johan Bockgård + + pcase.el: Fix edebugging of backquoted cons patterns + + * lisp/emacs-lisp/pcase.el (pcase-QPAT): Fix edebugging of backquoted + cons patterns. (Bug#21920) + +2015-11-16 Paul Eggert + + Improve fix for regex reentrancy abort + + Suggested by Stefan Monnier (Bug#21688). + * src/syntax.c (update_syntax_table_forward): + Remove recently-added PROPERTIZE arg, and assume it is true. + All callers changed. + * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST): + Invoke update_syntax_table directly. + +2015-11-16 Artur Malabarba + + * lisp/faces.el (faces--attribute-at-point): Use `face-list-p' + + * lisp/emacs-lisp/package.el (package--with-response-buffer): Missing require + + * lisp/emacs-lisp/nadvice.el (add-function): Escape quote + +2015-11-15 Vasily Korytov + + Recognize .rbw and .pyw files (bug#18753) + + * lisp/progmodes/python.el (auto-mode-alist): + Recognize .pyw files. + + * lisp/progmodes/ruby-mode.el (auto-mode-alist): + Recognize .rbw files. + +2015-11-15 Dmitry Gutov + + Fix ruby-mode auto-mode-alist entry + + * lisp/progmodes/ruby-mode.el (auto-mode-alist): Add grouping + around the extensions (bug#21257). + +2015-11-15 Dmitry Gutov + + Fix etags completion near eob + + * lisp/progmodes/etags.el (tags-completion-at-point-function): + Use `goto-char', to avoid the end-of-buffer error (bug#20061). + +2015-11-15 Alan Mackenzie + + De-pessimize detection of C++ member initialization lists. + + list/progmodes/cc-engine.el (c-back-over-list-of-member-inits): New macro. + (c-back-over-member-initializers): Reformulate such that c-at-toplevel-p + is only called when a construct "looks right" rather than continually. + (c-guess-basic-syntax, CASE 5R): Add a check for the mode being C++ Mode. + +2015-11-15 Artur Malabarba + + Backport: * lisp/emacs-lisp/package.el: Fix a decoding issue. + + * lisp/url/url-handlers.el (url-insert-file-contents): Move some code to + `url-insert-buffer-contents'. + (url-insert-buffer-contents): New function + + (package--with-response-buffer): Use `url-insert-buffer-contents'. + The previous code had some issues with decoding. Refactoring that + function allows us to use the decoding from url-handlers while still + treating both sync and async requests the same. + +2015-11-15 Stephen Leake + + Improve a few doc strings, comments + + * lisp/cedet/cedet-global.el (cedet-gnu-global-expand-filename): + * lisp/cedet/ede/locate.el (ede-locate-base): + * lisp/cedet/semantic/symref.el (semantic-symref-calculate-rootdir): + * src/fns.c (Fdelq): Improve doc string. + + * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Add FIXME. + +2015-11-15 Anders Lindgren + + Enhance NSTRACE (trace output for NextStep). + + Trace can be disabled for groups of functions. By default, event + functions and functions that generate lots of output are disabled. + + Trace output of Objective-C functions now use the "[ClassName + parameter:]" form. + + * src/nsterm.h (NSTRACE_ALL_GROUPS, NSTRACE_GROUP_EVENTS) + (NSTRACE_GROUP_UPDATES, NSTRACE_GROUP_FRINGE, NSTRACE_GROUP_COLOR) + (NSTRACE_GROUP_GLYPHS, NSTRACE_GROUP_FOCUS): New macros, + controlling in which function groups trace should be active. + (NSTRACE_WHEN): Support for silencing a function, this also + silencing all called functions. + (NSTRACE_UNSILENCE): New macro, used to re-enable trace. + (NSTRACE_FMT_FSTYPE, NSTRACE_ARG_FSTYPE): New macros, used to + print the full screen state in NSTRACE functions. + + * src/nsterm.m (nstrace_depth, nstrace_num): Made volatile as they + can be accessed from multiple threads. + (nstrace_enabled_global): New variable, when FALSE, trace is + silenced. + (nstrace_restore_global_trace_state): New function, used to + restore `nstrace_enabled_global' at end of block. + ([EmacsView setFrame:], [EmacsWindow setFrame:display:]) + ([EmacsWindow setFrame:display:animation:]) + ([EmacsWindow setFrameTopLeftPoint:]): New functions, print trace + and call corresponding super function. + (Many functions): Add or enhance trace output. + + * src/nsimage.m (ns_image_from_file): Enhanced trace output. + + * src/nsfns.m (x_set_tool_bar_lines): Add trace output. + + * src/nsmenu.m ([EmacsToolbar setVisible:]): New function, print trace + and call corresponding super function. + +2015-11-15 Anders Lindgren + + Fixed a toolbar related issue on OS X. + + Earlier, when toggling the tool-bar in a maximized frame, the + frame size didn't match the number of text lines, leaving an + unused area at the bottom of the frame. + + * nsfns.m (x_set_tool_bar_lines): Exit maximized and full height + fullscreen modes when tool bar is disabled. + +2015-11-15 Anders Lindgren + + Fixed OS X 10.6.8 build issue (bug#21862). + + * src/nsterm.h (EmacsView): Add missing declarations. + * src/nsterm.m ([EmacsView windowDidBecomeKey]): New method, like + the standard method but without the notification parameter. + Intended to be used for direct calls. + ([EmacsView windowDidEnterFullScreen]): Call the non-notification + version of `windowDidBecomeKey'. Made the notification method call + the non-notification method instead of the vice versa. + (NSWindowDidEnterFullScreenNotification): Deleted, no longer + needed. + +2015-11-15 Artur Malabarba + + * lisp/faces.el (faces--attribute-at-point): Fix an issue + + Previous code would signal an error when the face at point was + a manually built list of attributes such as '(:foregroud "white"). + + * test/automated/faces-tests.el (faces--test-color-at-point): Add a test + +2015-11-15 Paul Eggert + + Fix regex abort when it tries to reenter itself + + Problem reported by Ken Raeburn. + Solution suggested by Stefan Monnier (Bug#21688). + * src/regex.c (re_match_2_internal): + Use new _FAST functions to avoid regex code reentering itself. + * src/syntax.c (update_syntax_table_forward): New arg PROPERTIZE. + All callers changed. + * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST) + (UPDATE_SYNTAX_TABLE_FAST): New inline functions. + +2015-11-15 Dmitry Gutov + + Improve Ruby 1.9-style keyword keys highlighting + + * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): + Handle required keyword arguments (bug#21367). + And highlight the colon together with the name. + +2015-11-15 Dmitry Gutov + + Unify the absolutely equal xref-backend-references implementations + + * lisp/progmodes/elisp-mode.el (xref-backend-references): + Remove. + + * lisp/progmodes/etags.el (xref-backend-references): + Remove. + + * lisp/progmodes/xref.el (xref-backend-references): + Define the default implementation. + +2015-11-14 Dmitry Gutov + + Update project-find-regexp for the new xref API + + * lisp/progmodes/project.el (project--read-regexp): + Update to use the new xref API methods. + + * lisp/progmodes/xref.el (xref-find-backend): Autoload. + +2015-11-14 Dmitry Gutov + + Fix replacing a match with a shorter string + + In effect, partially reverting fe973fc. + + * lisp/progmodes/xref.el (xref-query-replace): Store the end + of each match as a marker again, instead of length. + (xref--query-replace-1): Update accordingly. + +2015-11-14 Artur Malabarba + + * lisp/progmodes/xref.el (xref-pop-marker-stack): Downgrade errors + + Signal user-errors instead. + +2015-11-14 Eli Zaretskii + + Document 'describe-symbol' + + * doc/emacs/help.texi (Help Summary): Mention "C-h o". + (Name Help): Document "C-h o" and describe-symbol. + + * lisp/help-fns.el (describe-symbol): Doc fix. + +2015-11-14 Paul Eggert + + Change test name to avoid spellcheck issue. + +2015-11-14 Eli Zaretskii + + Avoid signaling an error in 'describe-symbol' + + * lisp/help-fns.el (describe-symbol): Avoid errors when the symbol + exists as a function/variable/face/etc., but is undocumented. + + * test/automated/help-fns.el (help-fns-test-describe-symbol): New + test. + +2015-11-14 Eli Zaretskii + + * INSTALL (--with-cairo): Document this new configure option. + +2015-11-14 Eli Zaretskii + + Document that GNU Make >= 3.81 is required to build Emacs + + * doc/lispref/internals.texi (Building Emacs): Document that GNU + Make 3.81 or later is now required. + +2015-11-14 Artur Malabarba + + Backport: * lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async. + + (package--with-work-buffer-async): Reimplement as + `package--with-response-buffer'. + (package--with-work-buffer): Mark obsolete. + (package--with-response-buffer): New macro. This is a more self + contained and less contrived version of + `package--with-work-buffer-async'. It uses keyword arguments, + doesn't have async on the name, doesn't fallback on + `package--with-work-buffer', and has _much_ simpler error + handling. On master, this macro will soon be part of another + library (either standalone or inside url.el), which is why this + commit is not to be merged back. + + (package--check-signature, package--download-one-archive) + (package-install-from-archive, describe-package-1): Use it. + + (package--download-and-read-archives): Let + `package--download-one-archive' take care of calling + `package--update-downloads-in-progress'. + +2015-11-14 Eli Zaretskii + + * CONTRIBUTE (Branches): Improve wording for back-ported commits. + +2015-11-14 Dmitry Gutov + + Merge branch 'master' into emacs-25 + +2015-11-13 John Wiegley + + Merge remote-tracking branch 'origin/master' into emacs-25 + +2015-11-13 l3thal + + Merge branch 'erc-async-reconnect' into emacs-25 + + Reconnect asynchronously. + +2015-11-13 Eli Zaretskii + + Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25 + +2015-11-13 Paul Eggert + + Port recent XCB changes to 64-bit ‘long int’ + + For historical reasons, libX11 represents 32-bit values like Atoms as + ‘long int’ even on platforms where ‘long int’ is 64 bits. XCB doesn’t + do that, so adapt the recent XCB code to behave properly on 64-bit + platforms. Also, fix what appears to be a bug in the interpretation + of xcb_get_property_value_length, at least on my Fedora platform + which is running libxcb-1.11-5.fc21. + * src/xfns.c (x_real_pos_and_offsets): + * src/xterm.c (get_current_wm_state): + xcb_get_property_value_length returns a byte count, not a word count. + For 32-bit quantities, xcb_get_property_value returns a vector + of 32-bit words, not of (possibly 64-bit) long int. + + Backport. + +2015-11-13 Paul Eggert + + * src/undo.c (run_undoable_change): Now static. + + Backport. + +2015-11-13 Eli Zaretskii + + Remove support for ':timeout' from w32 tray notifications + + * src/w32fns.c (Fw32_notification_notify): Delete the code that + supports ':timeout'. + (syms_of_w32fns): Don't DEFSYM ':timeout'. This avoids clashes + with dbusbind.c when D-Bus is compiled in. + + * doc/lispref/os.texi (Desktop Notifications): Don't mention + ':timeout'. + + Backport. + +2015-11-13 Juanma Barranquero + + * test/automated/simple-test.el: Add test for bug#20698 (bug#21885) + + (simple-test--transpositions): New macro. + (simple-transpose-subr): New test. + + Backport. + +2015-11-13 Juanma Barranquero + + * lisp/progmodes/elisp-mode.el: Declare function `project-roots' + + Backport. + +2015-11-13 Juanma Barranquero + + * src/undo.c: Small fixes for previous change + + (run_undoable_change): Mark void argument list. + (record_property_change): Remove unused variable `boundary'. + + Backport. + +2015-11-13 Eli Zaretskii + + Add a few more variables to redisplay--variables + + * lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction + and bidi-display-reordering to the list. + + Backport. + +2015-11-13 Eli Zaretskii + + * lisp/loadup.el: Enlarge the size of the hash table to 80000. + + Backport. + +2015-11-13 Eli Barzilay + + Fix point positioning after transposing with negative arg + + * lisp/simple.el (transpose-subr): When invoked with a negative + argument, move point to after the transposed text, like we do + when invoked with a positive argument. (Bug#21885) + + Backport. + +2015-11-13 Eli Zaretskii + + Fix last change in shr.el + + * lisp/net/shr.el (shr--have-one-fringe-p): Rename from + have-fringes-p. All callers changed. Doc fix. (Bug#21895) + + Backport. + +2015-11-13 Eli Zaretskii + + Fix last change + + * src/w32fns.c (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: + Don't DEFSYM tray notification symbols if D-Bus is being used. + + Backport. + +2015-11-13 Eli Zaretskii + + Another fix for MinGW64 and Cygwin builds due to notifications + + * src/w32fns.c: Ifdef away tray notification code if D-Bus is + being compiled into Emacs. + (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: Don't defsubr + Sw32_notification_notify and Sw32_notification_close if the code + is not compiled. Reported by Andy Moreton . + + Backport. + +2015-11-13 YAMAMOTO Mitsuharu + + Remove intern calls and XXX comments from Fx_export_frames + + * src/xfns.c (Fx_export_frames): Use Qpdf, Qpng, Qpostscript, and + Qsvg instead of intern calls. Use "postscript" instead of "ps" + for consistency with image types. Remove XXX comments. + (syms_of_xfns) : DEFSYM it. + + Backport. + +2015-11-13 Michael Albinus + + Adapt Tramp version, do not merge with master + + * doc/misc/trampver.texi (trampver): + * lisp/net/trampver.el (tramp-version): Set to "2.2.13-25.1". + +2015-11-11 Alan Mackenzie + + First commit to scratch/follow. Make Isearch work with Follow Mode, etc. + + doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of + Windows" and new @defun selected-window-group. + (Window Start and End): Describe new &optional parameter GROUP and + ...-group-function for window-start, window-end, set-window-start, and + pos-visible-in-window-p. + (Textual Scrolling) Describe the same for recenter. + doc/lispref/positions.texi (Screen Lines): Describe the same for + move-to-window-line. + + src/window.c (Fwindow_start, Fwindow_end, Fset_window_start) + (Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar + new optional parameter "group". At the beginning of each, check whether the + corresponding ...-group-function is set to a function, and if so execute this + function in place of the normal processing. + (syms_of_window): Define symbols for the six new variables below. + (window-start-group-function, window-end-group-function) + (set-window-start-group-function, recenter-group-function) + (pos-visible-in-window-p-group-function, move-to-window-line-group-function): + New permanent local buffer local variables. + src/keyboard.c (Fposn_at_point): Add extra parameter in call to + Fpos_visible_in_window_p. + + lisp/window.el (selected-window-group-function): New permanent local buffer + local variable. + (selected-window-group): New function. + + lisp/follow.el (follow-mode): Set the ...-group-function variables at mode + enable, kill them at mode disable. Add/remove follow-after-change to/from + after-change-functions. + (follow-start-end-invalid): New variable. + (follow-redisplay): Manipulate follow-start-end-invalid. + (follow-after-change, follow-window-start, follow-window-end) + (follow-set-window-start, follow-pos-visible-in-window-p) + (follow-move-to-window-line, follow-sit-for): New functions. + + lisp/isearch.el (isearch-call-message): New macro. + (isearch-update, with-isearch-suspended, isearch-del-char) + (isearch-search-and-update, isearch-ring-adjust): Invoke above new macro. + (with-isearch-suspended): Rearrange code such that isearch-call-message is + invoked before point is moved. + (isearch-message): Add comment about where point must be at function call. + (isearch-search): Remove call to isearch-message. + (isearch-lazy-highlight-window-group): New variable. + (isearch-lazy-highlight-new-loop): Unconditionally start idle timer. Move + the battery of tests to ... + (isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer. + Note: (sit-for 0) is still called. + (isearch-lazy-highlight-update): Check membership of + isearch-lazy-highlight-window-group. Don't set the `window' overlay + property. + (isearch-update, isearch-done, isearch-string-out-of-window) + (isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop) + (isearch-lazy-highlight-search, isearch-lazy-highlight-update) + (isearch-lazy-highlight-update): Call the six amended primitives (see + src/window.c above) with the new `group' argument set to t, to cooperate + with Follow Mode. + 2015-12-27 Lars Ingebrigtsen * shr.el (shr-descend): Allow using lambdas in external functions. @@ -20350,7 +25221,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit 531b28b4d96adf39d853fcb5e0bba7251fcce4b6 (inclusive). +commit fb6d826c69939c2d016c1b824d4e9bcb53d9e643 (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: commit fb6d826c69939c2d016c1b824d4e9bcb53d9e643 Merge: 536f48e 91917dd Author: K. Handa Date: Sun Jan 3 17:53:43 2016 +0900 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 91917dd58ec5278e555b9c693a830749083e8f89 Merge: c988877 9f2f14a Author: John Wiegley Date: Sat Jan 2 23:31:52 2016 -0800 Merge branch 'emacs-25-merge' commit c988877f436bbbb285a0b34f5e037f7758dd6349 Merge: cfad94a 7e47c2a Author: Vincent Belaïche Date: Sat Jan 2 16:59:42 2016 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit cfad94a5937931c4f28845a24d507fba4d6436cf Author: Vincent Belaïche Date: Sat Jan 2 16:59:03 2016 +0100 Align textually on fix done for emacs-25 branch for bug#21054 * lisp/ses.el (ses-check-curcell): Suppress ``temporary fix'' comment, and useless `(if t ...)' in order to align textually on fix done for emacs-25 branch for bug#21054. diff --git a/lisp/ses.el b/lisp/ses.el index 3e35fc1..ee2bcd5 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1117,13 +1117,7 @@ region, or nil if cursor is not at a cell." The end marker is appropriate if some argument is 'end. A range is appropriate if some argument is 'range. A single cell is appropriate unless some argument is 'needrange." - (if t;; Vincent B.: - ;; previously (eq ses--curcell t) - ;; this is a quick hack to temporary fix the bug implied by changes made by Stefan in - ;; http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ses.el?id=84e0b7dad6f1a8e53261f9b96f5a9080fea681a4 - ;;------------------------------------------------------------------------- - ;; curcell recalculation was postponed, but user typed ahead. - (ses-set-curcell)) + (ses-set-curcell); fix bug#21054 (cond ((not ses--curcell) (or (memq 'end args) commit 536f48e9a2251b9e654ea974bd90ff2f40218753 Author: K. Handa Date: Sat Jan 2 16:36:21 2016 +0900 support rendering of wider range of combinging characters by ftfont backend * lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend supports rendering of combining characters, call font-shape-gstring. * src/font.c (Ffont_get): Handle `combining-capability' property. (syms_of_font): New symbol ":combining-capability'. * src/font.h (struct font_driver): New member combining_capability. * src/ftfont.c: Include "category.h". (ftfont_driver): Initialize combining_capability to ftfont_combining_capability. (ftfont_shape_by_flt): If OTF is null, try to find a suitable FLT in advance. (ftfont_combining_capability): New function. diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index a3f4b3d..05f2f25 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el @@ -216,24 +216,26 @@ Bidirectional editing is supported."))) (setq idx 1 nglyphs nchars)) ;; Now IDX is an index to the first non-precomposed glyph. ;; Adjust positions of the remaining glyphs artificially. - (setq base-width (lglyph-width (lgstring-glyph gstring 0))) - (while (< idx nglyphs) - (setq glyph (lgstring-glyph gstring idx)) - (lglyph-set-from-to glyph 0 (1- nchars)) - (if (>= (lglyph-lbearing glyph) (lglyph-width glyph)) - ;; It seems that this glyph is designed to be rendered - ;; before the base glyph. - (lglyph-set-adjustment glyph (- base-width) 0 0) - (if (>= (lglyph-lbearing glyph) 0) - ;; Align the horizontal center of this glyph to the - ;; horizontal center of the base glyph. - (let ((width (- (lglyph-rbearing glyph) - (lglyph-lbearing glyph)))) - (lglyph-set-adjustment glyph - (- (/ (- base-width width) 2) - (lglyph-lbearing glyph) - base-width) 0 0)))) - (setq idx (1+ idx)))))) + (if (font-get font :combining-capability) + (font-shape-gstring gstring) + (setq base-width (lglyph-width (lgstring-glyph gstring 0))) + (while (< idx nglyphs) + (setq glyph (lgstring-glyph gstring idx)) + (lglyph-set-from-to glyph 0 (1- nchars)) + (if (>= (lglyph-lbearing glyph) (lglyph-width glyph)) + ;; It seems that this glyph is designed to be rendered + ;; before the base glyph. + (lglyph-set-adjustment glyph (- base-width) 0 0) + (if (>= (lglyph-lbearing glyph) 0) + ;; Align the horizontal center of this glyph to the + ;; horizontal center of the base glyph. + (let ((width (- (lglyph-rbearing glyph) + (lglyph-lbearing glyph)))) + (lglyph-set-adjustment glyph + (- (/ (- base-width width) 2) + (lglyph-lbearing glyph) + base-width) 0 0)))) + (setq idx (1+ idx))))))) gstring)) (let* ((base "[\u05D0-\u05F2]") diff --git a/src/font.c b/src/font.c index 016b7e0..6fa5995 100644 --- a/src/font.c +++ b/src/font.c @@ -4036,7 +4036,13 @@ The value of :otf is a cons (GSUB . GPOS) where GSUB and GPOS are lists representing the OpenType features supported by the font by this form: ((SCRIPT (LANGSYS FEATURE ...) ...) ...) SCRIPT, LANGSYS, and FEATURE are all symbols representing OpenType -Layout tags. */) +Layout tags. + +In addition to the keys listed abobe, the following keys are reserved +for the specific meanings as below: + +The value of :combining-capability is non-nil if the font-backend of +FONT supports rendering of combining characters for non-OTF fonts. */) (Lisp_Object font, Lisp_Object key) { int idx; @@ -4051,14 +4057,22 @@ Layout tags. */) if (idx >= 0 && idx < FONT_EXTRA_INDEX) return AREF (font, idx); val = Fassq (key, AREF (font, FONT_EXTRA_INDEX)); - if (NILP (val) && EQ (key, QCotf) && FONT_OBJECT_P (font)) + if (NILP (val) && FONT_OBJECT_P (font)) { struct font *fontp = XFONT_OBJECT (font); - if (fontp->driver->otf_capability) - val = fontp->driver->otf_capability (fontp); - else - val = Fcons (Qnil, Qnil); + if (EQ (key, QCotf)) + { + if (fontp->driver->otf_capability) + val = fontp->driver->otf_capability (fontp); + else + val = Fcons (Qnil, Qnil); + } + else if (EQ (key, QCcombining_capability)) + { + if (fontp->driver->combining_capability) + val = fontp->driver->combining_capability (fontp); + } } else val = Fcdr (val); @@ -5290,6 +5304,7 @@ syms_of_font (void) DEFSYM (QCscalable, ":scalable"); DEFSYM (QCavgwidth, ":avgwidth"); DEFSYM (QCfont_entity, ":font-entity"); + DEFSYM (QCcombining_capability, ":combining-capability"); /* Symbols representing values of font spacing property. */ DEFSYM (Qc, "c"); diff --git a/src/font.h b/src/font.h index 1d13e1c..f6f862a 100644 --- a/src/font.h +++ b/src/font.h @@ -715,6 +715,12 @@ struct font_driver bool (*cached_font_ok) (struct frame *f, Lisp_Object font_object, Lisp_Object entity); + + /* Optional + + Return non-nil if the driver support rendering of combining + characters for FONT according to Unicode combining class. */ + Lisp_Object (*combining_capability) (struct font *font); }; diff --git a/src/ftfont.c b/src/ftfont.c index 17e41a9..575bf53 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -30,6 +30,7 @@ along with GNU Emacs. If not, see . */ #include "dispextern.h" #include "character.h" #include "charset.h" +#include "category.h" #include "composite.h" #include "font.h" #include "ftfont.h" @@ -81,6 +82,8 @@ static Lisp_Object ftfont_lookup_cache (Lisp_Object, static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist); +static Lisp_Object ftfont_combining_capability (struct font *); + #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM)) static struct @@ -547,6 +550,10 @@ struct font_driver ftfont_driver = #endif ftfont_filter_properties, /* filter_properties */ + + NULL, /* cached_font_ok */ + + ftfont_combining_capability, }; static Lisp_Object @@ -2533,7 +2540,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, len = i; - if (with_variation_selector) + if (otf && with_variation_selector) { setup_otf_gstring (len); for (i = 0; i < len; i++) @@ -2583,14 +2590,19 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, flt_font_ft.otf = otf; flt_font_ft.matrix = matrix->xx != 0 ? matrix : 0; - if (1 < len) + if (1 < len || ! otf) { /* A little bit ad hoc. Perhaps, shaper must get script and language information, and select a proper flt for them here. */ int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1)); - if (0x300 <= c1 && c1 <= 0x36F) + if (CHAR_HAS_CATEGORY (c1, '^')) flt = mflt_get (msymbol ("combining")); + else if (! otf) + flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)), + &flt_font_ft.flt_font); + if (! flt) + return make_number (0); } MFLTGlyphFT *glyphs = (MFLTGlyphFT *) gstring.glyphs; @@ -2675,8 +2687,6 @@ ftfont_shape (Lisp_Object lgstring) struct ftfont_info *ftfont_info = (struct ftfont_info *) font; OTF *otf = ftfont_get_otf (ftfont_info); - if (! otf) - return make_number (0); return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf, &ftfont_info->matrix); } @@ -2750,6 +2760,16 @@ ftfont_filter_properties (Lisp_Object font, Lisp_Object alist) } +static Lisp_Object +ftfont_combining_capability (struct font *font) +{ +#ifdef HAVE_M17N_FLT + return Qt; +#else + return Qnil; +#endif +} + void syms_of_ftfont (void) { commit 7e47c2a7e101244a2532444cce7744f3e53e2f4f Author: Xue Fuqiao Date: Sat Jan 2 14:52:57 2016 +0800 ; * etc/NEWS: Typo fix. diff --git a/etc/NEWS b/etc/NEWS index e4db425..ca8f337 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -531,9 +531,9 @@ whether to use variable-pitch fonts or not. The user can also customize the `shr-use-fonts' variable. +++ -*** A new command `C' (`eww-toggle-colors) can be used to toggle +*** A new command `C' (`eww-toggle-colors') can be used to toggle whether to use the HTML-specified colors or not. The user can also -customize the `shr-use-colors variable. +customize the `shr-use-colors' variable. +++ *** A new command `R' (`eww-readable') will try do identify the main commit 222796697a6d1cae1d965df80fc42613f5fb1f89 Author: Andrew Hyatt Date: Fri Jan 1 15:07:53 2016 -0500 Add notes on bug triage procedure * CONTRIBUTE: In section on the issue tracker, point to new triage file. * admin/notes/triage: New file explaining triage procedure. diff --git a/CONTRIBUTE b/CONTRIBUTE index b385d68..0c0ef20 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -222,6 +222,17 @@ the tracker with the corresponding bugs/issues. GNU ELPA has a 'debbugs' package that allows accessing the tracker database from Emacs. +Bugs needs regular attention. A large backlog of bugs is +disheartening to the developers, and a culture of ignoring bugs is +harmful to users, who expect software that works. Bugs have to be +regularly looked at and acted upon. Not all bugs are critical, but at +the least, each bug needs to be regularly re-reviewed to make sure it +is still reproducible. + +The process of going through old or new bugs and acting on them is +called bug triage. This process is described in the file +admin/notes/triage. + ** Document your changes. Any change that matters to end-users should have an entry in etc/NEWS. diff --git a/admin/notes/triage b/admin/notes/triage new file mode 100644 index 0000000..bc91b6c --- /dev/null +++ b/admin/notes/triage @@ -0,0 +1,68 @@ +HOW TO TRIAGE EMACS BUGS -*- outline -*- + +This document just describes the procedure of triaging bugs, for information on +how to work with the bug tracker, see the bugtracker file in this same directory +for the basics. You can also install the debbugs ELPA package for access to M-x +debbugs-gnu, an emacs interface to debbugs, and M-x debbugs-org, an emacs +interface via org-mode. + +* Bug backlog triage procedure + +The goal of this triage is to prune down the list of old bugs, closing +the ones that are not reproducible on the current release. + + 1. To start, enter debbugs mode (either debbugs-gnu, debbugs-org, or via the + web browser), and accept the default list option of bugs that have severity + serious, important, or normal. + 2. This will also show closed bugs that have yet to be archived. You can + filter these out in debbugs-gnu with "x" (debbugs-gnu-toggle-suppress). + 3. For each bug, do the following: + - Read the mail thread for the bug. Find out if anyone has been able to + reproduce this on the current release. + - If someone has been able to, then your work is finished for this bug. + - Make sure there's enough information to reproduce the bug. It should be + very clear how to reproduce. If not, please ask for specific steps to + reproduce. If you don't get them, and you can't reproduce without them, + you can close as "doneunreproducible". + - If no one has mentioned being able to reproduce on the current release, + read the bug description and attempt to reproduce on an emacs started + with "emacs -Q" (the goal is to not let our personal configs interfere + with bug testing). + - If you can reproduce, then reply on the thread (either on the original + message, or anywhere you find appropriate) that you can reproduce this on + the current release. If your reproduction gives additional info (such as + a backtrace), then add that as well, since it will help whoever attempts + to fix it. + - If you can't reproduce, state that you can't reproduce it on the current + release, ask if they can try again against the current release. Tag the + bug as "unreproducable". Wait a few weeks for their reply - if they can + reproduce it, then that's great, otherwise close as "doneunreproducible". + - If the bug ends up still open, make sure the priority and other tags + seems reasonable. + 4. Your changes will take some time to take effect. After a period of minutes + to hours, you will get a mail telling you the control message has been + processed. At this point, if there were no errors detected, you and + everyone else can see your changes. If there are errors, read the error + text - if you need help, consulting the bugtracker documentation in this + same directory. + +* New bug triage process + +The goal of the new bug triage process is similar to the backlog triage process, +except that the focus is on prioritizing the bug, and making sure it is has +necessary information for others to act on. + +For each new bug, ask the following questions: + + 1. Is the bug report written in a way to be easy to reproduce (starts from + emacs -Q, etc.)? If not, ask the reporter to try and reproduce it on an + emacs without customization. + 2. Is the bug report written against the lastest emacs? If not, try to + reproduce on the latest version, and if it can't be reproduced, ask the + reporter to try again with the latest version. + 3. Is the bug the same as another bug? If so, merge the bugs. + 4. What is the priority of the bug? Add a priority: critical, grave, serious, + important, normal, minor, or wishlist. + 5. Who should be the owner? This depends on what component the bug is part + of. You can look at the admin/MAINTAINERS file (then you can just search + emacs-devel to match the name with an email address). commit ee0117c4a859f7d8c37661c60aa4736add4dd53f Author: Glenn Morris Date: Fri Jan 1 06:18:06 2016 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 4691056..b870d81 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -3026,8 +3026,8 @@ See Info node `(calc)Defining Functions'. ;;;*** -;;;### (autoloads nil "calculator" "calculator.el" (22109 33223 416655 -;;;;;; 811000)) +;;;### (autoloads nil "calculator" "calculator.el" (22118 48196 106762 +;;;;;; 331000)) ;;; Generated autoloads from calculator.el (autoload 'calculator "calculator" "\ @@ -6442,7 +6442,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** -;;;### (autoloads nil "dired" "dired.el" (22085 50883 181731 271000)) +;;;### (autoloads nil "dired" "dired.el" (22142 30520 415026 947000)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -8149,15 +8149,15 @@ BUFFER is put back into its original major mode. ;;;*** -;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (22102 59970 -;;;;;; 680776 103000)) +;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (22131 60223 +;;;;;; 713707 127000)) ;;; Generated autoloads from emacs-lisp/eieio.el (push (purecopy '(eieio 1 4)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22102 -;;;;;; 59970 668776 103000)) +;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22131 +;;;;;; 60223 709707 127000)) ;;; Generated autoloads from emacs-lisp/eieio-core.el (push (purecopy '(eieio-core 1 4)) package--builtin-versions) @@ -8786,7 +8786,7 @@ Look at CONFIG and try to expand GROUP. ;;;*** -;;;### (autoloads nil "erc" "erc/erc.el" (22011 58553 477858 469000)) +;;;### (autoloads nil "erc" "erc/erc.el" (22145 6712 764647 100000)) ;;; Generated autoloads from erc/erc.el (push (purecopy '(erc 5 3)) package--builtin-versions) @@ -10050,7 +10050,7 @@ fourth arg NOSEP non-nil inhibits this. ;;;*** -;;;### (autoloads nil "eww" "net/eww.el" (22063 20273 743891 395000)) +;;;### (autoloads nil "eww" "net/eww.el" (22147 48445 679722 290000)) ;;; Generated autoloads from net/eww.el (defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ @@ -10465,7 +10465,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** -;;;### (autoloads nil "ffap" "ffap.el" (21993 28596 82597 473000)) +;;;### (autoloads nil "ffap" "ffap.el" (22142 30520 599026 947000)) ;;; Generated autoloads from ffap.el (autoload 'ffap-next "ffap" "\ @@ -12683,8 +12683,8 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** -;;;### (autoloads nil "gnutls" "net/gnutls.el" (22011 58553 761858 -;;;;;; 469000)) +;;;### (autoloads nil "gnutls" "net/gnutls.el" (22141 9655 59660 +;;;;;; 171000)) ;;; Generated autoloads from net/gnutls.el (defvar gnutls-min-prime-bits 256 "\ @@ -14311,8 +14311,8 @@ Convert HTML to plain text in the current buffer. ;;;*** -;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (22026 25907 -;;;;;; 591502 692000)) +;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (22131 60223 +;;;;;; 733707 127000)) ;;; Generated autoloads from htmlfontify.el (push (purecopy '(htmlfontify 0 21)) package--builtin-versions) @@ -14448,8 +14448,8 @@ bound to the current value of the filter. ;;;*** -;;;### (autoloads nil "ibuffer" "ibuffer.el" (22032 64681 350838 -;;;;;; 183000)) +;;;### (autoloads nil "ibuffer" "ibuffer.el" (22131 60223 745707 +;;;;;; 127000)) ;;; Generated autoloads from ibuffer.el (autoload 'ibuffer-list-buffers "ibuffer" "\ @@ -16973,8 +16973,8 @@ A major mode to edit GNU ld script files ;;;*** -;;;### (autoloads nil "let-alist" "emacs-lisp/let-alist.el" (21890 -;;;;;; 39605 402073 663000)) +;;;### (autoloads nil "let-alist" "emacs-lisp/let-alist.el" (22110 +;;;;;; 2280 793544 228000)) ;;; Generated autoloads from emacs-lisp/let-alist.el (push (purecopy '(let-alist 1 0 4)) package--builtin-versions) @@ -19254,8 +19254,8 @@ listed in the PORTS list. ;;;*** -;;;### (autoloads nil "network-stream" "net/network-stream.el" (21855 -;;;;;; 577 147947 107000)) +;;;### (autoloads nil "network-stream" "net/network-stream.el" (22146 +;;;;;; 27578 220451 942000)) ;;; Generated autoloads from net/network-stream.el (autoload 'open-network-stream "network-stream" "\ @@ -22021,8 +22021,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;*** -;;;### (autoloads nil "ps-print" "ps-print.el" (22011 58553 993858 -;;;;;; 469000)) +;;;### (autoloads nil "ps-print" "ps-print.el" (22131 60223 805707 +;;;;;; 127000)) ;;; Generated autoloads from ps-print.el (push (purecopy '(ps-print 7 3 5)) package--builtin-versions) @@ -22872,8 +22872,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead. ;;;*** -;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22056 47028 -;;;;;; 787798 795000)) +;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22131 60223 +;;;;;; 841707 127000)) ;;; Generated autoloads from textmodes/reftex.el (autoload 'reftex-citation "reftex-cite" nil t) (autoload 'reftex-all-document-files "reftex-parse") @@ -23206,8 +23206,8 @@ variable. ;;;*** -;;;### (autoloads nil "rmail" "mail/rmail.el" (22011 58553 725858 -;;;;;; 469000)) +;;;### (autoloads nil "rmail" "mail/rmail.el" (22131 60223 757707 +;;;;;; 127000)) ;;; Generated autoloads from mail/rmail.el (defvar rmail-file-name (purecopy "~/RMAIL") "\ @@ -24606,7 +24606,7 @@ only these files will be asked to be saved. ;;;*** -;;;### (autoloads nil "ses" "ses.el" (21990 52406 736500 385000)) +;;;### (autoloads nil "ses" "ses.el" (22149 3770 262205 950000)) ;;; Generated autoloads from ses.el (autoload 'ses-mode "ses" "\ @@ -24917,7 +24917,7 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads nil "shr" "net/shr.el" (22085 50883 205731 271000)) +;;;### (autoloads nil "shr" "net/shr.el" (22146 27578 232451 942000)) ;;; Generated autoloads from net/shr.el (autoload 'shr-render-region "shr" "\ @@ -29035,8 +29035,8 @@ no further processing). URL is either a string or a parsed URL. ;;;*** -;;;### (autoloads nil "url-auth" "url/url-auth.el" (21989 31537 943825 -;;;;;; 721000)) +;;;### (autoloads nil "url-auth" "url/url-auth.el" (22142 30520 631026 +;;;;;; 947000)) ;;; Generated autoloads from url/url-auth.el (autoload 'url-get-authentication "url-auth" "\ @@ -29178,8 +29178,8 @@ overriding the value of `url-gateway-method'. ;;;*** -;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22089 -;;;;;; 47939 367694 315000)) +;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22142 +;;;;;; 30520 631026 947000)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -29226,6 +29226,13 @@ accessible. \(fn URL &rest IGNORED)" nil nil) +(autoload 'url-insert-buffer-contents "url-handlers" "\ +Insert the contents of BUFFER into current buffer. +This is like `url-insert', but also decodes the current buffer as +if it had been inserted from a file named URL. + +\(fn BUFFER URL &optional VISIT BEG END REPLACE)" nil nil) + (autoload 'url-insert-file-contents "url-handlers" "\ @@ -29233,8 +29240,8 @@ accessible. ;;;*** -;;;### (autoloads nil "url-http" "url/url-http.el" (22018 31799 119263 -;;;;;; 120000)) +;;;### (autoloads nil "url-http" "url/url-http.el" (22146 27578 232451 +;;;;;; 942000)) ;;; Generated autoloads from url/url-http.el (autoload 'url-default-expander "url-expand") @@ -29376,8 +29383,8 @@ Fetch a data URL (RFC 2397). ;;;*** -;;;### (autoloads nil "url-parse" "url/url-parse.el" (21670 32331 -;;;;;; 885635 586000)) +;;;### (autoloads nil "url-parse" "url/url-parse.el" (22142 30520 +;;;;;; 663026 947000)) ;;; Generated autoloads from url/url-parse.el (autoload 'url-recreate-url "url-parse" "\ @@ -29473,8 +29480,8 @@ would have been passed to OPERATION. ;;;*** -;;;### (autoloads nil "url-util" "url/url-util.el" (21993 28596 418597 -;;;;;; 473000)) +;;;### (autoloads nil "url-util" "url/url-util.el" (22146 27578 232451 +;;;;;; 942000)) ;;; Generated autoloads from url/url-util.el (defvar url-debug nil "\ @@ -32317,12 +32324,13 @@ Zone out, completely. ;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" ;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" ;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" -;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el" -;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/avl-tree.el" -;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" -;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" -;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-compat.el" -;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el" +;;;;;; "dframe.el" "dired-aux.el" "dired-loaddefs.el" "dired-x.el" +;;;;;; "dom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" "dynamic-setting.el" +;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" +;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" +;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" +;;;;;; "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el" +;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-loaddefs.el" ;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el" ;;;;;; "emacs-lisp/generator.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" ;;;;;; "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" @@ -32361,9 +32369,9 @@ Zone out, completely. ;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el" ;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2231.el" ;;;;;; "gnus/rtree.el" "gnus/sieve-manage.el" "gnus/smime.el" "gnus/spam-stat.el" -;;;;;; "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el" -;;;;;; "international/charscript.el" "international/fontset.el" -;;;;;; "international/iso-ascii.el" "international/ja-dic-cnv.el" +;;;;;; "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "htmlfontify-loaddefs.el" +;;;;;; "ibuf-ext.el" "ibuffer-loaddefs.el" "international/charscript.el" +;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" ;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "international/uni-bidi.el" ;;;;;; "international/uni-brackets.el" "international/uni-category.el" ;;;;;; "international/uni-combining.el" "international/uni-comment.el" @@ -32386,13 +32394,13 @@ Zone out, completely. ;;;;;; "leim/quail/symbol-ksc.el" "leim/quail/thai.el" "leim/quail/tibetan.el" ;;;;;; "leim/quail/viqr.el" "leim/quail/vntelex.el" "leim/quail/vnvni.el" ;;;;;; "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" "mail/mailheader.el" -;;;;;; "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el" -;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el" -;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el" -;;;;;; "mail/undigest.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el" -;;;;;; "mh-e/mh-buffers.el" "mh-e/mh-compat.el" "mh-e/mh-funcs.el" -;;;;;; "mh-e/mh-gnus.el" "mh-e/mh-identity.el" "mh-e/mh-inc.el" -;;;;;; "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" +;;;;;; "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-loaddefs.el" +;;;;;; "mail/rmail-spam-filter.el" "mail/rmailedit.el" "mail/rmailkwd.el" +;;;;;; "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el" +;;;;;; "mail/rmailsum.el" "mail/undigest.el" "mh-e/mh-acros.el" +;;;;;; "mh-e/mh-alias.el" "mh-e/mh-buffers.el" "mh-e/mh-compat.el" +;;;;;; "mh-e/mh-funcs.el" "mh-e/mh-gnus.el" "mh-e/mh-identity.el" +;;;;;; "mh-e/mh-inc.el" "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el" ;;;;;; "mh-e/mh-loaddefs.el" "mh-e/mh-mime.el" "mh-e/mh-print.el" ;;;;;; "mh-e/mh-scan.el" "mh-e/mh-search.el" "mh-e/mh-seq.el" "mh-e/mh-show.el" ;;;;;; "mh-e/mh-speed.el" "mh-e/mh-thread.el" "mh-e/mh-tool-bar.el" @@ -32400,38 +32408,38 @@ Zone out, completely. ;;;;;; "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el" "net/eudcb-ldap.el" ;;;;;; "net/eudcb-mab.el" "net/eudcb-ph.el" "net/hmac-def.el" "net/hmac-md5.el" ;;;;;; "net/imap.el" "net/ldap.el" "net/mairix.el" "net/newsticker.el" -;;;;;; "net/nsm.el" "net/rfc2104.el" "net/sasl-cram.el" "net/sasl-digest.el" -;;;;;; "net/sasl-scram-rfc.el" "net/sasl.el" "net/shr-color.el" -;;;;;; "net/soap-inspect.el" "net/socks.el" "net/tls.el" "net/tramp-adb.el" -;;;;;; "net/tramp-cache.el" "net/tramp-cmds.el" "net/tramp-compat.el" -;;;;;; "net/tramp-gvfs.el" "net/tramp-gw.el" "net/tramp-loaddefs.el" -;;;;;; "net/tramp-sh.el" "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" -;;;;;; "net/zeroconf.el" "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el" -;;;;;; "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el" -;;;;;; "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" -;;;;;; "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el" -;;;;;; "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el" -;;;;;; "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" -;;;;;; "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" -;;;;;; "org/ob-core.el" "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" -;;;;;; "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" -;;;;;; "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" -;;;;;; "org/ob-js.el" "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" -;;;;;; "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" -;;;;;; "org/ob-matlab.el" "org/ob-maxima.el" "org/ob-mscgen.el" -;;;;;; "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el" -;;;;;; "org/ob-picolisp.el" "org/ob-plantuml.el" "org/ob-python.el" -;;;;;; "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scala.el" -;;;;;; "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" "org/ob-shen.el" -;;;;;; "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/ob-tangle.el" -;;;;;; "org/ob.el" "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el" -;;;;;; "org/org-bibtex.el" "org/org-clock.el" "org/org-crypt.el" -;;;;;; "org/org-ctags.el" "org/org-datetree.el" "org/org-docview.el" -;;;;;; "org/org-element.el" "org/org-entities.el" "org/org-eshell.el" -;;;;;; "org/org-faces.el" "org/org-feed.el" "org/org-footnote.el" -;;;;;; "org/org-gnus.el" "org/org-habit.el" "org/org-id.el" "org/org-indent.el" -;;;;;; "org/org-info.el" "org/org-inlinetask.el" "org/org-install.el" -;;;;;; "org/org-irc.el" "org/org-list.el" "org/org-loaddefs.el" +;;;;;; "net/nsm.el" "net/puny.el" "net/rfc2104.el" "net/sasl-cram.el" +;;;;;; "net/sasl-digest.el" "net/sasl-scram-rfc.el" "net/sasl.el" +;;;;;; "net/shr-color.el" "net/soap-inspect.el" "net/socks.el" "net/tls.el" +;;;;;; "net/tramp-adb.el" "net/tramp-cache.el" "net/tramp-cmds.el" +;;;;;; "net/tramp-compat.el" "net/tramp-gvfs.el" "net/tramp-gw.el" +;;;;;; "net/tramp-loaddefs.el" "net/tramp-sh.el" "net/tramp-smb.el" +;;;;;; "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" "notifications.el" +;;;;;; "nxml/nxml-enc.el" "nxml/nxml-maint.el" "nxml/nxml-ns.el" +;;;;;; "nxml/nxml-outln.el" "nxml/nxml-parse.el" "nxml/nxml-rap.el" +;;;;;; "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" "nxml/rng-maint.el" +;;;;;; "nxml/rng-match.el" "nxml/rng-parse.el" "nxml/rng-pttrn.el" +;;;;;; "nxml/rng-uri.el" "nxml/rng-util.el" "nxml/xsd-regexp.el" +;;;;;; "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-awk.el" +;;;;;; "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" "org/ob-core.el" +;;;;;; "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" "org/ob-emacs-lisp.el" +;;;;;; "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" "org/ob-gnuplot.el" +;;;;;; "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" "org/ob-js.el" +;;;;;; "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" "org/ob-lilypond.el" +;;;;;; "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" "org/ob-matlab.el" +;;;;;; "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" "org/ob-octave.el" +;;;;;; "org/ob-org.el" "org/ob-perl.el" "org/ob-picolisp.el" "org/ob-plantuml.el" +;;;;;; "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" +;;;;;; "org/ob-scala.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" +;;;;;; "org/ob-shen.el" "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" +;;;;;; "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" "org/org-attach.el" +;;;;;; "org/org-bbdb.el" "org/org-bibtex.el" "org/org-clock.el" +;;;;;; "org/org-crypt.el" "org/org-ctags.el" "org/org-datetree.el" +;;;;;; "org/org-docview.el" "org/org-element.el" "org/org-entities.el" +;;;;;; "org/org-eshell.el" "org/org-faces.el" "org/org-feed.el" +;;;;;; "org/org-footnote.el" "org/org-gnus.el" "org/org-habit.el" +;;;;;; "org/org-id.el" "org/org-indent.el" "org/org-info.el" "org/org-inlinetask.el" +;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-list.el" "org/org-loaddefs.el" ;;;;;; "org/org-macro.el" "org/org-mhe.el" "org/org-mobile.el" "org/org-mouse.el" ;;;;;; "org/org-pcomplete.el" "org/org-plot.el" "org/org-protocol.el" ;;;;;; "org/org-rmail.el" "org/org-src.el" "org/org-table.el" "org/org-timer.el" @@ -32445,23 +32453,25 @@ Zone out, completely. ;;;;;; "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el" "progmodes/ebnf-iso.el" ;;;;;; "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el" ;;;;;; "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" -;;;;;; "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el" -;;;;;; "sb-image.el" "scroll-bar.el" "soundex.el" "subdirs.el" "tempo.el" -;;;;;; "textmodes/bib-mode.el" "textmodes/makeinfo.el" "textmodes/page-ext.el" -;;;;;; "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el" -;;;;;; "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el" "textmodes/reftex-global.el" -;;;;;; "textmodes/reftex-index.el" "textmodes/reftex-parse.el" "textmodes/reftex-ref.el" -;;;;;; "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" "textmodes/texnfo-upd.el" -;;;;;; "timezone.el" "tooltip.el" "tree-widget.el" "url/url-about.el" -;;;;;; "url/url-cookie.el" "url/url-dired.el" "url/url-domsuf.el" -;;;;;; "url/url-expand.el" "url/url-ftp.el" "url/url-future.el" -;;;;;; "url/url-history.el" "url/url-imap.el" "url/url-methods.el" -;;;;;; "url/url-nfs.el" "url/url-proxy.el" "url/url-vars.el" "vc/ediff-diff.el" -;;;;;; "vc/ediff-init.el" "vc/ediff-merg.el" "vc/ediff-ptch.el" -;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" -;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vc/vc-filewise.el" "vcursor.el" -;;;;;; "vt-control.el" "vt100-led.el" "w32-fns.el" "w32-vars.el" -;;;;;; "x-dnd.el") (22106 57434 227149 199000)) +;;;;;; "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-print-loaddefs.el" +;;;;;; "ps-samp.el" "sb-image.el" "scroll-bar.el" "soundex.el" "subdirs.el" +;;;;;; "tempo.el" "textmodes/bib-mode.el" "textmodes/makeinfo.el" +;;;;;; "textmodes/page-ext.el" "textmodes/refbib.el" "textmodes/refer.el" +;;;;;; "textmodes/reftex-auc.el" "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el" +;;;;;; "textmodes/reftex-global.el" "textmodes/reftex-index.el" +;;;;;; "textmodes/reftex-loaddefs.el" "textmodes/reftex-parse.el" +;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" +;;;;;; "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el" +;;;;;; "url/url-about.el" "url/url-cookie.el" "url/url-dired.el" +;;;;;; "url/url-domsuf.el" "url/url-expand.el" "url/url-ftp.el" +;;;;;; "url/url-future.el" "url/url-history.el" "url/url-imap.el" +;;;;;; "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el" +;;;;;; "url/url-vars.el" "vc/ediff-diff.el" "vc/ediff-init.el" "vc/ediff-merg.el" +;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" +;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" +;;;;;; "vc/vc-filewise.el" "vcursor.el" "vt-control.el" "vt100-led.el" +;;;;;; "w32-fns.el" "w32-vars.el" "x-dnd.el") (22147 48445 679722 +;;;;;; 290000)) ;;;*** commit 0c9abf36a4fbc775918c08c1104a64d037280abc Author: Vincent Belaïche Date: Thu Dec 31 00:10:37 2015 +0100 Correct ses-rename-cell cursor-intangible text prop updating. There were two problems: - First ses-rename-cell has to work when called non interactively (with non-nil CELL argument), so in this case the start pos of put-text-property cannot be plainly (point), you need a ses-goto-print call before - Second, the range itself was computed erronously, only the first char was affected instead of the full cell width. This was not noticeable prior to changes (Deprecate `intangible' and `point-entered' properties) made by Stefan on 2015-04-13T19:51:15Z * lisp/ses.el (ses-rename-cell): Correct computation of position range to which the 'cursor-intangible text property has to be set to cell new name. diff --git a/lisp/ses.el b/lisp/ses.el index 8cbc2e8..3e35fc1 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -3414,15 +3414,17 @@ highlighted range in the spreadsheet." (setf (ses-cell--symbol cell) new-name) (makunbound sym) (and curcell (setq ses--curcell new-name)) - (let* ((pos (point)) - (inhibit-read-only t) - (col (current-column)) - (end (save-excursion - (move-to-column (1+ col)) - (if (eolp) - (+ pos (ses-col-width col) 1) - (point))))) - (put-text-property pos end 'cursor-intangible new-name)) + (save-excursion + (or curcell (ses-goto-print row col)) + (let* ((pos (point)) + (inhibit-read-only t) + (end (progn + (move-to-column (+ (current-column) (ses-col-width col))) + (if (eolp) + (+ pos (ses-col-width col) 1) + (forward-char) + (point))))) + (put-text-property pos end 'cursor-intangible new-name))) ;; Update the cell name in the mode-line. (force-mode-line-update))) commit 209e30bac2d73c2e6f1c46b0d7281b474527cfa4 Author: Vincent Belaïche Date: Wed Dec 30 12:37:54 2015 +0100 Don't fake empty cells value by "" when printing with a lambda. When using a lambda expression printer function the user should be free to format differently a really empty cell, ie. containing nil, from a cell containing an empty string "". * ses.el (ses-call-printer): Replace `(or value "")' by just `value' in the case of a lambda expression printer function. * ses.texi (Printer functions): Add example and description about lambda expression printer function handling all the possible values, including unexpected ones. diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 2f92e3e..4cb4188 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -443,6 +443,36 @@ printer function. Then, if you call again @code{"%.3f"} all the cells using printer @samp{foo} will be reprinted accordingly. +When you define a printer function with a lambda expression taking one +argument, please take care that the returned value is a string, or a +list containing a string, even when the input argument has an +unexpected value. Here is an example: + +@example +(lambda (val) + (cond + ((null val) "") + ((and (numberp val) (>= val 0)) (format "%.1f" val)) + (t (ses-center-span (format "%S" val) ?#)))) +@end example + +This example will: +@itemize +@item +When the cell is empty (ie.@: when @code{val} is @code{nil}), print an +empty string @code{""} +@item +When the cell value is a non negative number, format the the value in +fixed-point notation with one decimal after point +@item +Otherwise, handle the value as erroneous by printing it as an +s-expression (using @code{prin1}), centered and surrounded by @code{#} +filling. +@end itemize + + + + @node Clearing cells @section Clearing cells @cindex clearing commands diff --git a/lisp/ses.el b/lisp/ses.el index 7347eb8..8cbc2e8 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1289,7 +1289,7 @@ printer signaled one (and \"%s\" is used as the default printer), else nil." (and locprn (ses--locprn-compiled locprn)))) printer) - (or value ""))) + value)) (if (stringp value) value (or (stringp (car-safe value)) commit e8702794d46ae032803bf54ffbd71ebde215179c Author: Vincent Belaïche Date: Wed Dec 30 11:57:29 2015 +0100 Quick temporary hack to fix curcell refreshing. The problem was caused by change: 2015-04-13 Deprecate `intangible' and `point-entered' properties. The problem is that this change has removed the (setq ses--curcell t) setting in the ses-command-hook function. * ses.el (ses-check-curcell): replace `(eq ses--curcell t)' by just `t' as a condition to call function `ses-set-curcell'. Comment this as a quick temporary hack to make it work, as I don't know yet whether a definite correction would be to make the ses-set-curcell at every ses-check-curcell, or to revert to the previous approach, ie marking ses--curcell as out-of-date at every potentially cursor motion command. diff --git a/lisp/ses.el b/lisp/ses.el index ec1359b..7347eb8 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1117,7 +1117,11 @@ region, or nil if cursor is not at a cell." The end marker is appropriate if some argument is 'end. A range is appropriate if some argument is 'range. A single cell is appropriate unless some argument is 'needrange." - (if (eq ses--curcell t) + (if t;; Vincent B.: + ;; previously (eq ses--curcell t) + ;; this is a quick hack to temporary fix the bug implied by changes made by Stefan in + ;; http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/ses.el?id=84e0b7dad6f1a8e53261f9b96f5a9080fea681a4 + ;;------------------------------------------------------------------------- ;; curcell recalculation was postponed, but user typed ahead. (ses-set-curcell)) (cond commit 36a0feb2971e6088cebb4a2fdc65862d395081ea Author: Lars Magne Ingebrigtsen Date: Wed Dec 30 10:11:34 2015 +0100 Restrictive URL checking tweaks * lisp/net/eww.el (eww): Check whether the domain is restrictive instead of the string (http://македонија.icom.museum is restrictive even if each part is from a different script). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index ed19bea..e096493 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -280,7 +280,7 @@ word(s) will be searched for via `eww-search-prefix'." ;; IDNA characters. If not, transform to punycode to indicate that ;; there may be funny business going on. (let ((parsed (url-generic-parse-url url))) - (unless (puny-highly-restrictive-p (url-host parsed)) + (unless (puny-highly-restrictive-domain-p (url-host parsed)) (setf (url-host parsed) (puny-encode-domain (url-host parsed))) (setq url (url-recreate-url parsed)))) (plist-put eww-data :url url) commit 7c343eeaacd1454aef7ab492cbefb53d52ab6cf4 Author: Lars Magne Ingebrigtsen Date: Wed Dec 30 10:10:20 2015 +0100 New function `puny-highly-restrictive-domain-p' * lisp/net/puny.el (puny-highly-restrictive-string-p): Rename. (puny-highly-restrictive-domain-p): New function. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index ac47e13..f2fa346 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -193,7 +193,12 @@ For instance \"xn--bcher-kva\" => \"bücher\"." ;; http://www.unicode.org/reports/tr39/#Restriction_Level_Detection ;; http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Inclusion_in_Identifiers -(defun puny-highly-restrictive-p (string) +(defun puny-highly-restrictive-string-p (string) + "Say whether STRING is \"highly restrictive\" in the Unicode IDNA sense. +See http://www.unicode.org/reports/tr39/#Restriction_Level_Detection +for details. The main idea is that if you're mixing +scripts (like latin and cyrillic), you may confuse the user by +using homographs." (let ((scripts (delq t @@ -233,6 +238,11 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (latin han bopomofo) (latin han hangul))))))) +(defun puny-highly-restrictive-domain-p (domain) + "Say whether DOMAIN is \"highly restrictive\" in the Unicode IDNA sense. +See `puny-highly-restrictive-string-p' for further details." + (seq-every-p 'puny-highly-restrictive-string-p (split-string domain "[.]"))) + (provide 'puny) ;;; puny.el ends here commit d7f24b86e1dd28bcbe4fa7089bebb70f0fe29b3a Author: Lars Magne Ingebrigtsen Date: Wed Dec 30 10:00:15 2015 +0100 eww build fix (require puny) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 88dfb02..ed19bea 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -31,6 +31,7 @@ (require 'url-queue) (require 'url-util) ; for url-get-url-at-point (require 'mm-url) +(require 'puny) (eval-when-compile (require 'subr-x)) ;; for string-trim (defgroup eww nil commit 40621e704d5180c39880820234b01034c241204f Author: Lars Magne Ingebrigtsen Date: Wed Dec 30 09:59:30 2015 +0100 Transform non-restrictive domains to punycode for display * lisp/net/eww.el (eww): Check whether the domain is Highly Restrictive in the Unicode IDNA sense. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7ec58f1..88dfb02 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -275,6 +275,13 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) (eww-setup-buffer) + ;; Check whether the domain only uses "Highly Restricted" Unicode + ;; IDNA characters. If not, transform to punycode to indicate that + ;; there may be funny business going on. + (let ((parsed (url-generic-parse-url url))) + (unless (puny-highly-restrictive-p (url-host parsed)) + (setf (url-host parsed) (puny-encode-domain (url-host parsed))) + (setq url (url-recreate-url parsed)))) (plist-put eww-data :url url) (plist-put eww-data :title "") (eww-update-header-line-format) commit 9f2f14a0725211b13a744573344636b57b9c98b9 Merge: d259328 e823c34 Author: John Wiegley Date: Tue Dec 29 21:40:28 2015 -0800 Merge emacs-25 into master (using imerge) commit e823c34072bf045800d91e12c7ddb61fa23c6e30 Author: Eli Zaretskii Date: Tue Dec 29 22:56:53 2015 +0200 Fix typos in CC Mode manual * doc/misc/cc-mode.texi (c-offsets-alist, Style Variables): Fix typos. (Bug#22267) diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 9b488cb..7415da5 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -2461,7 +2461,7 @@ handled a little differently from the other style variables. It's default global binding is the empty list @code{nil}, rather than @code{set-from-style}. Before the style system is initialized, you can add individual elements to @code{c-offsets-alist} by calling -@code{c-set-offset}(@pxref{c-offsets-alist}) just like you would set +@code{c-set-offset} (@pxref{c-offsets-alist}) just like you would set other style variables with @code{setq}. Those elements will then prevail when the style system later initializes a buffer-local copy of @code{c-offsets-alist}. @@ -5234,13 +5234,13 @@ This command changes the entry for a syntactic symbol in the current binding of @code{c-offsets-alist}, or it inserts a new entry if there isn't already one for that syntactic symbol. -You can use @code{c-set-offsets} interactively within a @ccmode{} +You can use @code{c-set-offset} interactively within a @ccmode{} buffer to make experimental changes to your indentation settings. @kbd{C-c C-o} prompts you for the syntactic symbol to change (defaulting to that of the current line) and the new offset (defaulting to the current offset). -@code{c-set-offsets} takes two arguments when used programmatically: +@code{c-set-offset} takes two arguments when used programmatically: @var{symbol}, the syntactic element symbol to change and @var{offset}, the new offset for that syntactic element. You can call the command in your @file{.emacs} to change the global binding of commit 57bd9a35efafd37a6888e69be28f54d49affcd30 Author: Eli Zaretskii Date: Tue Dec 29 20:07:23 2015 +0200 Avoid assertion violations in compact_font_cache_entry * src/alloc.c (compact_font_cache_entry): Don't use VECTORP to avoid assertion violation in ASIZE. (Bug#22263) diff --git a/src/alloc.c b/src/alloc.c index 23ddd83..fe55cde 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5346,7 +5346,10 @@ compact_font_cache_entry (Lisp_Object entry) /* Consider OBJ if it is (font-spec . [font-entity font-entity ...]). */ if (CONSP (obj) && GC_FONT_SPEC_P (XCAR (obj)) && !VECTOR_MARKED_P (GC_XFONT_SPEC (XCAR (obj))) - && VECTORP (XCDR (obj))) + /* Don't use VECTORP here, as that calls ASIZE, which could + hit assertion violation during GC. */ + && (VECTORLIKEP (XCDR (obj)) + && ! (gc_asize (XCDR (obj)) & PSEUDOVECTOR_FLAG))) { ptrdiff_t i, size = gc_asize (XCDR (obj)); Lisp_Object obj_cdr = XCDR (obj); commit 88e2de2381a61445c20f8d35857ad57d581eafe1 Author: Eli Zaretskii Date: Tue Dec 29 18:49:57 2015 +0200 Fix filling text with bidirectional characters in shr.el * lisp/net/shr.el (shr-insert-document): Bind bidi-display-reordering to nil while filling lines. This is required for when a line includes characters whose bidi directionality is opposite to the base paragraph direction, because columns are counted in the logical order. (Bug#22250) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d5c5636..330f7b5 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -244,7 +244,8 @@ DOM should be a parse tree as generated by (if (and (null shr-width) (not (shr--have-one-fringe-p))) (* (frame-char-width) 2) - 0)))))) + 0))))) + bidi-display-reordering) (shr-descend dom) (shr-fill-lines start (point)) (shr-remove-trailing-whitespace start (point)) commit d259328fb87db8cc67d52771efcfa653e52c5b71 Author: Lars Ingebrigtsen Date: Tue Dec 29 17:46:00 2015 +0100 Further Unicode restrictive fixups * puny.el (puny-highly-restrictive-p): Include the extra identifier characters from table 3. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 08da51b..ac47e13 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -191,13 +191,36 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (buffer-string))) ;; http://www.unicode.org/reports/tr39/#Restriction_Level_Detection +;; http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Inclusion_in_Identifiers (defun puny-highly-restrictive-p (string) (let ((scripts - (seq-uniq - (seq-map (lambda (char) - (aref char-script-table char)) - string)))) + (delq + t + (seq-uniq + (seq-map (lambda (char) + (if (memq char + ;; These characters are always allowed + ;; in any string. + '(#x0027 ; APOSTROPHE + #x002D ; HYPHEN-MINUS + #x002E ; FULL STOP + #x003A ; COLON + #x00B7 ; MIDDLE DOT + #x058A ; ARMENIAN HYPHEN + #x05F3 ; HEBREW PUNCTUATION GERESH + #x05F4 ; HEBREW PUNCTUATION GERSHAYIM + #x0F0B ; IBETAN MARK INTERSYLLABIC TSHEG + #x200C ; ERO WIDTH NON-JOINER* + #x200D ; ERO WIDTH JOINER* + #x2010 ; YPHEN + #x2019 ; IGHT SINGLE QUOTATION MARK + #x2027 ; YPHENATION POINT + #x30A0 ; KATAKANA-HIRAGANA DOUBLE HYPHEN + #x30FB)) ; KATAKANA MIDDLE DOT + t + (aref char-script-table char))) + string))))) (or ;; Every character uses the same script. (= (length scripts) 1) commit 9fc2d2c0c735430b238bc4bc8a1d0085a95ae457 Author: Martin Rudalics Date: Tue Dec 29 17:41:15 2015 +0100 * src/xfns.c (x_create_tip_frame): Process alpha parameter. diff --git a/src/xfns.c b/src/xfns.c index ab6b922..3f95f7b 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5582,6 +5582,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo, "autoLower", "AutoRaiseLower", RES_TYPE_BOOLEAN); x_default_parameter (f, parms, Qcursor_type, Qbox, "cursorType", "CursorType", RES_TYPE_SYMBOL); + x_default_parameter (f, parms, Qalpha, Qnil, + "alpha", "Alpha", RES_TYPE_NUMBER); /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size. Change will not be effected unless different from the current commit 8ca864ba8df6c2214dcaa9c8d1c9aa069a62db06 Author: Michael Albinus Date: Tue Dec 29 15:35:44 2015 +0100 Sync with Tramp 2.2.13 * doc/misc/trampver.texi: Change version to "2.2.13.25.1". * lisp/net/tramp-compat.el (tramp-compat-delete-dups): Use `tramp-compat-funcall'. * lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names): Make `split-string' call compatible with older Emacsen. * lisp/net/trampver.el: Change version to "2.2.13.25.1". diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index a303219..4366796 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -8,7 +8,7 @@ @c In the Tramp GIT, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.13-25.1 +@set trampver 2.2.13.25.1 @c Other flags from configuration @set instprefix /usr/local diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index c571028..b6d6796 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -600,7 +600,8 @@ and replace a sub-expression, e.g. Store the result in LIST and return it. LIST must be a proper list. Of several `equal' occurrences of an element in LIST, the first one is kept." - (cl-delete-duplicates list '(:test equal :from-end) nil))) + (tramp-compat-funcall + 'cl-delete-duplicates list '(:test equal :from-end) nil))) (add-hook 'tramp-unload-hook (lambda () diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index c5a6075..549d3b1 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -1740,20 +1740,25 @@ be used." (list user host))) (zeroconf-list-services service))) +;; We use the TRIM argument of `split-string', which exist since Emacs +;; 24.4. I mask this for older Emacs versions, there is no harm. (defun tramp-gvfs-parse-device-names (service) "Return a list of (user host) tuples allowed to access. This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." (let ((result - (split-string - (shell-command-to-string (format "avahi-browse -trkp %s" service)) - "[\n\r]+" 'omit "^\\+;.*$"))) + (ignore-errors + (tramp-compat-funcall + 'split-string + (shell-command-to-string (format "avahi-browse -trkp %s" service)) + "[\n\r]+" 'omit "^\\+;.*$")))) (tramp-compat-delete-dups (mapcar (lambda (x) (let* ((list (split-string x ";")) (host (nth 6 list)) (port (nth 8 list)) - (text (split-string (nth 9 list) "\" \"" 'omit "\"")) + (text (tramp-compat-funcall + 'split-string (nth 9 list) "\" \"" 'omit "\"")) user) ; (when (and port (not (string-equal port "0"))) ; (setq host (format "%s%s%s" host tramp-prefix-port-regexp port))) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index aebfe42..0dd2440 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5425,9 +5425,6 @@ Return ATTR." (save-match-data (with-tramp-connection-property vec "ls-quoting-style" (tramp-message vec 5 "Checking, whether `ls --quoting-style=shell' works") - ;; Some "ls" versions are sensible wrt the order of arguments, - ;; they fail when "-al" is after the "--dired" argument (for - ;; example on FreeBSD). (tramp-send-command-and-check vec (format "%s --quoting-style=shell -al /dev/null" (tramp-get-ls-command vec)))))) @@ -5436,7 +5433,9 @@ Return ATTR." (save-match-data (with-tramp-connection-property vec "ls-w-option" (tramp-message vec 5 "Checking, whether `ls -w' works") - ;; Option "-w" is available on BSD systems. + ;; Option "-w" is available on BSD systems. No argument is + ;; given, because this could return wrong results in case "ls" + ;; supports the "-w NUM" argument, as for busyboxes. (tramp-send-command-and-check vec (format "%s -alw" (tramp-get-ls-command vec)))))) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 77ee8ae..f93cfc4 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -63,7 +63,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.13-pre is not fit for %s" + (format "Tramp 2.2.13.25.1 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) commit 959ce5271b6e2b715bc5059fbd2b1014d954e82a Author: Lambda Coder Date: Tue Dec 29 15:33:54 2015 +0100 * doc/misc/tramp.texi: Editorial revisions to the Tramp manual diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 07d34bd..bd7d921 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -98,6 +98,7 @@ copy and modify this GNU manual.'' @contents + @ifnottex @node Top, Overview, (dir), (dir) @top @value{tramp} version @value{trampver} User Manual @@ -176,7 +177,9 @@ For the end user: For the developer: -* Files directories and localnames:: How file names, directories and localnames are mangled and managed. +* Files directories and localnames:: + How file names, directories and localnames + are mangled and managed. * Traces and Profiles:: How to Customize Traces. * Issues:: Debatable Issues and What Was Decided. @@ -198,7 +201,7 @@ Installing @value{tramp} with your @value{emacsname} Configuring @value{tramp} for use -* Connection types:: Types of connections made to remote hosts. +* Connection types:: Types of connections to remote hosts. * Inline methods:: Inline methods. * External methods:: External methods. @ifset emacsgvfs @@ -246,149 +249,138 @@ How file names, directories and localnames are mangled and managed @chapter An overview of @value{tramp} @cindex overview -After the installation of @value{tramp} into your @value{emacsname}, you -will be able to access files on remote hosts as though they were -local. Access to the remote file system for editing files, version -control, and @code{dired} are transparently enabled. - -Your access to the remote host can be with the @command{rsh}, -@command{rlogin}, @command{telnet} programs or with any similar -connection method. This connection must pass @acronym{ASCII} -successfully to be usable but need not be 8-bit clean. - -The package provides support for @command{ssh} connections out of the -box, one of the more common uses of the package. This allows -relatively secure access to hosts, especially if @command{ftp} -access is disabled. - -Under Windows, @value{tramp} is integrated with the PuTTY package, -using the @command{plink} program. - -The majority of activity carried out by @value{tramp} requires only that -the remote login is possible and is carried out at the terminal. In -order to access remote files @value{tramp} needs to transfer their content -to the local host temporarily. - -@value{tramp} can transfer files between the hosts in a variety of ways. -The details are easy to select, depending on your needs and the -hosts in question. - -The fastest transfer methods for large files rely on a remote file -transfer package such as @command{rcp}, @command{scp}, @command{rsync} -or (under Windows) @command{pscp}. - -If the remote copy methods are not suitable for you, @value{tramp} also -supports the use of encoded transfers directly through the shell. -This requires that the @command{mimencode} or @command{uuencode} tools -are available on the remote host. These methods are generally -faster for small files. - -@value{tramp} is still under active development and any problems you encounter, -trivial or major, should be reported to the @value{tramp} developers. -@xref{Bug Reports}. +@value{tramp} is for transparently accessing remote files from within +@value{emacsname}. @value{tramp} enables an easy, convenient, and +consistent interface to remote files as if they are local files. +@value{tramp}'s transparency extends to editing, version control, and +@code{dired}. + +@value{tramp} can access remote hosts using any number of access +methods, such as @command{rsh}, @command{rlogin}, @command{telnet}, +and related programs. If these programs can successfully pass +@acronym{ASCII]} characters, @value{tramp} can use them. +@value{tramp} does not require or mandate 8-bit clean connections. + +@value{tramp}'s most common access method is through @command{ssh}, a +more secure alternative to @command{ftp} and other older access +methods. + +@value{tramp} on Windows operating systems is integrated with the +PuTTY package, and uses the @command{plink} program. + +@value{tramp} mostly operates transparently in the background using +the connection programs. As long as these programs enable remote login +and can use the terminal, @value{tramp} can adapt them for seamless +and transparent access. + +@value{tramp} temporarily transfers a remote file's contents to the +local host editing and related operations. @value{tramp} can also +transfer files between hosts using standard Emacs interfaces, a +benefit of direct integration of @value{tramp} in @value{emacsname}. + +@value{tramp} can transfer files using any number of available host +programs for remote files, such as @command{rcp}, @command{scp}, +@command{rsync} or (under Windows) @command{pscp}. @value{tramp} +provides easy ways to specify these programs and customize them to +specific files, hosts, or access methods. + +For faster small-size file transfers, @value{tramp} supports encoded +transfers directly through the shell using @command{mimencode} or +@command{uuencode} provided such tools are available on the remote +host. -@subsubheading Behind the scenes +@subsubheading @value{tramp} behind the scenes @cindex behind the scenes @cindex details of operation @cindex how it works -This section tries to explain what goes on behind the scenes when you -access a remote file through @value{tramp}. +Accessing a remote file through @value{tramp} entails a series of +actions, many of which are transparent to the user. Yet some actions +may require user response (such as entering passwords or completing +file names). One typical scenario, opening a file on a remote host, is +presented here to illustrate the steps involved: -Suppose you type @kbd{C-x C-f} and enter part of an @value{tramp} file name, -then hit @kbd{@key{TAB}} for completion. Suppose further that this is -the first time that @value{tramp} is invoked for the host in question. Here's -what happens: +@kbd{C-x C-f} to initiate find-file, enter part of the @value{tramp} +file name, then hit @kbd{@key{TAB}} for completion. If this is the +first time connection to that host, here's what happens: @itemize @item -@value{tramp} discovers that it needs a connection to the host. So it -invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l -@var{user}} or a similar tool to connect to the remote host. -Communication with this process happens through an -@value{emacsname} buffer, that is, the output from the remote end -goes into a buffer. +@value{tramp} invokes @samp{telnet @var{host}} or @samp{rsh @var{host} +-l @var{user}} and establishes an external process to connect to the +remote host. @value{tramp} communicates with the process through an +@value{emacsname} buffer, which also shows output from the remote +host. @item -The remote host may prompt for a login name (for @command{telnet}). -The login name is given in the file name, so @value{tramp} sends the -login name and a newline. +The remote host may prompt for a login name (for @command{telnet}, for +example) in the buffer. If on the other hand, the login name was +included in the file name portion, @value{tramp} sends the login name +followed by a newline. @item -The remote host may prompt for a password or pass phrase (for -@command{rsh} or for @command{telnet} after sending the login name). -@value{tramp} displays the prompt in the minibuffer, asking you for the -password or pass phrase. - -You enter the password or pass phrase. @value{tramp} sends it to the remote -host, followed by a newline. +The remote host may then prompt for a password or pass phrase (for +@command{rsh} or for @command{telnet}). @value{tramp} displays the +password prompt in the minibuffer. @value{tramp} then sends whatever +is entered to the remote host, followed by a newline. @item -@value{tramp} now waits for the shell prompt or for a message that the login -failed. +@value{tramp} now waits for either the shell prompt or a failed login +message. -If @value{tramp} sees neither of them after a certain period of time -(a minute, say), then it issues an error message saying that it -couldn't find the remote shell prompt and shows you what the remote -host has sent. +If @value{tramp} does not receive any messages within a timeout period +(a minute, for example), then @value{tramp} responds with an error +message about not finding the remote shell prompt. If any messages +from the remote host, @value{tramp} displays them in the buffer. -If @value{tramp} sees a @samp{login failed} message, it tells you so, -aborts the login attempt and allows you to try again. +For any @samp{login failed} message from the remote host, +@value{tramp} aborts the login attempt, and repeats the login steps +again. @item -Suppose that the login was successful and @value{tramp} sees the shell prompt -from the remote host. Now @value{tramp} invokes @command{/bin/sh} because -Bourne shells and C shells have different command -syntaxes.@footnote{Invoking @command{/bin/sh} will fail if your login -shell doesn't recognize @samp{exec /bin/sh} as a valid command. -Maybe you use the Scheme shell @command{scsh}@dots{}} +Upon successful login and @value{tramp} recognizes the shell prompt +from the remote host, @value{tramp} prepares the shell environment by +turning off echoing, setting shell prompt, and other housekeeping +chores. -After the Bourne shell has come up, @value{tramp} sends a few commands to -ensure a good working environment. It turns off echoing, it sets the -shell prompt, and a few other things. +@strong{Note} that for the remote shell, @value{tramp} invokes +@command{/bin/sh}. The remote host must recognize @samp{exec /bin/sh} +and execute the appropriate shell. This shell must support Bourne +shell syntax. @item -Now the remote shell is up and it good working order. Remember, what -was supposed to happen is that @value{tramp} tries to find out what files exist -on the remote host so that it can do file name completion. - -So, @value{tramp} basically issues @command{cd} and @command{ls} commands and -also sometimes @command{echo} with globbing. Another command that is -often used is @command{test} to find out whether a file is writable or a -directory or the like. The output of each command is parsed for the -necessary operation. +@value{tramp} executes @command{cd} and @command{ls} commands to find +which files exist on the remote host. @value{tramp} sometimes uses +@command{echo} with globbing. @value{tramp} checks if a file or +directory is writable with @command{test}. After each command, +@value{tramp} parses the output from the remote host for completing +the next operation. @item -Suppose you are finished with file name completion, have entered @kbd{C-x -C-f}, a full file name and hit @kbd{@key{RET}}. Now comes the time to -transfer the file contents from the remote host to the local host so -that you can edit them. - -See above for an explanation of how @value{tramp} transfers the file contents. +After remote file name completion, @value{tramp} transfers the file +contents from the remote host. -For inline transfers, @value{tramp} issues a command like @samp{mimencode -b -/path/to/remote/file}, waits until the output has accumulated in the -buffer that's used for communication, then decodes that output to -produce the file contents. +For inline transfers, @value{tramp} sends a command, such as +@samp{mimencode -b /path/to/remote/file}, waits until the output has +accumulated in the buffer, decodes that output to produce the file's +contents. -For external transfers, @value{tramp} issues a command like the -following: +For external transfers, @value{tramp} sends a command as follows: @example rcp user@@host:/path/to/remote/file /tmp/tramp.4711 @end example -It then reads the local temporary file @file{/tmp/tramp.4711} into a -buffer and deletes the temporary file. +@value{tramp} reads the local temporary file @file{/tmp/tramp.4711} +into a buffer, and then deletes the temporary file. @item -You now edit the buffer contents, blithely unaware of what has happened -behind the scenes. (Unless you have read this section, that is.) When -you are finished, you type @kbd{C-x C-s} to save the buffer. +Edit, modify, change the buffer contents as normal, and then save the +buffer wth @kbd{C-x C-s}. @item -Again, @value{tramp} transfers the file contents to the remote host -either inline or external. This is the reverse of what happens when -reading the file. +@value{tramp} transfers the buffer contents to the remote host in +a reverse of the process using the appropriate inline or external +program. @end itemize I hope this has provided you with a basic overview of what happens @@ -400,28 +392,23 @@ behind the scenes when you open a file with @value{tramp}. @chapter Obtaining Tramp. @cindex obtaining Tramp -@value{tramp} is freely available on the Internet and the latest -release may be downloaded from @uref{ftp://ftp.gnu.org/gnu/tramp/}. -This release includes the full documentation and code for -@value{tramp}, suitable for installation. But Emacs (22 or later) -includes @value{tramp} already, and there is a @value{tramp} package -for XEmacs, as well. So maybe it is easier to just use those. But if -you want the bleeding edge, read on@dots{} +@value{tramp} is included as part of Emacs (since Emacs version 22.1). -For the especially brave, @value{tramp} is available from Git. The Git -version is the latest version of the code and may contain incomplete -features or new issues. Use these versions at your own risk. +@value{tramp} is also freely packaged for download on the Internet at +@uref{ftp://ftp.gnu.org/gnu/tramp/}. -Instructions for obtaining the latest development version of @value{tramp} -from Git can be found by going to the Savannah project page at the -following URL and then clicking on the Git link in the navigation bar -at the top. +@value{tramp} development versions are available on Git servers. +Development versions contain new and incomplete features. + +One way to obtain from Git server is to visit the Savannah project +page at the following URL and then clicking on the Git link in the +navigation bar at the top. @noindent @uref{http://savannah.gnu.org/projects/tramp/} @noindent -Or follow the example session below: +Another way is to follow the terminal session below: @example ] @strong{cd ~/@value{emacsdir}} @@ -429,7 +416,7 @@ Or follow the example session below: @end example @noindent -If you reside behind a firewall, you could use +From behind a firewall: @example ] @strong{git config --global http.proxy http://user:pwd@@proxy.server.com:8080} @@ -437,16 +424,18 @@ If you reside behind a firewall, you could use @end example @noindent -Tramp developers use instead +Tramp developers: @example ] @strong{git clone login@@git.sv.gnu.org:/srv/git/tramp.git} @end example @noindent -You should now have a directory @file{~/@value{emacsdir}/tramp} -containing the latest version of @value{tramp}. You can fetch the latest -updates from the repository by issuing the command: +After one of the above commands, @file{~/@value{emacsdir}/tramp} will +containing the latest version of @value{tramp}. + +@noindent +To fetch updates from the repository, use git pull: @example ] @strong{cd ~/@value{emacsdir}/tramp} @@ -454,9 +443,8 @@ updates from the repository by issuing the command: @end example @noindent -Once you've got updated files from the Git repository, you need to run -@command{autoconf} in order to get an up-to-date @file{configure} -script: +Run @command{autoconf} as follows to generate an up-to-date +@file{configure} script: @example ] @strong{cd ~/@value{emacsdir}/tramp} @@ -469,36 +457,32 @@ script: @cindex history @cindex development history -Development was started end of November 1998. The package was called -@file{rssh.el}, back then. It only provided one method to access a -file, using @command{ssh} to log in to a remote host and using -@command{scp} to transfer the file contents. After a while, the name -was changed to @file{rcp.el}, and now it's @value{tramp}. Along the way, -many more methods for getting a remote shell and for transferring the -file contents were added. Support for VC was added. - -After that, there were added the multi-hop methods in April 2000 and -the unification of @value{tramp} and Ange-FTP file names in July 2002. -In July 2004, multi-hop methods have been replaced by proxy hosts. -Running commands on remote hosts was introduced in December 2005. +@value{tramp} development started at the end of November 1998 as +@file{rssh.el}. It provided only one method of access. It used +@command{ssh} for login and @command{scp} to transfer file contents. +The name was changed to @file{rcp.el} before it got its preset name +@value{tramp}. New methods of remote access were added, so was support +for version control. + +April 2000 was the first time when multi-hop methods were added. In +July 2002, @value{tramp} unified file names with Ange-FTP@. In July +2004, proxy hosts replaced multi-hop methods. Running commands on +remote hosts was introduced in December 2005. @ifset emacsgw -Support of gateways exists since April 2007. +Support for gateways since April 2007. @end ifset @ifset emacsgvfs GVFS integration started in February 2009. @end ifset @ifset emacs -Remote commands on Windows hosts are available since September 2011. +Remote commands on Windows hosts since September 2011. @end ifset -Ad-hoc multi-hop methods (with a changed syntax) have been reenabled -in November 2011. In November 2012, Juergen Hoetzel's -@file{tramp-adb.el} has been added. +Ad-hoc multi-hop methods (with a changed syntax) re-enabled in November +2011. -In December 2001, @value{tramp} has been added to the XEmacs package -repository. Being part of the Emacs repository happened in June 2002, -the first release including @value{tramp} was Emacs 22.1. +In November 2012, added Juergen Hoetzel's @file{tramp-adb.el}. -@value{tramp} is also a Debian GNU/Linux package since February 2001. +In December 2001, XEmacs package repository adds @value{tramp}. @c Installation chapter is necessary only in case of standalone @@ -509,33 +493,25 @@ the first release including @value{tramp} was Emacs 22.1. @node Configuration -@chapter Configuring @value{tramp} for use +@chapter Configuring @value{tramp} @cindex configuration - @cindex default configuration -@value{tramp} is (normally) fully functional when it is initially -installed. It is initially configured to use the @command{scp} -program to connect to the remote host. So in the easiest case, you -just type @kbd{C-x C-f} and then enter the file name -@file{@trampfn{, user, host, /path/to.file}}. - -On some hosts, there are problems with opening a connection. These are -related to the behavior of the remote shell. See @xref{Remote shell -setup}, for details on this. - -If you do not wish to use these commands to connect to the remote -host, you should change the default connection and transfer method -that @value{tramp} uses. There are several different methods that @value{tramp} -can use to connect to remote hosts and transfer files -(@pxref{Connection types}). - -If you don't know which method is right for you, see @xref{Default -Method}. - -@strong{Note} that the following descriptions reference the setting of -user options or variables, not all of which are autoloaded by -@value{emacsname}. All examples assume that you have loaded -@value{tramp} first: + +@value{tramp} is initially configured to use the @command{scp} program +to connect to the remote host. Just type @kbd{C-x C-f} and then enter +file name @file{@trampfn{, user, host, /path/to.file}}. For details, +see @xref{Default Method}. + +For problems related to the behavior of remote shell, see @ref{Remote +shell setup} for details. + +For changing the connection type and file access method from the +defaults to one of several other options, see (@pxref{Connection +types}). + +@strong{Note} that some user options and variables described in these +examples are not auto loaded by @value{emacsname}. All examples +require @value{tramp} is installed and loaded: @lisp (require 'tramp) @@ -543,7 +519,7 @@ user options or variables, not all of which are autoloaded by @menu -* Connection types:: Types of connections made to remote hosts. +* Connection types:: Types of connections to remote hosts. * Inline methods:: Inline methods. * External methods:: External methods. @ifset emacsgvfs @@ -574,35 +550,26 @@ user options or variables, not all of which are autoloaded by @node Connection types -@section Types of connections made to remote hosts +@section Types of connections to remote hosts @cindex connection types, overview -There are two basic types of transfer methods, each with its own -advantages and limitations. Both types of connection make use of a -remote shell access program such as @command{rsh}, @command{ssh} or -@command{telnet} to connect to the remote host. - -This connection is used to perform many of the operations that @value{tramp} -requires to make the remote file system transparently accessible from -the local host. It is only when visiting files that the methods -differ. +@dfn{Inline method} and @dfn{external method} are the two basic types +of access methods. While they both use the same remote shell access +programs, such as @command{rsh}, @command{ssh}, or @command{telnet}, +they differ in the file access methods. Choosing the right method +becomes important for editing files, transferring large files, or +operating on a large number of files. @cindex inline methods @cindex external methods @cindex methods, inline @cindex methods, external -Loading or saving a remote file requires that the content of the file -be transferred between the two hosts. The content of the file can -be transferred using one of two methods: the @dfn{inline method} over -the same connection used to log in to the remote host, or the -@dfn{external method} through another connection using a remote copy -program such as @command{rcp}, @command{scp} or @command{rsync}. The performance of the external methods is generally better than that of the inline methods, at least for large files. This is caused by the need to encode and decode the data when transferring inline. -The one exception to this rule are the @command{scp} based transfer +The one exception to this rule are the @option{scp}-based access methods. While these methods do see better performance when actually transferring files, the overhead of the cryptographic negotiation at startup may drown out the improvement in file transfer times. @@ -621,68 +588,60 @@ action. @cindex inline methods @cindex methods, inline -The inline methods in @value{tramp} are quite powerful and can work in -situations where you cannot use an external transfer program to -connect. There are also strange inline methods which allow you to -transfer files between @emph{user identities} rather than hosts, see -below. +Inline methods use the same login connection to transfer file +contents. Inline methods are quick and easy for small files. They +depend on the availability of suitable encoding and decoding programs +on the remote host. For local source and destination, @value{tramp} +may use built-in equivalents of such programs in @value{emacsname}. -These methods depend on the existence of a suitable encoding and -decoding command on remote host. Locally, @value{tramp} may be able to -use features of @value{emacsname} to decode and encode the files or -it may require access to external commands to perform that task. +Inline methods can work in situations where an external transfer +program is unavailable. Inline methods also work when transferring +files between different @emph{user identities} on the same host. @cindex uuencode @cindex mimencode @cindex base-64 encoding -@value{tramp} checks the availability and usability of commands like -@command{mimencode} (part of the @command{metamail} package) or -@command{uuencode} on the remote host. The first reliable command -will be used. The search path can be customized, see @ref{Remote -programs}. -If both commands aren't available on the remote host, @value{tramp} -transfers a small piece of Perl code to the remote host, and tries to -apply it for encoding and decoding. +@value{tramp} checks the remote host for the availability and +usability of @command{mimencode} (part of the @command{metamail} +package) or @command{uuencode}. @value{tramp} uses the first reliable +command it finds. @value{tramp}'s search path can be customized, see +@ref{Remote programs}. -The variable @var{tramp-inline-compress-start-size} controls, whether -a file shall be compressed before encoding. This could increase -transfer speed for large text files. +In case both @command{mimencode} and @command{uuencode} are +unavailable, @value{tramp} first transfers a small Perl program to the +remote host, and then tries that program for encoding and decoding. +To increase transfer speeds for large text files, use compression +before encoding. The variable @var{tramp-inline-compress-start-size} +specifies the file size for such optimization. @table @asis @item @option{rsh} @cindex method rsh @cindex rsh method -Connect to the remote host with @command{rsh}. Due to the unsecure -connection it is recommended for very local host topology only. - -On operating systems which provide the command @command{remsh} instead -of @command{rsh}, you can use the method @option{remsh}. This is true -for HP-UX or Cray UNICOS, for example. +@command{rsh} is an option for connecting to hosts within local +networks since @command{rsh} is not as secure as other methods. @item @option{ssh} @cindex method ssh @cindex ssh method -Connect to the remote host with @command{ssh}. This is identical to -the previous option except that the @command{ssh} package is used, -making the connection more secure. - -All the methods based on @command{ssh} have an additional feature: you -can specify a host name which looks like @file{host#42} (the real host -name, then a hash sign, then a port number). This means to connect to -the given host but to also pass @code{-p 42} as arguments to the -@command{ssh} command. +@command{ssh} is a more secure option than others to connect to a +remote host. +@command{ssh} can also take extra parameters as port numbers. For +example, a host on port 42 is specified as @file{host#42} (the real +host name, a hash sign, then a port number). It is the same as passing +@code{-p 42} to the @command{ssh} command. @item @option{telnet} @cindex method telnet @cindex telnet method -Connect to the remote host with @command{telnet}. This is as unsecure +Connecting to a remote host with @command{telnet} is as insecure as the @option{rsh} method. @@ -690,63 +649,46 @@ as the @option{rsh} method. @cindex method su @cindex su method -This method does not connect to a remote host at all, rather it uses -the @command{su} program to allow you to edit files as another user. -That means, the specified host name in the file name must be either -@samp{localhost} or the host name as returned by the function -@command{(system-name)}. For an exception of this rule see -@ref{Multi-hops}. - +Instead of connecting to a remote host, @command{su} program allows +editing as another user. The host can be either @samp{localhost} or +the host returned by the function @command{(system-name)}. See +@ref{Multi-hops} for an exception to this behavior. @item @option{sudo} @cindex method sudo @cindex sudo method -This is similar to the @option{su} method, but it uses @command{sudo} -rather than @command{su} to become a different user. - -Note that @command{sudo} must be configured to allow you to start a -shell as the user. It would be nice if it was sufficient if -@command{ls} and @command{mimencode} were allowed, but that is not -easy to implement, so I haven't got around to it, yet. - +Similar to @option{su} method, @option{sudo} uses @command{sudo}. +@command{sudo} must have sufficient rights to start a shell. @item @option{sshx} @cindex method sshx @cindex sshx method -As you would expect, this is similar to @option{ssh}, only a little -different. Whereas @option{ssh} opens a normal interactive shell on -the remote host, this option uses @samp{ssh -t -t @var{host} -l -@var{user} /bin/sh} to open a connection. This is useful for users -where the normal login shell is set up to ask them a number of -questions when logging in. This procedure avoids these questions, and -just gives @value{tramp} a more-or-less ``standard'' login shell to work -with. - -Note that this procedure does not eliminate questions asked by -@command{ssh} itself. For example, @command{ssh} might ask ``Are you -sure you want to continue connecting?'' if the host key of the remote -host is not known. @value{tramp} does not know how to deal with such a -question (yet), therefore you will need to make sure that you can log -in without such questions. +Works like @option{ssh} but without the extra authentication prompts. +@option{sshx} uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} +to open a connection with a ``standard'' login shell. -This is also useful for Windows users where @command{ssh}, when -invoked from an @value{emacsname} buffer, tells them that it is not -allocating a pseudo tty. When this happens, the login shell is wont -to not print any shell prompt, which confuses @value{tramp} mightily. +@strong{Note} that @option{sshx} does not bypass authentication +questions. For example, if the host key of the remote host is not +known, @option{sshx} will still ask ``Are you sure you want to +continue connecting?''. @value{tramp} cannot handle such questions. +Connections will have to be setup where logins can proceed without +such questions. -This supports the @samp{-p} argument. +@option{sshx} is useful for Windows users when @command{ssh} triggers +an error about allocating a pseudo tty. This happens due to missing +shell prompts that confuses @value{tramp}. +@option{sshx} supports the @samp{-p} argument. @item @option{krlogin} @cindex method krlogin @cindex krlogin method @cindex Kerberos (with krlogin method) -This method is also similar to @option{ssh}. It only uses the -@command{krlogin -x} command to log in to the remote host. - +This method is also similar to @option{ssh}. It uses the +@command{krlogin -x} command only for remote host login. @item @option{ksu} @cindex method ksu @@ -760,26 +702,26 @@ This is another method from the Kerberos suite. It behaves like @option{su}. @cindex method plink @cindex plink method -This method is mostly interesting for Windows users using the PuTTY +@option{plink} method is for Windows users with the PuTTY implementation of SSH@. It uses @samp{plink -ssh} to log in to the remote host. -With a recent PuTTY, it is recommended to check the @samp{Share SSH -connections if possible} control for that session. +Check the @samp{Share SSH connections if possible} control for that +session. -This method supports the @samp{-P} argument. +@option{plink} method supports the @samp{-P} argument. @item @option{plinkx} @cindex method plinkx @cindex plinkx method -Another method using PuTTY on Windows. Instead of host names, it -expects PuTTY session names, calling @samp{plink -load @var{session} --t}. User names and port numbers must be defined in the session. +Another method using PuTTY on Windows with session names instead of +host names. @option{plinkx} calls @samp{plink -load @var{session} -t}. +User names and port numbers must be defined in the session. -With a recent PuTTY, it is recommended to check the @samp{Share SSH -connections if possible} control for that session. +Check the @samp{Share SSH connections if possible} control for that +session. @end table @@ -789,17 +731,16 @@ connections if possible} control for that session. @cindex methods, external @cindex external methods -The external methods operate through multiple channels, using the -remote shell connection for many actions while delegating file -transfers to an external transfer utility. +External methods operate over multiple channels, using the remote +shell connection for some actions while delegating file transfers to +an external transfer program. -This saves the overhead of encoding and decoding that multiplexing the -transfer through the one connection has with the inline methods. +External methods save on the overhead of encoding and decoding of +inline methods. -Since external methods need their own overhead opening a new channel, -all files which are smaller than @var{tramp-copy-size-limit} are still -transferred with the corresponding inline method. It should provide a -fair trade-off between both approaches. +Since external methods have the overhead of opening a new channel, +files smaller than @var{tramp-copy-size-limit} still use inline +methods. @table @asis @item @option{rcp}---@command{rsh} and @command{rcp} @@ -808,14 +749,12 @@ fair trade-off between both approaches. @cindex rcp (with rcp method) @cindex rsh (with rcp method) -This method uses the @command{rsh} and @command{rcp} commands to connect -to the remote host and transfer files. This is probably the fastest -connection method available. +This method uses the @command{rsh} and @command{rcp} commands to +connect to the remote host and transfer files. This is the fastest +access method available. The alternative method @option{remcp} uses the @command{remsh} and -@command{rcp} commands. It should be applied on hosts where -@command{remsh} is used instead of @command{rsh}. - +@command{rcp} commands. @item @option{scp}---@command{ssh} and @command{scp} @cindex method scp @@ -823,22 +762,16 @@ The alternative method @option{remcp} uses the @command{remsh} and @cindex scp (with scp method) @cindex ssh (with scp method) -Using @command{ssh} to connect to the remote host and @command{scp} to -transfer files between the hosts is the best method for securely -connecting to a remote host and accessing files. - -The performance of this option is also quite good. It may be slower than -the inline methods when you often open and close small files however. -The cost of the cryptographic handshake at the start of an @command{scp} -session can begin to absorb the advantage that the lack of encoding and -decoding presents. - -All the @command{ssh} based methods support the @samp{-p} feature -where you can specify a port number to connect to in the host name. -For example, the host name @file{host#42} tells @value{tramp} to -specify @samp{-p 42} in the argument list for @command{ssh}, and to -specify @samp{-P 42} in the argument list for @command{scp}. +Using a combination of @command{ssh} to connect and @command{scp} to +transfer is the most secure. While the performance is good, it is +slower than the inline methods for smaller files. Though there is no +overhead of encoding and decoding of the inline methods, +@command{scp}'s cryptographic handshake negates those speed gains. +@option{ssh}-based methods support @samp{-p} feature for specifying +port numbers. For example, @file{host#42} passes @samp{-p 42} in the +argument list to @command{ssh}, and @samp{-P 42} in the argument list +to @command{scp}. @item @option{rsync}---@command{ssh} and @command{rsync} @cindex method rsync @@ -846,17 +779,12 @@ specify @samp{-P 42} in the argument list for @command{scp}. @cindex rsync (with rsync method) @cindex ssh (with rsync method) -Using the @command{ssh} command to connect securely to the remote -host and the @command{rsync} command to transfer files is almost -identical to the @option{scp} method. +@command{ssh} command to connect in combination with @command{rsync} +command to transfer is similar to the @option{scp} method. -While @command{rsync} performs much better than @command{scp} when -transferring files that exist on both hosts, this advantage is lost if -the file exists only on one side of the connection. A file can exists -on both the remote and local host, when you copy a file from/to a -remote host. When you just open a file from the remote host (or write -a file there), a temporary file on the local side is kept as long as -the corresponding buffer, visiting this file, is alive. +@command{rsync} performs much better than @command{scp} when +transferring files that exist on both hosts. However, this advantage +is lost if the file exists only on one side of the connection. This method supports the @samp{-p} argument. @@ -867,19 +795,13 @@ This method supports the @samp{-p} argument. @cindex scp (with scpx method) @cindex ssh (with scpx method) -As you would expect, this is similar to @option{scp}, only a little -different. Whereas @option{scp} opens a normal interactive shell on -the remote host, this option uses @samp{ssh -t -t @var{host} -l -@var{user} /bin/sh} to open a connection. This is useful for users -where the normal login shell is set up to ask them a number of -questions when logging in. This procedure avoids these questions, and -just gives @value{tramp} a more-or-less ``standard'' login shell to work -with. +@option{scpx} is useful to avoid login shell questions. It is similar +in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t +@var{host} -l @var{user} /bin/sh} to open a connection. -This is also useful for Windows users where @command{ssh}, when -invoked from an @value{emacsname} buffer, tells them that it is not -allocating a pseudo tty. When this happens, the login shell is wont -to not print any shell prompt, which confuses @value{tramp} mightily. +@option{sshx} is useful for Windows users when @command{ssh} triggers +an error about allocating a pseudo tty. This happens due to missing +shell prompts that confuses @value{tramp}. This method supports the @samp{-p} argument. @@ -902,8 +824,8 @@ use the @command{plink} command to connect to the remote host, and they use @command{pscp} or @command{psftp} for transferring the files. These programs are part of PuTTY, an SSH implementation for Windows. -With a recent PuTTY, it is recommended to configure the @samp{Share -SSH connections if possible} control for that session. +Check the @samp{Share SSH connections if possible} control for that +session. These methods support the @samp{-P} argument. @@ -914,27 +836,22 @@ These methods support the @samp{-P} argument. @cindex fsh (with fcp method) @cindex fcp (with fcp method) -This method is similar to @option{scp}, but it uses the @command{fsh} -command to connect to the remote host, and it uses @command{fcp} for -transferring the files. @command{fsh/fcp} are a front-end for -@command{ssh} which allow for reusing the same @command{ssh} session -for submitting several commands. This avoids the startup overhead of -@command{scp} (which has to establish a secure connection whenever it -is called). Note, however, that you can also use one of the inline -methods to achieve a similar effect. +This method is similar to @option{scp}, but uses @command{fsh} to +connect and @command{fcp} to transfer files. @command{fsh/fcp}, a +front-end for @command{ssh}, reuse @command{ssh} session by +submitting several commands. This avoids the startup overhead due to +@command{scp}'s secure connection. Inline methods have similar +benefits. -This method uses the command @samp{fsh @var{host} -l @var{user} -/bin/sh -i} to establish the connection, it does not work to just say -@command{fsh @var{host} -l @var{user}}. +The command used for this connection is: @samp{fsh @var{host} -l +@var{user} /bin/sh -i} @cindex method fsh @cindex fsh method -There is no inline method using @command{fsh} as the multiplexing -provided by the program is not very useful in our context. @value{tramp} -opens just one connection to the remote host and then keeps it open, -anyway. - +@option{fsh} has no inline method since the multiplexing it offers is +not useful for @value{tramp}. @command{fsh} connects to remote host +and @value{tramp} keeps that one connection open. @item @option{nc}---@command{telnet} and @command{nc} @cindex method nc @@ -942,21 +859,22 @@ anyway. @cindex nc (with nc method) @cindex telnet (with nc method) -Using @command{telnet} to connect to the remote host and @command{nc} -for file transfer is often the only possibility to access dumb -devices, like routers or NAS hosts. Those hosts have just a -restricted @command{busybox} as local shell, and there is no program -to encode and decode files for transfer. - +Using @command{telnet} to connect and @command{nc} to transfer files +is sometimes the only combination suitable for accessing routers or +NAS hosts. These dumb devices have severely restricted local shells, +such as the @command{busybox} and do not host any other encode or +decode programs. @item @option{ftp} @cindex method ftp @cindex ftp method -This is not a native @value{tramp} method. Instead, it forwards all -requests to @value{ftppackagename}. +When @value{tramp} uses @option{ftp}, it forwards requests to whatever +ftp program is specified by @value{ftppackagename}. This external +program must be capable of servicing requests from @value{tramp}. + @ifset xemacs -This works only for unified file names, see @ref{Issues}. +This method works only for unified file names, see @ref{Issues}. @end ifset @@ -964,83 +882,107 @@ This works only for unified file names, see @ref{Issues}. @cindex method smb @cindex smb method -This is another not native @value{tramp} method. It uses the -@command{smbclient} command on different Unices in order to connect to -an SMB server. An SMB server might be a Samba (or CIFS) server on -another UNIX host or, more interesting, a host running MS Windows. So -far, it is tested against MS Windows NT, MS Windows 2000, MS Windows -XP, MS Windows Vista, and MS Windows 7. - -The first directory in the localname must be a share name on the remote -host. Remember that the @code{$} character, in which default shares -usually end, must be written @code{$$} due to environment variable -substitution in file names. If no share name is given (i.e., remote -directory @code{/}), all available shares are listed. - -Since authorization is done on share level, you will always be -prompted for a password if you access another share on the same host. -This can be suppressed by @ref{Password handling}. - -For authorization, MS Windows uses both a user name and a domain name. -Because of this, the @value{tramp} syntax has been extended: you can -specify a user name which looks like @code{user%domain} (the real user -name, then a percent sign, then the domain name). So, to connect to -the host @code{melancholia} as user @code{daniel} of the domain -@code{BIZARRE}, and edit @file{.emacs} in the home directory (share -@code{daniel$}) I would specify the file name @file{@trampfn{smb, -daniel%BIZARRE, melancholia, /daniel$$/.emacs}}. - -Depending on the Windows domain configuration, a Windows user might be -considered as domain user per default. In order to connect as local -user, the WINS name of that host must be given as domain name. -Usually, it is the host name in capital letters. In the example -above, the local user @code{daniel} would be specified as -@file{@trampfn{smb, daniel%MELANCHOLIA, melancholia, /daniel$$/.emacs}}. - -The domain name as well as the user name are optional. If no user -name is specified at all, the anonymous user (without password -prompting) is assumed. This is different from all other @value{tramp} -methods, where in such a case the local user name is taken. - -The @option{smb} method supports the @samp{-p} argument. - -@strong{Please note:} If @value{emacsname} runs locally under MS -Windows, this method isn't available. Instead, you can use UNC -file names like @file{//melancholia/daniel$$/.emacs}. The only -disadvantage is that there's no possibility to specify another user -name. +This is another non-native @value{tramp} method. @command{smbclient} +connects to any host with SMB/CIFS protocol, such as MS Windows and +Samba Servers running on Unixes. Tests show this @value{tramp} method +works with MS Windows NT, MS Windows 2000, MS Windows XP, MS Windows +Vista, and MS Windows 7. + +Using @command{smbclient} requires a few tweaks when working with +@value{tramp}: + +The first directory in the localname must be a share name on the +remote host. + +Since smb shares end in the @code{$} character, @value{tramp} must use +@code{$$} when specifying those shares to avoid environment variable +substitutions. + +When @value{tramp} is not specific about the share name or uses the +generic remote directory @code{/}, @command{smbclient} returns all +available shares. + +Since SMB authentication is based on each SMB share, @value{tramp} +prompts for a password even when accessing a different share on the +same SMB host. This prompting can be suppressed by @ref{Password +handling}. + +To accommodate user name/domain name syntax required by MS Windows +authorization, @value{tramp} provides for an extended syntax in +@code{user%domain} format (where user is username, @code{%} is the +percent symbol, and domain is the windows domain name). An example: + +@example +@trampfn{smb, daniel%BIZARRE, melancholia, /daniel$$/.emacs} +@end example + +where user @code{daniel} connects as a domain user to the SMB host +@code{melancholia} in the windows domain @code{BIZARRE} to edit +@file{.emacs} located in the home directory (share @code{daniel$}). + +Alternatively, for local WINS users (as opposed to domain users), +substitute the domain name with the name of the local host in +UPPERCASE as shown here: + +@example +@trampfn{smb, daniel%MELANCHOLIA, melancholia, /daniel$$/.emacs} +@end example + +where user @code{daniel} connects as local user to the SMB host +@code{melancholia} in the local domain @code{MELANCHOLIA} to edit +@file{.emacs} located in the home directory (share @code{daniel$}). + +The domain name and user name are optional for @command{smbclient} +authentication. When user name is not specified, @command{smbclient} +uses the anonymous user (without prompting for password). This +behavior is unlike other @value{tramp} methods, where local user name +is substituted. + +@option{smb} method is unavailable if @value{emacsname} is run under a +local user authentication context in MS Windows. However such users +can still access remote files using UNC file names instead of @value{tramp}: + +@example +//melancholia/daniel$$/.emacs +@end example + +UNC file name specification does not allow to specify a different user +name for authentication like the @command{smbclient} can. @item @option{adb} @cindex method adb @cindex adb method -This special method uses the Android Debug Bridge for accessing -Android devices. The Android Debug Bridge must be installed locally. -Some GNU/Linux distributions offer it for installation, otherwise it -can be installed as part of the Android SDK@. If the @command{adb} -program is not found via the @env{PATH} environment variable, the -variable @var{tramp-adb-program} must point to its absolute path. - -@value{tramp} does not connect Android devices to @command{adb}, -unless the custom option @option{tramp-adb-connect-if-not-connected} -is non-@code{nil}. If there is exactly one Android device connected -to @command{adb}, a host name is not needed in the remote file name. -The default @value{tramp} name to be used is @file{@trampfn{adb, , ,}}, -therefore. Otherwise, one could find potential host names with the -command @command{adb devices}. - -Usually, the @command{adb} method does not need any user name. It -runs under the permissions of the @command{adbd} process on the -Android device. If a user name is specified, @value{tramp} applies an -@command{su} on the device. This does not work with all Android -devices, especially with unrooted ones. In that case, an error -message is displayed. - -If a device shall be connected via TCP/IP, it is possible to declare -the port number to be used like @file{device#42}. Without a port -number, the default value as declared in @command{adb} will be used. -Port numbers are not applicable to Android devices connected via USB. +This method uses Android Debug Bridge program for accessing Android +devices. The Android Debug Bridge must be installed locally for +@value{tramp} to work. Some GNU/Linux distributions provide Android +Debug Bridge as an installation package. Alternatively, the program is +installed as part of the Android SDK@. @value{tramp} finds the +@command{adb} program either via the @env{PATH} environment variable +or the absolute path set in the variable @var{tramp-adb-program}. + +@value{tramp} connects to Android devices with @option{adb} only when +the custom option @option{tramp-adb-connect-if-not-connected} is not +@code{nil}. Otherwise, the connection must be established outside +@value{emacsname}. + +@value{tramp} does not require a host name part of the remote file +name when a single Android device is connected to @command{adb}. +@value{tramp} instead uses @file{@trampfn{adb, , ,}} as the default +name. @command{adb devices} shows available host names. + +@option{adb} method normally does not need user name to authenticate +on the Andriod device because it runs under the @command{adbd} +process. But when a user name is specified, however, @value{tramp} +applies an @command{su} in the syntax. When authentication does not +succeed, especially on un-rooted Android devices, @value{tramp} +displays login errors. + +For Andriod devices connected through TCP/IP, a port number can be +specified using @file{device#42} host name syntax or @value{tramp} can +use the default value as declared in @command{adb} command. Port +numbers are not applicable to Android devices connected through USB@. @end table @@ -1052,75 +994,68 @@ Port numbers are not applicable to Android devices connected via USB. @cindex gvfs based methods @cindex dbus -The connection methods described in this section are based on GVFS -@uref{http://en.wikipedia.org/wiki/GVFS}. Via GVFS, the remote -filesystem is mounted locally through FUSE@. @value{tramp} uses -this local mounted directory internally. +GVFS is the virtual file system for the Gnome Desktop, +@uref{http://en.wikipedia.org/wiki/GVFS}. Remote files on GVFS are +mounted locally through FUSE and @value{tramp} uses this locally +mounted directory internally. -The communication with GVFS is implemented via D-Bus messages. -Therefore, your @value{emacsname} must have D-Bus integration, -@pxref{Top, , D-Bus, dbus}. +@value{emacsname} uses the D-Bus mechanism to communicate with GVFS@. +@value{emacsname} must have the message bus system, D-Bus integration +active, @pxref{Top, , D-Bus, dbus}. @table @asis @item @option{afp} @cindex method afp @cindex afp method -Access to Mac OS X volumes via the Apple Filing Protocol is offered by -this method. The access must always be performed with a leading -volume (share) name, like @file{@trampfn{afp, user, host, /volume}}. - - +This method is for connecting to remote hosts with the Apple Filing +Protocol for accessing files on Mac OS X volumes. @value{tramp} access +syntax requires a leading volume (share) name, for example: +@file{@trampfn{afp, user, host, /volume}}. @item @option{dav} +@item @option{davs} @cindex method dav @cindex method davs @cindex dav method @cindex davs method -This method provides access to WebDAV files and directories. There -exists also the external method @option{davs}, which uses SSL -encryption for the access. - -Both methods support the port number specification as discussed above. - +@option{dav} method provides access to WebDAV files and directories +based on standard protocols, such as HTTP@. @option{davs} does the same +but with SSL encryption. Both methods support the port numbers. @item @option{obex} @cindex method obex @cindex obex method -OBEX is an FTP-like access protocol for simple devices, like cell -phones. For the time being, @value{tramp} only supports OBEX over Bluetooth. +OBEX is an FTP-like access protocol for cell phones and similar simple +devices. @value{tramp} supports OBEX over Bluetooth. @item @option{sftp} @cindex method sftp @cindex sftp method -As you might expect, this method uses @command{sftp} in order to -access the remote host. Contrary to the @option{ssh} and @option{scp} -methods, it doesn't open an @command{ssh} session for login. -Therefore, it could be used to access to remote hosts which refuse -@command{ssh} for security reasons. - +This method uses @command{sftp} in order to securely access remote +hosts. @command{sftp} is a more secure option for connecting to hosts +that for security reasons refuse @command{ssh} connections. @item @option{synce} @cindex method synce @cindex synce method -The @option{synce} method allows communication with Windows Mobile -devices. Beside GVFS for mounting remote files and directories via -FUSE, it also needs the SYNCE-GVFS plugin. +@option{synce} method allows connecting to Windows Mobile devices. It +uses GVFS for mounting remote files and directories via FUSE and +requires the SYNCE-GVFS plugin. @end table -@vindex tramp-gvfs-methods @defopt tramp-gvfs-methods -This custom option, a list, defines the external methods which shall -be used with GVFS@. Per default, these are @option{afp}, -@option{dav}, @option{davs}, @option{obex}, @option{sftp} and -@option{synce}. Other possible values are @option{ftp} and -@option{smb}. +@vindex tramp-gvfs-methods +This custom option is a list of external methods for GVFS@. By +default, this list includes @option{afp}, @option{dav}, @option{davs}, +@option{obex}, @option{sftp} and @option{synce}. Other methods to +include are: @option{ftp} and @option{smb}. @end defopt @end ifset @@ -1131,20 +1066,19 @@ be used with GVFS@. Per default, these are @option{afp}, @cindex methods, gateway @cindex gateway methods -Gateway methods are not methods to access a remote host directly. -These methods are intended to pass firewalls or proxy servers. -Therefore, they can be used for proxy host declarations -(@pxref{Multi-hops}) only. +Gateway methods are for proxy host declarations (@pxref{Multi-hops}) +so as to pass through firewalls and proxy servers. They are not like +the other methods that declare direct connections to a remote host. -A gateway method must always come along with a method which supports -port setting. This is because @value{tramp} targets the accompanied -method to @file{localhost#random_port}, from where the firewall or -proxy server is accessed. +A gateway method always comes with a port setting. @value{tramp} +targets the port number with the gateway method +@file{localhost#random_port} from where the firewall or proxy server +is accessed. -Gateway methods support user name and password declarations. These -are used to authenticate towards the corresponding firewall or proxy -server. They can be passed only if your friendly administrator has -granted your access. +Gateway methods support user name and password declarations for +authenticating the corresponding firewall or proxy server. Such +authentication can be passed through only if granted access by system +administrators. @table @asis @item @option{tunnel} @@ -1152,23 +1086,22 @@ granted your access. @cindex tunnel method This method implements an HTTP tunnel via the @command{CONNECT} -command (see RFC 2616, 2817). Any HTTP 1.1 compliant (proxy) server -shall support this command. +command (conforming to RFC 2616, 2817 specifications). Proxy servers +using HTTP version 1.1 or later protocol support this command. -As authentication method, only @option{Basic Authentication} (see RFC -2617) is implemented so far. If no port number is given in the -declaration, port @option{8080} is used for the proxy server. +For authentication, this protocol uses only @option{Basic +Authentication} (see RFC 2617). When no port number is specified, this +protocol defaults to @option{8080}. @item @option{socks} @cindex method socks @cindex socks method -The @command{socks} method provides access to SOCKSv5 servers (see -RFC 1928). @option{Username/Password Authentication} according to RFC -1929 is supported. +The @option{socks} method connects to SOCKSv5 servers (see RFC 1928) +and supports @option{Username/Password Authentication}. -The default port number of the socks server is @option{1080}, if not +The default port number for the socks server is @option{1080}, if not specified otherwise. @end table @@ -1178,21 +1111,23 @@ specified otherwise. @node Default Method @section Selecting a default method @cindex default method - @vindex tramp-default-method -When you select an appropriate transfer method for your typical usage -you should set the variable @code{tramp-default-method} to reflect that -choice. This variable controls which method will be used when a method -is not specified in the @value{tramp} file name. For example: +@vindex tramp-default-method-alist + +Default method is for transferring files. The variable +@code{tramp-default-method} sets it. @value{tramp} uses this variable +to determine the default method for tramp file names that do not have +one specified. @lisp (setq tramp-default-method "ssh") @end lisp -@vindex tramp-default-method-alist -You can also specify different methods for certain user/host -combinations, via the variable @code{tramp-default-method-alist}. For -example, the following two lines specify to use the @option{ssh} +Default methods for transferring files can be customized for specific +user and host combinations through the alist variable +@code{tramp-default-method-alist}. + +For example, the following two lines specify to use the @option{ssh} method for all user names matching @samp{john} and the @option{rsync} method for all host names matching @samp{lily}. The third line specifies to use the @option{su} method for the user @samp{root} on @@ -1207,95 +1142,82 @@ the host @samp{localhost}. @noindent See the documentation for the variable -@code{tramp-default-method-alist} for more details. +@code{tramp-default-method-alist} for details. -External methods are normally preferable to inline methods, giving -better performance. +@noindent +External methods performance faster for large files. +@noindent @xref{Inline methods}. @xref{External methods}. -Another consideration with the selection of transfer methods is the -environment you will use them in and, especially when used over the -Internet, the security implications of your preferred method. +Choosing the access method also depends on the security environment. +For example, @option{rsh} and @option{telnet} methods that use clear +text password transfers are inappropriate for over the Internet +connections. Secure remote connections should use @option{ssh} that +provide encryption. -The @option{rsh} and @option{telnet} methods send your password as -plain text as you log in to the remote host, as well as -transferring the files in such a way that the content can easily be -read from other hosts. -If you need to connect to remote systems that are accessible from the -Internet, you should give serious thought to using @option{ssh} based -methods to connect. These provide a much higher level of security, -making it a non-trivial exercise for someone to obtain your password -or read the content of the files you are editing. +@subsection Which method to use? +@cindex choosing the right method +@value{tramp} provides maximum number of choices for maximum +flexibility. Choosing which method depends on the hosts, clients, +network speeds, and the security context. -@subsection Which method is the right one for me? -@cindex choosing the right method +Start by using an inline method. -Given all of the above, you are probably thinking that this is all fine -and good, but it's not helping you to choose a method! Right you are. -As a developer, we don't want to boss our users around but give them -maximum freedom instead. However, the reality is that some users would -like to have some guidance, so here I'll try to give you this guidance -without bossing you around. You tell me whether it works @dots{} - -My suggestion is to use an inline method. For large files, external -methods might be more efficient, but I guess that most people will -want to edit mostly small files. And if you access large text files, -compression (driven by @var{tramp-inline-compress-start-size}) shall -still result in good performance. - -I guess that these days, most people can access a remote host by -using @command{ssh}. So I suggest that you use the @option{ssh} -method. So, type @kbd{C-x C-f @trampfn{ssh, root, otherhost, -/etc/motd} @key{RET}} to edit the @file{/etc/motd} file on the other -host. +External methods might be more efficient for large files, but most +@value{tramp} users edit small files more often than large files. -If you can't use @option{ssh} to log in to the remote host, then -select a method that uses a program that works. For instance, Windows -users might like the @option{plink} method which uses the PuTTY -implementation of @command{ssh}. Or you use Kerberos and thus like -@option{krlogin}. +Enable compression, @var{tramp-inline-compress-start-size}, for a +performance boost for large files. -For the special case of editing files on the local host as another -user, see the @option{su} or @option{sudo} methods. They offer -shortened syntax for the @samp{root} account, like -@file{@trampfn{su, , , /etc/motd}}. +Since @command{ssh} has become the most common method of remote host +access and it has the most reasonable security protocols, use +@option{ssh} method. Typical @option{ssh} usage to edit the +@file{/etc/motd} file on the otherhost: -People who edit large files may want to consider @option{scp} instead -of @option{ssh}, or @option{pscp} instead of @option{plink}. These -external methods are faster than inline methods for large files. -Note, however, that external methods suffer from some limitations. -Please try first whether you really get a noticeable speed advantage -from using an external method! Maybe even for large files, inline -methods are fast enough. +@example +@kbd{C-x C-f @trampfn{ssh, root, otherhost,/etc/motd} @key{RET}} +@end example + +If @option{ssh} is unavailable for whatever reason, look for other +obvious options. For Windows, try the @option{plink} method. For +Kerberos, try @option{krlogin}. + +For editing local files as @option{su} or @option{sudo} methods, try +the shortened syntax of @samp{root}: + +@example +@kbd{C-x C-f @trampfn{su, , , /etc/motd} @key{RET}} +@end example + +For editing large files, @option{scp} is faster than @option{ssh}. +@option{pscp} is faster than @option{plink}. But this speed +improvement is not always true. @node Default User @section Selecting a default user @cindex default user +@vindex tramp-default-user +@vindex tramp-default-user-alist -The user part of a @value{tramp} file name can be omitted. Usually, -it is replaced by the user name you are logged in. Often, this is not -what you want. A typical use of @value{tramp} might be to edit some -files with root permissions on the local host. This case, you should -set the variable @code{tramp-default-user} to reflect that choice. +@value{tramp} file name can omit the user name part since +@value{tramp} substitutes the currently logged-in user name. However +this substitution can be overridden with @code{tramp-default-user}. For example: @lisp (setq tramp-default-user "root") @end lisp -@code{tramp-default-user} is regarded as obsolete, and will be removed -soon. - -@vindex tramp-default-user-alist -You can also specify different users for certain method/host -combinations, via the variable @code{tramp-default-user-alist}. For -example, if you always have to use the user @samp{john} in the domain -@samp{somewhere.else}, you can specify the following: +Instead of a single default user, @code{tramp-default-user-alist} +allows multiple default user values based on access method or host +name combinations. The alist can hold multiple values. For example, to +use the @samp{john} as the default user for the domain +@samp{somewhere.else} only: @lisp (add-to-list 'tramp-default-user-alist @@ -1306,69 +1228,54 @@ example, if you always have to use the user @samp{john} in the domain See the documentation for the variable @code{tramp-default-user-alist} for more details. -One trap to fall in must be known. If @value{tramp} finds a default -user, this user will be passed always to the connection command as -parameter (for example @command{ssh here.somewhere.else -l john}. If -you have specified another user for your command in its configuration -files, @value{tramp} cannot know it, and the remote access will fail. -If you have specified in the given example in @file{~/.ssh/config} the -lines - -@example -Host here.somewhere.else - User lily -@end example - -@noindent -than you must discard selecting a default user by @value{tramp}. This -will be done by setting it to @code{nil} (or @samp{lily}, likewise): +A Caution: @value{tramp} will override any default user specified in +the configuration files outside @value{emacsname}, such as +@file{~/.ssh/config}. To stop @value{tramp} from applying the default +value, set the corresponding alist entry to nil: @lisp (add-to-list 'tramp-default-user-alist '("ssh" "\\`here\\.somewhere\\.else\\'" nil)) @end lisp -The last entry in @code{tramp-default-user-alist} could be your -default user you'll apply predominantly. You shall @emph{append} it -to that list at the end: +The last entry in @code{tramp-default-user-alist} should be reserved +for catch-all or most often used login. @lisp -(add-to-list 'tramp-default-user-alist '(nil nil "jonas") t) +(add-to-list 'tramp-default-user-alist + '(nil nil "jonas") t) @end lisp @node Default Host @section Selecting a default host @cindex default host - @vindex tramp-default-host -Finally, it is even possible to omit the host name part of a -@value{tramp} file name. This case, the value of the variable -@code{tramp-default-host} is used. Per default, it is initialized -with the host name your local @value{emacsname} is running. +@vindex tramp-default-host-alist -If you, for example, use @value{tramp} mainly to contact the host -@samp{target} as user @samp{john}, you can specify: +When host name is omitted, @value{tramp} substitutes the value from +the @code{tramp-default-host} variable. It is initially populated with +the local hostname where @value{emacsname} is running. Both the +default user and default host can be overridden as follows: @lisp (setq tramp-default-user "john" tramp-default-host "target") @end lisp -Then the simple file name @samp{@trampfn{ssh, , ,}} will connect you -to John's home directory on target. +With both defaults set, @samp{@trampfn{ssh, , ,}} will connect +@value{tramp} to John's home directory on target. + @ifset emacs -Note, however, that the most simplification @samp{/::} won't work, -because @samp{/:} is the prefix for quoted file names. +@strong{Note} @samp{/::} won't work, because @samp{/:} is the prefix +for quoted file names. @end ifset -@vindex tramp-default-host-alist -Like with methods and users, you can also specify different default -hosts for certain method/user combinations via the variable -@code{tramp-default-host-alist}. Usually, this isn't necessary, -because @code{tramp-default-host} should be sufficient. For some -methods, like @option{adb}, that default value must be overwritten, -which is already the initial value of @code{tramp-default-host-alist}. +Instead of a single default host, @code{tramp-default-host-alist} +allows multiple default host values based on access method or user +name combinations. The alist can hold multiple values. While +@code{tramp-default-host} is sufficient in most cases, some methods, +like @option{adb}, require defaults overwritten. @noindent See the documentation for the variable @code{tramp-default-host-alist} @@ -1380,28 +1287,27 @@ for more details. @cindex multi-hop @cindex proxy hosts -Sometimes, the methods described before are not sufficient. -Sometimes, it is not possible to connect to a remote host using a -simple command. For example, if you are in a secured network, you -might have to log in to a bastion host first before you can connect to -the outside world. Of course, the target host may also require a -bastion host. +Multi-hops are methods to reach hosts behind firewalls or to reach the +outside world from inside a bastion host. With multi-hops, +@value{tramp} can negotiate these hops with the appropriate user/host +authentication at each hop. All methods until now have been the single +hop kind, where the start and end points of the connection did not +have intermediate check points. -@vindex tramp-default-proxies-alist @defopt tramp-default-proxies-alist -In order to specify multiple hops, it is possible to define a proxy -host to pass through, via the custom option -@option{tramp-default-proxies-alist}. This variable keeps a list of -triples (@var{host} @var{user} @var{proxy}). - -The first matching item specifies the proxy host to be passed for a -file name located on a remote target matching @var{user}@@@var{host}. -@var{host} and @var{user} are regular expressions or @code{nil}, which -is interpreted as a regular expression which always matches. - -@var{proxy} must be a Tramp file name which localname part is ignored. -Method and user name on @var{proxy} are optional, which is interpreted -with the default values. +@vindex tramp-default-proxies-alist +@option{tramp-default-proxies-alist} specifies proxy hosts to pass +through. This variable is list of triples consisting of (@var{host} +@var{user} @var{proxy}). + +The first match is the proxy host through which passes the file name +and the target host matching @var{user}@@@var{host}. @var{host} and +@var{user} are regular expressions or @code{nil}, interpreted as a +regular expression which always matches. + +@var{proxy} is a literal @value{tramp} file name whose local name part +is ignored, and the method and user name parts are optional. + @ifset emacsgw The method must be an inline or gateway method (@pxref{Inline methods}, @pxref{Gateway methods}). @@ -1412,9 +1318,8 @@ The method must be an inline method (@pxref{Inline methods}). If @var{proxy} is @code{nil}, no additional hop is required reaching @var{user}@@@var{host}. -If you, for example, must pass the host @samp{bastion.your.domain} as -user @samp{bird} for any remote host which is not located in your local -domain, you can set +For example, to pass through the host @samp{bastion.your.domain} as +user @samp{bird} to reach remote hosts outside the local domain: @lisp (add-to-list 'tramp-default-proxies-alist @@ -1423,13 +1328,12 @@ domain, you can set '("\\.your\\.domain\\'" nil nil)) @end lisp -Please note the order of the code. @code{add-to-list} adds elements at the -beginning of a list. Therefore, most relevant rules must be added last. +@strong{Note}: @code{add-to-list} adds elements at the beginning of a +list. Therefore, most relevant rules must come last in the list. -Proxy hosts can be cascaded. If there is another host called -@samp{jump.your.domain}, which is the only one in your local domain who -is allowed connecting @samp{bastion.your.domain}, you can add another -rule: +Proxy hosts can be cascaded in the alist. If there is another host +called @samp{jump.your.domain}, which is the only host allowed to +connect to @samp{bastion.your.domain}, then: @lisp (add-to-list 'tramp-default-proxies-alist @@ -1438,31 +1342,31 @@ rule: "@trampfn{ssh, , jump.your.domain,}")) @end lisp -@var{proxy} can contain the patterns @code{%h} or @code{%u}. These -patterns are replaced by the strings matching @var{host} or -@var{user}, respectively. +@var{proxy} can take patterns @code{%h} or @code{%u} for @var{host} or +@var{user} respectively. -If you, for example, wants to work as @samp{root} on hosts in the -domain @samp{your.domain}, but login as @samp{root} is disabled for -non-local access, you might add the following rule: +To login as @samp{root} on remote hosts in the domain +@samp{your.domain}, but login as @samp{root} is disabled for non-local +access, then use this alist entry: @lisp (add-to-list 'tramp-default-proxies-alist '("\\.your\\.domain\\'" "\\`root\\'" "@trampfn{ssh, , %h,}")) @end lisp -Opening @file{@trampfn{sudo, , randomhost.your.domain,}} would connect -first @samp{randomhost.your.domain} via @code{ssh} under your account -name, and perform @code{sudo -u root} on that host afterwards. It is -important to know that the given method is applied on the host which -has been reached so far. @code{sudo -u root}, applied on your local -host, wouldn't be useful here. +Opening @file{@trampfn{sudo, , randomhost.your.domain,}} first +connects to @samp{randomhost.your.domain} via @code{ssh} under your +account name, and then perform @code{sudo -u root} on that host. -@var{host}, @var{user} and @var{proxy} can also be Lisp forms. These -forms are evaluated, and must return a string, or @code{nil}. The -previous example could be generalized then: For all hosts except my -local one connect via @command{ssh} first, and apply @command{sudo -u -root} afterwards: +It is key for the sudo method in the above example to be applied on +the host after reaching it and not on the local host. + +@var{host}, @var{user} and @var{proxy} can also take Lisp forms. These +forms when evaluated must return either a string or @code{nil}. + +To generalize (from the previous example): For all hosts, except my +local one, first connect via @command{ssh}, and then apply +@command{sudo -u root}: @lisp (add-to-list 'tramp-default-proxies-alist @@ -1471,46 +1375,45 @@ root} afterwards: '((regexp-quote (system-name)) nil nil)) @end lisp -This is the recommended configuration to work as @samp{root} on remote -Ubuntu hosts. +The above configuration allows @value{tramp} connection as @samp{root} +to remote Ubuntu hosts. @ifset emacsgw -Finally, @code{tramp-default-proxies-alist} can be used to pass -firewalls or proxy servers. Imagine your local network has a host -@samp{proxy.your.domain} which is used on port 3128 as HTTP proxy to -the outer world. Your friendly administrator has granted you access -under your user name to @samp{host.other.domain} on that proxy -server.@footnote{HTTP tunnels are intended for secure SSL/TLS -communication. Therefore, many proxy server restrict the tunnels to -related target ports. You might need to run your ssh server on your -target host @samp{host.other.domain} on such a port, like 443 (https). -See @uref{http://savannah.gnu.org/maintenance/CvsFromBehindFirewall} -for discussion of ethical issues.} You would need to add the -following rule: +@code{tramp-default-proxies-alist} is also used for passing through +firewalls or proxy servers. + +For example, the local host @samp{proxy.your.domain} on port 3128 +serves as HTTP proxy to the outer world. User has access rights to +another proxy server on @samp{host.other.domain}.@footnote{HTTP tunnels +are intended for secure SSL/TLS communication. Therefore, many proxy +servers restrict the tunnels to related target ports. You might need +to run your ssh server on your target host @samp{host.other.domain} on +such a port, like 443 (https). See +@uref{http://savannah.gnu.org/maintenance/CvsFromBehindFirewall} for +discussion of ethical issues.} Then the configuration is: @lisp (add-to-list 'tramp-default-proxies-alist '("\\`host\\.other\\.domain\\'" nil - "@trampfn{tunnel, , proxy.your.domain#3128,}")) + "@trampfn{tunnel, , proxy.your.domain#3128,}")) @end lisp -Gateway methods can be declared as first hop only in a multiple hop -chain. +Gateway methods in a multiple hop chain can be declared only as the first hop. @end ifset @end defopt -Hops to be passed tend to be restricted firewalls and alike. -Sometimes they offer limited features only, like running @command{rbash} -(restricted bash). This must be told to @value{tramp}. +Passing through hops involves dealing with restricted shells, such as +@command{rbash}. If @value{tramp} is made aware, then it would use +them for proxies only. -@vindex tramp-restricted-shell-hosts-alist @defopt tramp-restricted-shell-hosts-alist -This custom option keeps a list of regular expressions, which denote -hosts running a registered shell like @command{rbash}. Those hosts -can be used as proxies only. +@vindex tramp-restricted-shell-hosts-alist +An alist of regular expressions of hosts running restricted shells, +such as @command{rbash}. @value{tramp} will then use them only as +proxies. -If the bastion host from the example above runs a restricted shell, -you shall apply +To specify the bastion host from the example above as running a +restricted shell: @lisp (add-to-list 'tramp-restricted-shell-hosts-alist @@ -1525,11 +1428,10 @@ you shall apply @cindex using non-standard methods @cindex create your own methods -There is a variable @code{tramp-methods} which you can change if the -predefined methods don't seem right. - -For the time being, I'll refer you to the Lisp documentation of that -variable, accessible with @kbd{C-h v tramp-methods @key{RET}}. +The @code{tramp-methods} variable currently has an exhaustive list of +predefined methods. Any part of this list can be modified with more +suitable settings. Refer to the Lisp documentation of that variable, +accessible with @kbd{C-h v tramp-methods @key{RET}}. @node Customizing Completion @@ -1538,15 +1440,14 @@ variable, accessible with @kbd{C-h v tramp-methods @key{RET}}. @cindex selecting config files @vindex tramp-completion-function-alist -The variable @code{tramp-completion-function-alist} is intended to -customize which files are taken into account for user and host name -completion (@pxref{File name completion}). For every method, it keeps -a set of configuration files, accompanied by a Lisp function able to -parse that file. Entries in @code{tramp-completion-function-alist} -have the form (@var{method} @var{pair1} @var{pair2} @dots{}). +@code{tramp-completion-function-alist} uses predefined files for user +and host name completion (@pxref{File name completion}). For each +method, it keeps a set of configuration files and a function that can +parse that file. Each entry in @code{tramp-completion-function-alist} +is of the form (@var{method} @var{pair1} @var{pair2} @dots{}). Each @var{pair} is composed of (@var{function} @var{file}). -@var{function} is responsible to extract user names and host names +@var{function} is responsible for extracting user names and host names from @var{file} for completion. There are two functions which access this variable: @@ -1619,31 +1520,28 @@ case, hosts names are coded in file names @item @code{tramp-parse-hosts} @findex tramp-parse-hosts -A function dedicated to @file{/etc/hosts} style files. It returns -host names only. +A function dedicated to @file{/etc/hosts} for host names. @item @code{tramp-parse-passwd} @findex tramp-parse-passwd -A function which parses @file{/etc/passwd} like files. Obviously, it -can return user names only. +A function which parses @file{/etc/passwd} files for user names. @item @code{tramp-parse-netrc} @findex tramp-parse-netrc -Finally, a function which parses @file{~/.netrc} like files. This -includes also @file{~/.authinfo}-style files. +A function which parses @file{~/.netrc} and @file{~/.authinfo}-style files. @end table -If you want to keep your own data in a file, with your own structure, -you might provide such a function as well. This function must meet -the following conventions: +To keep a custom file with custom data in a custom structure, a custom +function has to be provided. This function must meet the following +conventions: @defun my-tramp-parse file -@var{file} must be either a file name on your host, or @code{nil}. -The function must return a list of (@var{user} @var{host}), which are -taken as candidates for user and host name completion. +@var{file} must be either a file on the host, or @code{nil}. The +function must return a list of (@var{user} @var{host}), which are +taken as candidates for completion for user and host names. Example: @example @@ -1658,144 +1556,127 @@ Example: @section Reusing passwords for several connections @cindex passwords -Sometimes it is necessary to connect to the same remote host several -times. Reentering passwords again and again would be annoying, when -the chosen method does not support access without password prompt -through own configuration. - -The best recommendation is to use the method's own mechanism for -password handling. Consider @command{ssh-agent} for @option{ssh}-like +To avoid repeated prompts for passwords, consider native caching +mechanisms, such as @command{ssh-agent} for @option{ssh}-like methods, or @command{pageant} for @option{plink}-like methods. -However, if you cannot apply such native password handling, -@value{tramp} offers alternatives. +@value{tramp} offers alternatives when native solutions cannot meet +the need. @anchor{Using an authentication file} @subsection Using an authentication file - @vindex auth-sources -The package @file{auth-source.el}, originally developed in No Gnus, -offers the possibility to read passwords from a file, like FTP does it -from @file{~/.netrc}. The default authentication file is -@file{~/.authinfo.gpg}, this can be changed via the variable + +The package @file{auth-source.el}, originally developed for No Gnus, +reads passwords from different sources, @xref{Help for users, , +auth-source, auth}. The default authentication file is +@file{~/.authinfo.gpg}, but this can be changed via the variable @code{auth-sources}. @noindent -A typical entry in the authentication file would be +A typical entry in the authentication file: @example machine melancholia port scp login daniel password geheim @end example -The port can be any @value{tramp} method (@pxref{Inline methods}, -@pxref{External methods}), to match only this method. When you omit -the port, you match all @value{tramp} methods. +The port can take any @value{tramp} method (@pxref{Inline methods}, +@pxref{External methods}). Omitting port values matches all +@value{tramp} methods. -In case of problems, setting @code{auth-source-debug} to @code{t} -gives useful debug messages. +Setting @code{auth-source-debug} to @code{t} to debug messages. @anchor{Caching passwords} @subsection Caching passwords -If there is no authentication file, @value{tramp} caches the passwords -entered by you. They will be reused next time if a connection needs -them for the same user name and host name, independently of the -connection method. +@value{tramp} can cache passwords as entered and reuse when needed for +the same user or host name independent of the access method. @vindex password-cache-expiry -Passwords are not saved permanently, that means the password caching -is limited to the lifetime of your @value{emacsname} session. You -can influence the lifetime of password caching by customizing the -variable @code{password-cache-expiry}. The value is the number of -seconds how long passwords are cached. Setting it to @code{nil} -disables the expiration. + +@code{password-cache-expiry} sets the duration (in seconds) the +passwords are remembered. Passwords are never saved permanently nor +can they extend beyond the lifetime of the current @value{emacsname} +session. Set @code{password-cache-expiry} to @code{nil} to disable +expiration. @vindex password-cache -If you don't like this feature for security reasons, password caching -can be disabled totally by customizing the variable -@code{password-cache} (setting it to @code{nil}). -Implementation Note: password caching is based on the package -@file{password-cache.el}. For the time being, it is activated only -when this package is seen in the @code{load-path} while loading -@value{tramp}. +Set @code{password-cache} to @code{nil} to disable password caching. + +@strong{Implementation Note}: password caching depends on +@file{password-cache.el} package. @value{tramp} activates password +caching only if @value{tramp} can discover, while @value{emacsname} is +loading, the package through @code{load-path}. + @ifset installchapter -If you don't use No Gnus, you can take @file{password.el} from the -@value{tramp} @file{contrib} directory, see @ref{Installation -parameters}. +@file{password.el} is available from No Gnus or from the @value{tramp} +@file{contrib} directory, see @ref{Installation parameters}. @end ifset @node Connection caching @section Reusing connection related information @cindex caching - @vindex tramp-persistency-file-name -In order to reduce initial connection time, @value{tramp} stores -connection related information persistently. The variable -@code{tramp-persistency-file-name} keeps the file name where these -information are written. Its default value is + +For faster initial connection times, @value{tramp} stores previous +connection properties in a file specified by the variable +@code{tramp-persistency-file-name}. + +The default file name for @code{tramp-persistency-file-name} is: @ifset emacs @file{~/.emacs.d/tramp}. @end ifset @ifset xemacs @file{~/.xemacs/tramp}. @end ifset -It is recommended to choose a local file name. - -@value{tramp} reads this file during startup, and writes it when -exiting @value{emacsname}. You can simply remove this file if -@value{tramp} shall be urged to recompute these information next -@value{emacsname} startup time. - -Using such persistent information can be disabled by setting -@code{tramp-persistency-file-name} to @code{nil}. - -Once consequence of reusing connection related information is that -@value{tramp} needs to distinguish hosts. If you, for example, run a -local @code{sshd} on port 3001, which tunnels @command{ssh} to another -host, you could access both @file{@trampfn{ssh, , localhost,}} and -@file{@trampfn{ssh, , localhost#3001,}}. @value{tramp} would use the -same host related information (like paths, Perl variants, etc) for -both connections, although the information is valid only for one of -them. -In order to avoid trouble, you must use another host name for one of -the connections, like introducing a @option{Host} section in -@file{~/.ssh/config} (@pxref{Frequently Asked Questions}) or applying -multiple hops (@pxref{Multi-hops}). +@value{tramp} reads this file during @value{emacsname} startup, and +writes to it when exiting @value{emacsname}. Delete this file for +@value{tramp} to recreate a new one on next @value{emacsname} startup. + +Set @code{tramp-persistency-file-name} to @code{nil} to disable +storing connections persistently. -When @value{tramp} detects a changed operating system version on a -remote host (via the command @command{uname -sr}), it flushes all -connection related information for this host, and opens the -connection again. +To reuse connection information from the persistent list, +@value{tramp} needs to uniquely identify every host. However in some +cases, two different connections may result in the same persistent +information. For example, connecting to a host using @command{ssh} and +connecting to the same host through @code{sshd} on port 3001. Both +access methods result in nearly identical persistent specifications +@file{@trampfn{ssh, , localhost,}} and @file{@trampfn{ssh, , +localhost#3001,}}. + +Changing host names could avoid duplicates. One way is to add a +@option{Host} section in @file{~/.ssh/config} (@pxref{Frequently Asked +Questions}). Another way is to apply multiple hops (@pxref{Multi-hops}). + +When @value{tramp} detects a change in the operating system version in +a remote host (via the command @command{uname -sr}), it flushes all +connection related information for that host and creates a new entry. @node Predefined connection information @section Setting own connection related information +@vindex tramp-connection-properties -Sometimes, method specific arguments in @code{tramp-methods} do not -fit your needs. Sometimes, @value{tramp} is not able to detect -correct connection related information. In such cases, you could tell -@value{tramp} which value it has to take. Since this could result in -errors, it has to be used with care. +For more precise customization, parameters specified by +@code{tramp-methods} can be overwritten manually. -@vindex tramp-connection-properties -Such settings can be performed via the list -@code{tramp-connection-properties}. An entry in this list has the -form @code{(@var{regexp} @var{property} @var{value})}. @var{regexp} -matches remote file names for which a property shall be predefined. -It can be @code{nil}. @var{property} is a string, and @var{value} the -corresponding value. - -@var{property} could be any method specific parameter found in -@code{tramp-methods}. The parameter key in @code{tramp-methods} is a -symbol name @code{tramp-}. In order to overwrite it, -@var{property} must be the string @samp{}. If you, for example, -want to change the remote shell to be used on a remote machine, you -could apply +Set @code{tramp-connection-properties} to manually override +@code{tramp-methods}. Properties in this list are in the form +@code{(@var{regexp} @var{property} @var{value})}. @var{regexp} matches +remote file names. Use @code{nil} to match all. @var{property} is the +property's name, and @var{value} is the property's value. + +@var{property} is any method specific parameter contained in +@code{tramp-methods}. The parameter key in @code{tramp-methods} is a +symbol name @code{tramp-}. To overwrite that property, use the +string @samp{} for @var{property}. For example, this changes the +remote shell: @lisp (add-to-list 'tramp-connection-properties @@ -1806,17 +1687,15 @@ could apply "remote-shell-login" '("-"))) @end lisp -This would overwrite the @code{tramp-remote-shell} and -@code{tramp-remote-shell-login} parameters in @code{tramp-methods}, to -be used on that remote host. +The parameters @code{tramp-remote-shell} and +@code{tramp-remote-shell-login} in @code{tramp-methods} now have new +values for the remote host. -@var{property} could also be any property found in the file +@var{property} could also be any property found in @code{tramp-persistency-file-name}. -A special property is @samp{busybox}. This must be set, if the remote -host runs a very restricted busybox as shell, which closes the -connection at will. Since there is no reliable test for this, -@value{tramp} must be indicated this way. Example: +To get around how restricted shells randomly drop connections, set the +special property @samp{busybox}. For example: @lisp (add-to-list 'tramp-connection-properties @@ -1828,69 +1707,55 @@ connection at will. Since there is no reliable test for this, @node Remote programs @section How @value{tramp} finds and uses programs on the remote host -@value{tramp} depends on a number of programs on the remote host in order to -function, including @command{ls}, @command{test}, @command{find} and +@value{tramp} requires access to and rights to several commands on +remote hosts: @command{ls}, @command{test}, @command{find} and @command{cat}. -In addition to these required tools, there are various tools that may be -required based on the connection method. See @ref{Inline methods} and -@ref{External methods} for details on these. +Besides there are other required programs for @ref{Inline methods} and +@ref{External methods} of connection. -Certain other tools, such as @command{perl} (or @command{perl5}) and -@command{grep} will be used if they can be found. When they are -available, they are used to improve the performance and accuracy of -remote file access. +To improve performance and accuracy of remote file access, +@value{tramp} uses @command{perl} (or @command{perl5}) and +@command{grep} when available. +@defopt tramp-remote-path @vindex tramp-remote-path @vindex tramp-default-remote-path @vindex tramp-own-remote-path -@defopt tramp-remote-path -When @value{tramp} connects to the remote host, it searches for the -programs that it can use. The custom option -@option{tramp-remote-path} controls the directories searched on the -remote host. +@option{tramp-remote-path} specifies which remote directory paths +@value{tramp} can search for @ref{Remote programs}. -By default, this is set to a reasonable set of defaults for most -hosts. The symbol @code{tramp-default-remote-path} is a place -holder, it is replaced by the list of directories received via the -command @command{getconf PATH} on your remote host. For example, -on Debian GNU/Linux this is @file{/bin:/usr/bin}, whereas on Solaris -this is @file{/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin}. -It is recommended to apply this symbol on top of -@option{tramp-remote-path}. +@value{tramp} uses standard defaults, such as @file{/bin} and +@file{/usr/bin}, which are reasonable for most hosts. To accommodate +differences in hosts and paths, for example, @file{/bin:/usr/bin} on +Debian GNU/Linux or +@file{/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin} on +Solaris, @value{tramp} queries the remote host with @command{getconf +PATH} and updates the symbol @code{tramp-default-remote-path}. -It is possible, however, that your local (or remote ;) system -administrator has put the tools you want in some obscure local -directory. - -In this case, you can still use them with @value{tramp}. You simply -need to add code to your @file{.emacs} to add the directory to the -remote path. This will then be searched by @value{tramp} when you -connect and the software found. - -To add a directory to the remote search path, you could use code such -as: +For instances where hosts keep obscure locations for paths for +security reasons, manually add such paths to local @file{.emacs} as +shown below for @value{tramp} to use when connecting. @lisp (add-to-list 'tramp-remote-path "/usr/local/perl/bin") @end lisp -Another possibility is to reuse the path settings of your remote -account when you log in. Usually, these settings are overwritten, -because they might not be useful for @value{tramp}. The place holder -@code{tramp-own-remote-path} preserves these settings. You can -activate it via +Another way to find the remote path is to use the path assigned to the +remote user by the remote host. @value{tramp} does not normally retain +this remote path after logging. However, @code{tramp-own-remote-path} +preserves the path value, which can be used to update +@code{tramp-remote-path}. @lisp (add-to-list 'tramp-remote-path 'tramp-own-remote-path) @end lisp @end defopt -@value{tramp} caches several information, like the Perl binary -location. The changed remote search path wouldn't affect these -settings. In order to force @value{tramp} to recompute these values, -you must exit @value{emacsname}, remove your persistency file -(@pxref{Connection caching}), and restart @value{emacsname}. +When remote search paths are changed, local @value{tramp} caches must +be recomputed. To force @value{tramp} to recompute afresh, exit +@value{emacsname}, remove the persistent file (@pxref{Connection +caching}), and restart @value{emacsname}. @node Remote shell setup @@ -1900,77 +1765,44 @@ you must exit @value{emacsname}, remove your persistency file @cindex @file{.login} file @cindex shell init files -As explained in the @ref{Overview} section, @value{tramp} connects to the -remote host and talks to the shell it finds there. Of course, when you -log in, the shell executes its init files. Suppose your init file -requires you to enter the birth date of your mother; clearly @value{tramp} -does not know this and hence fails to log you in to that host. - -There are different possible strategies for pursuing this problem. One -strategy is to enable @value{tramp} to deal with all possible situations. -This is a losing battle, since it is not possible to deal with -@emph{all} situations. The other strategy is to require you to set up -the remote host such that it behaves like @value{tramp} expects. This might -be inconvenient because you have to invest a lot of effort into shell -setup before you can begin to use @value{tramp}. - -The package, therefore, pursues a combined approach. It tries to -figure out some of the more common setups, and only requires you to -avoid really exotic stuff. For example, it looks through a list of -directories to find some programs on the remote host. And also, it -knows that it is not obvious how to check whether a file exists, and -therefore it tries different possibilities. (On some hosts and -shells, the command @command{test -e} does the trick, on some hosts -the shell builtin doesn't work but the program @command{/usr/bin/test --e} or @command{/bin/test -e} works. And on still other hosts, -@command{ls -d} is the right way to do this.) - -Below you find a discussion of a few things that @value{tramp} does not deal -with, and that you therefore have to set up correctly. +@value{tramp} checks for the availability of standard programs in the +usual locations. Common tactics include successively trying +@command{test -e}, @command{/usr/bin/test -e}, and @command{/bin/test +-e}. @command{ls -d} is another approach. But these approaches do not +help with these new login patterns. -@table @asis -@item @var{shell-prompt-pattern} -@vindex shell-prompt-pattern - -After logging in to the remote host, @value{tramp} has to wait for the remote -shell startup to finish before it can send commands to the remote -shell. The strategy here is to wait for the shell prompt. In order to -recognize the shell prompt, the variable @code{shell-prompt-pattern} has -to be set correctly to recognize the shell prompt on the remote host. - -Note that @value{tramp} requires the match for @code{shell-prompt-pattern} -to be at the end of the buffer. Many people have something like the -following as the value for the variable: @samp{^[^>$][>$] *}. Now -suppose your shell prompt is @code{a c $ }. In this case, -@value{tramp} recognizes the @code{>} character as the end of the prompt, -but it is not at the end of the buffer. +When @value{tramp} encounters two-factor logins or additional challenge +questions, such as entering birth date or security code or passphrase, +@value{tramp} needs a few more configuration steps to accommodate +them. +The difference between a password prompt and a passphrase prompt is +that the password for completing the login while the passphrase is +for authorizing access to local authentication information, such as +the ssh key. + +There is no one configuration to accommodate all the variations in +login security, especially not the exotic ones. However, @value{tramp} +provides a few tweaks to address the most common ones. + +@table @asis @item @var{tramp-shell-prompt-pattern} @vindex tramp-shell-prompt-pattern -This regular expression is used by @value{tramp} in the same way as -@code{shell-prompt-pattern}, to match prompts from the remote shell. -This second variable exists because the prompt from the remote shell -might be different from the prompt from a local shell---after all, -the whole point of @value{tramp} is to log in to remote hosts as a -different user. The default value of -@code{tramp-shell-prompt-pattern} is the same as the default value of -@code{shell-prompt-pattern}, which is reported to work well in many -circumstances. +@code{tramp-shell-prompt-pattern} is for remote login shell prompt, +which may not be the same as the local login shell prompt, +@code{shell-prompt-pattern}. Since most hosts use identical prompts, +@value{tramp} sets a similar default value for both prompts. @item @var{tramp-password-prompt-regexp} +@item @var{tramp-wrong-passwd-regexp} @vindex tramp-password-prompt-regexp @vindex tramp-wrong-passwd-regexp -During login, @value{tramp} might be forced to enter a password or a -passphrase. The difference between both is that a password is -requested from the shell on the remote host, while a passphrase is -needed for accessing local authentication information, like your ssh -key. - -@var{tramp-password-prompt-regexp} handles the detection of such -requests for English environments. When you use another localization -of your (local or remote) host, you might need to adapt this. Example: +@value{tramp} uses @var{tramp-password-prompt-regexp} to distinguish +between prompts for passwords and prompts for passphrases. By default, +@var{tramp-password-prompt-regexp} handles the detection in English +language environments. See a localization example below: @lisp (setq @@ -1988,29 +1820,29 @@ of your (local or remote) host, you might need to adapt this. Example: ".*:\0? *")) @end lisp -In parallel, it might also be necessary to adapt -@var{tramp-wrong-passwd-regexp}. +Similar localization may be necessary for handling wrong password +prompts, for which @value{tramp} uses @var{tramp-wrong-passwd-regexp}. @item @command{tset} and other questions @cindex Unix command tset @cindex tset Unix command +@vindex tramp-terminal-type -Some people invoke the @command{tset} program from their shell startup -scripts which asks the user about the terminal type of the shell. -Maybe some shells ask other questions when they are started. -@value{tramp} does not know how to answer these questions. There are -two approaches for dealing with this problem. One approach is to take -care that the shell does not ask any questions when invoked from -@value{tramp}. You can do this by checking the @env{TERM} -environment variable, it will be set to @code{dumb} when connecting. +To suppress inappropriate prompts for terminal type, @value{tramp} +sets the @env{TERM} to @code{dumb} before the remote login process +begins via the variable @code{tramp-terminal-type}. This will silence +common @command{tset} related prompts. -@vindex tramp-terminal-type -The variable @code{tramp-terminal-type} can be used to change this value -to @code{dumb}. +@value{tramp}'s strategy for handling such prompts (commonly triggered +from login scripts on remote hosts) is to set the environment +variables so that no prompts interrupt the shell initialization +process. @vindex tramp-actions-before-shell -The other approach is to teach @value{tramp} about these questions. See -the variable @code{tramp-actions-before-shell}. Example: + +An alternative approach is to configure @value{tramp} with strings +that can identify such questions using +@code{tramp-actions-before-shell}. Example: @lisp (defconst my-tramp-prompt-regexp @@ -2030,80 +1862,61 @@ the variable @code{tramp-actions-before-shell}. Example: @end lisp -@item Environment variables named like users in @file{.profile} +@item Conflicting names for users and variables in @file{.profile} -If you have a user named frumple and set the variable @env{FRUMPLE} in -your shell environment, then this might cause trouble. Maybe rename -the variable to @env{FRUMPLE_DIR} or the like. - -This weird effect was actually reported by a @value{tramp} user! +When a user name is the same as a variable name in a local file, such +as @file{.profile}, then @value{tramp} may send incorrect values for +environment variables. To avoid incorrect values, change the local +variable name to something different from the user name. For example, +if the user name is @env{FRUMPLE}, then change the variable name to +@env{FRUMPLE_DIR}. @item Non-Bourne commands in @file{.profile} -After logging in to the remote host, @value{tramp} issues the command -@command{exec /bin/sh}. (Actually, the command is slightly -different.) When @command{/bin/sh} is executed, it reads some init -files, such as @file{~/.shrc} or @file{~/.profile}. - -Now, some people have a login shell which is not @code{/bin/sh} but a -Bourne-ish shell such as bash or ksh. Some of these people might put -their shell setup into the files @file{~/.shrc} or @file{~/.profile}. -This way, it is possible for non-Bourne constructs to end up in those -files. Then, @command{exec /bin/sh} might cause the Bourne shell to -barf on those constructs. - -As an example, imagine somebody putting @command{export FOO=bar} into -the file @file{~/.profile}. The standard Bourne shell does not -understand this syntax and will emit a syntax error when it reaches -this line. - -Another example is the tilde (@code{~}) character, say when adding -@file{~/bin} to @env{PATH}. Many Bourne shells will not expand this -character, and since there is usually no directory whose name consists -of the single character tilde, strange things will happen. - -What can you do about this? - -Well, one possibility is to make sure that everything in -@file{~/.shrc} and @file{~/.profile} on all remote hosts is -Bourne-compatible. In the above example, instead of @command{export -FOO=bar}, you might use @command{FOO=bar; export FOO} instead. - -The other possibility is to put your non-Bourne shell setup into some -other files. For example, bash reads the file @file{~/.bash_profile} -instead of @file{~/.profile}, if the former exists. So bash -aficionados just rename their @file{~/.profile} to -@file{~/.bash_profile} on all remote hosts, and Bob's your uncle. - -The @value{tramp} developers would like to circumvent this problem, so -if you have an idea about it, please tell us. However, we are afraid -it is not that simple: before saying @command{exec /bin/sh}, -@value{tramp} does not know which kind of shell it might be talking -to. It could be a Bourne-ish shell like ksh or bash, or it could be a -csh derivative like tcsh, or it could be zsh, or even rc. If the -shell is Bourne-ish already, then it might be prudent to omit the -@command{exec /bin/sh} step. But how to find out if the shell is -Bourne-ish? +When the remote host's @file{.profile} is also used for shells other +than Bourne shell, then some incompatible syntaxes for commands in +@file{.profile} may trigger errors in Bourne shell on the host and may +not complete client's @value{tramp} connections. + +One example of a Bourne shell incompatible syntax in @file{.profile}: +using @command{export FOO=bar} instead of @command{FOO=bar; export +FOO}. After remote login, @value{tramp} will trigger an error during +its execution of @command{/bin/sh} on the remote host because Bourne +shell does not recognize the export command as entered in +@file{.profile}. + +Likewise, (@code{~}) character in paths will cause errors because +Bourne shell does not do (@code{~}) character expansions. + +One approach to avoiding these incompatibilities is to make all +commands in @file{~/.shrc} and @file{~/.profile} Bourne shell +compatible so @value{tramp} can complete connections to that remote. +To accommodate using non-Bourne shells on that remote, use other +shell-specific config files. For example, bash can use +@file{~/.bash_profile} and ignore @file{.profile}. @item Interactive shell prompt -@value{tramp} redefines the shell prompt in order to parse the shell's -output robustly. When calling an interactive shell by @kbd{M-x -shell}, this doesn't look nice. +@value{tramp} redefines the remote shell prompt internally for robust +parsing. This redefinition affects the looks of a prompt in an +interactive remote shell through commands, such as @kbd{M-x +shell}. Such prompts, however, can be reset to something more readable +and recognizable using these @value{tramp} variables. -You can redefine the shell prompt by checking the environment variable -@env{INSIDE_EMACS}, which is set by @value{tramp}, in your startup -script @file{~/.emacs_SHELLNAME}. @env{SHELLNAME} might be the string -@code{bash} or similar, in case of doubt you could set it the -environment variable @env{ESHELL} in your @file{.emacs}: +@value{tramp} sets the @env{INSIDE_EMACS} variable in the startup +script file @file{~/.emacs_SHELLNAME}. + +@env{SHELLNAME} is @code{bash} or equivalent shell names. Change it by +setting the environment variable @env{ESHELL} in the @file{.emacs} as +follows: @lisp (setenv "ESHELL" "bash") @end lisp -Your file @file{~/.emacs_SHELLNAME} could contain code like +Then re-set the prompt string in @file{~/.emacs_SHELLNAME} as follows: @example # Reset the prompt for remote Tramp shells. @@ -2122,18 +1935,16 @@ fi @cindex Unix command nc @cindex nc Unix command -The @command{nc} command will be used with the @option{nc} method. On -the remote host, a listener will be installed. Unfortunately, the -command line syntax for this has been changed with the different -@command{busybox} versions. @value{tramp} uses the following syntax -(see @code{tramp-methods}): +@value{tramp}'s @option{nc} method uses the @command{nc} command to +install and execute a listener as follows (see @code{tramp-methods}): @example # nc -l -p 42 @end example -If your remote @command{nc} refuses to accept the @command{-p} -parameter, you could overwrite the syntax with the following form: +The above command-line syntax has changed with @command{busybox} +versions. If @command{nc} refuses the @command{-p} parameter, then +overwrite as follows: @lisp (add-to-list @@ -2142,7 +1953,7 @@ parameter, you could overwrite the syntax with the following form: @end lisp @noindent -with @samp{192.168.0.1} being the IP address of your remote host +where @samp{192.168.0.1} is the remote host IP address (@pxref{Predefined connection information}). @end table @@ -2152,18 +1963,17 @@ with @samp{192.168.0.1} being the IP address of your remote host @section Android shell setup hints @cindex android shell setup -Android devices use a restricted shell. They can be accessed via the -@option{adb} method. However, this restricts the access to a USB -connection, and it requires the installation of the Android SDK on the -local host. +@value{tramp} uses the @option{adb} method to access Android +devices. Android devices provide a restricted shell access through an +USB connection. The local host must have Andriod SDK installed. -When an @command{sshd} process runs on the Android device, like -provided by the @code{SSHDroid} app, any @option{ssh}-based method can -be used. This requires some special settings. +Applications such as @code{SSHDroid} that run @command{sshd} process +on the Android device can accept any @option{ssh}-based methods +provided these settings are adjusted: -The default shell @code{/bin/sh} does not exist. Instead, you shall -use just @code{sh}, which invokes the shell installed on the device. -You can instruct @value{tramp} by this form: +@code{sh} must be specified for remote shell since Android devices do +not provide @code{/bin/sh}. @code{sh} will then invoke whatever shell is +installed on the device with this setting: @lisp (add-to-list 'tramp-connection-properties @@ -2171,13 +1981,12 @@ You can instruct @value{tramp} by this form: @end lisp @noindent -with @samp{192.168.0.26} being the IP address of your Android device +where @samp{192.168.0.26} is the Android device's IP address. (@pxref{Predefined connection information}). -The user settings for the @env{PATH} environment variable must be -preserved. It has also been reported, that the commands in -@file{/system/xbin} are better suited than the ones in -@file{/system/bin}. Add these setting: +@value{tramp} requires preserving @env{PATH} environment variable from +user settings. Android devices prefer @file{/system/xbin} path over +@file{/system/bin}. Both of these are set as follows: @lisp (add-to-list 'tramp-remote-path 'tramp-own-remote-path) @@ -2185,20 +1994,20 @@ preserved. It has also been reported, that the commands in @end lisp @noindent -If the Android device is not @samp{rooted}, you must give the shell a -writable directory for temporary files: +When the Android device is not @samp{rooted}, specify a writable +directory for temporary files: @lisp (add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME") @end lisp @noindent -Now you shall be able to open a remote connection with @kbd{C-x C-f -@trampfn{ssh, , 192.168.0.26#2222, }}, given that @command{sshd} -listens on port @samp{2222}. +Open a remote connection with the command @kbd{C-x C-f @trampfn{ssh, , +192.168.0.26#2222, }}, where @command{sshd} is listening on port +@samp{2222}. -It is also recommended to add a corresponding entry to your -@file{~/.ssh/config} for that connection, like +To add a corresponding entry to the @file{~/.ssh/config} file +(recommended), use this: @example Host android @@ -2208,7 +2017,8 @@ Host android @end example @noindent -In this case, you must change the setting for the remote shell to +To use the host name @samp{android} instead of the IP address shown in +the previous example, fix the connection properties as follows: @lisp (add-to-list 'tramp-connection-properties @@ -2216,8 +2026,8 @@ In this case, you must change the setting for the remote shell to @end lisp @noindent -You would open the connection with @kbd{C-x C-f @trampfn{ssh, , -android, }} then. +Open a remote connection with a more concise command @kbd{C-x C-f +@trampfn{ssh, , android, }}. @node Auto-save and Backup @@ -2231,22 +2041,24 @@ android, }} then. @vindex bkup-backup-directory-info @end ifset -Normally, @value{emacsname} writes backup files to the same directory -as the original files, but this behavior can be changed via the -variable +To avoid @value{tramp} from saving backup files owned by root to +locations accessible to others, default backup settings in @ifset emacs -@code{backup-directory-alist}. +@code{backup-directory-alist} @end ifset @ifset xemacs -@code{bkup-backup-directory-info}. +@code{bkup-backup-directory-info} @end ifset -In connection with @value{tramp}, this can have unexpected side -effects. Suppose that you specify that all backups should go to the -directory @file{~/.emacs.d/backups/}, and then you edit the file -@file{@trampfn{su, root, localhost, /etc/secretfile}}. The effect is -that the backup file will be owned by you and not by root, thus -possibly enabling others to see it even if they were not intended to -see it. +have to be altered. + +Here's a scenario where files could be inadvertently +exposed. @value{emacsname} by default writes backup files to the same +directory as the original files unless changed to another location, +such as @file{~/.emacs.d/backups/}. Such a directory will also be used +by default by @value{tramp} when using, say, a restricted file +@file{@trampfn{su, root, localhost, /etc/secretfile}}. The backup file +of the secretfile is now owned by the user logged in from tramp and +not root. When @ifset emacs @@ -2257,16 +2069,8 @@ When @end ifset is @code{nil} (the default), such problems do not occur. -Therefore, it is useful to set special values for @value{tramp} -files. For example, the following statement effectively ``turns off'' -the effect of -@ifset emacs -@code{backup-directory-alist} -@end ifset -@ifset xemacs -@code{bkup-backup-directory-info} -@end ifset -for @value{tramp} files: +To ``turns off'' the backup feature for @value{tramp} files and stop +@value{tramp} from saving to the backup directory, use this: @ifset emacs @lisp @@ -2283,8 +2087,8 @@ for @value{tramp} files: @end ifset @ifset emacs -It is also possible to disable backups depending on the used method. -The following code disables backups for the @option{su} and +@noindent +Disabling backups can be targetted to just @option{su} and @option{sudo} methods: @lisp @@ -2298,24 +2102,28 @@ The following code disables backups for the @option{su} and @end lisp @end ifset - -Another possibility is to use the @value{tramp} variable +Another option is to create better backup file naming with user and +host names prefixed to the file name. For example, transforming +@file{/etc/secretfile} to +@file{~/.emacs.d/backups/!su:root@@localhost:!etc!secretfile}, set the +@value{tramp} variable @ifset emacs -@code{tramp-backup-directory-alist}. +@code{tramp-backup-directory-alist} @end ifset @ifset xemacs -@code{tramp-bkup-backup-directory-info}. +@code{tramp-bkup-backup-directory-info} @end ifset -This variable has the same meaning like +from the existing variable @ifset emacs @code{backup-directory-alist}. @end ifset @ifset xemacs @code{bkup-backup-directory-info}. @end ifset -If a @value{tramp} file is backed up, and DIRECTORY is an absolute -local file name, DIRECTORY is prepended with the @value{tramp} file -name prefix of the file to be backed up. + +Then @value{tramp} backs up to a file name that is transformed with a +prefix consisting of the DIRECTORY name. This file name prefixing +happens only when the DIRECTORY is an absolute local file name. @noindent Example: @@ -2348,101 +2156,98 @@ The backup file name of @file{@trampfn{su, root, localhost, ~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}} @end ifset -The same problem can happen with auto-saving files. +Just as for backup files, similar issues of file naming affect +auto-saving @value{tramp} files. @ifset emacs -The variable @code{auto-save-file-name-transforms} keeps information, -on which directory an auto-saved file should go. By default, it is -initialized for @value{tramp} files to the local temporary directory. - -On some versions of @value{emacsname}, namely the version built for -Debian GNU/Linux, the variable @code{auto-save-file-name-transforms} -contains the directory where @value{emacsname} was built. A -workaround is to manually set the variable to a sane value. +Auto-saved files are saved in the directory specified by the variable +@code{auto-save-file-name-transforms}. By default this is set to the +local temporary directory. But in some versions of Debian GNU/Linux, +this points to the source directory where the @value{emacsname} was +compiled. Reset such values to a valid directory. -If auto-saved files should go into the same directory as the original -files, @code{auto-save-file-name-transforms} should be set to @code{nil}. +Set @code{auto-save-file-name-transforms} to @code{nil} to save +auto-saved files to the same directory as the original file. -Another possibility is to set the variable -@code{tramp-auto-save-directory} to a proper value. +Alternatively, set the variable @code{tramp-auto-save-directory} to +direct all auto saves to that location. @end ifset @ifset xemacs -For this purpose you can set the variable @code{auto-save-directory} -to a proper value. +@code{auto-save-directory} can also be used here instead of other +locations specfied above. @end ifset - @node Windows setup hints @section Issues with Cygwin ssh @cindex Cygwin, issues -This section needs a lot of work! Please help. +This section is incomplete. Please share your solutions. @cindex method sshx with Cygwin @cindex sshx method with Cygwin -The recent Cygwin installation of @command{ssh} works only with a -Cygwinized @value{emacsname}. You can check it by typing @kbd{M-x -eshell}, and starting @kbd{ssh test.host}. The problem is evident -if you see a message like this: + +Cygwin's @command{ssh} works only with a Cygwin version of +@value{emacsname}. To check for compatibility: type @kbd{M-x eshell}, and +start @kbd{ssh test.host}. Incompatbilities trigger this message: @example Pseudo-terminal will not be allocated because stdin is not a terminal. @end example -Older @command{ssh} versions of Cygwin are told to cooperate with -@value{tramp} selecting @option{sshx} as the connection method. You -can find information about setting up Cygwin in their FAQ at -@uref{http://cygwin.com/faq/}. +Some older versions of Cygwin's @command{ssh} work with the +@option{sshx} access method. Consult Cygwin's FAQ at +@uref{http://cygwin.com/faq/} for details. + @cindex method scpx with Cygwin @cindex scpx method with Cygwin -If you wish to use the @option{scpx} connection method, then you might -have the problem that @value{emacsname} calls @command{scp} with a -Windows file name such as @code{c:/foo}. The Cygwin version of -@command{scp} does not know about Windows file names and interprets -this as a remote file name on the host @code{c}. -One possible workaround is to write a wrapper script for @option{scp} -which converts the Windows file name to a Cygwinized file name. +When using the @option{scpx} access method, @value{emacsname} may call +@command{scp} with Windows file naming, such as @code{c:/foo}. But +the version of @command{scp} that is installed with Cygwin does not +know about Windows file naming, which causes it to incorrectly look +for a host named @code{c}. + +A workaround: write a wrapper script for @option{scp} to convert +Windows file names to Cygwin file names. @cindex Cygwin and ssh-agent @cindex SSH_AUTH_SOCK and @value{emacsname} on Windows -If you want to use either @option{ssh} based method on Windows, then -you might encounter problems with @command{ssh-agent}. Using this -program, you can avoid typing the pass-phrase every time you log in. -However, if you start @value{emacsname} from a desktop shortcut, then -the environment variable @env{SSH_AUTH_SOCK} is not set and so -@value{emacsname} and thus @value{tramp} and thus @command{ssh} and -@command{scp} started from @value{tramp} cannot communicate with -@command{ssh-agent}. It works better to start @value{emacsname} from -the shell. -If anyone knows how to start @command{ssh-agent} under Windows in such a -way that desktop shortcuts can profit, please holler. I don't really -know anything at all about Windows@dots{} +When using the @command{ssh-agent} on Windows for password-less +interaction, @option{ssh} methods depend on the environment variable +@env{SSH_AUTH_SOCK}. But this variable is not set when +@value{emacsname} is started from a Desktop shortcut and +authentication fails. + +One workaround is to use a Windows based SSH Agent, such as +Pageant. It is part of the Putty Suite of tools. + +The fallback is to start @value{emacsname} from a shell. @node Usage @chapter Using @value{tramp} @cindex using @value{tramp} -Once you have installed @value{tramp} it will operate fairly -transparently. You will be able to access files on any remote host -that you can log in to as though they were local. - -Files are specified to @value{tramp} using a formalized syntax specifying the -details of the system to connect to. This is similar to the syntax used -by the @value{ftppackagename} package. +@value{tramp} operates transparently, accessing remote files as if +they are local. However, @value{tramp} employs a formalized remote +file naming syntax to perform its functions transparently. This +syntax consists of many parts specifying access methods, +authentication, host names, and file names. +@ifset emacs +@value{ftppackagename} uses a similar syntax. +@end ifset @cindex type-ahead -Something that might happen which surprises you is that -@value{emacsname} remembers all your keystrokes, so if you see a -password prompt from @value{emacsname}, say, and hit @kbd{@key{RET}} -twice instead of once, then the second keystroke will be processed by -@value{emacsname} after @value{tramp} has done its thing. Why, this -type-ahead is normal behavior, you say. Right you are, but be aware -that opening a remote file might take quite a while, maybe half a -minute when a connection needs to be opened. Maybe after half a -minute you have already forgotten that you hit that key! + +Unlike opening local files in @value{emacsname}, which are +instantaneous, opening remote files in @value{tramp} is slower at +first. Sometimes there is a noticable delay before the prompts for +passwords or authentication appear in the minibuffer. Hitting +@kbd{@key{RET}} or other keys during this gap will be processed by +@value{emacsname}. This type-ahead facility is a feature of +@value{emacsname} that may cause missed prompts when using +@value{tramp}. @menu * File name Syntax:: @value{tramp} file name conventions. @@ -2458,107 +2263,96 @@ minute you have already forgotten that you hit that key! @cindex file name syntax @cindex file name examples -To access the file @var{localname} on the remote host @var{host} -you would specify the file name @file{@trampfn{, , host, -localname}}. This will connect to @var{host} and transfer the file -using the default method. @xref{Default Method}. - -Some examples of @value{tramp} file names are shown below. +@file{@trampfn{, , host, localfilename}} +opens file @var{localfilename} on the remote host @var{host}, using +the default method. @xref{Default Method}. @table @file @item @value{prefix}melancholia@value{postfix}.emacs -Edit the file @file{.emacs} in your home directory on the host +For the file @file{.emacs} located in the home directory, on the host @code{melancholia}. @item @value{prefix}melancholia.danann.net@value{postfix}.emacs -This edits the same file, using the fully qualified domain name of +For the file @file{.emacs} specified using the fully qualified domain name of the host. @item @value{prefix}melancholia@value{postfix}~/.emacs -This also edits the same file; the @file{~} is expanded to your -home directory on the remote host, just like it is locally. +For the file @file{.emacs} specified using the @file{~}, which is expanded. @item @value{prefix}melancholia@value{postfix}~daniel/.emacs -This edits the file @file{.emacs} in the home directory of the user -@code{daniel} on the host @code{melancholia}. The @file{~} -construct is expanded to the home directory of that user on the remote -host. +For the file @file{.emacs} located in @code{daniel}'s home directory +on the host, @code{melancholia}. The @file{~} construct is +expanded to the home directory of that user on the remote host. @item @value{prefix}melancholia@value{postfix}/etc/squid.conf -This edits the file @file{/etc/squid.conf} on the host -@code{melancholia}. +For the file @file{/etc/squid.conf} on the host @code{melancholia}. @end table -@var{host} can also be an IPv4 or IPv6 address, like in -@file{@trampfn{, , 127.0.0.1, .emacs}} or @file{@trampfn{, , +@var{host} can take IPv4 or IPv6 address, as in @file{@trampfn{, , +127.0.0.1, .emacs}} or @file{@trampfn{, , @value{ipv6prefix}::1@value{ipv6postfix}, .emacs}}. @ifset emacs For syntactical reasons, IPv6 addresses must be embedded in square brackets @file{@value{ipv6prefix}} and @file{@value{ipv6postfix}}. @end ifset -Unless you specify a different name to use, @value{tramp} will use the -current local user name as the remote user name to log in with. If you -need to log in as a different user, you can specify the user name as -part of the file name. +By default, @value{tramp} will use the current local user name as the +remote user name for log in to the remote host. Specifying a different +name using the proper syntax will override this default behavior: + +@example +@trampfn{, user, host, path/to.file} +@end example + +@file{@trampfn{, daniel, melancholia, .emacs}} is for file +@file{.emacs} in @code{daniel}'s home directory on the host, +@code{melancholia}. -To log in to the remote host as a specific user, you use the syntax -@file{@trampfn{, user, host, path/to.file}}. That means that -connecting to @code{melancholia} as @code{daniel} and editing -@file{.emacs} in your home directory you would specify -@file{@trampfn{, daniel, melancholia, .emacs}}. +Specify other file access methods (@pxref{Inline methods}, +@pxref{External methods}) as part of the file name. -It is also possible to specify other file transfer methods -(@pxref{Inline methods}, @pxref{External methods}) as part of the -file name. @ifset emacs -This is done by putting the method before the user and host name, as -in @file{@value{prefix}@var{method}@value{postfixhop}} (Note the -trailing colon). +Method name comes before user name, as in +@file{@value{prefix}@var{method}@value{postfixhop}} (Note the trailing +colon). @end ifset @ifset xemacs This is done by replacing the initial @file{@value{prefix}} with -@file{@value{prefix}@value{postfixhop}}. (Note the trailing +@file{@value{prefix}@var{method}@value{postfixhop}} (Note the trailing slash!). @end ifset -The user, host and file specification remain the same. +The syntax specificaton for user, host, and file do not change. -So, to connect to the host @code{melancholia} as @code{daniel}, -using the @option{ssh} method to transfer files, and edit -@file{.emacs} in my home directory I would specify the file name -@file{@trampfn{ssh, daniel, melancholia, .emacs}}. +To connect to the host @code{melancholia} as @code{daniel}, using +@option{ssh} method for @file{.emacs} in @code{daniel}'s home +directory, the full specification is: @file{@trampfn{ssh, daniel, +melancholia, .emacs}}. -@ifset emacs -A remote file name containing a host name only, which is equal to a -method name, is not allowed. If such a host name is used, it must -always be preceded by an explicit method name, like -@file{@value{prefix}ssh@value{postfixhop}ssh@value{postfix}}. -@end ifset +A remote file name containing a host name, which is the same string as +a method name, is not allowed. -Finally, for some methods it is possible to specify a different port -number than the default one, given by the method. This is specified -by adding @file{#} to the host name, like in @file{@trampfn{ssh, -daniel, melancholia#42, .emacs}}. +For specifying port numbers, affix @file{#} to the host +name. For example: @file{@trampfn{ssh, daniel, melancholia#42, +.emacs}}. @node File name completion @section File name completion @cindex file name completion -File name completion works with @value{tramp} for completion of method -names, of user names and of host names as well as for completion of -file names on remote hosts. +@value{tramp} can complete the following @value{tramp} file name +components: method names, user names, host names, and file names +located on remote hosts. @ifset emacs -In order to enable this, partial completion must be activated in your -@file{.emacs}. +Enable this by activating partial completion in @file{.emacs}. @ifinfo @xref{Completion Options, , , @value{emacsdir}}. @end ifinfo @end ifset -If you, for example, type @kbd{C-x C-f @value{prefix}t -@key{TAB}}, @value{tramp} might give you as result the choice for +For example, type @kbd{C-x C-f @value{prefix}t @key{TAB}}, +@value{tramp} completion choices show up as @example @c @multitable {@trampfn{telnet, , melancholia.danann.net,}} {@trampfn{telnet, , 192.168.0.1,}} @@ -2580,12 +2374,11 @@ is a possible completion for the respective method, @end ifset and @samp{@value{prefixhop}toto@value{postfix}} might be a host @value{tramp} has detected in your @file{~/.ssh/known_hosts} -file (given you're using default method @option{ssh}). +file (when using @option{ssh} as default method). -If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to -@samp{@value{prefix}telnet@value{postfixhop}}. -Next @kbd{@key{TAB}} brings you all host names @value{tramp} detects in -your @file{/etc/hosts} file, let's say +Type @kbd{e @key{TAB}} for the minibuffer completion to +@samp{@value{prefix}telnet@value{postfixhop}}. Typing @kbd{@key{TAB}} +shows host names @value{tramp} from @file{/etc/hosts} file, for example. @example @multitable @columnfractions .5 .5 @@ -2596,21 +2389,20 @@ your @file{/etc/hosts} file, let's say @end multitable @end example -Now you can choose the desired host, and you can continue to -complete file names on that host. +Choose a host from the above list and then continue to complete file +names on that host. -If the configuration files (@pxref{Customizing Completion}), which -@value{tramp} uses for analysis of completion, offer user names, those user -names will be taken into account as well. +When the configuration (@pxref{Customizing Completion}) includes user +names, then the completion lists will account for the user names as well. -Remote hosts which have been visited in the past and kept -persistently (@pxref{Connection caching}) will be offered too. +Remote hosts previously visited or hosts whose connections are kept +persistently (@pxref{Connection caching}) will be included in the +completion lists. -Once the remote host identification is completed, it comes to -file name completion on the remote host. This works pretty much like -for files on the local host, with the exception that minibuffer -killing via a double-slash works only on the file name part, except -that file name part starts with @file{//}. +After remote host name completion comes completion of file names on +the remote host. It works the same as on loal host file completion +except when killing with double-slash @file{//} kills only the file +name part of the @value{tramp} file name syntax. @ifset emacs A triple-slash stands for the default behavior. @end ifset @@ -2642,18 +2434,17 @@ Example: @end ifset @end example -A remote directory might have changed its contents out of -@value{emacsname} control, for example by creation or deletion of -files by other processes. Therefore, during file name completion, the -remote directory contents are reread regularly in order to detect such -changes, which would be invisible otherwise (@pxref{Connection caching}). +During file name completion, remote directory contents are re-read +regularly to account for any changes in the filesystem that may affect +the completion candidates. Such re-reads can account for changes to +the file system by applications outside @value{emacsname} +(@pxref{Connection caching}). -@vindex tramp-completion-reread-directory-timeout @defopt tramp-completion-reread-directory-timeout -This custom option defines the number of seconds since last remote -command before rereading a directory contents. A value of 0 would -require an immediate reread during file name completion, @code{nil} -means to use always cached values for the directory contents. +@vindex tramp-completion-reread-directory-timeout +The timeout is number of seconds since last remote command for +rereading remote directory contents. 0 re-reads immediately during +file name completion, @code{nil} uses cached directory contents. @end defopt @@ -2662,17 +2453,15 @@ means to use always cached values for the directory contents. @cindex multi-hop, ad-hoc @cindex proxy hosts, ad-hoc -Multiple hops are configured with the variable -@code{tramp-default-proxies-alist} (@pxref{Multi-hops}). However, -sometimes it is desirable to reach a remote host immediately, without -configuration changes. This can be reached by an ad-hoc specification -of the proxies. +@value{tramp} file name syntax can accommodate ad hoc specification of +multiple proxies without using @code{tramp-default-proxies-alist} +configuration setup(@pxref{Multi-hops}). -A proxy looks like a remote file name specification without the local -file name part. It is prepended to the target remote file name, -separated by @samp{|}. As an example, a remote file on -@samp{you@@remotehost}, passing the proxy @samp{bird@@bastion}, could -be opened by +Each proxy is specified using the same syntax as the remote host +specification minus the file name part. Each hop is separated by a +@samp{|}. Chain the proxies from the starting host to the destination +remote host name and file name. For example, hopping over a single +proxy @samp{bird@@bastion} to a remote file on @samp{you@@remotehost}: @example @c @kbd{C-x C-f @trampfn{ssh@value{postfixhop}bird@@bastion|ssh, you, @@ -2680,21 +2469,23 @@ be opened by @kbd{C-x C-f @value{prefix}ssh@value{postfixhop}bird@@bastion|ssh@value{postfixhop}you@@remotehost@value{postfix}/path} @end example -Multiple hops can be cascaded, separating all proxies by @samp{|}. -The proxies can also contain the patterns @code{%h} or @code{%u}. +Proxies can take patterns @code{%h} or @code{%u}. -The ad-hoc definition is added on the fly to -@code{tramp-default-proxies-alist}. Therefore, during the lifetime of -the @value{emacsname} session it is not necessary to enter this ad-hoc -specification, again. The remote file name @samp{@trampfn{ssh, you, -remotehost, /path}} would be sufficient from now on. +@value{tramp} adds the ad-hoc definitions on the fly to +@code{tramp-default-proxies-alist} and is available for re-use during +that @value{emacsname} session. Subsequent @value{tramp} connections +to the same remote host can then use the shortcut form: +@samp{@trampfn{ssh, you, remotehost, /path}}. -@vindex tramp-save-ad-hoc-proxies @defopt tramp-save-ad-hoc-proxies -This custom option controls whether ad-hoc definitions are kept -persistently in @option{tramp-default-proxies-alist}. That means, -those definitions are available also for future @value{emacsname} -sessions. +@vindex tramp-save-ad-hoc-proxies +For ad-hoc definitions to be saved automatically in +@option{tramp-default-proxies-alist} for future @value{emacsname} +sessions, set @option{tramp-save-ad-hoc-proxies}. + +@lisp +(setq tramp-save-ad-hoc-proxies t) +@end lisp @end defopt @@ -2703,11 +2494,14 @@ sessions. @cindex compile @cindex recompile -@value{tramp} supports running processes on a remote host. This -allows to exploit @value{emacsname} packages without modification for -remote file names. It does not work for the @option{ftp} method. -Association of a pty, as specified in @code{start-file-process}, is -not supported. +@value{tramp} supports starting new running processes on the remote +host for discovering remote file names. @value{emacsname} packages on +the remote host need no specific modifications for @value{tramp}'s +use. + +This type of integration does not work with the @option{ftp} method, +and does not support the pty association as specified in +@code{start-file-process}. @code{process-file} and @code{start-file-process} work on the remote host when the variable @code{default-directory} is remote: @@ -2718,51 +2512,53 @@ host when the variable @code{default-directory} is remote: "/bin/sh" "-c" "grep -e tramp *")) @end lisp + @ifset emacsgvfs -If the remote host is mounted via GVFS (see @ref{GVFS based methods}), -the remote filesystem is mounted locally. Therefore, there are no -remote processes; all processes run still locally on your host with -an adapted @code{default-directory}. This section does not apply for -such connection methods. +Remote processes do not apply to GVFS (see @ref{GVFS based methods}) +because the remote file system is mounted on the local host and +@value{tramp} just accesses by changing the @code{default-directory}. @end ifset -Remote processes are started when a corresponding command is executed -from a buffer belonging to a remote file or directory. Up to now, the -packages @file{compile.el} (commands like @code{compile} and -@code{grep}) and @file{gud.el} (@code{gdb} or @code{perldb}) have been -integrated. Integration of further packages is planned, any help for -this is welcome! +@value{tramp} starts a remote process when a command is executed in a +remote file or directory buffer. As of now, these packages have been +integrated to work with @value{tramp}: @file{compile.el} (commands +like @code{compile} and @code{grep}) and @file{gud.el} (@code{gdb} or +@code{perldb}). -When your program is not found in the default search path -@value{tramp} sets on the remote host, you should either use an -absolute path, or extend @code{tramp-remote-path} (see @ref{Remote -programs}): +For @value{tramp} to find the command on the remote, it must be +accessible through the default search path as setup by @value{tramp} +upon first connection. Alternatively, use an absolute path or extend +@code{tramp-remote-path} (see @ref{Remote programs}): @lisp (add-to-list 'tramp-remote-path "~/bin") (add-to-list 'tramp-remote-path "/appli/pub/bin") @end lisp -The environment for your program can be adapted by customizing -@code{tramp-remote-process-environment}. This variable is a list of -strings. It is structured like @code{process-environment}. Each -element is a string of the form @samp{ENVVARNAME=VALUE}. An entry -@samp{ENVVARNAME=} disables the corresponding environment variable, -which might have been set in your init file like @file{~/.profile}. +Customize @code{tramp-remote-process-environment} to suit the remote +program's environment for the remote host. +@code{tramp-remote-process-environment} is a list of strings +structured similar to @code{process-environment}, where each element +is a string of the form @samp{ENVVARNAME=VALUE}. + +To avoid any conflicts with local host variables set through local +configuration files, such as @file{~/.profile}, use @samp{ENVVARNAME=} +to unset them for the remote environment. @noindent -Adding an entry can be performed via @code{add-to-list}: +Use @code{add-to-list} to add entries: @lisp (add-to-list 'tramp-remote-process-environment "JAVA_HOME=/opt/java") @end lisp -Changing or removing an existing entry is not encouraged. The default -values are chosen for proper @value{tramp} work. Nevertheless, if for -example a paranoid system administrator disallows changing the -@env{HISTORY} environment variable, you can customize -@code{tramp-remote-process-environment}, or you can apply the -following code in your @file{.emacs}: +Modifying or deleting already existing values in the +@code{tramp-remote-process-environment} list may not be feasible on +restricted remote hosts. For example, some system administrators +disallow changing @env{HISTORY} variable. To accommodate such +restrictions when using @value{tramp}, fix the +@code{tramp-remote-process-environment} by the following code in the +local @file{.emacs} file: @lisp (let ((process-environment tramp-remote-process-environment)) @@ -2770,31 +2566,29 @@ following code in your @file{.emacs}: (setq tramp-remote-process-environment process-environment)) @end lisp -When running @code{process-file} or @code{start-file-process} on a -remote @code{default-directory}, the default settings in -@code{process-environment} are not used as it is the case for local -processes. However, if you need environment variables other than set -in @code{tramp-remote-process-environment}, you can let-bind them to -@code{process-environment}. Only those variables will be set then: +@value{tramp} does not use the defaults specified in +@code{process-environment} for running @code{process-file} or +@code{start-file-process} on remote hosts. When values from +@code{process-environment} are needed for remote processes, then set +them as follows: @lisp (let ((process-environment (cons "HGPLAIN=1" process-environment))) (process-file @dots{})) @end lisp -This works only for environment variables which are not set already in +This works only for environment variables not already set in the @code{process-environment}. -If you use other @value{emacsname} packages which do not run -out-of-the-box on a remote host, please let us know. We will try to -integrate them as well. @xref{Bug Reports}. +For integrating other @value{emacsname} packages so @value{tramp} can +execute remotely, please file a bug report. @xref{Bug Reports}. @subsection Running remote programs that create local X11 windows -If you want to run a remote program, which shall connect the X11 -server you are using with your local host, you can set the -@env{DISPLAY} environment variable on the remote host: +To allow a remote program to create an X11 window on the local host, +set the @env{DISPLAY} environment variable for the remote host as +follows in the local @file{.emacs} file: @lisp (add-to-list 'tramp-remote-process-environment @@ -2802,65 +2596,61 @@ server you are using with your local host, you can set the @end lisp @noindent -@code{(getenv "DISPLAY")} shall return a string containing a host -name, which can be interpreted on the remote host; otherwise you might -use a fixed host name. Strings like @code{:0} cannot be used properly -on the remote host. - -Another trick might be that you put @code{ForwardX11 yes} or -@code{ForwardX11Trusted yes} to your @file{~/.ssh/config} file for -that host. +@code{(getenv "DISPLAY")} should return a recognizable name for the +local host that the remote host can redirect X11 window +interactions. If querying for a recognizable name is not possible for +whatever reason, then replace @code{(getenv "DISPLAY")} with a +hard-coded, fixed name. Note that using @code{:0} for X11 display name +here will not work as expected. + +An alternate approach is specify @code{ForwardX11 yes} or +@code{ForwardX11Trusted yes} in the file @file{~/.ssh/config} on the +local host. @subsection Running @code{shell} on a remote host @cindex shell -Calling @kbd{M-x shell} in a buffer related to a remote host runs the -local shell as defined in @option{shell-file-name}. This might be -also a valid file name for a shell to be applied on the remote host, -but it will fail at least when your local and remote hosts belong to -different system types, like @samp{windows-nt} and @samp{gnu/linux}. - -You must set the variable @option{explicit-shell-file-name} to the -shell file name on the remote host, in order to start that shell on -the remote host. +Set @option{explicit-shell-file-name} to the appropriate shell name +when using @value{tramp} between two hosts with different operating +systems, such as @samp{windows-nt} and @samp{gnu/linux}. This option +ensures the correct name of the remote shell program. @ifset emacs -Starting with Emacs 24 this won't be necessary, if you call -@code{shell} interactively. You will be asked for the remote shell -file name, if you are on a remote buffer, and if -@option{explicit-shell-file-name} is equal to @code{nil}. +Starting with Emacs 24, when @option{explicit-shell-file-name} is +equal to @code{nil}, calling @code{shell} interactively will prompt +for a shell name. @end ifset @subsection Running @code{shell-command} on a remote host @cindex shell-command -@code{shell-command} allows to execute commands in a shell, either -synchronously, either asynchronously. This works also on remote -hosts. Example: +@code{shell-command} executes commands synchronously or asynchronously +on remote hosts and displays output in buffers on the local +host. Example: @example @kbd{C-x C-f @trampfn{sudo, , , } @key{RET}} @kbd{M-! tail -f /var/log/syslog.log & @key{RET}} @end example -You will see the buffer @file{*Async Shell Command*}, containing the -continuous output of the @command{tail} command. +@command{tail} command outputs continuously to the local buffer, +@file{*Async Shell Command*} @ifset emacs -A similar behavior can be reached by @kbd{M-x auto-revert-tail-mode}, -if available. +@kbd{M-x auto-revert-tail-mode} runs similarly showing continuous output. @end ifset @subsection Running @code{eshell} on a remote host @cindex eshell -@value{tramp} is integrated into @file{eshell.el}. That is, you can -open an interactive shell on your remote host, and run commands there. -After you have started @kbd{M-x eshell}, you could perform commands -like this: +@value{tramp} is integrated into @file{eshell.el}, which enables +interactive eshell sessions on remote hosts at the command prompt. +You must add the module @code{eshell-tramp} to +@code{eshell-modules-list}. Here's a sample interaction after opening +@kbd{M-x eshell} on a remote host: @example @b{~ $} cd @trampfn{sudo, , , /etc} @key{RET} @@ -2874,12 +2664,11 @@ uid=0(root) gid=0(root) groups=0(root) @end example @ifset emacs -Since @value{emacsname} 23.2, @code{eshell} has also an own -implementation of the @code{su} and @code{sudo} commands. Both -commands change the default directory of the @file{*eshell*} buffer to -the value related to the user the command has switched to. This works -even on remote hosts, adding silently a corresponding entry to the -variable @code{tramp-default-proxies-alist} (@pxref{Multi-hops}): +@code{eshell} in @value{emacsname} 23.2 added custom @code{su} and +@code{sudo} commands that set the default directory correctly for the +@file{*eshell*} buffer. @value{tramp} silently updates +@code{tramp-default-proxies-alist} with an entry for this directory +(@pxref{Multi-hops}): @example @b{~ $} cd @trampfn{ssh, user, remotehost, /etc} @key{RET} @@ -2902,56 +2691,51 @@ uid=0(root) gid=0(root) groups=0(root) @cindex gdb @cindex perldb -@file{gud.el} offers a unified interface to several symbolic -debuggers +@file{gud.el} provides a unified interface to symbolic debuggers @ifset emacs @ifinfo (@ref{Debuggers, , , @value{emacsdir}}). @end ifinfo @end ifset -With @value{tramp}, it is possible to debug programs on -remote hosts. You can call @code{gdb} with a remote file name: +@value{tramp} can run debug on remote hosts by calling @code{gdb} +with a remote file name: @example @kbd{M-x gdb @key{RET}} @b{Run gdb (like this):} gdb --annotate=3 @trampfn{ssh, , host, ~/myprog} @key{RET} @end example -The file name can also be relative to a remote default directory. -Given you are in a buffer that belongs to the remote directory -@trampfn{ssh, , host, /home/user}, you could call +Relative file names are based on the remote default directory. When +@file{myprog.pl} exists in @file{@trampfn{ssh, , host, /home/user}}, +valid calls include: @example @kbd{M-x perldb @key{RET}} @b{Run perldb (like this):} perl -d myprog.pl @key{RET} @end example -It is not possible to use just the absolute local part of a remote -file name as program to debug, like @kbd{perl -d -/home/user/myprog.pl}, though. +Just the local part of a remote file name, such as @kbd{perl -d +/home/user/myprog.pl}, is not possible. -Arguments of the program to be debugged are taken literally. That -means, file names as arguments must be given as ordinary relative or -absolute file names, without any remote specification. +Arguments of the program to be debugged must be literal, can take +relative or absolute paths, but not remote paths. @subsection Running remote processes on Windows hosts @cindex winexe @cindex powershell -With the help of the @command{winexe} it is possible tu run processes -on a remote Windows host. @value{tramp} has implemented this for -@code{process-file} and @code{start-file-process}. +@command{winexe} runs processes on a remote Windows host, and +@value{tramp} can use it for @code{process-file} and +@code{start-file-process}. -The variable @code{tramp-smb-winexe-program} must contain the file -name of your local @command{winexe} command. On the remote host, -Powershell V2.0 must be installed; it is used to run the remote -process. +@code{tramp-smb-winexe-program} specifies the local @command{winexe} +command. Powershell V2.0 on the remote host is required to run +processes triggered from @value{tramp}. -In order to open a remote shell on the Windows host via @kbd{M-x -shell}, you must set the variables @option{explicit-shell-file-name} -and @option{explicit-*-args}. If you want, for example, run -@command{cmd}, you must set: +@option{explicit-shell-file-name} and @option{explicit-*-args} have to +be set properly so @kbd{M-x shell} can open a proper remote shell on a +Windows host. To open @command{cmd}, set it as follows: @lisp (setq explicit-shell-file-name "cmd" @@ -2959,7 +2743,7 @@ and @option{explicit-*-args}. If you want, for example, run @end lisp @noindent -In case of running @command{powershell} as remote shell, the settings are +To open @command{powershell} as a remote shell, use this: @lisp (setq explicit-shell-file-name "powershell" @@ -2971,34 +2755,32 @@ In case of running @command{powershell} as remote shell, the settings are @section Cleanup remote connections @cindex cleanup -Sometimes it is useful to cleanup remote connections. The following -commands support this. +@value{tramp} provides several ways to flush remote connections. @deffn Command tramp-cleanup-connection vec This command flushes all connection related objects. @option{vec} is -the internal representation of a remote connection. Called -interactively, the command offers all active remote connections in the -minibuffer as remote file name prefix like @file{@trampfn{method, -user, host, }}. The cleanup includes password cache (@pxref{Password -handling}), file cache, connection cache (@pxref{Connection caching}), -connection buffers. +the internal representation of a remote connection. When called +interactively, this command lists active remote connections in the +minibuffer. Each connection is of the format @file{@trampfn{method, +user, host, }}. Flushing remote connections also cleans the password +cache (@pxref{Password handling}), file cache, connection cache +(@pxref{Connection caching}), and connection buffers. @end deffn @deffn Command tramp-cleanup-this-connection -This command flushes all objects of the current buffer's remote -connection. The same objects are removed as in -@code{tramp-cleanup-connection}. +Flushes only the current buffer's remote connection objects, the same +as in @code{tramp-cleanup-connection}. @end deffn @deffn Command tramp-cleanup-all-connections -This command flushes objects for all active remote connections. The -same objects are removed as in @code{tramp-cleanup-connection}. +Flushes all active remote connection objects, the same as in +@code{tramp-cleanup-connection}. @end deffn @deffn Command tramp-cleanup-all-buffers -Like in @code{tramp-cleanup-all-connections}, all remote connections -are cleaned up. Additionally all buffers, which are related to a -remote connection, are killed. +Just as for @code{tramp-cleanup-all-connections}, all remote +connections are cleaned up in addition to killing buffers related to +that remote connection. @end deffn @@ -3006,60 +2788,62 @@ remote connection, are killed. @chapter Reporting Bugs and Problems @cindex bug reports -Bugs and problems with @value{tramp} are actively worked on by the -development team. Feature requests and suggestions are also more than -welcome. +@value{tramp}'s development team is actively engaged in solving bugs +and problems and looks to feature requests and suggestions. + +@value{tramp}'s mailing list is the place for more advice and +information on working with @value{tramp}, solving problems, +discussing, and general discussions about @value{tramp}. -The @value{tramp} mailing list is a great place to get information on -working with @value{tramp}, solving problems and general discussion -and advice on topics relating to the package. It is moderated so -non-subscribers can post but messages will be delayed, possibly up to -48 hours (or longer in case of holidays), until the moderator approves -your message. +@value{tramp}'s mailing list is moderated but even non-subscribers can +post for moderator approval. Sometimes this approval step may take as +long as 48 hours due to public holidays. -The mailing list is at @email{tramp-devel@@gnu.org}. Messages sent to -this address go to all the subscribers. This is @emph{not} the address -to send subscription requests to. +@email{tramp-devel@@gnu.org} is the mailing list. Messages sent to +this address go to all the subscribers. This is @emph{not} the +address to send subscription requests to. -Subscribing to the list is performed via -@uref{http://lists.gnu.org/mailman/listinfo/tramp-devel/, -the @value{tramp} Mail Subscription Page}. +To subscribe to the mailing list, visit: +@uref{http://lists.gnu.org/mailman/listinfo/tramp-devel/, the +@value{tramp} Mail Subscription Page}. @ifset emacs @ifset installchapter -Before sending a bug report, you could check whether @value{tramp} -works at all. Run the test suite on your local host, @ref{Testing}. +Before sending a bug report, run the test suite first @ref{Testing}. @end ifset @end ifset @findex tramp-bug -To report a bug in @value{tramp}, you should execute @kbd{M-x -tramp-bug}. This will automatically generate a buffer with the details -of your system and @value{tramp} version. - -When submitting a bug report, please try to describe in excruciating -detail the steps required to reproduce the problem, the setup of the -remote host and any special conditions that exist. You should also -check that your problem is not described already in @xref{Frequently +Check if the bug or problem is already addressed in @xref{Frequently Asked Questions}. -If you can identify a minimal test case that reproduces the problem, -include that with your bug report. This will make it much easier for -the development team to analyze and correct the problem. +Run @kbd{M-x tramp-bug} to generate a buffer with details of the +system along with the details of the @value{tramp} +installation. Please include these details with the bug report. + +The bug report must describe in as excruciating detail as possible the +steps required to reproduce the problem. These details must include +the setup of the remote host and any special or unique conditions that +exist. + +Include a minimal test case that reproduces the problem. This will +help the development team find the best solution and avoid unrelated +detours. -Sometimes, there might be also problems due to Tramp caches. Flush -all caches before running the test, @ref{Cleanup remote connections}. +To exclude cache-related problems, flush all caches before running the +test, @ref{Cleanup remote connections}. -Before reporting the bug, you should set the verbosity level to 6 -(@pxref{Traces and Profiles, Traces}) in the @file{~/.emacs} file and -repeat the bug. Then, include the contents of the @file{*tramp/foo*} -and @file{*debug tramp/foo*} buffers in your bug report. A verbosity -level greater than 6 will produce a very huge debug buffer, which is -mostly not necessary for the analysis. +When including @value{tramp}'s messages in the bug report, increase +the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the +@file{~/.emacs} file before repeating steps to the bug. Include the +contents of the @file{*tramp/foo*} and @file{*debug tramp/foo*} +buffers with the bug report. -Please be aware that, with a verbosity level of 6 or greater, the +@strong{Note} that a verbosity level greater than 6 is not necessary +at this stage. Also note that a verbosity level of 6 or greater, the contents of files and directories will be included in the debug -buffer. Passwords you've typed will never be included there. +buffer. Passwords typed in @value{tramp} will never be included +there. @node Frequently Asked Questions @@ -3069,15 +2853,15 @@ buffer. Passwords you've typed will never be included there. @itemize @bullet @item -Where can I get the latest @value{tramp}? +Where is the latest @value{tramp}? -@value{tramp} is available under the URL below. +@value{tramp} is available at the GNU URL: @noindent @uref{ftp://ftp.gnu.org/gnu/tramp/} @noindent -There is also a Savannah project page. +@value{tramp}'s GNU project page is located here: @noindent @uref{http://savannah.gnu.org/projects/tramp/} @@ -3086,38 +2870,39 @@ There is also a Savannah project page. @item Which systems does it work on? -The package has been used successfully on Emacs 22, Emacs 23, Emacs -24, XEmacs 21 (starting with 21.4), and SXEmacs 22. +The package works successfully on Emacs 22, Emacs 23, Emacs 24, Emacs +25, XEmacs 21 (starting with 21.4), and SXEmacs 22. -The package was intended to work on Unix, and it really expects a -Unix-like system on the remote end (except the @option{smb} method), -but some people seemed to have some success getting it to work on MS -Windows XP/Vista/7 @value{emacsname}. +While Unix and Unix-like systems are the primary remote targets, +@value{tramp} has equal success connecting to other platforms, such as +MS Windows XP/Vista/7. @item -How could I speed up @value{tramp}? +How to speed up @value{tramp}? -In the backstage, @value{tramp} needs a lot of operations on the -remote host. The time for transferring data from and to the remote -host as well as the time needed to perform the operations there count. -In order to speed up @value{tramp}, one could either try to avoid some -of the operations, or one could try to improve their performance. +@value{tramp} does many things in the background, some of which +depends on network speeds, response speeds of remote hosts, and +authentication delays. During these operations, @value{tramp}'s +responsiveness slows down. Some suggestions within the scope of +@value{tramp}'s settings include: -Use an external method, like @option{scp}. +Use an external method, such as @option{scp}, which are faster than +internal methods. -Use caching. This is already enabled by default. Information about -the remote host as well as the remote files are cached for reuse. The -information about remote hosts is kept in the file specified in -@code{tramp-persistency-file-name}. Keep this file. If you are -confident that files on remote hosts are not changed out of -@value{emacsname}' control, set @code{remote-file-name-inhibit-cache} -to @code{nil}. Set also @code{tramp-completion-reread-directory-timeout} -to @code{nil}, @ref{File name completion}. +Keep the file @code{tramp-persistency-file-name}, which is where +@value{tramp} caches remote information about hosts and files. Caching +is enabled by default. Don't disable it. -Disable version control. If you access remote files which are not -under version control, a lot of check operations can be avoided by -disabling VC@. This can be achieved by +Set @code{remote-file-name-inhibit-cache} to @code{nil} if remote +files are not independently updated outside @value{tramp}'s control. +That cache cleanup will be necessary if the remote directories or +files are updated independent of @value{tramp}. + +Set @code{tramp-completion-reread-directory-timeout} to @code{nil} to +speed up completions, @ref{File name completion}. + +Disable version control to avoid delays: @lisp (setq vc-ignore-dir-regexp @@ -3126,49 +2911,46 @@ disabling VC@. This can be achieved by tramp-file-name-regexp)) @end lisp -Disable excessive traces. The default trace level of @value{tramp}, -defined in the variable @code{tramp-verbose}, is 3. You should -increase this level only temporarily, hunting bugs. - +Disable excessive traces. Set @code{tramp-verbose} to 3 or lower, +default being 3. Increase trace levels temporarily when hunting for +bugs. @item @value{tramp} does not connect to the remote host -When @value{tramp} does not connect to the remote host, there are three -reasons heading the bug mailing list: +Three main reasons for why @value{tramp} does not connect to the remote host: @itemize @minus @item Unknown characters in the prompt -@value{tramp} needs to recognize the prompt on the remote host -after execution any command. This is not possible when the prompt -contains unknown characters like escape sequences for coloring. This -should be avoided on the remote side. @xref{Remote shell setup}. for -setting the regular expression detecting the prompt. +@value{tramp} needs a clean recognizable prompt on the remote host for +accurate parsing. Shell prompts that contain escape sequences for +coloring cause parsing problems. @ref{Remote shell setup} for +customizing prompt detection using regular expressions. -You can check your settings after an unsuccessful connection by -switching to the @value{tramp} connection buffer @file{*tramp/foo*}, -setting the cursor at the top of the buffer, and applying the expression +To check if the remote host's prompt is being recognized, use this +test: switch to @value{tramp} connection buffer @file{*tramp/foo*}, +put the cursor at the top of the buffer, and then apply the following +expression: @example @kbd{M-: (re-search-forward (concat tramp-shell-prompt-pattern "$"))} @end example -If it fails, or the cursor is not moved at the end of the buffer, your -prompt is not recognized correctly. +If the cursor has not moved to the prompt at the bottom of the buffer, +then @value{tramp} has failed to recognize the prompt. -A special problem is the zsh shell, which uses left-hand side and -right-hand side prompts in parallel. Therefore, it is necessary to -disable the zsh line editor on the remote host. You shall add to -@file{~/.zshrc} the following command: +When using zsh on remote hosts, disable zsh line editor because zsh +uses left-hand side and right-hand side prompts in parallel. Add the +following line to @file{~/.zshrc}: @example [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' @end example -Similar fancy prompt settings are known from the fish shell. Here you -must add in @file{~/.config/fish/config.fish}: +When using fish shell on remote hosts, disable fancy formatting by +adding the following to @file{~/.config/fish/config.fish}: @example function fish_prompt @@ -3180,35 +2962,30 @@ function fish_prompt end @end example -Furthermore it has been reported, that @value{tramp} (like sshfs, -incidentally) doesn't work with WinSSHD due to strange prompt settings. +When using WinSSHD on remote hosts, @value{tramp} do not recognize the +strange prompt settings. @item Echoed characters after login -When the remote host opens an echoing shell, there might be control -characters in the welcome message. @value{tramp} tries to suppress -such echoes via the @command{stty -echo} command, but sometimes this -command is not reached, because the echoed output has confused -@value{tramp} already. In such situations it might be helpful to use -the @option{sshx} or @option{scpx} methods, which allocate a pseudo tty. -@xref{Inline methods}. +@value{tramp} suppresses echos from remote hosts with the +@command{stty -echo} command. But sometimes it is too late to suppress +welcome messages from the remote host containing harmful control +characters. Using @option{sshx} or @option{scpx} methods can avoid +this problem because they allocate a pseudo tty. @xref{Inline +methods}. @item -@value{tramp} doesn't transfer strings with more than 500 characters -correctly - -On some few systems, the implementation of @code{process-send-string} -seems to be broken for longer strings. It is reported for HP-UX, -FreeBSD and Tru64 Unix, for example. This case, you should customize -the variable @code{tramp-chunksize} to 500. For a description how to -determine whether this is necessary see the documentation of -@code{tramp-chunksize}. - -Additionally, it will be useful to set @code{file-precious-flag} to -@code{t} for @value{tramp} files. Then the file contents will be -written into a temporary file first, which is checked for correct -checksum. +@value{tramp} stops transferring strings longer than 500 characters + +Set @code{tramp-chunksize} to 500 to get around this problem, which is +related to faulty implementation of @code{process-send-string} on +HP-UX, FreeBSD and Tru64 Unix systems. Consult the documentation for +@code{tramp-chunksize} to see when this is necessary. + +Set @code{file-precious-flag} to @code{t} for files accessed by +@value{tramp} so the file contents are checked using checksum by +first saving to a temporary file. @ifinfo @pxref{Saving Buffers, , , elisp} @end ifinfo @@ -3224,17 +3001,12 @@ checksum. @item -@value{tramp} does not recognize hung @command{ssh} sessions - -When your network connection is down, @command{ssh} sessions might -hang. @value{tramp} cannot detect it safely, because it still sees a -running @command{ssh} process. Timeouts cannot be used as well, -because it cannot be predicted how long a remote command will last, -for example when copying very large files. +@value{tramp} does not recognize if a @command{ssh} session hangs -Therefore, you must configure the @command{ssh} process to die -in such a case. The following entry in @file{~/.ssh/config} would do -the job: +@command{ssh} sessions on the local host hang when the network is +down. @value{tramp} cannot safely detect such hangs. The network +configuration for @command{ssh} can be configured to kill such hangs +with the following command in the @file{~/.ssh/config}: @example Host * @@ -3243,25 +3015,17 @@ Host * @item -@value{tramp} does not use my @command{ssh} @code{ControlPath} +@value{tramp} does not use default @command{ssh} @code{ControlPath} -Your @code{ControlPath} setting will be overwritten by @command{ssh} -sessions initiated by @value{tramp}. This is because a master -session, initiated outside @value{emacsname}, could be closed, which -would stall all other @command{ssh} sessions for that host inside -@value{emacsname}. - -Consequently, if you connect to a remote host via @value{tramp}, you -might be prompted for a password again, even if you have established -already an @command{ssh} connection to that host. Further -@value{tramp} connections to that host, for example in order to run a -process on that host, will reuse that initial @command{ssh} -connection. +@value{tramp} overwrites @code{ControlPath} settings when initiating +@command{ssh} sessions. @value{tramp} does this to fend off a stall +if a master session opened outside the @value{emacsname} session is no +longer open. That is why @value{tramp} prompts for the password again +even if there is an @command{ssh} already open. -If your @command{ssh} version supports the @code{ControlPersist} -option, you could customize the variable -@code{tramp-ssh-controlmaster-options} to use your @code{ControlPath}, -for example: +Some @command{ssh} versions support a @code{ControlPersist} option, +which allows to set the @code{ControlPath} provided the variable +@code{tramp-ssh-controlmaster-options} is customized as follows: @lisp (setq tramp-ssh-controlmaster-options @@ -3270,11 +3034,12 @@ for example: "-o ControlMaster=auto -o ControlPersist=yes")) @end lisp -Note, that "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and -"%%p", respectively. +Note how "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and +"%%p". -These settings can be suppressed, if they are configured properly in -your @file{~/.ssh/config}: +If the @file{~/.ssh/config} is configured appropriately for the above +behavior, then any changes to @command{ssh} can be suppressed with +this @code{nil} setting: @lisp (setq tramp-use-ssh-controlmaster-options nil) @@ -3284,44 +3049,40 @@ your @file{~/.ssh/config}: @item File name completion does not work with @value{tramp} -When you log in to the remote host, do you see the output of -@command{ls} in color? If so, this may be the cause of your problems. - -@command{ls} outputs @acronym{ANSI} escape sequences that your terminal -emulator interprets to set the colors. These escape sequences will -confuse @value{tramp} however. - -In your @file{.bashrc}, @file{.profile} or equivalent on the remote -host you probably have an alias configured that adds the option -@option{--color=yes} or @option{--color=auto}. +@acronym{ANSI} escape sequences from the remote shell may cause errors +in @value{tramp}'s parsing of remote buffers. -You should remove that alias and ensure that a new login @emph{does not} -display the output of @command{ls} in color. If you still cannot use -file name completion, report a bug to the @value{tramp} developers. +To test if this is the case, open a remote shell and check if the output +of @command{ls} is in color. +To disable @acronym{ANSI} escape sequences from the remote hosts, +disable @option{--color=yes} or @option{--color=auto} in the remote +host's @file{.bashrc} or @file{.profile}. Turn this alias on and off +to see if file name completion works. @item -File name completion does not work in large directories +File name completion does not work in directories with large number of +files -@value{tramp} uses globbing for some operations. (Globbing means to use the -shell to expand wildcards such as @samp{*.c}.) This might create long -command lines, especially in directories with many files. Some shells -choke on long command lines, or don't cope well with the globbing -itself. +This may be related to globbing, which is the use of shell's ability +to expand wild card specifications, such as @samp{*.c}. For +directories with large number of files, globbing might exceed the +shell's limit on length of command lines and hang. @value{tramp} uses +globbing. -If you have a large directory on the remote end, you may wish to execute -a command like @samp{ls -d * ..?* > /dev/null} and see if it hangs. -Note that you must first start the right shell, which might be -@command{/bin/sh}, @command{ksh} or @command{bash}, depending on which -of those supports tilde expansion. +To test if globbing hangs, open a shell on the remote host and then +run @samp{ls -d * ..?* > /dev/null}. + +When testing, ensure the remote shell is the same shell +(@command{/bin/sh}, @command{ksh} or @command{bash}), that +@value{tramp} uses when connecting to that host. @item -How can I get notified when @value{tramp} file transfers are complete? +How to get notified after @value{tramp} completes file transfers? -The following snippet can be put in your @file{~/.emacs} file. It -makes @value{emacsname} beep after reading from or writing to the -remote host. +Make @value{emacsname} beep after reading from or writing to the +remote host with the following code in @file{~/.emacs} file. @lisp (defadvice tramp-handle-write-region @@ -3346,12 +3107,11 @@ remote host. @ifset emacs @item -I'ld like to get a Visual Warning when working in a sudo:ed context +How to get a Visual Warning when working with @samp{root} privileges -When you are working with @samp{root} privileges, it might be useful -to get an indication in the buffer's modeline. The following code, -tested with @value{emacsname} 22.1, does the job. You should put it -into your @file{~/.emacs}: +Get a modeline indication when working with @samp{root} privileges +with the following code (tested with @value{emacsname} 22.1) in +@file{~/.emacs} file: @lisp (defun my-mode-line-function () @@ -3367,10 +3127,10 @@ into your @file{~/.emacs}: @ifset emacs @item -I'ld like to see a host indication in the mode line when I'm remote +How to get host indication in the mode line? -The following code has been tested with @value{emacsname} 22.1. You -should put it into your @file{~/.emacs}: +The following code (tested with @value{emacsname} 22.1) in +@file{~/.emacs} file shows it: @lisp (defconst my-mode-line-buffer-identification @@ -3398,11 +3158,11 @@ should put it into your @file{~/.emacs}: my-mode-line-buffer-identification))) @end lisp -Since @value{emacsname} 23.1, the mode line contains an indication if -@code{default-directory} for the current buffer is on a remote host. -The corresponding tooltip includes the name of that host. If you -still want the host name as part of the mode line, you can use the -example above, but the @code{:eval} clause can be simplified: +The mode line in @value{emacsname} 23.1 and later versions now +contains an indication if @code{default-directory} for the current +buffer is on a remote host. Moreover, the corresponding tool-tip +shows the remote host name. The above @code{:eval} clause can also be +simplified to show the host name in the mode line: @lisp '(:eval @@ -3418,12 +3178,11 @@ example above, but the @code{:eval} clause can be simplified: @ifset emacs @item -My remote host does not understand default directory listing options +Remote host does not understand default options for directory listing -@value{emacsname} computes the @command{dired} options depending on -the local host you are working. If your @command{ls} command on the -remote host does not understand those options, you can change them -like this: +@value{emacsname} computes the @command{dired} options based on the +local host but if the remote host cannot understand the same +@command{ls} command, then set them with a hook as follows: @lisp (add-hook @@ -3436,13 +3195,12 @@ like this: @item -There's this @file{~/.sh_history} file on the remote host which keeps -growing and growing. What's that? +Why is @file{~/.sh_history} file on the remote host growing? -Sometimes, @value{tramp} starts @command{ksh} on the remote host for -tilde expansion. Maybe @command{ksh} saves the history by default. -@value{tramp} tries to turn off saving the history, but maybe you have -to help. For example, you could put this in your @file{.kshrc}: +Due to @command{ksh} saving tilde expansions triggered by +@value{tramp}, the history file is probably growing rapidly. To fix, +turn off saving history by putting this shell code in the +@file{.kshrc} file: @example if [ -f $HOME/.sh_history ] ; then @@ -3456,23 +3214,24 @@ if [ "$@{HISTSIZE-unset@}" != "unset" ] ; then fi @end example -Furthermore, if you use an @option{ssh}-based method, you could add -the following line to your @file{~/.ssh/environment} file: +For @option{ssh}-based method, add the following line to your +@file{~/.ssh/environment} file: @example HISTFILE=/dev/null @end example -@item There are longish file names to type. How to shorten this? +@item +How to shorten long file names when typing in @value{tramp}? -Let's say you need regularly access to @file{@trampfn{ssh, news, -news.my.domain, /opt/news/etc}}, which is boring to type again and -again. The following approaches can be mixed: +Adapt several of these approaches to reduce typing. If the full name +is @file{@trampfn{ssh, news, news.my.domain, /opt/news/etc}}, then: @enumerate -@item Use default values for method and user name: +@item +Use default values for method name and user name: You can define default methods and user names for hosts, (@pxref{Default Method}, @pxref{Default User}): @@ -3482,18 +3241,18 @@ You can define default methods and user names for hosts, tramp-default-user "news") @end lisp -The file name left to type would be -@kbd{C-x C-f @trampfn{, , news.my.domain, /opt/news/etc}}. +The reduced typing: @kbd{C-x C-f @trampfn{, , news.my.domain, /opt/news/etc}}. -Note that there are some useful settings already. Accessing your -local host as @samp{root} user, is possible just by @kbd{C-x C-f +@strong{Note} that there are some useful shortcuts already. Accessing +your local host as @samp{root} user, is possible just by @kbd{C-x C-f @trampfn{su, , ,}}. -@item Use configuration possibilities of your method: +@item +Use configuration options of the access method: -Several connection methods (i.e., the programs used) offer powerful -configuration possibilities (@pxref{Customizing Completion}). In the -given case, this could be @file{~/.ssh/config}: +Programs used for access methods already offer powerful configurations +(@pxref{Customizing Completion}). For @option{ssh}, configure the +file @file{~/.ssh/config}: @example Host xy @@ -3501,30 +3260,32 @@ Host xy User news @end example -The file name left to type would be @kbd{C-x C-f @trampfn{ssh, , xy, -/opt/news/etc}}. Depending on files in your directories, it is even -possible to complete the host name with @kbd{C-x C-f +The reduced typing: @kbd{C-x C-f @trampfn{ssh, , xy, /opt/news/etc}}. + +Depending on the number of files in the directories, host names +completion can further reduce key strokes: @kbd{C-x C-f @value{prefix}ssh@value{postfixhop}x @key{TAB}}. -@item Use environment variables: +@item +Use environment variables to expand long strings -File names typed in the minibuffer can be expanded by environment -variables. You can set them outside @value{emacsname}, or even with -Lisp: +For long file names, set up environment variables that are expanded in +the minibuffer. Environment variables are set either outside +@value{emacsname} or inside @value{emacsname} with Lisp: @lisp (setenv "xy" "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}") @end lisp -Then you need simply to type @kbd{C-x C-f $xy @key{RET}}, and here you -are. The disadvantage is that you cannot edit the file name, because +The reduced typing: @kbd{C-x C-f $xy @key{RET}}. + +@strong{Note} that file name cannot be edited here because the environment variables are not expanded during editing in the minibuffer. @item Define own keys: -You can define your own key sequences in @value{emacsname}, which can -be used instead of @kbd{C-x C-f}: +Redefine another key sequence in @value{emacsname} for @kbd{C-x C-f}: @lisp (global-set-key @@ -3537,16 +3298,16 @@ be used instead of @kbd{C-x C-f}: "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")))) @end lisp -Simply typing @kbd{C-x C-y} would initialize the minibuffer for -editing with your beloved file name. +Simply typing @kbd{C-x C-y} would prepare minibuffer editing of file +name. -See also @uref{http://www.emacswiki.org/cgi-bin/wiki/TrampMode, the -Emacs Wiki} for a more comprehensive example. +See @uref{http://www.emacswiki.org/cgi-bin/wiki/TrampMode, the Emacs +Wiki} for a more comprehensive example. -@item Define own abbreviation (1): +@item +Define own abbreviation (1): -It is possible to define an own abbreviation list for expanding file -names: +Abbreviation list expansion can be used to reduce typing long file names: @lisp (add-to-list @@ -3554,13 +3315,16 @@ names: '("^/xy" . "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) @end lisp -This shortens the file opening command to @kbd{C-x C-f /xy -@key{RET}}. The disadvantage is, again, that you cannot edit the file -name, because the expansion happens after entering the file name only. +The reduced typing: @kbd{C-x C-f /xy @key{RET}}. + +@strong{Note} that file name cannot be edited here because the +environment variables are not expanded during editing in the +minibuffer. -@item Define own abbreviation (2): +@item +Define own abbreviation (2): -The @code{abbrev-mode} gives more flexibility for editing the +The @code{abbrev-mode} gives additional flexibility for editing in the minibuffer: @lisp @@ -3583,18 +3347,18 @@ minibuffer: (expand-abbrev)) @end lisp -After entering @kbd{C-x C-f xy @key{TAB}}, the minibuffer is -expanded, and you can continue editing. +The reduced typing: @kbd{C-x C-f xy @key{TAB}}. + +The minibuffer expands for further editing. @item Use bookmarks: -Bookmarks can be used to visit Tramp files or directories. +Use bookmarks to save Tramp file names. @ifinfo -@pxref{Bookmarks, , , @value{emacsdir}} +@pxref{Bookmarks, , , @value{emacsdir}}. @end ifinfo -When you have opened @file{@trampfn{ssh, news, news.my.domain, -/opt/news/etc/}}, you should save the bookmark via +Upon visiting a location with @value{tramp}, save it as a bookmark with @ifset emacs @kbd{@key{menu-bar} @key{edit} @key{bookmarks} @key{set}}. @end ifset @@ -3602,7 +3366,7 @@ When you have opened @file{@trampfn{ssh, news, news.my.domain, @kbd{@key{menu-bar} @key{view} @key{bookmarks} @key{set}}. @end ifset -Later on, you can always navigate to that bookmark via +To revisit that bookmark: @ifset emacs @kbd{@key{menu-bar} @key{edit} @key{bookmarks} @key{jump}}. @end ifset @@ -3621,15 +3385,15 @@ Later on, you can always navigate to that bookmark via remembers visited places. @ifinfo @ifset emacs -@pxref{File Conveniences, , , @value{emacsdir}} +@pxref{File Conveniences, , , @value{emacsdir}}. @end ifset @ifset xemacs -@pxref{recent-files, , , edit-utils} +@pxref{recent-files, , , edit-utils}. @end ifset @end ifinfo -You could keep remote file names in the recent list without checking -their readability through a remote access: +Keep remote file names in the recent list without have to check for +their accessibility through remote access: @lisp @ifset emacs @@ -3646,7 +3410,7 @@ their readability through a remote access: @end ifset @end lisp -The list of files opened recently is reachable via +Reaching recently opened files: @ifset emacs @kbd{@key{menu-bar} @key{file} @key{Open Recent}}. @end ifset @@ -3657,8 +3421,8 @@ The list of files opened recently is reachable via @ifset emacs @item Use filecache: -@file{filecache} remembers visited places. Add the directory into -the cache: +Since @file{filecache} remembers visited places, add the remote +directory to the cache: @lisp (eval-after-load "filecache" @@ -3666,30 +3430,28 @@ the cache: "@trampfn{ssh, news, news.my.domain, /opt/news/etc/}")) @end lisp -Whenever you want to load a file, you can enter @kbd{C-x C-f -C-@key{TAB}} in the minibuffer. The completion is done for the given -directory. +Then use directory completion in the minibuffer with @kbd{C-x C-f +C-@key{TAB}}. @end ifset @ifset emacs @item Use bbdb: @file{bbdb} has a built-in feature for @value{ftppackagename} files, -which works also for @value{tramp}. +which also works for @value{tramp} file names. @ifinfo -@pxref{bbdb-ftp, Storing FTP sites in the BBDB, , bbdb} +@pxref{bbdb-ftp, Storing FTP sites in the BBDB, , bbdb}. @end ifinfo -You need to load @file{bbdb}: +Load @file{bbdb} in @value{emacs}: @lisp (require 'bbdb) (bbdb-initialize) @end lisp -Then you can create a BBDB entry via @kbd{M-x bbdb-create-ftp-site}. -Because BBDB is not prepared for @value{tramp} syntax, you must -specify a method together with the user name when needed. Example: +Create a BBDB entry with @kbd{M-x bbdb-create-ftp-site}. Then specify +a method and user name where needed. Examples: @example @kbd{M-x bbdb-create-ftp-site @key{RET}} @@ -3700,45 +3462,42 @@ specify a method together with the user name when needed. Example: @b{Additional Comments:} @key{RET} @end example -When you have opened your BBDB buffer, you can access such an entry by -pressing the key @key{F}. +In BBDB buffer, access an entry by pressing the key @key{F}. @end ifset @end enumerate -I would like to thank all @value{tramp} users who have contributed to -the different recipes! +Thanks to @value{tramp} users for contributing to these recipes. +@item +Why saved multi-hop file names do not work in a new @value{emacsname} +session? -@item I have saved @value{tramp} file names as indicated. But it -doesn't work in a new @value{emacsname} session! - -If you have saved an ad-hoc multi-hop @value{tramp} file name -(@pxref{Ad-hoc multi-hops}) via bookmarks, recent files, +When saving ad-hoc multi-hop @value{tramp} file names (@pxref{Ad-hoc +multi-hops}) via bookmarks, recent files, @ifset emacs filecache, bbdb, @end ifset -or another package, you must use the full ad-hoc file name including -all hops, like @file{@trampfn{ssh, bird, +or another package, use the full ad-hoc file name including all hops, +like @file{@trampfn{ssh, bird, bastion|ssh@value{postfixhop}news.my.domain, /opt/news/etc}}. -Alternatively, if you save only the abbreviated multi-hop file name +Alternatively, when saving abbreviated multi-hop file names @file{@trampfn{ssh, news, news.my.domain, /opt/news/etc}}, the custom -option @code{tramp-save-ad-hoc-proxies} must be set to a to a -non-@code{nil} value. +option @code{tramp-save-ad-hoc-proxies} must be set non-@code{nil} +value. @ifset emacs @item -How can I use @value{tramp} to connect to a remote @value{emacsname} -session? +How to connect to a remote @value{emacsname} session using @value{tramp}? -You can configure Emacs Client doing this. +Configure Emacs Client @ifinfo -@xref{Emacs Server, , , @value{emacsdir}}. +(@pxref{Emacs Server, , , @value{emacsdir}}). @end ifinfo -On the remote host, you start the Emacs Server: +Then on the remote host, start the Emacs Server: @lisp (require 'server) @@ -3747,29 +3506,31 @@ On the remote host, you start the Emacs Server: (server-start) @end lisp -Make sure that the result of @code{(system-name)} can be resolved on -your local host; otherwise you might use a hard coded IP address. +If @code{(system-name)} of the remote host cannot be resolved on the +local host, use IP address instead. + +Copy from the remote host the resulting file +@file{~/.emacs.d/server/server} to the local host, to the same +location. -The resulting file @file{~/.emacs.d/server/server} must be copied to -your local host, at the same location. You can call then the Emacs -Client from the command line: +Then start Emacs Client from the command line: @example emacsclient @trampfn{ssh, user, host, /file/to/edit} @end example -@code{user} and @code{host} shall be related to your local host. +@code{user} and @code{host} refer to the local host. -If you want to use Emacs Client also as editor for other programs, you -could write a script @file{emacsclient.sh}: +To make Emacs Client an editor for other programs, use a wrapper +script @file{emacsclient.sh}: @example #!/bin/sh emacsclient @trampfn{ssh, $(whoami), $(hostname --fqdn), $1} @end example -Then you must set the environment variable @env{EDITOR} pointing to -that script: +Then change the environment variable @env{EDITOR} to point to the +wrapper script: @example export EDITOR=/path/to/emacsclient.sh @@ -3778,18 +3539,18 @@ export EDITOR=/path/to/emacsclient.sh @item -There are packages which call @value{tramp} although I haven't entered -a remote file name ever. I dislike it, how could I disable it? +How to disable other packages from calling @value{tramp}? -In general, @value{tramp} functions are used only when -you apply remote file name syntax. However, some packages enable -@value{tramp} on their own. +There are packages that call @value{tramp} without the user ever +entering a remote file name. Even without applying a remote file +syntax, some packages enable @value{tramp} on their own. How can users +disable such features. @itemize @minus @item @file{ido.el} -You could disable @value{tramp} file name completion: +Disable @value{tramp} file name completion: @lisp (custom-set-variables @@ -3799,7 +3560,7 @@ You could disable @value{tramp} file name completion: @item @file{rlogin.el} -You could disable remote directory tracking mode: +Disable remote directory tracking mode: @lisp (rlogin-directory-tracking-mode -1) @@ -3808,15 +3569,13 @@ You could disable remote directory tracking mode: @item -How can I disable @value{tramp} at all? - -Shame on you, why did you read until now? +How to disable @value{tramp}? @itemize @minus @ifset emacs @item -If you just want to have @value{ftppackagename} as default remote -files access package, you should apply the following code: +To keep @value{ftppackagename} as default the remote files access +package, set this in @file{.emacs}: @lisp (setq tramp-default-method "ftp") @@ -3824,24 +3583,23 @@ files access package, you should apply the following code: @end ifset @item -In order to disable +To disable both @ifset emacs @value{tramp} (and @value{ftppackagename}), @end ifset @ifset xemacs @value{tramp}, @end ifset -you must set @code{tramp-mode} to @code{nil}: +set @code{tramp-mode} to @code{nil} in @file{.emacs}. @lisp (setq tramp-mode nil) @end lisp @item -Unloading @value{tramp} can be achieved by applying @kbd{M-x -tramp-unload-tramp}. +To unload @value{tramp}, type @kbd{M-x tramp-unload-tramp}. @ifset emacs -This resets also the @value{ftppackagename} plugins. +Unloading @value{tramp} resets @value{ftppackagename} plugins also. @end ifset @end itemize @end itemize @@ -3852,48 +3610,44 @@ This resets also the @value{ftppackagename} plugins. @chapter How file names, directories and localnames are mangled and managed. @menu -* Localname deconstruction:: Breaking a localname into its components. +* Localname deconstruction:: Splitting a localname into its component parts. @ifset emacs -* External packages:: Integration with external Lisp packages. +* External packages:: Integrating with external Lisp packages. @end ifset @end menu @node Localname deconstruction -@section Breaking a localname into its components - -@value{tramp} file names are somewhat different, obviously, to ordinary file -names. As such, the lisp functions @code{file-name-directory} and -@code{file-name-nondirectory} are overridden within the @value{tramp} -package. +@section Splitting a localname into its component parts -Their replacements are reasonably simplistic in their approach. They -dissect the file name, call the original handler on the localname and -then rebuild the @value{tramp} file name with the result. +@value{tramp} package redefines lisp functions +@code{file-name-directory} and @code{file-name-nondirectory} to +accommodate the unique file naming syntax that @value{tramp} requires. -This allows the platform specific hacks in the original handlers to take -effect while preserving the @value{tramp} file name information. +The replacements dissect the file name, use the original handler for +the localname, take that result, and then re-build the @value{tramp} +file name. By relying on the original handlers for localnames, +@value{tramp} benefits from platform specific hacks to the original +handlers. @ifset emacs @node External packages -@section Integration with external Lisp packages +@section Integrating with external Lisp packages @subsection File name completion. -While reading file names in the minibuffer, @value{tramp} must decide -whether it completes possible incomplete file names, or not. Imagine -there is the following situation: You have typed @kbd{C-x C-f -@value{prefix}ssh@value{postfixhop} @key{TAB}}. @value{tramp} cannot -know, whether @option{ssh} is a method or a host name. It checks -therefore the last input character you have typed. If this is -@key{TAB}, @key{SPACE} or @kbd{?}, @value{tramp} assumes that you are -still in file name completion, and it does not connect to the possible -remote host @option{ssh}. - -External packages, which use other characters for completing file names -in the minibuffer, must signal this to @value{tramp}. For this case, -the variable @code{non-essential} can be bound temporarily to -a non-@code{nil} value. +For name completions in the minibuffer, @value{tramp} depends on the +last input character to decide whether to look for method name +completion or host name completion. For example, @kbd{C-x C-f +@value{prefix}ssh@value{postfixhop} @key{TAB}} is not entirely clear +if @option{ssh} is a method or a host name. But if the last input +character was either @key{TAB}, @key{SPACE} or @kbd{?}, then +@value{tramp} favors file name completion over host name completion. + +What about external packages using other characters to trigger file +name completions? They must somehow signal this to @value{tramp}. Use +the variable @code{non-essential} temporarily and bind it to +non-@code{nil} value. @lisp (let ((non-essential t)) @@ -3903,27 +3657,27 @@ a non-@code{nil} value. @subsection File attributes cache. -When @value{tramp} runs remote processes, files on the remote host -could change their attributes. Consequently, @value{tramp} must flush -its complete cache keeping attributes for all files of the remote host -it has seen so far. +Keeping a local cache of remote file attributes in sync with the +remote host is a time-consuming operation. Flushing and re-querying +these attributes can tax @value{tramp} to a grinding halt on busy +remote servers. -This is a performance degradation, because the lost file attributes -must be recomputed when needed again. In cases where the caller of -@code{process-file} knows that there are no file attribute changes, it -should let-bind the variable @code{process-file-side-effects} to -@code{nil}. Then @value{tramp} won't flush the file attributes cache. +To get around these types of slow-downs in @value{tramp}'s +responsiveness, set the @code{process-file-side-effects} to @code{nil} +to stop @value{tramp} from flushing the cache. This is helpful in +situations where callers to @code{process-file} know there are no file +attribute changes. The let-bind form to accomplish this: @lisp (let (process-file-side-effects) @dots{}) @end lisp -For asynchronous processes, @value{tramp} flushes the file attributes -cache via a process sentinel. If the caller of -@code{start-file-process} knows that there are no file attribute -changes, it should set the process sentinel to the default. In cases -where the caller defines its own process sentinel, @value{tramp}'s process +For asynchronous processes, @value{tramp} uses a process sentinel to +flush file attributes cache. When callers to @code{start-file-process} +know beforehand no file attribute changes are expected, then the +process sentinel should be set to the default state. In cases where +the caller defines its own process sentinel, @value{tramp}'s process sentinel is overwritten. The caller can still flush the file attributes cache in its process sentinel with this code: @@ -3932,21 +3686,18 @@ attributes cache in its process sentinel with this code: (dired-uncache remote-directory)) @end lisp -@code{remote-directory} shall be the root directory, where file -attribute changes can happen during the process lifetime. -@value{tramp} traverses all subdirectories, starting at this -directory. Often, it is sufficient to use @code{default-directory} of -the process buffer as root directory. +Since @value{tramp} traverses subdirectories starting with the +root-directory, it is most likely sufficient to make the +@code{default-directory} of the process buffer as the root directory. @end ifset @node Traces and Profiles @chapter How to Customize Traces -All @value{tramp} messages are raised with a verbosity level. The -verbosity level can be any number between 0 and 10. Only messages with -a verbosity level less than or equal to @code{tramp-verbose} are -displayed. +@value{tramp} messages are raised with verbosity levels ranging from 0 +to 10. @value{tramp} does not display all messages; only those with a +verbosity level less than or equal to @code{tramp-verbose}. The verbosity levels are @@ -3962,11 +3713,10 @@ The verbosity levels are @*@indent @w{ 9} test commands @*@indent @w{10} traces (huge) -When @code{tramp-verbose} is greater than or equal to 4, the messages -are also written into a @value{tramp} debug buffer. This debug buffer -is useful for analyzing problems; sending a @value{tramp} bug report -should be done with @code{tramp-verbose} set to a verbosity level of at -least 6 (@pxref{Bug Reports}). +With @code{tramp-verbose} greater than or equal to 4, messages are +also written to a @value{tramp} debug buffer. Such debug buffers are +essential to bug and problem analyses. For @value{tramp} bug reports, +set the @code{tramp-verbose} level to 6 (@pxref{Bug Reports}). The debug buffer is in @ifinfo @@ -3975,25 +3725,23 @@ The debug buffer is in @ifnotinfo Outline Mode. @end ifnotinfo -That means, you can change the level of messages to be viewed. If you -want, for example, see only messages up to verbosity level 5, you must -enter @kbd{C-u 6 C-c C-q}. +In this buffer, messages can be filtered by their level. To see +messages up to verbosity level 5, enter @kbd{C-u 6 C-c C-q}. @ifinfo -Other keys for navigating are described in +Other navigation keys are described in @ref{Outline Visibility, , , @value{emacsdir}}. @end ifinfo -@value{tramp} errors are handled internally in order to raise the -verbosity level 1 messages. When you want to get a Lisp backtrace in -case of an error, you need to set both +@value{tramp} handles errors internally. But to get a Lisp backtrace, +both the error and the signal have to be set as follows: @lisp (setq debug-on-error t debug-on-signal t) @end lisp -Sometimes, it might be even necessary to step through @value{tramp} -function call traces. Such traces are enabled by the following code: +To enable stepping through @value{tramp} function call traces, they +have to be specifically enabled as shown in this code: @lisp (require 'trace) @@ -4003,11 +3751,10 @@ function call traces. Such traces are enabled by the following code: (untrace-function 'tramp-gw-basic-authentication) @end lisp -The function call traces are inserted in the buffer -@file{*trace-output*}. @code{tramp-read-passwd} and -@code{tramp-gw-basic-authentication} shall be disabled when the -function call traces are added to @value{tramp}, because both -functions return password strings, which should not be distributed. +The buffer @file{*trace-output*} contains the output from the function +call traces. Disable @code{tramp-read-passwd} and +@code{tramp-gw-basic-authentication} to stop password strings from +being written to @file{*trace-output*}. @node Issues @@ -4016,52 +3763,49 @@ functions return password strings, which should not be distributed. @itemize @bullet @item The uuencode method does not always work. -Due to the design of @value{tramp}, the encoding and decoding programs -need to read from stdin and write to stdout. On some systems, -@command{uudecode -o -} will read stdin and write the decoded file to -stdout, on other systems @command{uudecode -p} does the same thing. -But some systems have uudecode implementations which cannot do this at -all---it is not possible to call these uudecode implementations with -suitable parameters so that they write to stdout. +@command{uudecode} on some systems cannot write to stdout, but +@value{tramp} depends on encoding and decoding programs to be able to +read from stdin and write to stdout. -Of course, this could be circumvented: the @code{begin foo 644} line -could be rewritten to put in some temporary file name, then -@command{uudecode} could be called, then the temp file could be -printed and deleted. +We can find ways to circumvent @command{uudecode}'s ability to write +to stdout, such as writing to a temporary file and then piping that to +stdout. -But I have decided that this is too fragile to reliably work, so on some -systems you'll have to do without the uuencode methods. +But I have decided not to implement workarounds as they are too +fragile to work reliably. Some on systems, @value{tramp} will not have +uuencode method. @item The @value{tramp} file name syntax differs between Emacs and XEmacs. The Emacs maintainers wish to use a unified file name syntax for -Ange-FTP and @value{tramp} so that users don't have to learn a new -syntax. It is sufficient to learn some extensions to the old syntax. +Ange-FTP and @value{tramp} so that users don't have to learn yet +another syntax though it is okay to learn new extensions. -For the XEmacs maintainers, the problems caused from using a unified -file name syntax are greater than the gains. The XEmacs package system -uses EFS for downloading new packages. So, obviously, EFS has to be -installed from the start. If the file names were unified, @value{tramp} -would have to be installed from the start, too. +For the XEmacs maintainers, the disruption from a unified file name +syntax are not worth the gains. Firstly, the XEmacs package system +relies on EFS for downloading new packages and therefore is already +installed. On the other hand, @value{tramp} is not installed by +default in XEmacs. Unifying will require @value{tramp} installed from +the start. @ifset xemacs -@strong{Note:} If you'd like to use a similar syntax like -@value{ftppackagename}, you need the following settings in your init -file: +@strong{Note:} To make the syntax similar to @value{ftppackagename}, +make this change to the init file: @lisp (setq tramp-unified-filenames t) (require 'tramp) @end lisp -The autoload of the @value{emacsname} @value{tramp} package must be -disabled. This can be achieved by setting file permissions @code{000} -to the files @file{@dots{}/xemacs-packages/lisp/tramp/auto-autoloads.el*}. +To disable auto loading @value{emacsname} @value{tramp} package, set +file permissions of +@file{@dots{}/xemacs-packages/lisp/tramp/auto-autoloads.el*} to +@code{000}. -In case of unified file names, all @value{emacsname} download sites are -added to @code{tramp-default-method-alist} with default method -@option{ftp} @xref{Default Method}. These settings shouldn't be -touched for proper working of the @value{emacsname} package system. +When using unified file names, @value{emacsname} download sites are +added to @code{tramp-default-method-alist} with default method of +@option{ftp} @xref{Default Method} for proper working of the +@value{emacsname} package system. The syntax for unified file names is described in the @value{tramp} manual for @value{emacsothername}. commit 6e5df6c901bd79680f901af6ba7b96e664094ef9 Author: Lars Ingebrigtsen Date: Tue Dec 29 14:46:40 2015 +0100 Mention that tls.el is secure by default, and will fail diff --git a/etc/NEWS b/etc/NEWS index 3b86a88..10d516b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -161,6 +161,12 @@ the variable `dir-locals-file' for more information. added via the new Network Security Manager (NSM) and controlled via the `network-security-level' variable. +** If Emacs isn't built with TLS support, an external TLS-capable +program is used instead. This program used to be run in --insecure +mode by default, but has now changed to be secure instead, and will +fail if you try to connect to non-verifiable hosts. This is +controlled by the `tls-program' variable. + +++ ** C-h l now also lists the commands that were run. commit de5c44fe8811b07eaad6ab5fc53d498e465a43d4 Author: Lars Ingebrigtsen Date: Tue Dec 29 14:46:20 2015 +0100 Make tls.el use trustfiles by default * lisp/net/tls.el (tls-program): Add a certfile by default (bug#21227). (open-tls-stream): Insert the trustfile by looking at `gnutls-trustfiles'. diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 6745e5d..72fb50e 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -44,6 +44,8 @@ ;;; Code: +(require 'gnutls) + (autoload 'format-spec "format-spec") (autoload 'format-spec-make "format-spec") @@ -74,9 +76,10 @@ and `gnutls-cli' (version 2.0.1) output." :type 'regexp :group 'tls) -(defcustom tls-program '("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" - "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") +(defcustom tls-program + '("gnutls-cli --x509cafile %t -p %p %h" + "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3" + "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") "List of strings containing commands to start TLS stream to a host. Each entry in the list is tried until a connection is successful. %h is replaced with server hostname, %p with port to connect to. @@ -89,24 +92,20 @@ successful negotiation." :type '(choice (const :tag "Default list of commands" - ("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" - "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) + ("gnutls-cli --x509cafile %t -p %p %h" + "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3" + "openssl s_client -CAfile %t -connect %h:%p -no_ssl2 -ign_eof")) (list :tag "Choose commands" :value - ("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" + ("gnutls-cli --x509cafile %t -p %p %h" + "gnutls-cli --x509cafile %t -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") (set :inline t ;; FIXME: add brief `:tag "..."' descriptions. ;; (repeat :inline t :tag "Other" (string)) - ;; See `tls-checktrust': - (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h") - (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3") - (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof") ;; No trust check: - (const "gnutls-cli -p %p %h") - (const "gnutls-cli -p %p %h --protocols ssl3") + (const "gnutls-cli --insecure -p %p %h") + (const "gnutls-cli --insecure -p %p %h --protocols ssl3") (const "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (repeat :inline t :tag "Other" (string))) (list :tag "List of commands" @@ -232,6 +231,7 @@ Fourth arg PORT is an integer specifying a port to connect to." (format-spec cmd (format-spec-make + ?t (car (gnutls-trustfiles)) ?h host ?p (if (integerp port) (int-to-string port) commit 1ba1e35fbed820ec9d9e1dafbe150f88f29342d8 Author: Lars Ingebrigtsen Date: Tue Dec 29 14:39:53 2015 +0100 Refactor out gnutls-trustfiles * lisp/net/gnutls.el (gnutls-trustfiles): Refactor out for reuse by tls.el. diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index ccaef8a..a7321da 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -193,12 +193,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." ;; The gnutls library doesn't understand files delivered via ;; the special handlers, so ignore all files found via those. (file-name-handler-alist nil) - (trustfiles (or trustfiles - (delq nil - (mapcar (lambda (f) (and f (file-exists-p f) f)) - (if (functionp gnutls-trustfiles) - (funcall gnutls-trustfiles) - gnutls-trustfiles))))) + (trustfiles (or trustfiles (gnutls-trustfiles))) (priority-string (or priority-string (cond ((eq type 'gnutls-anon) @@ -251,6 +246,14 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." process)) +(defun gnutls-trustfiles () + "Return a list of usable trustfiles." + (delq nil + (mapcar (lambda (f) (and f (file-exists-p f) f)) + (if (functionp gnutls-trustfiles) + (funcall gnutls-trustfiles) + gnutls-trustfiles)))) + (declare-function gnutls-error-string "gnutls.c" (error)) (defun gnutls-message-maybe (doit format &rest params) commit ad9aaa460e2fa446b08124bd8df846e1471c030b Author: Lars Ingebrigtsen Date: Tue Dec 29 14:30:53 2015 +0100 Remove --insecure from gnutls-cli invocation * tls.el (tls-program): Default to using secure TLS connections (bug#19284). diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 48e6a42..6745e5d 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -74,8 +74,8 @@ and `gnutls-cli' (version 2.0.1) output." :type 'regexp :group 'tls) -(defcustom tls-program '("gnutls-cli --insecure -p %p %h" - "gnutls-cli --insecure -p %p %h --protocols ssl3" +(defcustom tls-program '("gnutls-cli -p %p %h" + "gnutls-cli -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") "List of strings containing commands to start TLS stream to a host. Each entry in the list is tried until a connection is successful. @@ -89,13 +89,13 @@ successful negotiation." :type '(choice (const :tag "Default list of commands" - ("gnutls-cli --insecure -p %p %h" - "gnutls-cli --insecure -p %p %h --protocols ssl3" + ("gnutls-cli -p %p %h" + "gnutls-cli -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (list :tag "Choose commands" :value - ("gnutls-cli --insecure -p %p %h" - "gnutls-cli --insecure -p %p %h --protocols ssl3" + ("gnutls-cli -p %p %h" + "gnutls-cli -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") (set :inline t ;; FIXME: add brief `:tag "..."' descriptions. @@ -105,8 +105,8 @@ successful negotiation." (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3") (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof") ;; No trust check: - (const "gnutls-cli --insecure -p %p %h") - (const "gnutls-cli --insecure -p %p %h --protocols ssl3") + (const "gnutls-cli -p %p %h") + (const "gnutls-cli -p %p %h --protocols ssl3") (const "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (repeat :inline t :tag "Other" (string))) (list :tag "List of commands" commit d181366dc39620eb0f249fc3f1d58b6199b9e44d Author: Lars Ingebrigtsen Date: Tue Dec 29 12:40:55 2015 +0100 Add a new function to say whether a string is restrictive * puny.el (puny-highly-restrictive-p): New function. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index d96c6c2..08da51b 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -190,6 +190,26 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (cl-incf i))) (buffer-string))) +;; http://www.unicode.org/reports/tr39/#Restriction_Level_Detection + +(defun puny-highly-restrictive-p (string) + (let ((scripts + (seq-uniq + (seq-map (lambda (char) + (aref char-script-table char)) + string)))) + (or + ;; Every character uses the same script. + (= (length scripts) 1) + (seq-some 'identity + (mapcar (lambda (list) + (seq-every-p (lambda (script) + (memq script list)) + scripts)) + '((latin han hiragana kana) + (latin han bopomofo) + (latin han hangul))))))) + (provide 'puny) ;;; puny.el ends here commit 00beafafd7480317bb3bf6c0f2bc04ad344a02de Author: Paul Eggert Date: Mon Dec 28 19:05:50 2015 -0800 Spelling fix diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index b49c2e4..c8e48e2 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -36,7 +36,7 @@ ;; Utils: ;; ;; `project-combine-directories' and `project-subtract-directories', -;; mainly for use in the aborementioned generics' implementations. +;; mainly for use in the abovementioned generics' implementations. ;; ;; Commands: ;; commit 3f09548ecb183964bbbb7d8438abd8813983dbb1 Author: Paul Eggert Date: Mon Dec 28 18:43:09 2015 -0800 Port report-emacs-bug to deterministic builds * lisp/mail/emacsbug.el (report-emacs-bug): Future-proof the recent "built on" change to deterministic builds where emacs-build-system will be nil. See: http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg01369.html diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index ae0e711..ef5e86a 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -242,7 +242,11 @@ usually do not have translators for other languages.\n\n"))) (let ((txt (delete-and-extract-region (1+ user-point) (point)))) (insert (propertize "\n" 'display txt))) - (insert "\n\nIn " (emacs-version) " built on " emacs-build-system "\n") + (insert "\n\nIn " (emacs-version)) + (if emacs-build-system + (insert " built on " emacs-build-system)) + (insert "\n") + (if (stringp emacs-repository-version) (insert "Repository revision: " emacs-repository-version "\n")) (if (fboundp 'x-server-vendor) commit 11fe8e485e313c2f800f16693993946f56e38f33 Author: Dmitry Gutov Date: Tue Dec 29 03:53:32 2015 +0200 ; * lisp/progmodes/project.el: Update TODO diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e00f143..b49c2e4 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -58,9 +58,10 @@ ;; project is using. ;; ;; * Command to (re)build the tag files in all project roots. To that -;; end, we might need to add a way to limit etags to certain files -;; (e.g. have a whitelist, in addition to the blacklist provided by -;; ignores), and/or allow specifying additional tag regexps. +;; end, we might need to add a way to provide file whitelist +;; wildcards for each root to limit etags to certain files (in +;; addition to the blacklist provided by ignores), and/or allow +;; specifying additional tag regexps. ;; ;; * UI for the user to be able to pick the current project for the ;; whole Emacs session, independent of the current directory. Or, @@ -69,6 +70,15 @@ ;; to search for a regexp across all open projects. Provide a ;; history of projects that were opened in the past (storing it as a ;; list of directories should suffice). +;; +;; * Support for project-local variables: a UI to edit them, and a +;; utility function to retrieve a value. Probably useless without +;; support in various built-in commands. In the API, we might get +;; away with only adding a `project-configuration-directory' method, +;; defaulting to the project root the current file/buffer is in. +;; And prompting otherwise. How to best mix that with backends that +;; want to set/provide certain variables themselves, is up for +;; discussion. ;;; Code: commit 499dac5497f0f2b90914a7954c969cbac182a92c Author: Jose A. Ortega Ruiz Date: Tue Dec 29 01:27:48 2015 +0100 Fix URL auth error message * lisp/url/url-http.el (url-http-handle-authentication): Make the error message more correct (bug#20069). Copyright-paperwork-exempt: yes diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index c5b6ef3..e34f352 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -420,7 +420,7 @@ Return the number of characters removed." (progn (widen) (goto-char (point-max)) - (insert "
Sorry, but I do not know how to handle " type + (insert "
Sorry, but I do not know how to handle " (or type auth url "") " authentication. If you'd like to write it," " please use M-x report-emacs-bug RET.
") ;; We used to set a `status' var (declared "special") but I can't commit 5fcbeaf602e8dfcd6c7c0e9309d5bc9169f185c5 Author: Lars Ingebrigtsen Date: Tue Dec 29 00:11:34 2015 +0100 Mention the new puny.el library diff --git a/etc/NEWS b/etc/NEWS index 20a1232..e4db425 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -166,9 +166,13 @@ unsaved customizations and prompts user to customize (if found). added via the new Network Security Manager (NSM) and controlled via the `network-security-level' variable. +--- +** International domain names (IDNA) are now encoded via the new +puny.el library, so that one can visit web sites like +"http://méxico.icom.museum". + ** C-h l now also lists the commands that were run. ---- ** The new M-s M-w key binding uses eww to search the web for the text in the region. commit 8b61c22ea1a53167dae2e39eb318ceeb326cdff5 Author: Lars Ingebrigtsen Date: Tue Dec 29 00:11:06 2015 +0100 IDNA-related fixes for the URL library * lisp/url/url-http.el (url-http-create-request): IDNA-encode the Host: header. * lisp/url/url-util.el (url-encode-url): Don't hex-encode domain names, but leave them as UTF-8, so that they can be IDNA-encoded later when contacting the host. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 916f263..258f802 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -26,6 +26,7 @@ ;;; Code: (require 'cl-lib) +(require 'puny) (eval-when-compile (require 'subr-x)) @@ -318,8 +319,9 @@ request.") (url-scheme-get-property (url-type url-http-target-url) 'default-port)) (format - "Host: %s:%d\r\n" host (url-port url-http-target-url)) - (format "Host: %s\r\n" host)) + "Host: %s:%d\r\n" (puny-encode-domain host) + (url-port url-http-target-url)) + (format "Host: %s\r\n" (puny-encode-domain host))) ;; Who its from (if url-personal-mail-address (concat diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index e011b96..54b02e9 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -468,7 +468,7 @@ should return it unchanged." (and host (not (string-match "\\`\\[.*\\]\\'" host)) (setf (url-host obj) - (url-hexify-string host url-host-allowed-chars))) + (decode-coding-string (url-host obj) 'utf-8))) (if path (setq path (url-hexify-string path url-path-allowed-chars))) commit fc3965ed9b19bdd167a466a06181c88ad59a57de Author: Lars Ingebrigtsen Date: Tue Dec 29 00:09:10 2015 +0100 IDNA-encode all domain names in `open-network-stream' * network-stream.el (open-network-stream) (network-stream-open-plain, network-stream-open-starttls): IDNA-encode all domain names, if needed. diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 1eb5342..8e1ad63 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -46,6 +46,7 @@ (require 'starttls) (require 'auth-source) (require 'nsm) +(require 'puny) (autoload 'gnutls-negotiate "gnutls") (autoload 'open-gnutls-stream "gnutls") @@ -148,7 +149,7 @@ asynchronously, if possible." (plist-get parameters :capability-command)))))) ;; The simplest case: wrapper around `make-network-process'. (make-network-process :name name :buffer buffer - :host host :service service + :host (puny-encode-domain host) :service service :nowait (plist-get parameters :nowait)) (let ((work-buffer (or buffer (generate-new-buffer " *stream buffer*"))) @@ -198,7 +199,8 @@ asynchronously, if possible." (defun network-stream-open-plain (name buffer host service parameters) (let ((start (with-current-buffer buffer (point))) (stream (make-network-process :name name :buffer buffer - :host host :service service + :host (puny-encode-domain host) + :service service :nowait (plist-get parameters :nowait)))) (when (plist-get parameters :warn-unless-encrypted) (setq stream (nsm-verify-connection stream host service nil t))) @@ -219,7 +221,8 @@ asynchronously, if possible." eoc)) ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE) (stream (make-network-process :name name :buffer buffer - :host host :service service)) + :host (puny-encode-domain host) + :service service)) (greeting (and (not (plist-get parameters :nogreeting)) (network-stream-get-response stream start eoc))) (capabilities (network-stream-command stream capability-command @@ -296,7 +299,8 @@ asynchronously, if possible." (unless require-tls (setq stream (make-network-process :name name :buffer buffer - :host host :service service)) + :host (puny-encode-domain host) + :service service)) (network-stream-get-response stream start eoc))) ;; Re-get the capabilities, which may have now changed. (setq capabilities commit 341feb3a26a0277f535217f4919b23eb70e3680e Author: Lars Ingebrigtsen Date: Tue Dec 29 00:07:50 2015 +0100 Fix puny-encoding all-non-ASCII domains * puny.el (puny-encode-string): Fix the all-non-ASCII encoding case. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index a16e3a0..d96c6c2 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -47,7 +47,11 @@ For instance, \"bücher\" => \"xn--bcher-kva\"." string))) (if (= (length ascii) (length string)) string - (concat "xn--" ascii "-" (puny-encode-complex (length ascii) string))))) + (concat "xn--" + (if (null ascii) + "" + (concat ascii "-")) + (puny-encode-complex (length ascii) string))))) (defun puny-decode-domain (domain) "Decode DOMAIN according to the IDNA/punycode algorith. commit 9982c01d1a190390254b8c5bd866aea62848664f Author: Lars Ingebrigtsen Date: Mon Dec 28 21:55:18 2015 +0100 shr link traversal fixup * shr.el (shr-next-link): Don't bug out on adjacent links. Backport: (cherry picked from commit 1efc5f8b09273c359683ce13be95fb5df7a84311) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index c28e0b8..d5c5636 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -303,13 +303,25 @@ redirects somewhere else." (defun shr-next-link () "Skip to the next link." (interactive) - (let ((skip (text-property-any (point) (point-max) 'help-echo nil))) - (if (or (eobp) - (not (setq skip (text-property-not-all skip (point-max) - 'help-echo nil)))) - (message "No next link") + (let ((current (get-text-property (point) 'shr-url)) + (start (point)) + skip) + (while (and (not (eobp)) + (equal (get-text-property (point) 'shr-url) current)) + (forward-char 1)) + (cond + ((and (not (eobp)) + (get-text-property (point) 'shr-url)) + ;; The next link is adjacent. + (message "%s" (get-text-property (point) 'help-echo))) + ((or (eobp) + (not (setq skip (text-property-not-all (point) (point-max) + 'shr-url nil)))) + (goto-char start) + (message "No next link")) + (t (goto-char skip) - (message "%s" (get-text-property (point) 'help-echo))))) + (message "%s" (get-text-property (point) 'help-echo)))))) (defun shr-previous-link () "Skip to the previous link." commit 1efc5f8b09273c359683ce13be95fb5df7a84311 Author: Lars Ingebrigtsen Date: Mon Dec 28 21:55:18 2015 +0100 shr link traversal fixup * shr.el (shr-next-link): Don't bug out on adjacent links. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 469ef4e..0b80e81 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -316,13 +316,25 @@ redirects somewhere else." (defun shr-next-link () "Skip to the next link." (interactive) - (let ((skip (text-property-any (point) (point-max) 'help-echo nil))) - (if (or (eobp) - (not (setq skip (text-property-not-all skip (point-max) - 'help-echo nil)))) - (message "No next link") + (let ((current (get-text-property (point) 'shr-url)) + (start (point)) + skip) + (while (and (not (eobp)) + (equal (get-text-property (point) 'shr-url) current)) + (forward-char 1)) + (cond + ((and (not (eobp)) + (get-text-property (point) 'shr-url)) + ;; The next link is adjacent. + (message "%s" (get-text-property (point) 'help-echo))) + ((or (eobp) + (not (setq skip (text-property-not-all (point) (point-max) + 'shr-url nil)))) + (goto-char start) + (message "No next link")) + (t (goto-char skip) - (message "%s" (get-text-property (point) 'help-echo))))) + (message "%s" (get-text-property (point) 'help-echo)))))) (defun shr-previous-link () "Skip to the previous link." commit 2ed9de442cf0ff46cf3cf8484b587f7d52a50e3f Author: Tom Tromey Date: Mon Dec 28 13:00:56 2015 -0700 set :safe on css-indent-offset * lisp/textmodes/css-mode.el (css-indent-offset): Add :safe 'integerp. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 3e84b43..a8a2067 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -308,7 +308,8 @@ (defcustom css-indent-offset 4 "Basic size of one indentation step." :version "22.2" - :type 'integer) + :type 'integer + :safe 'integerp) (require 'smie) commit 82b9bfc40949987f4a4d8d2f87aa6af4ec234253 Author: Lars Ingebrigtsen Date: Mon Dec 28 21:02:43 2015 +0100 * eww.el (eww-mode): Remove superfluous bidi reset. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index d455577..e8fdc97 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -737,8 +737,7 @@ the like." (setq-local desktop-save-buffer #'eww-desktop-misc-data) ;; multi-page isearch support (setq-local multi-isearch-next-buffer-function #'eww-isearch-next-buffer) - (setq truncate-lines t - bidi-paragraph-direction 'left-to-right) + (setq truncate-lines t) (buffer-disable-undo) (setq buffer-read-only t)) commit 57029f3d84232584ae43791f7b8d8804d516eadd Author: James Stout Date: Mon Dec 28 20:49:57 2015 +0100 Make chunked encoding trailer detection more compliant * lisp/url/url-http.el (url-http-chunked-encoding-after-change-function): Make trailer detection more compliant (bug#16345). Copyright-paperwork-exempt: yes diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index b65affe..c5b6ef3 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1056,7 +1056,7 @@ the end of the document." (when (looking-at "\r?\n") (url-http-debug "Removing terminator of last chunk") (delete-region (match-beginning 0) (match-end 0))) - (if (re-search-forward "^\r*$" nil t) + (if (re-search-forward "^\r?\n" nil t) (url-http-debug "Saw end of trailers...")) (if (url-http-parse-headers) (url-http-activate-callback)))))))))) commit d686802510c3902f6be4a4c4e82b1134d9dfb8a0 Author: Lars Ingebrigtsen Date: Mon Dec 28 20:52:41 2015 +0100 Reconnect erc even on server errors * lisp/erc/erc-backend.el (erc-server-reconnect-p): Try to reconnect even if a server error has occurred (bug#18527). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index cab0fb9..1ef2fac 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -609,7 +609,6 @@ EVENT is the message received from the closed connection process." ;; otherwise go through the full spectrum of checks: (and erc-server-auto-reconnect (not erc-server-banned) - (not erc-server-error-occurred) ;; make sure we don't infinitely try to reconnect, unless the ;; user wants that (or (eq erc-server-reconnect-attempts t) commit 0e99ccb32119882af50b37264cd4662db14b1e03 Author: Lars Ingebrigtsen Date: Mon Dec 28 19:13:51 2015 +0100 Fix punycode short circuit logic * puny.el (puny-encode-domain): Fix short-circuit logic. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 389a6dc..a16e3a0 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -34,7 +34,7 @@ For instance, \"fśf.org\" => \"xn--ff-2sa.org\"." ;; The vast majority of domain names are not IDNA domain names, so ;; add a check first to avoid doing unnecessary work. - (if (string-match "\\'[[:ascii:]]*\\'" domain) + (if (string-match "\\'[[:ascii:]]+\\'" domain) domain (mapconcat 'puny-encode-string (split-string domain "[.]") "."))) commit 6dcaa56a13271eabc79d475059d29ebb886ea3e7 Author: Martin Rudalics Date: Mon Dec 28 19:11:22 2015 +0100 Fix Bug#10873 in `report-emacs-bug' * lisp/mail/emacsbug.el (report-emacs-bug): If `report-emacs-bug-no-explanations' is nil, make sure we can show mail and warnings buffer on this frame (Bug#10873). diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index bc2dafa..ae0e711 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -162,6 +162,14 @@ Prompts for bug subject. Leaves you in a mail buffer." (setq message-end-point (with-current-buffer (messages-buffer) (point-max-marker))) + (condition-case nil + ;; For the novice user make sure there's always enough space for + ;; the mail and the warnings buffer on this frame (Bug#10873). + (unless report-emacs-bug-no-explanations + (delete-other-windows) + (set-window-dedicated-p nil nil) + (set-frame-parameter nil 'unsplittable nil)) + (error nil)) (compose-mail report-emacs-bug-address topic) ;; The rest of this does not execute if the user was asked to ;; confirm and said no. commit 91ef47353d423acbeeace443984f0ac097f1b2a0 Author: Lars Ingebrigtsen Date: Mon Dec 28 18:47:51 2015 +0100 IDNA speed up * puny.el (puny-encode-domain): Make the common non-IDNA case faster diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 5874871..389a6dc 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -32,7 +32,11 @@ (defun puny-encode-domain (domain) "Encode DOMAIN according to the IDNA/punycode algorith. For instance, \"fśf.org\" => \"xn--ff-2sa.org\"." - (mapconcat 'puny-encode-string (split-string domain "[.]") ".")) + ;; The vast majority of domain names are not IDNA domain names, so + ;; add a check first to avoid doing unnecessary work. + (if (string-match "\\'[[:ascii:]]*\\'" domain) + domain + (mapconcat 'puny-encode-string (split-string domain "[.]") "."))) (defun puny-encode-string (string) "Encode STRING according to the IDNA/punycode algorithm. commit 1f11b33a780ca4adeff7560cf347ea41cd31bc43 Author: Lars Ingebrigtsen Date: Mon Dec 28 18:41:13 2015 +0100 Add IDNA domain encode/decode functions * puny.el (puny-decode-domain): New function. (puny-encode-domain): Ditto. (puny-decode-digit): Fix digit decoding error. diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 474ecda..5874871 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -29,6 +29,11 @@ (require 'seq) +(defun puny-encode-domain (domain) + "Encode DOMAIN according to the IDNA/punycode algorith. +For instance, \"fśf.org\" => \"xn--ff-2sa.org\"." + (mapconcat 'puny-encode-string (split-string domain "[.]") ".")) + (defun puny-encode-string (string) "Encode STRING according to the IDNA/punycode algorithm. This is used to encode non-ASCII domain names. @@ -40,10 +45,15 @@ For instance, \"bücher\" => \"xn--bcher-kva\"." string (concat "xn--" ascii "-" (puny-encode-complex (length ascii) string))))) +(defun puny-decode-domain (domain) + "Decode DOMAIN according to the IDNA/punycode algorith. +For instance, \"xn--ff-2sa.org\" => \"fśf.org\"." + (mapconcat 'puny-decode-string (split-string domain "[.]") ".")) + (defun puny-decode-string (string) "Decode an IDNA/punycode-encoded string. For instance \"xn--bcher-kva\" => \"bücher\"." - (if (string-match "\\`xn--.*-" string) + (if (string-match "\\`xn--" string) (puny-decode-string-internal (substring string 4)) string)) @@ -55,17 +65,6 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (defconst puny-tmax 26) (defconst puny-skew 28) -(defun puny-decode-digit (cp) - (cond - ((<= cp ?9) - (- cp ?0)) - ((<= cp ?Z) - (- cp ?A)) - ((<= cp ?z) - (- cp ?a)) - (t - puny-base))) - ;; 0-25 a-z ;; 26-36 0-9 (defun puny-encode-digit (d) @@ -129,48 +128,58 @@ For instance \"xn--bcher-kva\" => \"bücher\"." (cl-incf n)) (nreverse result))) +(defun puny-decode-digit (cp) + (cond + ((<= cp ?9) + (+ (- cp ?0) 26)) + ((<= cp ?Z) + (- cp ?A)) + ((<= cp ?z) + (- cp ?a)) + (t + puny-base))) + (defun puny-decode-string-internal (string) (with-temp-buffer (insert string) (goto-char (point-max)) - (if (not (search-backward "-" nil t)) - (error "Invalid PUNY string") - ;; The encoded chars are after the final dash. - (let ((encoded (buffer-substring (1+ (point)) (point-max))) - (ic 0) - (i 0) - (bias puny-initial-bias) - (n puny-initial-n) - out) - (delete-region (point) (point-max)) - (while (< ic (length encoded)) - (let ((old-i i) - (w 1) - (k puny-base) - digit t1) - (cl-loop do (progn - (setq digit (puny-decode-digit (aref encoded ic))) - (cl-incf ic) - (cl-incf i (* digit w)) - (setq t1 (cond - ((<= k bias) - puny-tmin) - ((>= k (+ bias puny-tmax)) - puny-tmax) - (t - (- k bias))))) - while (>= digit t1) - do (setq w (* w (- puny-base t1)) - k (+ k puny-base))) - (setq out (1+ (buffer-size))) - (setq bias (puny-adapt (- i old-i) out (= old-i 0)))) - - (setq n (+ n (/ i out)) - i (mod i out)) - (goto-char (point-min)) - (forward-char i) - (insert (format "%c" n)) - (cl-incf i)))) + (search-backward "-" nil (point-min)) + ;; The encoded chars are after the final dash. + (let ((encoded (buffer-substring (1+ (point)) (point-max))) + (ic 0) + (i 0) + (bias puny-initial-bias) + (n puny-initial-n) + out) + (delete-region (point) (point-max)) + (while (< ic (length encoded)) + (let ((old-i i) + (w 1) + (k puny-base) + digit t1) + (cl-loop do (progn + (setq digit (puny-decode-digit (aref encoded ic))) + (cl-incf ic) + (cl-incf i (* digit w)) + (setq t1 (cond + ((<= k bias) + puny-tmin) + ((>= k (+ bias puny-tmax)) + puny-tmax) + (t + (- k bias))))) + while (>= digit t1) + do (setq w (* w (- puny-base t1)) + k (+ k puny-base))) + (setq out (1+ (buffer-size))) + (setq bias (puny-adapt (- i old-i) out (= old-i 0)))) + + (setq n (+ n (/ i out)) + i (mod i out)) + (goto-char (point-min)) + (forward-char i) + (insert (format "%c" n)) + (cl-incf i))) (buffer-string))) (provide 'puny) commit ad1f24f96b204e6e61051f896a713b03708391a0 Author: Lars Ingebrigtsen Date: Mon Dec 28 18:21:20 2015 +0100 Rename idna.el to puny.el * puny.el: Renamed from idna.el to avoid name collisions with the external idna.el library. diff --git a/lisp/net/idna.el b/lisp/net/idna.el deleted file mode 100644 index 052a9f6..0000000 --- a/lisp/net/idna.el +++ /dev/null @@ -1,178 +0,0 @@ -;;; idna.el --- translate non-ASCII domain names to ASCII - -;; Copyright (C) 2015 Free Software Foundation, Inc. - -;; Author: Lars Magne Ingebrigtsen -;; Keywords: mail, net - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; Written by looking at -;; http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion - -;;; Code: - -(require 'seq) - -(defun idna-encode-string (string) - "Encode STRING according to the IDNA/punycode algorithm. -This is used to encode non-ASCII domain names. -For instance, \"bücher\" => \"xn--bcher-kva\"." - (let ((ascii (seq-filter (lambda (char) - (< char 128)) - string))) - (if (= (length ascii) (length string)) - string - (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string))))) - -(defun idna-decode-string (string) - "Decode an IDNA/punycode-encoded string. -For instance \"xn--bcher-kva\" => \"bücher\"." - (if (string-match "\\`xn--.*-" string) - (idna-decode-string-internal (substring string 4)) - string)) - -(defconst idna-initial-n 128) -(defconst idna-initial-bias 72) -(defconst idna-base 36) -(defconst idna-damp 700) -(defconst idna-tmin 1) -(defconst idna-tmax 26) -(defconst idna-skew 28) - -(defun idna-decode-digit (cp) - (cond - ((<= cp ?9) - (- cp ?0)) - ((<= cp ?Z) - (- cp ?A)) - ((<= cp ?z) - (- cp ?a)) - (t - idna-base))) - -;; 0-25 a-z -;; 26-36 0-9 -(defun idna-encode-digit (d) - (if (< d 26) - (+ ?a d) - (+ ?0 (- d 26)))) - -(defun idna-adapt (delta num-points first-time) - (let ((delta (if first-time - (/ delta idna-damp) - (/ delta 2))) - (k 0)) - (setq delta (+ delta (/ delta num-points))) - (while (> delta (/ (* (- idna-base idna-tmin) - idna-tmax) - 2)) - (setq delta (/ delta (- idna-base idna-tmin)) - k (+ k idna-base))) - (+ k (/ (* (1+ (- idna-base idna-tmin)) delta) - (+ delta idna-skew))))) - -(defun idna-encode-complex (insertion-points string) - (let ((n idna-initial-n) - (delta 0) - (bias idna-initial-bias) - (h insertion-points) - result m ijv q) - (while (< h (length string)) - (setq ijv (cl-loop for char across string - when (>= char n) - minimize char)) - (setq m ijv) - (setq delta (+ delta (* (- m n) (+ h 1))) - n m) - (cl-loop for char across string - when (< char n) - do (cl-incf delta) - when (= char ijv) - do (progn - (setq q delta) - (cl-loop with k = idna-base - for t1 = (cond - ((<= k bias) - idna-tmin) - ((>= k (+ bias idna-tmax)) - idna-tmax) - (t - (- k bias))) - while (>= q t1) - do (push (idna-encode-digit - (+ t1 (mod (- q t1) - (- idna-base t1)))) - result) - do (setq q (/ (- q t1) (- idna-base t1)) - k (+ k idna-base))) - (push (idna-encode-digit q) result) - (setq bias (idna-adapt delta (+ h 1) (= h insertion-points)) - delta 0 - h (1+ h)))) - (cl-incf delta) - (cl-incf n)) - (nreverse result))) - -(defun idna-decode-string-internal (string) - (with-temp-buffer - (insert string) - (goto-char (point-max)) - (if (not (search-backward "-" nil t)) - (error "Invalid IDNA string") - ;; The encoded chars are after the final dash. - (let ((encoded (buffer-substring (1+ (point)) (point-max))) - (ic 0) - (i 0) - (bias idna-initial-bias) - (n idna-initial-n) - out) - (delete-region (point) (point-max)) - (while (< ic (length encoded)) - (let ((old-i i) - (w 1) - (k idna-base) - digit t1) - (cl-loop do (progn - (setq digit (idna-decode-digit (aref encoded ic))) - (cl-incf ic) - (cl-incf i (* digit w)) - (setq t1 (cond - ((<= k bias) - idna-tmin) - ((>= k (+ bias idna-tmax)) - idna-tmax) - (t - (- k bias))))) - while (>= digit t1) - do (setq w (* w (- idna-base t1)) - k (+ k idna-base))) - (setq out (1+ (buffer-size))) - (setq bias (idna-adapt (- i old-i) out (= old-i 0)))) - - (setq n (+ n (/ i out)) - i (mod i out)) - (goto-char (point-min)) - (forward-char i) - (insert (format "%c" n)) - (cl-incf i)))) - (buffer-string))) - -(provide 'idna) - -;;; shr.el ends here diff --git a/lisp/net/puny.el b/lisp/net/puny.el new file mode 100644 index 0000000..474ecda --- /dev/null +++ b/lisp/net/puny.el @@ -0,0 +1,178 @@ +;;; puny.el --- translate non-ASCII domain names to ASCII + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen +;; Keywords: mail, net + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Written by looking at +;; http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion + +;;; Code: + +(require 'seq) + +(defun puny-encode-string (string) + "Encode STRING according to the IDNA/punycode algorithm. +This is used to encode non-ASCII domain names. +For instance, \"bücher\" => \"xn--bcher-kva\"." + (let ((ascii (seq-filter (lambda (char) + (< char 128)) + string))) + (if (= (length ascii) (length string)) + string + (concat "xn--" ascii "-" (puny-encode-complex (length ascii) string))))) + +(defun puny-decode-string (string) + "Decode an IDNA/punycode-encoded string. +For instance \"xn--bcher-kva\" => \"bücher\"." + (if (string-match "\\`xn--.*-" string) + (puny-decode-string-internal (substring string 4)) + string)) + +(defconst puny-initial-n 128) +(defconst puny-initial-bias 72) +(defconst puny-base 36) +(defconst puny-damp 700) +(defconst puny-tmin 1) +(defconst puny-tmax 26) +(defconst puny-skew 28) + +(defun puny-decode-digit (cp) + (cond + ((<= cp ?9) + (- cp ?0)) + ((<= cp ?Z) + (- cp ?A)) + ((<= cp ?z) + (- cp ?a)) + (t + puny-base))) + +;; 0-25 a-z +;; 26-36 0-9 +(defun puny-encode-digit (d) + (if (< d 26) + (+ ?a d) + (+ ?0 (- d 26)))) + +(defun puny-adapt (delta num-points first-time) + (let ((delta (if first-time + (/ delta puny-damp) + (/ delta 2))) + (k 0)) + (setq delta (+ delta (/ delta num-points))) + (while (> delta (/ (* (- puny-base puny-tmin) + puny-tmax) + 2)) + (setq delta (/ delta (- puny-base puny-tmin)) + k (+ k puny-base))) + (+ k (/ (* (1+ (- puny-base puny-tmin)) delta) + (+ delta puny-skew))))) + +(defun puny-encode-complex (insertion-points string) + (let ((n puny-initial-n) + (delta 0) + (bias puny-initial-bias) + (h insertion-points) + result m ijv q) + (while (< h (length string)) + (setq ijv (cl-loop for char across string + when (>= char n) + minimize char)) + (setq m ijv) + (setq delta (+ delta (* (- m n) (+ h 1))) + n m) + (cl-loop for char across string + when (< char n) + do (cl-incf delta) + when (= char ijv) + do (progn + (setq q delta) + (cl-loop with k = puny-base + for t1 = (cond + ((<= k bias) + puny-tmin) + ((>= k (+ bias puny-tmax)) + puny-tmax) + (t + (- k bias))) + while (>= q t1) + do (push (puny-encode-digit + (+ t1 (mod (- q t1) + (- puny-base t1)))) + result) + do (setq q (/ (- q t1) (- puny-base t1)) + k (+ k puny-base))) + (push (puny-encode-digit q) result) + (setq bias (puny-adapt delta (+ h 1) (= h insertion-points)) + delta 0 + h (1+ h)))) + (cl-incf delta) + (cl-incf n)) + (nreverse result))) + +(defun puny-decode-string-internal (string) + (with-temp-buffer + (insert string) + (goto-char (point-max)) + (if (not (search-backward "-" nil t)) + (error "Invalid PUNY string") + ;; The encoded chars are after the final dash. + (let ((encoded (buffer-substring (1+ (point)) (point-max))) + (ic 0) + (i 0) + (bias puny-initial-bias) + (n puny-initial-n) + out) + (delete-region (point) (point-max)) + (while (< ic (length encoded)) + (let ((old-i i) + (w 1) + (k puny-base) + digit t1) + (cl-loop do (progn + (setq digit (puny-decode-digit (aref encoded ic))) + (cl-incf ic) + (cl-incf i (* digit w)) + (setq t1 (cond + ((<= k bias) + puny-tmin) + ((>= k (+ bias puny-tmax)) + puny-tmax) + (t + (- k bias))))) + while (>= digit t1) + do (setq w (* w (- puny-base t1)) + k (+ k puny-base))) + (setq out (1+ (buffer-size))) + (setq bias (puny-adapt (- i old-i) out (= old-i 0)))) + + (setq n (+ n (/ i out)) + i (mod i out)) + (goto-char (point-min)) + (forward-char i) + (insert (format "%c" n)) + (cl-incf i)))) + (buffer-string))) + +(provide 'puny) + +;;; puny.el ends here commit b406665df12664a3e7048f93f192a488a14058f2 Author: Lars Ingebrigtsen Date: Mon Dec 28 18:11:56 2015 +0100 Always reset the bidi direction * eww.el (eww-display-html): Always reset the bidi direction to `left-to-right' (bug#22257). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 5755a94..d455577 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -401,6 +401,7 @@ Currently this means either text/html or application/xhtml+xml." (source (and (null document) (buffer-substring (point) (point-max))))) (with-current-buffer buffer + (setq bidi-paragraph-direction 'left-to-right) (plist-put eww-data :source source) (plist-put eww-data :dom document) (let ((inhibit-read-only t) commit 326ffcce5fbbb0ca368cfa08a33101dbbcaa2ace Author: Alan Mackenzie Date: Mon Dec 28 16:01:05 2015 +0000 Allow line comments ending with escaped NL to be continued to the next line. Use this in C, C++, and Objective C Modes. Fixes bug#22246 * src/syntax.c (comment-end-can-be-escaped): New buffer local variable. (forw-comment, back-comment): On encountering an end of comment character, test whether it is escaped when `comment-end-can-be-escaped' is non-nil. * doc/lispref/syntax.texi (Control Parsing): Describe `comment-end-can-be-escaped'. * etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'. * lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'. diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 7a984e3..831ebd1 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -945,6 +945,14 @@ whitespace by the functions in this section and by @code{forward-sexp}, The behavior of @code{parse-partial-sexp} is also affected by @code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}). +@defvar comment-end-can-be-escaped +If this buffer local variable is non-@code{nil}, a single character +which usually terminates a comment doesn't do so when that character +is escaped. This is used in C and C++ Modes, where line comments +starting with @samp{//} can be continued onto the next line by +escaping the newline with @samp{\}. +@end defvar + You can use @code{forward-comment} to move forward or backward over one comment or several comments. diff --git a/etc/NEWS b/etc/NEWS index 1aeab35..3b86a88 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1268,6 +1268,11 @@ Area. The output is still logged to the *Messages* buffer. buffers to allow certain parts of the text to be writable. +++ +** A new variable `comment-end-can-be-escaped' is useful in languages + such as C and C++ where line comments with escaped newlines are + continued to the next line. + ++++ ** New macro `define-advice'. ** `read-buffer' takes a new `predicate' argument. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 5b67083..1a07c4c 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1433,6 +1433,14 @@ properly." "\\)\\s *")) (c-lang-setvar comment-start-skip (c-lang-const comment-start-skip)) +(c-lang-defconst comment-end-can-be-escaped + "When non-nil, escaped EOLs inside comments are valid. +This works in Emacs >= 25.1." + t nil + (c c++ objc) t) +(c-lang-setvar comment-end-can-be-escaped + (c-lang-const comment-end-can-be-escaped)) + (c-lang-defconst c-syntactic-ws-start ;; Regexp matching any sequence that can start syntactic whitespace. ;; The only uncertain case is '#' when there are cpp directives. diff --git a/src/syntax.c b/src/syntax.c index 5b0ec6d..2acbd41 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -790,8 +790,10 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, || SYNTAX_FLAGS_COMMENT_NESTED (syntax) != comnested)) continue; - /* Ignore escaped characters, except comment-enders. */ - if (code != Sendcomment && char_quoted (from, from_byte)) + /* Ignore escaped characters, except comment-enders which cannot + be escaped. */ + if ((Vcomment_end_can_be_escaped || code != Sendcomment) + && char_quoted (from, from_byte)) continue; switch (code) @@ -2346,7 +2348,8 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop, if (code == Sendcomment && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ? - (nesting > 0 && --nesting == 0) : nesting < 0)) + (nesting > 0 && --nesting == 0) : nesting < 0) + && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte))) /* We have encountered a comment end of the same style as the comment sequence which began this comment section. */ @@ -3702,6 +3705,12 @@ character of that word. In both cases, LIMIT bounds the search. */); Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil); + DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped, + doc: /* Non-nil means an escaped ender inside a comment doesn'tend the comment. */); + Vcomment_end_can_be_escaped = 0; + DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped"); + Fmake_variable_buffer_local (Qcomment_end_can_be_escaped); + defsubr (&Ssyntax_table_p); defsubr (&Ssyntax_table); defsubr (&Sstandard_syntax_table); commit f602e172b6dad99e9bcc5d2cdfc7f548aeb3b2eb Author: Katsumi Yamaoka Date: Mon Dec 28 05:34:12 2015 +0000 lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Keep old Emacsen compatibility * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Don't use split-string with 4th arg for old Emacsen compatibility. diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 4f57cb7..fd01098 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -311,9 +311,8 @@ either an error is raised or not." (when (mml-secure-is-encrypted-p) (let ((bcc (mail-strip-quoted-names (message-fetch-field "bcc")))) (when bcc - ;; Split recipients at "," boundary, omit empty strings (t), - ;; and strip whitespace. - (let ((bcc-list (split-string bcc "," t "\\s-+"))) + (let ((bcc-list (mapcar #'cadr + (mail-extract-address-components bcc t)))) (unless (gnus-subsetp bcc-list mml-secure-safe-bcc-list) (unless (yes-or-no-p "Message for encryption contains Bcc header.\ This may give away all Bcc'ed identities to all recipients.\ commit 17ab0d10e1db9cc4924ceb778e5c4e6bb9a90c3d Author: Dmitry Gutov Date: Mon Dec 28 06:17:19 2015 +0200 Rename project-library-roots to project-external-roots * lisp/progmodes/project.el (project-library-roots): Rename to project-external-roots. (project-library-roots-function): Rename to project-vc-external-roots-function. Only use it in the VC backend, for now. Update project-external-roots accordingly. (project-vc-library-roots): Remove. (project-or-libraries-find-regexp): Rename to project-or-external-find-regexp. * lisp/progmodes/elisp-mode.el (elisp-library-roots): Rename to elisp-load-path-roots. * lisp/progmodes/etags.el (etags-library-roots): Remove. Use an anonymous function for the default value of project-vc-external-roots-function. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 12848fe..4cc2aee 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -228,7 +228,7 @@ Blank lines separate paragraphs. Semicolons start comments. \\{emacs-lisp-mode-map}" :group 'lisp - (defvar project-library-roots-function) + (defvar project-vc-external-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (setq-local electric-pair-text-pairs @@ -238,7 +238,7 @@ Blank lines separate paragraphs. Semicolons start comments. (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) - (setq-local project-library-roots-function #'elisp-library-roots) + (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil 'local)) @@ -795,7 +795,7 @@ non-nil result supercedes the xrefs produced by xrefs)) -(declare-function project-library-roots "project") +(declare-function project-external-roots "project") (cl-defmethod xref-backend-apropos ((_backend (eql elisp)) regexp) (apply #'nconc @@ -832,7 +832,7 @@ non-nil result supercedes the xrefs produced by (cl-defmethod xref-location-group ((l xref-elisp-location)) (xref-elisp-location-file l)) -(defun elisp-library-roots () +(defun elisp-load-path-roots () (if (boundp 'package-user-dir) (cons package-user-dir load-path) load-path)) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 3065725..dbb46a3 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2154,9 +2154,6 @@ for \\[find-tag] (which see)." (with-slots (tag-info) l (nth 1 tag-info))) -(defun etags-library-roots () - (mapcar #'file-name-directory tags-table-list)) - (provide 'etags) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 40d7e03..e00f143 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -20,13 +20,55 @@ ;;; Commentary: ;; This file contains generic infrastructure for dealing with -;; projects, and a number of public functions: finding the current -;; root, related project directories, and library directories. This -;; list is to be extended in future versions. +;; projects, some utility functions, and commands using that +;; infrastructure. ;; ;; The goal is to make it easier for Lisp programs to operate on the ;; current project, without having to know which package handles ;; detection of that project type, parsing its config files, etc. +;; +;; Infrastructure: +;; +;; Function `project-current', to determine the current project +;; instance, and 3 (at the moment) generic functions that act on it. +;; This list is to be extended in future versions. +;; +;; Utils: +;; +;; `project-combine-directories' and `project-subtract-directories', +;; mainly for use in the aborementioned generics' implementations. +;; +;; Commands: +;; +;; `project-find-regexp' and `project-or-external-find-regexp' use the +;; current API, and thus will work in any project that has an adapter. + +;;; TODO: + +;; * Commands `project-find-file' and `project-or-external-find-file'. +;; Currently blocked on adding a new completion style that would let +;; the user enter just the base file name (or a part of it), and get +;; it expanded to the absolute file name. +;; +;; * Build tool related functionality. Start with a `project-build' +;; command, which should provide completions on tasks to run, and +;; maybe allow entering some additional arguments. This might +;; be handled better with a separate API, though. Then we won't +;; force every project backend to be aware of the build tool(s) the +;; project is using. +;; +;; * Command to (re)build the tag files in all project roots. To that +;; end, we might need to add a way to limit etags to certain files +;; (e.g. have a whitelist, in addition to the blacklist provided by +;; ignores), and/or allow specifying additional tag regexps. +;; +;; * UI for the user to be able to pick the current project for the +;; whole Emacs session, independent of the current directory. Or, +;; in the more advanced case, open a set of projects, and have some +;; project-related commands to use them all. E.g., have a command +;; to search for a regexp across all open projects. Provide a +;; history of projects that were opened in the past (storing it as a +;; list of directories should suffice). ;;; Code: @@ -38,35 +80,6 @@ Each functions on this hook is called in turn with one argument (the directory) and should return either nil to mean that it is not applicable, or a project instance.") -;; FIXME: Using the current approach, major modes are supposed to set -;; this variable to a buffer-local value. So we don't have access to -;; the "library roots" of language A from buffers of language B, which -;; seems desirable in multi-language projects, at least for some -;; potential uses, like "jump to a file in project or library". -;; -;; We can add a second argument to this function: a file extension, or -;; a language name. Some projects will know the set of languages used -;; in them; for others, like VC-based projects, we'll need -;; auto-detection. I see two options: -;; -;; - That could be implemented as a separate second hook, with a -;; list of functions that return file extensions. -;; -;; - This variable will be turned into a hook with "append" semantics, -;; and each function in it will perform auto-detection when passed -;; nil instead of an actual file extension. Then this hook will, in -;; general, be modified globally, and not from major mode functions. -(defvar project-library-roots-function 'etags-library-roots - "Function that returns a list of library roots. - -It should return a list of directories that contain source files -related to the current buffer. Depending on the language, it -should include the headers search path, load path, class path, -and so on. - -The directory names should be absolute. Used in the default -implementation of `project-library-roots'.") - ;;;###autoload (defun project-current (&optional maybe-prompt dir) "Return the project instance in DIR or `default-directory'. @@ -86,40 +99,35 @@ the user for a different directory to look in." (defun project--find-in-directory (dir) (run-hook-with-args-until-success 'project-find-functions dir)) -;; FIXME: Add MODE argument, like in `ede-source-paths'? -(cl-defgeneric project-library-roots (project) - "Return the list of library roots for PROJECT. - -It's the list of directories outside of the project that contain -related source files. +(cl-defgeneric project-roots (project) + "Return the list of directory roots of the current project. -Project-specific version of `project-library-roots-function', -which see. Unless it knows better, a specialized implementation -should use the value returned by that function." - (project-subtract-directories - (project-combine-directories - (funcall project-library-roots-function)) - (project-roots project))) +Most often it's just one directory which contains the project +build file and everything else in the project. But in more +advanced configurations, a project can span multiple directories. -(cl-defgeneric project-roots (project) - "Return the list of directory roots belonging to the current project. +The directory names should be absolute.") -Most often it's just one directory, which contains the project -file and everything else in the project. But in more advanced -configurations, a project can span multiple directories. +;; FIXME: Add MODE argument, like in `ede-source-paths'? +(cl-defgeneric project-external-roots (_project) + "Return the list of external roots for PROJECT. -The rule of thumb for whether to include a directory here, and not -in `project-library-roots', is whether its contents are meant to -be edited together with the rest of the project. +It's the list of directories outside of the project that are +still related to it. If the project deals with source code then, +depending on the languages used, this list should include the +headers search path, load path, class path, and so on. -The directory names should be absolute.") +The rule of thumb for whether to include a directory here, and +not in `project-roots', is whether its contents are meant to be +edited together with the rest of the project." + nil) (cl-defgeneric project-ignores (_project _dir) "Return the list of glob patterns to ignore inside DIR. Patterns can match both regular files and directories. To root an entry, start it with `./'. To match directories only, end it with `/'. DIR must be one of `project-roots' or -`project-library-roots'." +`project-external-roots'." (require 'grep) (defvar grep-find-ignored-files) (nconc @@ -133,17 +141,46 @@ end it with `/'. DIR must be one of `project-roots' or "Project implementation using the VC package." :group 'tools) -(defcustom project-vc-library-roots nil - "List ot directories to include in `project-library-roots'. -The file names can be absolute, or relative to the project root." - :type '(repeat file) - :safe 'listp) - (defcustom project-vc-ignores nil "List ot patterns to include in `project-ignores'." :type '(repeat string) :safe 'listp) +;; FIXME: Using the current approach, major modes are supposed to set +;; this variable to a buffer-local value. So we don't have access to +;; the "external roots" of language A from buffers of language B, which +;; seems desirable in multi-language projects, at least for some +;; potential uses, like "jump to a file in project or external dirs". +;; +;; We could add a second argument to this function: a file extension, +;; or a language name. Some projects will know the set of languages +;; used in them; for others, like VC-based projects, we'll need +;; auto-detection. I see two options: +;; +;; - That could be implemented as a separate second hook, with a +;; list of functions that return file extensions. +;; +;; - This variable will be turned into a hook with "append" semantics, +;; and each function in it will perform auto-detection when passed +;; nil instead of an actual file extension. Then this hook will, in +;; general, be modified globally, and not from major mode functions. +;; +;; The second option seems simpler, but the first one has the +;; advantage that the user could override the list of languages used +;; in a project via a directory-local variable, thus skipping +;; languages they're not working on personally (in a big project), or +;; working around problems in language detection (the detection logic +;; might be imperfect for the project in question, or it might work +;; too slowly for the user's taste). +(defvar project-vc-external-roots-function (lambda () tags-table-list) + "Function that returns a list of external roots. + +It should return a list of directory roots that contain source +files related to the current buffer. + +The directory names should be absolute. Used in the VC project +backend implementation of `project-external-roots'.") + (defun project-try-vc (dir) (let* ((backend (ignore-errors (vc-responsible-backend dir))) (root (and backend (ignore-errors @@ -153,15 +190,12 @@ The file names can be absolute, or relative to the project root." (cl-defmethod project-roots ((project (head vc))) (list (cdr project))) -(cl-defmethod project-library-roots ((project (head vc))) +(cl-defmethod project-external-roots ((project (head vc))) (project-subtract-directories (project-combine-directories - (append - (let ((root (cdr project))) - (mapcar - (lambda (dir) (file-name-as-directory (expand-file-name dir root))) - (project--value-in-dir 'project-vc-library-roots root))) - (funcall project-library-roots-function))) + (mapcar + #'file-name-as-directory + (funcall project-vc-external-roots-function))) (project-roots project))) (cl-defmethod project-ignores ((project (head vc)) dir) @@ -217,7 +251,7 @@ DIRS must contain directory names." ;;;###autoload (defun project-find-regexp (regexp) - "Find all matches for REGEXP in the current project. + "Find all matches for REGEXP in the current project's roots. With \\[universal-argument] prefix, you can specify the directory to search in, and the file name pattern to search for." (interactive (list (project--read-regexp))) @@ -229,15 +263,15 @@ to search in, and the file name pattern to search for." (project--find-regexp-in dirs regexp pr))) ;;;###autoload -(defun project-or-libraries-find-regexp (regexp) - "Find all matches for REGEXP in the current project or libraries. +(defun project-or-external-find-regexp (regexp) + "Find all matches for REGEXP in the project roots or external roots. With \\[universal-argument] prefix, you can specify the file name pattern to search for." (interactive (list (project--read-regexp))) (let* ((pr (project-current t)) (dirs (append (project-roots pr) - (project-library-roots pr)))) + (project-external-roots pr)))) (project--find-regexp-in dirs regexp pr))) (defun project--read-regexp () diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 397f379..abb9cc6 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -246,7 +246,7 @@ find a search tool; by default, this uses \"find | grep\" in the (let ((pr (project-current t))) (append (project-roots pr) - (project-library-roots pr))))) + (project-external-roots pr))))) (cl-defgeneric xref-backend-apropos (backend pattern) "Find all symbols that match PATTERN. @@ -886,7 +886,7 @@ IGNORES is a list of glob patterns." hits))) (unwind-protect (cl-mapcan (lambda (hit) (xref--collect-matches hit regexp)) - (nreverse hits)) + hits) ;; TODO: Same as above. (mapc #'kill-buffer (cl-set-difference (buffer-list) orig-buffers))))) commit b9097188f7a6dbfd408a1fe8c6df80526d3bd944 Author: Lars Ingebrigtsen Date: Mon Dec 28 04:15:16 2015 +0100 * idna.el (idna-decode-string-internal): Implement decoding. diff --git a/lisp/net/idna.el b/lisp/net/idna.el index dfaf711..052a9f6 100644 --- a/lisp/net/idna.el +++ b/lisp/net/idna.el @@ -30,6 +30,9 @@ (require 'seq) (defun idna-encode-string (string) + "Encode STRING according to the IDNA/punycode algorithm. +This is used to encode non-ASCII domain names. +For instance, \"bücher\" => \"xn--bcher-kva\"." (let ((ascii (seq-filter (lambda (char) (< char 128)) string))) @@ -37,6 +40,13 @@ string (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string))))) +(defun idna-decode-string (string) + "Decode an IDNA/punycode-encoded string. +For instance \"xn--bcher-kva\" => \"bücher\"." + (if (string-match "\\`xn--.*-" string) + (idna-decode-string-internal (substring string 4)) + string)) + (defconst idna-initial-n 128) (defconst idna-initial-bias 72) (defconst idna-base 36) @@ -47,12 +57,12 @@ (defun idna-decode-digit (cp) (cond - ((< (- cp 48) 10) - (- cp 22)) - ((< (- cp 65) 26) - (- cp 65)) - ((< (- cp 97) 26) - (- cp 97)) + ((<= cp ?9) + (- cp ?0)) + ((<= cp ?Z) + (- cp ?A)) + ((<= cp ?z) + (- cp ?a)) (t idna-base))) @@ -119,6 +129,50 @@ (cl-incf n)) (nreverse result))) +(defun idna-decode-string-internal (string) + (with-temp-buffer + (insert string) + (goto-char (point-max)) + (if (not (search-backward "-" nil t)) + (error "Invalid IDNA string") + ;; The encoded chars are after the final dash. + (let ((encoded (buffer-substring (1+ (point)) (point-max))) + (ic 0) + (i 0) + (bias idna-initial-bias) + (n idna-initial-n) + out) + (delete-region (point) (point-max)) + (while (< ic (length encoded)) + (let ((old-i i) + (w 1) + (k idna-base) + digit t1) + (cl-loop do (progn + (setq digit (idna-decode-digit (aref encoded ic))) + (cl-incf ic) + (cl-incf i (* digit w)) + (setq t1 (cond + ((<= k bias) + idna-tmin) + ((>= k (+ bias idna-tmax)) + idna-tmax) + (t + (- k bias))))) + while (>= digit t1) + do (setq w (* w (- idna-base t1)) + k (+ k idna-base))) + (setq out (1+ (buffer-size))) + (setq bias (idna-adapt (- i old-i) out (= old-i 0)))) + + (setq n (+ n (/ i out)) + i (mod i out)) + (goto-char (point-min)) + (forward-char i) + (insert (format "%c" n)) + (cl-incf i)))) + (buffer-string))) + (provide 'idna) ;;; shr.el ends here commit 1f591ca64f2409b4c44d7ff239f95bcfa1a568aa Author: Lars Ingebrigtsen Date: Mon Dec 28 02:57:40 2015 +0100 Further IDNA tweaks (idna-encode-string): Make idna-encode-string safe for non-ASCII use. diff --git a/lisp/net/idna.el b/lisp/net/idna.el index f34fb9c..dfaf711 100644 --- a/lisp/net/idna.el +++ b/lisp/net/idna.el @@ -33,7 +33,9 @@ (let ((ascii (seq-filter (lambda (char) (< char 128)) string))) - (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string)))) + (if (= (length ascii) (length string)) + string + (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string))))) (defconst idna-initial-n 128) (defconst idna-initial-bias 72) commit bd892f033229d13a7f84e45906c070c052d4b1ae Author: Lars Ingebrigtsen Date: Mon Dec 28 02:55:52 2015 +0100 Clean up the code slightly diff --git a/lisp/net/idna.el b/lisp/net/idna.el index 24a771b..f34fb9c 100644 --- a/lisp/net/idna.el +++ b/lisp/net/idna.el @@ -27,22 +27,13 @@ ;;; Code: +(require 'seq) + (defun idna-encode-string (string) - (cl-destructuring-bind (ascii complex) - (cl-loop for i from 0 - for char across string - when (< char 128) - collect char into ascii - else - collect (cons i char) into complex - finally (return (list ascii complex))) - (concat (mapconcat 'string ascii "") - "-" - (idna-encode-complex (length ascii) - (sort complex - (lambda (e1 e2) - (< (cdr e1) (cdr e2)))) - string)))) + (let ((ascii (seq-filter (lambda (char) + (< char 128)) + string))) + (concat "xn--" ascii "-" (idna-encode-complex (length ascii) string)))) (defconst idna-initial-n 128) (defconst idna-initial-bias 72) @@ -53,13 +44,15 @@ (defconst idna-skew 28) (defun idna-decode-digit (cp) - (if (< (- cp 48) 10) - (- cp 22) - (if (< (- cp 65) 26) - (- cp 65) - (if (< (- cp 97) 26) - (- cp 97) - idna-base)))) + (cond + ((< (- cp 48) 10) + (- cp 22)) + ((< (- cp 65) 26) + (- cp 65)) + ((< (- cp 97) 26) + (- cp 97)) + (t + idna-base))) ;; 0-25 a-z ;; 26-36 0-9 @@ -74,20 +67,20 @@ (/ delta 2))) (k 0)) (setq delta (+ delta (/ delta num-points))) - (cl-loop while (> delta (/ (* (- idna-base idna-tmin) - idna-tmax) - 2)) - do (setq delta (/ delta (- idna-base idna-tmin)) - k (+ k idna-base))) + (while (> delta (/ (* (- idna-base idna-tmin) + idna-tmax) + 2)) + (setq delta (/ delta (- idna-base idna-tmin)) + k (+ k idna-base))) (+ k (/ (* (1+ (- idna-base idna-tmin)) delta) (+ delta idna-skew))))) -(defun idna-encode-complex (insertion-points complex string) +(defun idna-encode-complex (insertion-points string) (let ((n idna-initial-n) (delta 0) (bias idna-initial-bias) (h insertion-points) - result m) + result m ijv q) (while (< h (length string)) (setq ijv (cl-loop for char across string when (>= char n) @@ -102,11 +95,13 @@ do (progn (setq q delta) (cl-loop with k = idna-base - for t1 = (if (<= k bias) - idna-tmin - (if (>= k (+ bias idna-tmax)) - idna-tmax - (- k bias))) + for t1 = (cond + ((<= k bias) + idna-tmin) + ((>= k (+ bias idna-tmax)) + idna-tmax) + (t + (- k bias))) while (>= q t1) do (push (idna-encode-digit (+ t1 (mod (- q t1) commit 6a15c60d348c2652cca15b723ff72f8a6c53bb08 Author: Lars Ingebrigtsen Date: Mon Dec 28 02:46:50 2015 +0100 Added basic idna encoding support * lisp/net/idna.el: New file. diff --git a/lisp/net/idna.el b/lisp/net/idna.el new file mode 100644 index 0000000..24a771b --- /dev/null +++ b/lisp/net/idna.el @@ -0,0 +1,127 @@ +;;; idna.el --- translate non-ASCII domain names to ASCII + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen +;; Keywords: mail, net + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Written by looking at +;; http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion + +;;; Code: + +(defun idna-encode-string (string) + (cl-destructuring-bind (ascii complex) + (cl-loop for i from 0 + for char across string + when (< char 128) + collect char into ascii + else + collect (cons i char) into complex + finally (return (list ascii complex))) + (concat (mapconcat 'string ascii "") + "-" + (idna-encode-complex (length ascii) + (sort complex + (lambda (e1 e2) + (< (cdr e1) (cdr e2)))) + string)))) + +(defconst idna-initial-n 128) +(defconst idna-initial-bias 72) +(defconst idna-base 36) +(defconst idna-damp 700) +(defconst idna-tmin 1) +(defconst idna-tmax 26) +(defconst idna-skew 28) + +(defun idna-decode-digit (cp) + (if (< (- cp 48) 10) + (- cp 22) + (if (< (- cp 65) 26) + (- cp 65) + (if (< (- cp 97) 26) + (- cp 97) + idna-base)))) + +;; 0-25 a-z +;; 26-36 0-9 +(defun idna-encode-digit (d) + (if (< d 26) + (+ ?a d) + (+ ?0 (- d 26)))) + +(defun idna-adapt (delta num-points first-time) + (let ((delta (if first-time + (/ delta idna-damp) + (/ delta 2))) + (k 0)) + (setq delta (+ delta (/ delta num-points))) + (cl-loop while (> delta (/ (* (- idna-base idna-tmin) + idna-tmax) + 2)) + do (setq delta (/ delta (- idna-base idna-tmin)) + k (+ k idna-base))) + (+ k (/ (* (1+ (- idna-base idna-tmin)) delta) + (+ delta idna-skew))))) + +(defun idna-encode-complex (insertion-points complex string) + (let ((n idna-initial-n) + (delta 0) + (bias idna-initial-bias) + (h insertion-points) + result m) + (while (< h (length string)) + (setq ijv (cl-loop for char across string + when (>= char n) + minimize char)) + (setq m ijv) + (setq delta (+ delta (* (- m n) (+ h 1))) + n m) + (cl-loop for char across string + when (< char n) + do (cl-incf delta) + when (= char ijv) + do (progn + (setq q delta) + (cl-loop with k = idna-base + for t1 = (if (<= k bias) + idna-tmin + (if (>= k (+ bias idna-tmax)) + idna-tmax + (- k bias))) + while (>= q t1) + do (push (idna-encode-digit + (+ t1 (mod (- q t1) + (- idna-base t1)))) + result) + do (setq q (/ (- q t1) (- idna-base t1)) + k (+ k idna-base))) + (push (idna-encode-digit q) result) + (setq bias (idna-adapt delta (+ h 1) (= h insertion-points)) + delta 0 + h (1+ h)))) + (cl-incf delta) + (cl-incf n)) + (nreverse result))) + +(provide 'idna) + +;;; shr.el ends here commit 1fe73447864345c03fb28005122137419286853b Author: Vivek Dasmohapatra Date: Sun Dec 27 23:28:52 2015 +0100 Disconnection fixes for erc * lisp/erc/erc-backend.el (erc-server-reconnect-p): Don't reconnect if the user has disconnected explicitly (bug#4589). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index fbac849..cab0fb9 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -604,20 +604,22 @@ Make sure you are in an ERC buffer when running this." (defsubst erc-server-reconnect-p (event) "Return non-nil if ERC should attempt to reconnect automatically. EVENT is the message received from the closed connection process." - (or erc-server-reconnecting - (and erc-server-auto-reconnect - (not erc-server-banned) - (not erc-server-error-occurred) - ;; make sure we don't infinitely try to reconnect, unless the - ;; user wants that - (or (eq erc-server-reconnect-attempts t) - (and (integerp erc-server-reconnect-attempts) - (< erc-server-reconnect-count - erc-server-reconnect-attempts))) - (or erc-server-timed-out - (not (string-match "^deleted" event))) - ;; open-network-stream-nowait error for connection refused - (not (string-match "^failed with code 111" event))))) + (and (not erc-server-quitting) ;; user issued an explicit quit, give up now + (or erc-server-reconnecting ;; user issued explicit reconnect + ;; otherwise go through the full spectrum of checks: + (and erc-server-auto-reconnect + (not erc-server-banned) + (not erc-server-error-occurred) + ;; make sure we don't infinitely try to reconnect, unless the + ;; user wants that + (or (eq erc-server-reconnect-attempts t) + (and (integerp erc-server-reconnect-attempts) + (< erc-server-reconnect-count + erc-server-reconnect-attempts))) + (or erc-server-timed-out + (not (string-match "^deleted" event))) + ;; open-network-stream-nowait error for connection refused + (not (string-match "^failed with code 111" event)))))) (defun erc-process-sentinel-2 (event buffer) "Called when `erc-process-sentinel-1' has detected an unexpected disconnect." commit d50b89dda9478b5e7e20e9b23bf48bd07ee6210a Author: Thomas Riccardi Date: Sun Dec 27 23:14:13 2015 +0100 Further erc asynch fixes * lisp/erc/erc-backend.el (erc-process-sentinel-2): Make erc-server-connect to return even if the connection is not ready. Then erc-open and erc-server-reconnect do the same. (bug#5650). Copyright-paperwork-exempt: yes diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index a0b3537..fbac849 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -640,13 +640,11 @@ EVENT is the message received from the closed connection process." (condition-case err (progn (setq erc-server-reconnecting nil) - (erc-server-reconnect) - (setq erc-server-reconnect-count 0)) + (setq erc-server-reconnect-count (1+ erc-server-reconnect-count)) + (erc-server-reconnect)) (error (when (buffer-live-p buffer) (set-buffer buffer) - (if (integerp erc-server-reconnect-attempts) - (setq erc-server-reconnect-count - (1+ erc-server-reconnect-count)) + (unless (integerp erc-server-reconnect-attempts) (message "%s ... %s" "Reconnecting until we succeed" "kill the ERC server buffer to stop")) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 126cac6..cd8e427 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4488,6 +4488,7 @@ Set user modes and run `erc-after-connect' hook." (nick (car (erc-response.command-args parsed))) (buffer (process-buffer proc))) (setq erc-server-connected t) + (setq erc-server-reconnect-count 0) (erc-update-mode-line) (erc-set-initial-user-mode nick buffer) (erc-server-setup-periodical-ping buffer) commit 92e1878a04a7940413c426d641334dd8f090f741 Author: Vivek Dasmohapatra Date: Sun Dec 27 23:12:30 2015 +0100 Make erc connect asynchronously * lisp/erc/erc-backend.el (erc-server-reconnect): Use it to reconnect asynchronously. * lisp/erc/erc-backend.el (erc-open-network-stream): New function (bug#5650). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index ec45dcf..a0b3537 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -376,7 +376,7 @@ alist." :type '(repeat (cons (string :tag "Target") coding-system))) -(defcustom erc-server-connect-function 'open-network-stream +(defcustom erc-server-connect-function 'erc-open-network-stream "Function used to initiate a connection. It should take same arguments as `open-network-stream' does." :group 'erc-server @@ -505,51 +505,53 @@ The current buffer is given by BUFFER." (memq (process-status erc-server-process) '(run open))))) ;;;; Connecting to a server +(defun erc-open-network-stream (name buffer host service) + "As `open-network-stream', but does non-blocking IO" + (make-network-process :name name :buffer buffer + :host host :service service :nowait t)) (defun erc-server-connect (server port buffer) "Perform the connection and login using the specified SERVER and PORT. We will store server variables in the buffer given by BUFFER." - (let ((msg (erc-format-message 'connect ?S server ?p port))) + (let ((msg (erc-format-message 'connect ?S server ?p port)) process) (message "%s" msg) - (let ((process (funcall erc-server-connect-function - (format "erc-%s-%s" server port) - nil server port))) - (unless (processp process) - (error "Connection attempt failed")) + (setq process (funcall erc-server-connect-function + (format "erc-%s-%s" server port) nil server port)) + (unless (processp process) + (error "Connection attempt failed")) + ;; Misc server variables + (with-current-buffer buffer + (setq erc-server-process process) + (setq erc-server-quitting nil) + (setq erc-server-reconnecting nil) + (setq erc-server-timed-out nil) + (setq erc-server-banned nil) + (setq erc-server-error-occurred nil) + (let ((time (erc-current-time))) + (setq erc-server-last-sent-time time) + (setq erc-server-last-ping-time time) + (setq erc-server-last-received-time time)) + (setq erc-server-lines-sent 0) + ;; last peers (sender and receiver) + (setq erc-server-last-peers '(nil . nil))) + ;; we do our own encoding and decoding + (when (fboundp 'set-process-coding-system) + (set-process-coding-system process 'raw-text)) + ;; process handlers + (set-process-sentinel process 'erc-process-sentinel) + (set-process-filter process 'erc-server-filter-function) + (set-process-buffer process buffer) + (erc-log "\n\n\n********************************************\n") + (message "%s" (erc-format-message + 'login ?n + (with-current-buffer buffer (erc-current-nick)))) + ;; wait with script loading until we receive a confirmation (first + ;; MOTD line) + (if (eq (process-status process) 'connect) + ;; waiting for a non-blocking connect - keep the user informed + (erc-display-message nil nil buffer "Opening connection..\n") (message "%s...done" msg) - ;; Misc server variables - (with-current-buffer buffer - (setq erc-server-process process) - (setq erc-server-quitting nil) - (setq erc-server-reconnecting nil) - (setq erc-server-timed-out nil) - (setq erc-server-banned nil) - (setq erc-server-error-occurred nil) - (let ((time (erc-current-time))) - (setq erc-server-last-sent-time time) - (setq erc-server-last-ping-time time) - (setq erc-server-last-received-time time)) - (setq erc-server-lines-sent 0) - ;; last peers (sender and receiver) - (setq erc-server-last-peers '(nil . nil))) - ;; we do our own encoding and decoding - (when (fboundp 'set-process-coding-system) - (set-process-coding-system process 'raw-text)) - ;; process handlers - (set-process-sentinel process 'erc-process-sentinel) - (set-process-filter process 'erc-server-filter-function) - (set-process-buffer process buffer))) - (erc-log "\n\n\n********************************************\n") - (message "%s" (erc-format-message - 'login ?n - (with-current-buffer buffer (erc-current-nick)))) - ;; wait with script loading until we receive a confirmation (first - ;; MOTD line) - (if (eq erc-server-connect-function 'open-network-stream-nowait) - ;; it's a bit unclear otherwise that it's attempting to establish a - ;; connection - (erc-display-message nil nil buffer "Opening connection..\n") - (erc-login))) + (erc-login)) )) (defun erc-server-reconnect () "Reestablish the current IRC connection. @@ -565,7 +567,7 @@ Make sure you are in an ERC buffer when running this." (setq erc-server-last-sent-time 0) (setq erc-server-lines-sent 0) (let ((erc-server-connect-function (or erc-session-connector - 'open-network-stream))) + 'erc-open-network-stream))) (erc-open erc-session-server erc-session-port erc-server-current-nick erc-session-user-full-name t erc-session-password))))) commit a36c88806dcfc993e6af83b0d0f44b077293bc30 Author: Deniz Dogan Date: Sun Dec 27 22:36:55 2015 +0100 Clear erc user list upon disconnection * lisp/erc/erc-backend.el (erc-process-sentinel): Clear channel user lists upon disconnection. This prevents invalid channel user lists when reconnecting (bug#10947). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index df957d1..06a23e8 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -703,6 +703,9 @@ Conditionally try to reconnect and take appropriate action." (setq erc-server-ping-handler nil))) (run-hook-with-args 'erc-disconnected-hook (erc-current-nick) (system-name) "") + (dolist (buf (erc-buffer-filter (lambda () (boundp 'erc-channel-users)) cproc)) + (with-current-buffer buf + (setq erc-channel-users (make-hash-table :test 'equal)))) ;; Remove the prompt (goto-char (or (marker-position erc-input-marker) (point-max))) (forward-line 0) commit ff5f37e56a1df53dbc15c8590d904ac37a82a335 Author: Lars Ingebrigtsen Date: Sun Dec 27 22:18:32 2015 +0100 Don't bug out in erc after waking from sleep * erc-backend.el (erc-server-send-ping): If the server has closed connection, this may already have been detected and `erc-server-last-received-time' has been set to nil (bug#13608). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index daaa1b0..df957d1 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -805,7 +805,9 @@ protection algorithm." (defun erc-server-send-ping (buf) "Send a ping to the IRC server buffer in BUF. Additionally, detect whether the IRC process has hung." - (if (buffer-live-p buf) + (if (and (buffer-live-p buf) + (with-current-buffer buf + erc-server-last-received-time)) (with-current-buffer buf (if (and erc-server-send-ping-timeout (> commit af25edebbcb33e788a0f4f9619787417aa0834b8 Author: David Edmondson Date: Sun Dec 27 21:33:01 2015 +0100 Proxy error in erc with multiple clients * lisp/erc/erc.el (erc-channel-receive-names): Fix errors generated when multiple IRC clients talk to a single IRC proxy (bug#19034). Backport: (cherry picked from commit 507e98a54d1aa37823c64993d6b59257a82fe8f4) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 04e99c7..2b22bd5 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4826,6 +4826,11 @@ channel." (_ (error "Unknown prefix char `%S'" ch) voice)) 'on))) (when updatep + ;; If we didn't issue the NAMES request (consider two clients + ;; talking to an IRC proxy), `erc-channel-begin-receiving-names' + ;; will not have been called, so we have to do it here. + (unless erc-channel-new-member-names + (erc-channel-begin-receiving-names)) (puthash (erc-downcase name) t erc-channel-new-member-names) (erc-update-current-channel-member commit 507e98a54d1aa37823c64993d6b59257a82fe8f4 Author: David Edmondson Date: Sun Dec 27 21:33:01 2015 +0100 Proxy error in erc with multiple clients * lisp/erc/erc.el (erc-channel-receive-names): Fix errors generated when multiple IRC clients talk to a single IRC proxy (bug#19034). diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index cd8c8a8..126cac6 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4826,6 +4826,11 @@ channel." (_ (error "Unknown prefix char `%S'" ch) voice)) 'on))) (when updatep + ;; If we didn't issue the NAMES request (consider two clients + ;; talking to an IRC proxy), `erc-channel-begin-receiving-names' + ;; will not have been called, so we have to do it here. + (unless erc-channel-new-member-names + (erc-channel-begin-receiving-names)) (puthash (erc-downcase name) t erc-channel-new-member-names) (erc-update-current-channel-member commit 2cd894dc348b4872d7beb10275387c30027c8f26 Author: Dima Kogan Date: Sun Dec 27 21:19:13 2015 +0100 Ensure that we don't have several timers in erc * lisp/erc/erc-backend.el (erc-server-setup-periodical-ping): Checks for existing timers in the alist before adding new ones. If a timer already exists, it is cancelled and overwritten. (bug#19292). diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index b52c8f5..daaa1b0 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -493,9 +493,19 @@ The current buffer is given by BUFFER." 4 erc-server-send-ping-interval #'erc-server-send-ping buffer)) - (setq erc-server-ping-timer-alist (cons (cons buffer - erc-server-ping-handler) - erc-server-ping-timer-alist))))) + + ;; I check the timer alist for an existing timer. If one exists, + ;; I get rid of it + (let ((timer-tuple (assq buffer erc-server-ping-timer-alist))) + (if timer-tuple + ;; this buffer already has a timer. Cancel it and set the new one + (progn + (erc-cancel-timer (cdr timer-tuple)) + (setf (cdr (assq buffer erc-server-ping-timer-alist)) erc-server-ping-handler)) + + ;; no existing timer for this buffer. Add new one + (add-to-list 'erc-server-ping-timer-alist + (cons buffer erc-server-ping-handler))))))) (defun erc-server-process-alive (&optional buffer) "Return non-nil when BUFFER has an `erc-server-process' open or running." commit 85c1843f65f0fd82ed6c1df92b6a9a5113e51b1e Author: Jens Lechtenboerger Date: Sun Dec 27 21:12:16 2015 +0100 Fix mml-sec build warnings * lisp/gnus/mml-sec.el: Fix warnings by adding autoloads (bug#18718). Backport: (cherry picked from commit 3603097f62f5f4aa5451716e9ac380161f6829e2) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 45da937..0900237 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -25,10 +25,13 @@ (eval-when-compile (require 'cl)) +(autoload 'gnus-subsetp "gnus-util") +(autoload 'mail-strip-quoted-names "mail-utils") (autoload 'mml2015-sign "mml2015") (autoload 'mml2015-encrypt "mml2015") (autoload 'mml1991-sign "mml1991") (autoload 'mml1991-encrypt "mml1991") +(autoload 'message-fetch-field "message") (autoload 'message-goto-body "message") (autoload 'mml-insert-tag "mml") (autoload 'mml-smime-sign "mml-smime") commit 3603097f62f5f4aa5451716e9ac380161f6829e2 Author: Jens Lechtenboerger Date: Sun Dec 27 21:12:16 2015 +0100 Fix mml-sec build warnings * lisp/gnus/mml-sec.el: Fix warnings by adding autoloads (bug#18718). diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 0f26228..4f57cb7 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -25,10 +25,13 @@ (eval-when-compile (require 'cl)) +(autoload 'gnus-subsetp "gnus-util") +(autoload 'mail-strip-quoted-names "mail-utils") (autoload 'mml2015-sign "mml2015") (autoload 'mml2015-encrypt "mml2015") (autoload 'mml1991-sign "mml1991") (autoload 'mml1991-encrypt "mml1991") +(autoload 'message-fetch-field "message") (autoload 'message-goto-body "message") (autoload 'mml-insert-tag "mml") (autoload 'mml-smime-sign "mml-smime") commit 5caa4dea5a3432e2b9c5f85b63265c05954c3d53 Author: Lars Ingebrigtsen Date: Sun Dec 27 21:08:01 2015 +0100 Don't insert erc logs at the end * erc-log.el (erc-log-setup-logging): Insert the previous log at the start of the buffer, not at the end (bug#20496). diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index f022284..4ac13aa 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -270,9 +270,12 @@ The current buffer is given by BUFFER." (setq buffer-file-name nil) (erc-set-write-file-functions '(erc-save-buffer-in-logs)) (when erc-log-insert-log-on-open - (ignore-errors (insert-file-contents (erc-current-logfile)) - (move-marker erc-last-saved-position - (1- (point-max)))))))) + (ignore-errors + (save-excursion + (goto-char (point-min)) + (insert-file-contents (erc-current-logfile))) + (move-marker erc-last-saved-position + (1- (point-max)))))))) (defun erc-log-disable-logging (buffer) "Disable logging in BUFFER." commit 03dbfb948c13dd7c9f24fae63e6ef482393c1e8e Author: Lars Ingebrigtsen Date: Sun Dec 27 20:35:05 2015 +0100 (eww-setup-buffer): Restore left-to-right defaults * eww.el (eww-setup-buffer): Restore left-to-right defaults. Backport: (cherry picked from commit 96c874b96b617c124d500a94de761a61f2a08685) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 033529d..5755a94 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -561,6 +561,7 @@ Currently this means either text/html or application/xhtml+xml." (let ((inhibit-read-only t)) (remove-overlays) (erase-buffer)) + (setq bidi-paragraph-direction 'left-to-right) (unless (eq major-mode 'eww-mode) (eww-mode))) commit 96c874b96b617c124d500a94de761a61f2a08685 Author: Lars Ingebrigtsen Date: Sun Dec 27 20:35:05 2015 +0100 (eww-setup-buffer): Restore left-to-right defaults * eww.el (eww-setup-buffer): Restore left-to-right defaults. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index babfdef..7ec58f1 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -565,6 +565,7 @@ Currently this means either text/html or application/xhtml+xml." (let ((inhibit-read-only t)) (remove-overlays) (erase-buffer)) + (setq bidi-paragraph-direction 'left-to-right) (unless (eq major-mode 'eww-mode) (eww-mode))) commit 504982765cc563d96a0b773f4cf183ceacaf5861 Author: Lars Ingebrigtsen Date: Sun Dec 27 20:25:57 2015 +0100 Don't join erc channels doubly * erc-join.el (erc-autojoin-channels): Don't join channels more than once (if you have several nicks) (bug#20695). diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index 4c99898..c1ce14a 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el @@ -156,7 +156,13 @@ This function is run from `erc-nickserv-identified-hook'." (dolist (l erc-autojoin-channels-alist) (when (string-match (car l) server) (dolist (chan (cdr l)) - (erc-server-join-channel server chan))))) + (let ((buffer (erc-get-buffer chan))) + ;; Only auto-join the channels that we aren't already in + ;; using a different nick. + (when (or (not buffer) + (not (with-current-buffer buffer + (erc-server-process-alive)))) + (erc-server-join-channel server chan))))))) ;; Return nil to avoid stomping on any other hook funcs. nil) @@ -170,7 +176,7 @@ This function is run from `erc-nickserv-identified-hook'." (password (if (functionp secret) (funcall secret) secret))) - (erc-server-send (concat "join " channel + (erc-server-send (concat "JOIN " channel (if password (concat " " password) ""))))) commit 3ad99c4674e670b73e7dcd8de3fa00b6dec4448f Author: Eli Zaretskii Date: Sun Dec 27 20:52:21 2015 +0200 Avoid leaving "ghost" of mouse pointer on MS-Windows * src/w32term.c (frame_set_mouse_pixel_position): * src/w32fns.c (Fw32_mouse_absolute_pixel_position): Momentarily disable "mouse trails" when moving the mouse pointer. (Bug#22247) * src/w32term.c (frame_set_mouse_pixel_position): Include w32common.h. diff --git a/src/w32fns.c b/src/w32fns.c index 4be3221..c1d9bff 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -8093,11 +8093,22 @@ The coordinates X and Y are interpreted in pixels relative to a position (0, 0) of the selected frame's display. */) (Lisp_Object x, Lisp_Object y) { + UINT trail_num = 0; + BOOL ret = false; + CHECK_TYPE_RANGED_INTEGER (int, x); CHECK_TYPE_RANGED_INTEGER (int, y); block_input (); + /* When "mouse trails" are in effect, moving the mouse cursor + sometimes leaves behind an annoying "ghost" of the pointer. + Avoid that by momentarily switching off mouse trails. */ + if (os_subtype == OS_NT + && w32_major_version + w32_minor_version >= 6) + ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); SetCursorPos (XINT (x), XINT (y)); + if (ret) + SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0); unblock_input (); return Qnil; diff --git a/src/w32term.c b/src/w32term.c index 0b8bef2..60d64f7 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "blockinput.h" #include "w32term.h" +#include "w32common.h" /* for OS version info */ #include #include @@ -6237,6 +6238,8 @@ x_set_window_size (struct frame *f, bool change_gravity, void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) { + UINT trail_num = 0; + BOOL ret = false; RECT rect; POINT pt; @@ -6247,7 +6250,15 @@ frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) pt.y = rect.top + pix_y; ClientToScreen (FRAME_W32_WINDOW (f), &pt); + /* When "mouse trails" are in effect, moving the mouse cursor + sometimes leaves behind an annoying "ghost" of the pointer. + Avoid that by momentarily switching off mouse trails. */ + if (os_subtype == OS_NT + && w32_major_version + w32_minor_version >= 6) + ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); SetCursorPos (pt.x, pt.y); + if (ret) + SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0); unblock_input (); } commit c9c849e19b1484fe0fb0f674c272711659a260c8 Author: Lars Ingebrigtsen Date: Sun Dec 27 19:24:58 2015 +0100 * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): Fix typo in last check-in. diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index dbae280..0f26228 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -310,7 +310,7 @@ either an error is raised or not." (when bcc ;; Split recipients at "," boundary, omit empty strings (t), ;; and strip whitespace. - (let ((bcc-list (split-string hdr "," t "\\s-+"))) + (let ((bcc-list (split-string bcc "," t "\\s-+"))) (unless (gnus-subsetp bcc-list mml-secure-safe-bcc-list) (unless (yes-or-no-p "Message for encryption contains Bcc header.\ This may give away all Bcc'ed identities to all recipients.\ commit a757149ca49c1ae0b70ef74c2181e0fb10a81f5e Author: Jens Lechtenboerger Date: Sun Dec 27 19:22:56 2015 +0100 Identify unsafe combinations of Bcc and encryption * lisp/gnus/gnus-util.el (gnus-subsetp): New function * lisp/gnus/mml-sec.el (mml-secure-safe-bcc-list): New variable * lisp/gnus/mml-sec.el (mml-secure-bcc-is-safe): New function diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 40e2dcf..933387d 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1989,6 +1989,16 @@ to case differences." (defun gnus-timer--function (timer) (elt timer 5))) +(defun gnus-subsetp (list1 list2) + "Return t if LIST1 is a subset of LIST2. +Similar to `subsetp' but use member for element test so that this works for +lists of strings." + (when (and (listp list1) (listp list2)) + (if list1 + (and (member (car list1) list2) + (gnus-subsetp (cdr list1) list2)) + t))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 45da937..dbae280 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -122,6 +122,21 @@ Whether the passphrase is cached at all is controlled by :group 'message :type 'integer) +(defcustom mml-secure-safe-bcc-list nil + "List of e-mail addresses that are safe to use in Bcc headers. +EasyPG encrypts e-mails to Bcc addresses, and the encrypted e-mail +by default identifies the used encryption keys, giving away the +Bcc'ed identities. Clearly, this contradicts the original goal of +*blind* copies. +For an academic paper explaining the problem, see URL +`http://crypto.stanford.edu/portia/papers/bb-bcc.pdf'. +Use this variable to specify e-mail addresses whose owners do not +mind if they are identifiable as recipients. This may be useful if +you use Bcc headers to encrypt e-mails to yourself." + :version "25.1" + :group 'message + :type '(repeat string)) + ;;; Configuration/helper functions (defun mml-signencrypt-style (method &optional style) @@ -272,6 +287,37 @@ Use METHOD if given. Else use `mml-secure-method' or (interactive) (mml-secure-part "smime")) +(defun mml-secure-is-encrypted-p () + "Check whether secure encrypt tag is present." + (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n" + "<#secure[^>]+encrypt") + nil t))) + +(defun mml-secure-bcc-is-safe () + "Check whether usage of Bcc is safe (or absent). +Bcc usage is safe in two cases: first, if the current message does +not contain an MML secure encrypt tag; +second, if the Bcc addresses are a subset of `mml-secure-safe-bcc-list'. +In all other cases, ask the user whether Bcc usage is safe. +Raise error if user answers no. +Note that this function does not produce a meaningful return value: +either an error is raised or not." + (when (mml-secure-is-encrypted-p) + (let ((bcc (mail-strip-quoted-names (message-fetch-field "bcc")))) + (when bcc + ;; Split recipients at "," boundary, omit empty strings (t), + ;; and strip whitespace. + (let ((bcc-list (split-string hdr "," t "\\s-+"))) + (unless (gnus-subsetp bcc-list mml-secure-safe-bcc-list) + (unless (yes-or-no-p "Message for encryption contains Bcc header.\ + This may give away all Bcc'ed identities to all recipients.\ + Are you sure that this is safe?\ + (Customize `mml-secure-safe-bcc-list' to avoid this warning.) ") + (error "Aborted")))))))) + ;; defuns that add the proper <#secure ...> tag to the top of the message body (defun mml-secure-message (method &optional modesym) (let ((mode (prin1-to-string modesym)) commit c57d000a943b234e371414fb0642a3393db53289 Author: Glenn Morris Date: Sun Dec 27 06:23:49 2015 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index 61b25ab..6d72663 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,240 @@ +2015-12-27 Lars Ingebrigtsen + + * shr.el (shr-descend): Allow using lambdas in external functions. + +2015-12-25 Stefan Monnier + + * admin/gitmerge.el: Tweaks that seemed necessary + + * admin/gitmerge.el (gitmerge-skip-regexp): Remove "sync". + (gitmerge-maybe-resume): Provide explicit empty commit message. + +2015-12-25 Łukasz Stelmach (tiny change) + + Use a different port for TLS erc + + * lisp/erc/erc.el (erc-default-port-tls): New variable + (bug#19497). + * lisp/erc/erc.el (erc-tls): Use it. + +2015-12-25 Alain Schneble + + Make relative URL parsing and resolution consistent with RFC 3986 (bug#22044) + + * test/lisp/url/url-parse-tests.el: Add tests covering url-generic-parse-url. + * test/lisp/url/url-expand-tests.el: Add tests covering url-expand-file-name. + * lisp/url/url-parse.el (url-generic-parse-url): Keep empty fragment + information in URL-struct. + * lisp/url/url-parse.el (url-path-and-query): Do not artificially turn empty + path and query into nil path and query, respectively. + * lisp/url/url-expand.el (url-expander-remove-relative-links): Do not turn + empty path into an absolute ("/") path. + * lisp/url/url-expand.el (url-expand-file-name): Properly resolve + fragment-only URIs. Do not just return them unchanged. + * lisp/url/url-expand.el (url-default-expander): An empty path in the relative + reference URI should not drop the last segment. + +2015-12-25 Alain Schneble + + Make relative URL parsing and resolution consistent with RFC 3986 (bug#22044) + + * test/lisp/url/url-parse-tests.el: Add tests covering url-generic-parse-url. + * test/lisp/url/url-expand-tests.el: Add tests covering url-expand-file-name. + * lisp/url/url-parse.el (url-generic-parse-url): Keep empty fragment + information in URL-struct. + * lisp/url/url-parse.el (url-path-and-query): Do not artificially turn empty + path and query into nil path and query, respectively. + * lisp/url/url-expand.el (url-expander-remove-relative-links): Do not turn + empty path into an absolute ("/") path. + * lisp/url/url-expand.el (url-expand-file-name): Properly resolve + fragment-only URIs. Do not just return them unchanged. + * lisp/url/url-expand.el (url-default-expander): An empty path in the relative + reference URI should not drop the last segment. + +2015-12-25 Lars Ingebrigtsen + + Let url use default file modes when copying files + + * lisp/url/url-handlers.el (url-copy-file): Use default file + modes when copying files (bug#11400). + +2015-12-25 Devon Sean McCullough + + Doc fix for url-http + + * lisp/url/url-http.el (url-http): Document better return values + (bug#13187) (tiny change) + +2015-12-25 Lars Ingebrigtsen + + * eww.el (eww-display-html): Support