Commit graph

132801 commits

Author SHA1 Message Date
Eric Abrahamsen
ffbb4e8d54 Further fix to eieio-persistent
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  Make handling of hash tables and vectors recursive. This is
  necessary because the write process, in `eieio-override-prin1' is
  also recursive. With any luck, this will be the last fix of its
  kind. If that's true, cherry-pick to Emacs 26.2 later on.
2018-04-13 10:56:55 -07:00
Lars Ingebrigtsen
de28ae70ef Make nnimap parse pathological spam headers better
* lisp/gnus/nnimap.el (nnimap-transform-headers): Unfold certain
pathological IMAP headers more correctly (bug#25502).  Perhaps
this function should be re-implemented.
2018-04-13 19:28:17 +02:00
Lars Ingebrigtsen
9f8c433d96 Fix syntax error in emacs-mime.texi in last check-in 2018-04-13 19:09:03 +02:00
Lars Ingebrigtsen
7e47d44da4 Prefer settings from ~/.mailcap over system and Emacs settings
* doc/misc/emacs-mime.texi (mailcap): Document the variable and
how mailcap chooses which viewer to use.

* lisp/net/mailcap.el (mailcap-prefer-mailcap-viewers): New variable.
(mailcap-mime-info): Use it.
2018-04-13 19:08:16 +02:00
Lars Ingebrigtsen
712607b05a Fix bug in shr-urlify introduced in previous patch
* lisp/net/shr.el (shr-urlify): Not all URLs have domains, so
check for that before doing IDNA.
2018-04-13 18:35:07 +02:00
Lars Ingebrigtsen
b1943e84bc Make shr support inline <div>s
* lisp/net/shr.el (shr-tag-div): Support display: inline; for
<div>, since that's a very common thing (bug#25588).
2018-04-13 17:30:59 +02:00
Lars Ingebrigtsen
c194be368c Notify the user a bit more before clicking IDNA links
* lisp/net/shr.el (shr-urlify): Show the puny-encoded domain name
in the mouseover string (bug#25600).
2018-04-13 17:11:07 +02:00
Lars Ingebrigtsen
bd7601f21b (nnimap-sequence): Add comment
* lisp/gnus/nnimap.el (nnimap-sequence): Add comment.
2018-04-13 16:50:45 +02:00
Lars Ingebrigtsen
560553b1fa (url-http): Ensure that the referrer is all-ASCII
* lisp/url/url-http.el (url-http): Ensure that the referrer is all-ASCII.
2018-04-13 16:41:13 +02:00
Lars Ingebrigtsen
a53bac3142 gnutls.el now needs punycode
* lisp/net/gnutls.el (puny): Require punycode.
2018-04-13 16:39:17 +02:00
Lars Ingebrigtsen
4a63023303 Make Unicode domain names work again in URL after recent changes
* lisp/net/gnutls.el (open-gnutls-stream): IDNA-encode hostnames
before passing them on to gnutls for verification.

* lisp/net/network-stream.el (network-stream-open-starttls): Ditto.

* lisp/url/url-http.el (url-http--get-referer): Be IDNA-aware.
(url-http-create-request): Don't de-Unicodify host names, because
they may be IDNA names (that are later encoded).

* lisp/url/url-util.el (url-domain): Be IDNA-aware when doing
domain name computations.
2018-04-13 16:38:10 +02:00
Lars Ingebrigtsen
1fd104d30a Update defcustom version for last patch to url-vars.el
* lisp/url/url-vars.el (url-lastloc-privacy-level): Update
defcustom version.
2018-04-13 15:42:53 +02:00
Lars Ingebrigtsen
013bb2097e Use a separate history for the eww prompt
* lisp/net/eww.el (eww-prompt-history): A separate history
variable for the interactive eww prompt.
(eww): Use it.
2018-04-13 15:42:53 +02:00
Michael Albinus
1f31c1348c Fix Bug#30246
* lisp/auth-source.el (auth-source-secrets-search): Do not
suppress creation.
(auth-source-secrets-create): Implement it.  (Bug#30246)

* lisp/net/secrets.el (secrets-debug): Set default to nil.

* test/lisp/auth-source-tests.el (secrets): Require it.
(auth-source-test-secrets-create-secret): New test.
2018-04-13 15:21:24 +02:00
Peder O. Klingenberg
9822a6a570 Change gnutls-verify-error to be first-match
* doc/misc/url.texi (Customization): Describe the new user
option url-lastloc-privacy-level.

* lisp/net/eww.el (eww-render): Set url-current-lastloc to the
url we are rendering, to get the referer header right on
subsequent requests.

* lisp/url/url-http.el (url-http--get-referer): New function
to determine which referer to send, if any, considering the
users privacy settings and the target url we are visiting.
(url-http-referer): New variable keeping track of the referer
computed by url-http--get-referer
(url-http-create-request): Use url-http-referer instead of the
optional argument to set up the referer header.  Leave
checking of privacy settings to url-http--get-referer.
(url-http): Set up url-http-referer by using
url-http--get-referer.

* lisp/url/url-queue.el (url-queue): New struct member
context-buffer for keeping track of the context a queued job
started from.
(url-queue-retrieve): Store the current buffer in the queue
object.
(url-queue-start-retrieve): Make sure url-retrieve is called
in the context of the original buffer, if available.

* lisp/url/url-util.el (url-domain): New function to determine
the domain of a given URL.

* lisp/url/url-vars.el (url-current-lastloc): New variable to
keep track of the desired "last location" (referer header).
(url-lastloc-privacy-level): New custom setting for more
fine-grained control over how lastloc (referer) is sent to
servers (Bug#27012).
2018-04-13 15:08:18 +02:00
Lars Ingebrigtsen
fa41693799 Make #anchors work again in eww
* lisp/net/eww.el (eww-render): When we have a #link link, then
url.el will say that we have a redirect to a non-#link link, so
get the anchor before url.el mangles the URL (bug#28441).
(eww-display-html): ... and don't get it here, because it's gone
by now.

Test URL: http://www.gnu.org/s/hyperbole/#summary
2018-04-13 14:55:55 +02:00
Robert Pluim
0a71996423 Doc fix after previous gnutls patch
* lisp/net/gnutls.el (gnutls-verify-error): Mention that the
matching is first-match (bug#29977).
2018-04-13 14:44:41 +02:00
Robert Pluim
d5cf7330fa Change gnutls-verify-error to be first-match
* lisp/net/gnutls.el (gnutls-boot-parameters): Convert to
first-match for gnutls-verify-error rather than any-match
(bug#29977).
2018-04-13 14:24:11 +02:00
Lars Ingebrigtsen
feb5b442f7 Mention the new `shr-selected-link' face 2018-04-13 14:21:31 +02:00
Lars Ingebrigtsen
f51d3a8333 Clean up the double Gnus section 2018-04-13 14:19:47 +02:00
Lars Ingebrigtsen
4f4c7b8083 When opening external links in eww, blink the link
* lisp/net/eww.el (eww-follow-link): Ditto.

* lisp/net/shr.el (shr-selected-link): New face (bug#25096).
(shr--blink-link): New function to blink links.
(shr--current-link-region): New utility function.
(shr-browse-url): Use it to blink external links.

Blinking the link allows the user to get immediate feedback that the
action has been performed.  Opening the external browser may take a
while, and may not be obvious that is going on.
2018-04-13 14:17:51 +02:00
Lars Ingebrigtsen
c7abc5760b Tweak nnimap sequence numbers to avoid reuse
* lisp/gnus/nnimap.el (nnimap-sequence): Start the sequence at a
higher number to avoid reusing the sequence number used by
`open-network-stream' (bug#30022).
2018-04-13 13:41:31 +02:00
martin rudalics
a20d2e6625 * lisp/gnus/gnus-art.el (gnus-article-prepare): Fix previous commit,
in which selecting the article window is not necessary (bug#25526).
2018-04-13 07:42:19 +00:00
Lars Ingebrigtsen
93678bffe6 Remove unused local variable 2018-04-13 02:23:49 +02:00
Lars Ingebrigtsen
e6c4a0298e Treat 302 redirects as if they were 303 redirects
* lisp/url/url-http.el (url-http-parse-headers): Treat 302 as 303,
since this is what the standards recommend these days (bug#25703).
See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
2018-04-13 02:21:30 +02:00
Lars Ingebrigtsen
45c4c03f0d Make eww render <select> elements again
* lisp/net/eww.el (eww-tag-select): Actually render <select>
elements (bug#25703).
2018-04-13 02:08:40 +02:00
Lars Ingebrigtsen
dd0d2e0fdd <label> shouldn't introduce a line break
* lisp/net/shr.el (shr-tag-label): Remove so that labels don't
break lines (because they shouldn't: They're usually part of a
selection interface) (bug#30557).
2018-04-13 01:51:56 +02:00
Katsumi Yamaoka
306a6f8d43 * lisp/gnus/gnus-art.el (gnus-article-prepare): Make sure the article
begins with the top of the header (bug#25526).
2018-04-12 23:19:17 +00:00
Lars Ingebrigtsen
f8db783d09 Tweak the eww readability function
* lisp/net/eww.el (eww-highest-readability): Require that the
readable bit is at least 100 words (bug#30445).
2018-04-13 00:14:32 +02:00
Lars Ingebrigtsen
254f5021aa (dom-texts): Don't return contents of <script> as text
From: Lars Ingebrigtsen <larsi@gnus.org>

* lisp/dom.el (dom-texts): Don't return contents of <script> as
text, because it isn't and makes reasoning about textual parts
more difficult.
2018-04-13 00:14:32 +02:00
Basil L. Contovounesios
3d6fa0b1e0 Support list of default values in completing-read-multiple
* lisp/emacs-lisp/crm.el (completing-read-multiple):
Consider head of DEF argument when specified as a list,
as per completing-read-default. (bug#30072)
2018-04-12 23:36:45 +03:00
Jonathan Marten
7643fbb452 From: Lars Ingebrigtsen <larsi@gnus.org>
* lisp/gnus/nnimap.el (nnimap-login): Allow anonymous logins
(bug#24704).

Copyright-paperwork-exempt: yes
2018-04-12 22:24:11 +02:00
Lars Ingebrigtsen
c22677bf00 Default message-forward-as-mime to nil
* doc/misc/gnus.texi (Summary Mail Commands): Ditto.

* doc/misc/message.texi (Forwarding): Note the new default.

* lisp/gnus/message.el (message-forward-as-mime): Default to nil
since it's been reported that many recipients can't read MIME
digest forwards (bug#24878).
2018-04-12 22:04:09 +02:00
Lars Ingebrigtsen
e7c813e912 Load w3m in Gnus if required
* lisp/gnus/gnus-art.el (gnus-article-show-images): Ensure that
w3m is loaded if the user requests that we use it.
2018-04-12 21:34:37 +02:00
Tim Landscheidt
271d8510c4 Don't autoload function from w3m
* lisp/gnus/gnus-art.el (w3m-toggle-inline-images): Don't use
autoload for packages that may not be installed (bug#25604).
2018-04-12 21:31:49 +02:00
Oleg Pykhalov
2892b4b99c From: Lars Ingebrigtseb <larsi@gnus.org>
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-score): Allow limit
to articles that have a score below the stated number, too
(bug#30356).
2018-04-12 21:19:23 +02:00
Lars Ingebrigtsen
02f4d79222 message-forward-as-mime doc clarification
* lisp/gnus/message.el (message-forward-as-mime): Doc
clarification (bug#27714).
2018-04-12 21:13:47 +02:00
Lars Ingebrigtsen
57fbf0cf7b message-forward-ignored-headers doc clarification
* lisp/gnus/message.el (message-forward-ignored-headers): Doc
clarification (bug#27715).
2018-04-12 21:11:12 +02:00
Lars Ingebrigtsen
6499285898 Restore point in summary buffer after sorting
* lisp/gnus/gnus-sum.el (gnus-summary-sort): Keep point on the
current article when sorting (bug#30615).
2018-04-12 19:36:28 +02:00
Lars Ingebrigtsen
17174d3f77 nil is no longer an allowed value for mm-inline-text-html
* doc/misc/emacs-mime.texi (Display Customization): Remove the doc
for the nil case of mm-inline-text-html.

* doc/misc/mh-e.texi (HTML): Ditto.

* lisp/gnus/mm-view.el (mm-inline-text-html): If no
mm-text-html-renderer is specified, just insert the raw text
instead of erroring out (bug#30870).
2018-04-12 19:18:26 +02:00
Lars Ingebrigtsen
4616ddc131 Ensure that non-QRESYNC nnimap can proceed after a QRESYNC fail
* lisp/gnus/nnimap.el (nnimap-update-info): If we don't have a
start-article in the non-QRESYNC case, then the start has to be 1
(bug#23241).
2018-04-12 18:12:03 +02:00
Lars Ingebrigtsen
d9d90def6e Make it possible to exit Gnus without saving .newsrc.eld
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Don't error out
here so that we can proceed with shutting down Gnus without saving
the .newsrc.eld file when it has been updated externally (bug#23761).
2018-04-12 17:50:14 +02:00
Lars Ingebrigtsen
f4692fa290 Make nnml save the .overview file when used as an expiry target
* lisp/gnus/nnmail.el (nnmail-expiry-target-group): Always pass in
the `last' parameter to the acceptance function so that backends
like nnml save the .overview file (bug#24499).  This may slow down
some use cases.
2018-04-12 16:53:07 +02:00
Lars Ingebrigtsen
c0593bfc7c Clarify Gnus doc string
* lisp/gnus/gnus-cite.el (gnus-article-fill-cited-article):
Clarify doc string (bug#24578).
2018-04-12 16:33:36 +02:00
Lars Ingebrigtsen
aa9d9e5e10 Elide XEmacs-relevant comment
* lisp/gnus/gnus-cite.el (gnus-article-fill-cited-article): Remove
mention of XEmacs, since we no longer support XEmacs.
2018-04-12 16:32:00 +02:00
Lars Ingebrigtsen
4f95846833 Make message-simplify-recipients obsolete
* lisp/gnus/message.el (message-simplify-recipients)
(message-recipients-without-full-name): Made obsolete since
Message now simplifies all addresses by default.
2018-04-12 15:17:40 +02:00
Lars Ingebrigtsen
9978e88b31 Remove repetitions from recipient addresses in Message
* lisp/gnus/message.el (message--alter-repeat-address): New function.
(message-get-reply-headers): Use it to remove repetitions on the
form "foo@bar.com" <foo@bar.com>.
2018-04-12 14:59:41 +02:00
Damien Cassou
20c6a516ec * etc/NEWS: Fix entry regarding automatic encryption of (Bug#31124) messages 2018-04-11 21:25:46 -04:00
Noam Postavsky
1160af606c ; doc/misc/gnus.texi (Fancy Mail Splitting): Fix misplaced @item. 2018-04-11 21:17:08 -04:00
Shanavas M
10f5f4361b Add tests for buffer-base-buffer function (Bug#30905)
* test/src/buffer-tests.el (test-buffer-base-buffer-indirect)
(test-buffer-base-buffer-non-indirect): New tests for
`buffer-base-buffer'.
2018-04-11 21:16:49 -04:00