diff options
| -rw-r--r-- | doc/misc/ChangeLog | 16 | ||||
| -rw-r--r-- | doc/misc/auth.texi | 114 | ||||
| -rw-r--r-- | doc/misc/emacs-mime.texi | 4 | ||||
| -rw-r--r-- | doc/misc/gnus-news.texi | 9 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 26 | ||||
| -rw-r--r-- | etc/GNUS-NEWS | 8 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 27 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 33 | ||||
| -rw-r--r-- | lisp/gnus/mml.el | 33 |
11 files changed, 242 insertions, 60 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 87efed613e5..dc39384e346 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2009-08-29 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * auth.texi: Rewritten for coverage and clarity. | ||
| 4 | |||
| 5 | 2009-08-29 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 6 | |||
| 7 | * gnus.texi (Expiring Mail): Mention | ||
| 8 | gnus-mark-copied-or-moved-articles-as-expirable. | ||
| 9 | (Various Various): Mention gnus-safe-html-newsgroups. | ||
| 10 | |||
| 11 | * gnus-news.texi: Mention | ||
| 12 | gnus-mark-copied-or-moved-articles-as-expirable. | ||
| 13 | |||
| 14 | * emacs-mime.texi (Display Customization): Add xref to | ||
| 15 | gnus-safe-html-newsgroups. | ||
| 16 | |||
| 1 | 2009-08-28 Michael Albinus <michael.albinus@gmx.de> | 17 | 2009-08-28 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 18 | ||
| 3 | * tramp.texi (Version Control): Remove. | 19 | * tramp.texi (Version Control): Remove. |
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index e4eaedbbc75..0cdb0df21d9 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | @setfilename ../../info/auth | 2 | @setfilename ../../info/auth |
| 3 | @settitle Emacs auth-source Library @value{VERSION} | 3 | @settitle Emacs auth-source Library @value{VERSION} |
| 4 | 4 | ||
| 5 | @set VERSION 0.1 | 5 | @set VERSION 0.2 |
| 6 | 6 | ||
| 7 | @copying | 7 | @copying |
| 8 | This file describes the Emacs auth-source library. | 8 | This file describes the Emacs auth-source library. |
| @@ -67,19 +67,53 @@ It is a way for multiple applications to share a single configuration | |||
| 67 | @node Overview | 67 | @node Overview |
| 68 | @chapter Overview | 68 | @chapter Overview |
| 69 | 69 | ||
| 70 | To be done. | 70 | The auth-source library is a modern, extensible, enterprise-class |
| 71 | authentication library. It uses the latest design patterns, has 1800 | ||
| 72 | unit tests, and has been featured in 21 industry conference keynote | ||
| 73 | talks. It's future-proof, mathematically proven to be bug-free, and | ||
| 74 | has 6 internal XML parsers just in case you ever need to eat up some | ||
| 75 | memory. | ||
| 76 | |||
| 77 | Just kidding. The auth-source library is simply a way for Emacs and | ||
| 78 | Gnus, among others, to find the answer to the old burning question ``I | ||
| 79 | have a server name and a port, what are my user name and password?'' | ||
| 80 | |||
| 81 | The auth-source library actually supports more than just the user name | ||
| 82 | (known as the login) or the password, but only those two are in use | ||
| 83 | today in Emacs or Gnus. Similarly, the auth-source library can in | ||
| 84 | theory support multiple storage formats, but currently it only | ||
| 85 | understands the classic ``netrc'' format, examples of which you can | ||
| 86 | see later in this document. | ||
| 71 | 87 | ||
| 72 | @node Help for users | 88 | @node Help for users |
| 73 | @chapter Help for users | 89 | @chapter Help for users |
| 74 | 90 | ||
| 75 | If you have problems with the port, turn up @code{gnus-verbose} and | 91 | ``Netrc'' files are a de facto standard. They look like this: |
| 76 | see what port the library is checking. Ditto for any other | 92 | @example |
| 77 | problems, your first step is to see what's being checked. | 93 | machine mymachine login myloginname password mypassword port myport |
| 94 | @end example | ||
| 78 | 95 | ||
| 79 | Setup: | 96 | The port is optional. If it's missing, auth-source will assume any |
| 97 | port is OK. Actually the port is a protocol name or a port number so | ||
| 98 | you can have separate entries for port 143 and for protocol ``imap'' | ||
| 99 | if you fancy that. Anyway, you can just omit the port if you don't | ||
| 100 | need it. ``Netrc'' files are usually called @code{.authinfo} or | ||
| 101 | @code{.netrc}; nowadays @code{.authinfo} seems to be more popular and | ||
| 102 | the auth-source library encourages this confusion by making it the | ||
| 103 | default, as you'll see later. | ||
| 104 | |||
| 105 | If you have problems with the port, set @var{auth-source-debug} to t | ||
| 106 | and see what port the library is checking in the @code{*Messages*} | ||
| 107 | buffer. Ditto for any other problems, your first step is always to | ||
| 108 | see what's being checked. The second step, of course, is to write a | ||
| 109 | blog entry about it and wait for the answer in the comments. | ||
| 110 | |||
| 111 | You can customize the variable @var{auth-sources}. The following may | ||
| 112 | be needed if you are using an older version of Emacs or if the | ||
| 113 | auth-source library is not loaded for some other reason. | ||
| 80 | 114 | ||
| 81 | @lisp | 115 | @lisp |
| 82 | (require 'auth-source) | 116 | (require 'auth-source) ;; probably not necessary |
| 83 | (customize-variable 'auth-sources) ;; optional, do it once | 117 | (customize-variable 'auth-sources) ;; optional, do it once |
| 84 | @end lisp | 118 | @end lisp |
| 85 | 119 | ||
| @@ -93,21 +127,18 @@ can get fancy, the default and simplest configuration is: | |||
| 93 | (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) | 127 | (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) |
| 94 | @end lisp | 128 | @end lisp |
| 95 | 129 | ||
| 96 | By adding multiple entries to that list with a particular host or | 130 | This says ``for any host and any protocol, use just that one file.'' |
| 97 | protocol, you can have specific netrc files for that host or protocol. | 131 | Sweet simplicity. In fact, this is already the default, so unless you |
| 98 | 132 | want to move your netrc file, it will just work if you have that | |
| 99 | @end defvar | 133 | file. You may not, though, so make sure it exists. |
| 100 | 134 | ||
| 135 | By adding multiple entries to @var{auth-sources} with a particular | ||
| 136 | host or protocol, you can have specific netrc files for that host or | ||
| 137 | protocol. Usually this is unnecessary but may make sense if you have | ||
| 138 | shared netrc files or some other unusual setup (90% of Emacs users | ||
| 139 | have unusual setups and the remaining 10% are @emph{really} unusual). | ||
| 101 | 140 | ||
| 102 | ``Netrc'' files are a de facto standard. They look like this: | 141 | @end defvar |
| 103 | @example | ||
| 104 | machine mymachine login myloginname password mypassword port myport | ||
| 105 | @end example | ||
| 106 | |||
| 107 | The port is optional. If it's missing, auth-source will assume any | ||
| 108 | port is OK. Actually the port is a protocol name or a port number so | ||
| 109 | you can have separate entries for port 143 and for protocol ``imap'' | ||
| 110 | if you fancy that. | ||
| 111 | 142 | ||
| 112 | If you don't customize @var{auth-sources}, you'll have to live with | 143 | If you don't customize @var{auth-sources}, you'll have to live with |
| 113 | the defaults: any host and any port are looked up in the netrc | 144 | the defaults: any host and any port are looked up in the netrc |
| @@ -117,9 +148,26 @@ you set up EPA, which is strongly recommended. | |||
| 117 | @lisp | 148 | @lisp |
| 118 | (require 'epa-file) | 149 | (require 'epa-file) |
| 119 | (epa-file-enable) | 150 | (epa-file-enable) |
| 120 | (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important | 151 | ;;; VERY important if you want symmetric encryption |
| 152 | ;;; irrelevant if you don't | ||
| 153 | (setq epa-file-cache-passphrase-for-symmetric-encryption t) | ||
| 121 | @end lisp | 154 | @end lisp |
| 122 | 155 | ||
| 156 | The simplest working netrc line example is one without a port. | ||
| 157 | |||
| 158 | @example | ||
| 159 | machine YOURMACHINE login YOU password YOURPASSWORD | ||
| 160 | @end example | ||
| 161 | |||
| 162 | This will match any authentication port. Simple, right? But what if | ||
| 163 | there's a SMTP server on port 433 of that machine that needs a | ||
| 164 | different password from the IMAP server? | ||
| 165 | |||
| 166 | @example | ||
| 167 | machine YOURMACHINE login YOU password SMTPPASSWORD port 433 | ||
| 168 | machine YOURMACHINE login YOU password GENERALPASSWORD | ||
| 169 | @end example | ||
| 170 | |||
| 123 | For url-auth authentication (HTTP/HTTPS), you need to put this in your | 171 | For url-auth authentication (HTTP/HTTPS), you need to put this in your |
| 124 | netrc file: | 172 | netrc file: |
| 125 | 173 | ||
| @@ -127,9 +175,9 @@ netrc file: | |||
| 127 | machine yourmachine.com:80 port http login testuser password testpass | 175 | machine yourmachine.com:80 port http login testuser password testpass |
| 128 | @end example | 176 | @end example |
| 129 | 177 | ||
| 130 | This will match any realm and authentication method (basic or | 178 | This will match any realm and authentication method (basic or digest) |
| 131 | digest). If you want finer controls, explore the url-auth source | 179 | over HTTP. HTTPS is set up similarly. If you want finer controls, |
| 132 | code and variables. | 180 | explore the url-auth source code and variables. |
| 133 | 181 | ||
| 134 | For Tramp authentication, use: | 182 | For Tramp authentication, use: |
| 135 | 183 | ||
| @@ -139,7 +187,8 @@ machine yourmachine.com port scp login testuser password testpass | |||
| 139 | 187 | ||
| 140 | Note that the port denotes the Tramp connection method. When you | 188 | Note that the port denotes the Tramp connection method. When you |
| 141 | don't use a port entry, you match any Tramp method, as explained | 189 | don't use a port entry, you match any Tramp method, as explained |
| 142 | earlier. | 190 | earlier. Since Tramp has about 88 connection methods, this may be |
| 191 | necessary if you have an unusual (see earlier comment on those) setup. | ||
| 143 | 192 | ||
| 144 | @node Help for developers | 193 | @node Help for developers |
| 145 | @chapter Help for developers | 194 | @chapter Help for developers |
| @@ -149,14 +198,17 @@ The auth-source library only has one function for external use. | |||
| 149 | @defun auth-source-user-or-password mode host port | 198 | @defun auth-source-user-or-password mode host port |
| 150 | 199 | ||
| 151 | Retrieve appropriate authentication tokens, determined by @var{mode}, | 200 | Retrieve appropriate authentication tokens, determined by @var{mode}, |
| 152 | for host @var{host} and @var{port}. If @code{gnus-verbose} is 9 or | 201 | for host @var{host} and @var{port}. If @var{auth-source-debug} is t, |
| 153 | higher, debugging messages will be printed. | 202 | debugging messages will be printed. Set @var{auth-source-debug} to a |
| 203 | function to use that function for logging. The parameters passed will | ||
| 204 | be the same that the @code{message} function takes, that is, a string | ||
| 205 | formatting spec and optional parameters. | ||
| 154 | 206 | ||
| 155 | If @var{mode} is a list of strings, the function will return a list of | 207 | If @var{mode} is a list of strings, the function will return a list of |
| 156 | strings or @code{nil} objects. If it's a string, the function will | 208 | strings or @code{nil} objects (thus you can avoid parsing the netrc |
| 157 | return a string or a @code{nil} object. Currently only the modes | 209 | file more than once). If it's a string, the function will return a |
| 158 | ``login'' and ``password'' are recognized but more may be added in the | 210 | string or a @code{nil} object. Currently only the modes ``login'' and |
| 159 | future. | 211 | ``password'' are recognized but more may be added in the future. |
| 160 | 212 | ||
| 161 | @var{host} is a string containing the host name. | 213 | @var{host} is a string containing the host name. |
| 162 | 214 | ||
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index e9a03595502..a49ccf62cd7 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi | |||
| @@ -418,7 +418,9 @@ or @kbd{I} instead.} | |||
| 418 | A regular expression that matches safe URL names, i.e. URLs that are | 418 | A regular expression that matches safe URL names, i.e. URLs that are |
| 419 | unlikely to leak personal information when rendering @acronym{HTML} | 419 | unlikely to leak personal information when rendering @acronym{HTML} |
| 420 | email (the default value is @samp{\\`cid:}). If @code{nil} consider | 420 | email (the default value is @samp{\\`cid:}). If @code{nil} consider |
| 421 | all URLs safe. | 421 | all URLs safe. In Gnus, this will be overridden according to the value |
| 422 | of the variable @code{gnus-safe-html-newsgroups}, @xref{Various | ||
| 423 | Various, ,Various Various, gnus, Gnus Manual}. | ||
| 422 | 424 | ||
| 423 | @item mm-inline-text-html-with-w3m-keymap | 425 | @item mm-inline-text-html-with-w3m-keymap |
| 424 | @vindex mm-inline-text-html-with-w3m-keymap | 426 | @vindex mm-inline-text-html-with-w3m-keymap |
diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index 09d7be56a7a..cf6d80862d2 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi | |||
| @@ -311,6 +311,15 @@ intermediate host @samp{bar.example.com} from next time. | |||
| 311 | @item The @file{all.SCORE} file can be edited from the group buffer | 311 | @item The @file{all.SCORE} file can be edited from the group buffer |
| 312 | using @kbd{W e}. | 312 | using @kbd{W e}. |
| 313 | 313 | ||
| 314 | @item You can set @code{gnus-mark-copied-or-moved-articles-as-expirable} | ||
| 315 | to a non-@code{nil} value so that articles that have been read may be | ||
| 316 | marked as expirable automatically when copying or moving them to a group | ||
| 317 | that has auto-expire turned on. The default is @code{nil} and copying | ||
| 318 | and moving of articles behave as before; i.e., the expirable marks will | ||
| 319 | be unchanged except that the marks will be removed when copying or | ||
| 320 | moving articles to a group that has not turned auto-expire on. | ||
| 321 | @xref{Expiring Mail}. | ||
| 322 | |||
| 314 | @end itemize | 323 | @end itemize |
| 315 | 324 | ||
| 316 | @end itemize | 325 | @end itemize |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index a7eb08101a2..91ce3228231 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -16299,6 +16299,23 @@ If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking | |||
| 16299 | commands will not mark an article as expirable, even if the group has | 16299 | commands will not mark an article as expirable, even if the group has |
| 16300 | auto-expire turned on. | 16300 | auto-expire turned on. |
| 16301 | 16301 | ||
| 16302 | @vindex gnus-mark-copied-or-moved-articles-as-expirable | ||
| 16303 | The expirable marks of articles will be removed when copying or moving | ||
| 16304 | them to a group in which auto-expire is not turned on. This is for | ||
| 16305 | preventing articles from being expired unintentionally. On the other | ||
| 16306 | hand, to a group that has turned auto-expire on, the expirable marks of | ||
| 16307 | articles that are copied or moved will not be changed by default. I.e., | ||
| 16308 | when copying or moving to such a group, articles that were expirable | ||
| 16309 | will be left expirable and ones that were not expirable will not be | ||
| 16310 | marked as expirable. So, even though in auto-expire groups, some | ||
| 16311 | articles will never get expired (unless you read them again). If you | ||
| 16312 | don't side with that behavior that unexpirable articles may be mixed | ||
| 16313 | into auto-expire groups, you can set | ||
| 16314 | @code{gnus-mark-copied-or-moved-articles-as-expirable} to a | ||
| 16315 | non-@code{nil} value. In that case, articles that have been read will | ||
| 16316 | be marked as expirable automatically when being copied or moved to a | ||
| 16317 | group that has auto-expire turned on. The default value is @code{nil}. | ||
| 16318 | |||
| 16302 | 16319 | ||
| 16303 | @node Washing Mail | 16320 | @node Washing Mail |
| 16304 | @subsection Washing Mail | 16321 | @subsection Washing Mail |
| @@ -26926,6 +26943,15 @@ group). | |||
| 26926 | 26943 | ||
| 26927 | @acronym{IMAP} users might want to allow @samp{/} in group names though. | 26944 | @acronym{IMAP} users might want to allow @samp{/} in group names though. |
| 26928 | 26945 | ||
| 26946 | @item gnus-safe-html-newsgroups | ||
| 26947 | @vindex gnus-safe-html-newsgroups | ||
| 26948 | Groups in which links in html articles are considered all safe. The | ||
| 26949 | value may be a regexp matching those groups, a list of group names, or | ||
| 26950 | @code{nil}. This overrides @code{mm-w3m-safe-url-regexp}. The default | ||
| 26951 | value is @code{"\\`nnrss[+:]"}. This is effective only when emacs-w3m | ||
| 26952 | renders html articles, i.e., in the case @code{mm-text-html-renderer} is | ||
| 26953 | set to @code{w3m}. @xref{Display Customization, ,Display Customization, | ||
| 26954 | emacs-mime, The Emacs MIME Manual}. | ||
| 26929 | 26955 | ||
| 26930 | @end table | 26956 | @end table |
| 26931 | 26957 | ||
diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index 808db0de7b3..6bb90d87a02 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS | |||
| @@ -249,6 +249,14 @@ will connect to the news host by way of the intermediate host | |||
| 249 | 249 | ||
| 250 | ** The `all.SCORE' file can be edited from the group buffer using `W e'. | 250 | ** The `all.SCORE' file can be edited from the group buffer using `W e'. |
| 251 | 251 | ||
| 252 | ** You can set `gnus-mark-copied-or-moved-articles-as-expirable' to a | ||
| 253 | non-`nil' value so that articles that have been read may be marked as | ||
| 254 | expirable automatically when copying or moving them to a group that has | ||
| 255 | auto-expire turned on. The default is `nil' and copying and moving of | ||
| 256 | articles behave as before; i.e., the expirable marks will be unchanged | ||
| 257 | except that the marks will be removed when copying or moving articles to | ||
| 258 | a group that has not turned auto-expire on. *Note Expiring Mail::. | ||
| 259 | |||
| 252 | 260 | ||
| 253 | 261 | ||
| 254 | * For older news, see Gnus info node "New Features". | 262 | * For older news, see Gnus info node "New Features". |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2bdd3dfa91a..b11a7295d48 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-08-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * mml.el (mml-attach-file, mml-attach-buffer, mml-attach-external): | ||
| 4 | Don't save excursion. | ||
| 5 | |||
| 1 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * nnheader.el (nnheader-find-file-noselect): | 8 | * nnheader.el (nnheader-find-file-noselect): |
| @@ -23,6 +28,21 @@ | |||
| 23 | * gnus-art.el (gnus-button-patch): Use forward-line rather than | 28 | * gnus-art.el (gnus-button-patch): Use forward-line rather than |
| 24 | goto-line. | 29 | goto-line. |
| 25 | 30 | ||
| 31 | 2009-08-12 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 32 | |||
| 33 | * gnus-group.el (gnus-safe-html-newsgroups): New user option. | ||
| 34 | |||
| 35 | * gnus-art.el (gnus-bind-safe-url-regexp): New macro. | ||
| 36 | (gnus-mime-view-all-parts, gnus-mime-view-part-internally) | ||
| 37 | (gnus-mm-display-part, gnus-mime-display-single) | ||
| 38 | (gnus-mime-display-alternative): Use gnus-bind-safe-url-regexp to | ||
| 39 | override mm-w3m-safe-url-regexp according to gnus-safe-html-newsgroups. | ||
| 40 | |||
| 41 | * gnus-sum.el | ||
| 42 | (gnus-mark-copied-or-moved-articles-as-expirable): New user option. | ||
| 43 | (gnus-summary-move-article): Add expirable mark to articles copied or | ||
| 44 | moved to group that has auto-expire turned on if the option is non-nil. | ||
| 45 | |||
| 26 | 2009-07-24 Glenn Morris <rgm@gnu.org> | 46 | 2009-07-24 Glenn Morris <rgm@gnu.org> |
| 27 | 47 | ||
| 28 | * gnus-demon.el (gnus-demon-add-nntp-close-connection): | 48 | * gnus-demon.el (gnus-demon-add-nntp-close-connection): |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index cedfff0421c..087ad68c539 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4740,6 +4740,23 @@ General format specifiers can also be used. See Info node | |||
| 4740 | (vector (caddr c) (car c) :active t)) | 4740 | (vector (caddr c) (car c) :active t)) |
| 4741 | gnus-mime-button-commands))) | 4741 | gnus-mime-button-commands))) |
| 4742 | 4742 | ||
| 4743 | (defmacro gnus-bind-safe-url-regexp (&rest body) | ||
| 4744 | "Bind `mm-w3m-safe-url-regexp' according to `gnus-safe-html-newsgroups'." | ||
| 4745 | `(let ((mm-w3m-safe-url-regexp | ||
| 4746 | (let ((group (if (and (eq major-mode 'gnus-article-mode) | ||
| 4747 | (gnus-buffer-live-p | ||
| 4748 | gnus-article-current-summary)) | ||
| 4749 | (with-current-buffer gnus-article-current-summary | ||
| 4750 | gnus-newsgroup-name) | ||
| 4751 | gnus-newsgroup-name))) | ||
| 4752 | (if (cond ((stringp gnus-safe-html-newsgroups) | ||
| 4753 | (string-match gnus-safe-html-newsgroups group)) | ||
| 4754 | ((consp gnus-safe-html-newsgroups) | ||
| 4755 | (member group gnus-safe-html-newsgroups))) | ||
| 4756 | nil | ||
| 4757 | mm-w3m-safe-url-regexp)))) | ||
| 4758 | ,@body)) | ||
| 4759 | |||
| 4743 | (defun gnus-mime-button-menu (event prefix) | 4760 | (defun gnus-mime-button-menu (event prefix) |
| 4744 | "Construct a context-sensitive menu of MIME commands." | 4761 | "Construct a context-sensitive menu of MIME commands." |
| 4745 | (interactive "e\nP") | 4762 | (interactive "e\nP") |
| @@ -4765,7 +4782,7 @@ General format specifiers can also be used. See Info node | |||
| 4765 | (or (search-forward "\n\n") (goto-char (point-max))) | 4782 | (or (search-forward "\n\n") (goto-char (point-max))) |
| 4766 | (let ((inhibit-read-only t)) | 4783 | (let ((inhibit-read-only t)) |
| 4767 | (delete-region (point) (point-max)) | 4784 | (delete-region (point) (point-max)) |
| 4768 | (mm-display-parts handles)))))) | 4785 | (gnus-bind-safe-url-regexp (mm-display-parts handles))))))) |
| 4769 | 4786 | ||
| 4770 | (defun gnus-article-jump-to-part (n) | 4787 | (defun gnus-article-jump-to-part (n) |
| 4771 | "Jump to MIME part N." | 4788 | "Jump to MIME part N." |
| @@ -5267,7 +5284,7 @@ If no internal viewer is available, use an external viewer." | |||
| 5267 | (when handle | 5284 | (when handle |
| 5268 | (if (mm-handle-undisplayer handle) | 5285 | (if (mm-handle-undisplayer handle) |
| 5269 | (mm-remove-part handle) | 5286 | (mm-remove-part handle) |
| 5270 | (mm-display-part handle)))))) | 5287 | (gnus-bind-safe-url-regexp (mm-display-part handle))))))) |
| 5271 | 5288 | ||
| 5272 | (defun gnus-mime-action-on-part (&optional action) | 5289 | (defun gnus-mime-action-on-part (&optional action) |
| 5273 | "Do something with the MIME attachment at \(point\)." | 5290 | "Do something with the MIME attachment at \(point\)." |
| @@ -5488,7 +5505,7 @@ N is the numerical prefix." | |||
| 5488 | (save-restriction | 5505 | (save-restriction |
| 5489 | (narrow-to-region (point) | 5506 | (narrow-to-region (point) |
| 5490 | (if (eobp) (point) (1+ (point)))) | 5507 | (if (eobp) (point) (1+ (point)))) |
| 5491 | (mm-display-part handle) | 5508 | (gnus-bind-safe-url-regexp (mm-display-part handle)) |
| 5492 | ;; We narrow to the part itself and | 5509 | ;; We narrow to the part itself and |
| 5493 | ;; then call the treatment functions. | 5510 | ;; then call the treatment functions. |
| 5494 | (goto-char (point-min)) | 5511 | (goto-char (point-min)) |
| @@ -5767,7 +5784,7 @@ If displaying \"text/html\" is discouraged \(see | |||
| 5767 | (set-buffer gnus-summary-buffer) | 5784 | (set-buffer gnus-summary-buffer) |
| 5768 | (error)) | 5785 | (error)) |
| 5769 | gnus-newsgroup-ignored-charsets))) | 5786 | gnus-newsgroup-ignored-charsets))) |
| 5770 | (mm-display-part handle t)) | 5787 | (gnus-bind-safe-url-regexp (mm-display-part handle t))) |
| 5771 | (goto-char (point-max))) | 5788 | (goto-char (point-max))) |
| 5772 | ((and text not-attachment) | 5789 | ((and text not-attachment) |
| 5773 | (when move | 5790 | (when move |
| @@ -5903,7 +5920,7 @@ If displaying \"text/html\" is discouraged \(see | |||
| 5903 | (mail-parse-ignored-charsets | 5920 | (mail-parse-ignored-charsets |
| 5904 | (with-current-buffer gnus-summary-buffer | 5921 | (with-current-buffer gnus-summary-buffer |
| 5905 | gnus-newsgroup-ignored-charsets))) | 5922 | gnus-newsgroup-ignored-charsets))) |
| 5906 | (mm-display-part preferred) | 5923 | (gnus-bind-safe-url-regexp (mm-display-part preferred)) |
| 5907 | ;; Do highlighting. | 5924 | ;; Do highlighting. |
| 5908 | (save-excursion | 5925 | (save-excursion |
| 5909 | (save-restriction | 5926 | (save-restriction |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 602ee31944a..4a7f06833a3 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -110,6 +110,18 @@ If nil, no groups are permanently visible." | |||
| 110 | :group 'gnus-group-listing | 110 | :group 'gnus-group-listing |
| 111 | :type '(choice regexp (const nil))) | 111 | :type '(choice regexp (const nil))) |
| 112 | 112 | ||
| 113 | (defcustom gnus-safe-html-newsgroups "\\`nnrss[+:]" | ||
| 114 | "Groups in which links in html articles are considered all safe. | ||
| 115 | The value may be a regexp matching those groups, a list of group names, | ||
| 116 | or nil. This overrides `mm-w3m-safe-url-regexp' (which see). This is | ||
| 117 | effective only when emacs-w3m renders html articles, i.e., in the case | ||
| 118 | `mm-text-html-renderer' is set to `w3m'." | ||
| 119 | :version "23.2" | ||
| 120 | :group 'gnus-group-various | ||
| 121 | :type '(choice regexp | ||
| 122 | (repeat :tag "List of group names" (string :tag "Group")) | ||
| 123 | (const nil))) | ||
| 124 | |||
| 113 | (defcustom gnus-list-groups-with-ticked-articles t | 125 | (defcustom gnus-list-groups-with-ticked-articles t |
| 114 | "*If non-nil, list groups that have only ticked articles. | 126 | "*If non-nil, list groups that have only ticked articles. |
| 115 | If nil, only list groups that have unread articles." | 127 | If nil, only list groups that have unread articles." |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 0624418f5ee..c77e3fcd9e2 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -668,6 +668,17 @@ string with the suggested prefix." | |||
| 668 | :group 'gnus-summary | 668 | :group 'gnus-summary |
| 669 | :type 'boolean) | 669 | :type 'boolean) |
| 670 | 670 | ||
| 671 | (defcustom gnus-mark-copied-or-moved-articles-as-expirable nil | ||
| 672 | "If non-nil, mark articles copied or moved to auto-expire group as expirable. | ||
| 673 | If nil, the expirable marks will be unchanged except that the marks | ||
| 674 | will be removed when copying or moving articles to a group that has | ||
| 675 | not turned auto-expire on. If non-nil, articles that have been read | ||
| 676 | will be marked as expirable when being copied or moved to a group in | ||
| 677 | which auto-expire is turned on." | ||
| 678 | :version "23.2" | ||
| 679 | :type 'boolean | ||
| 680 | :group 'gnus-summary-marks) | ||
| 681 | |||
| 671 | (defcustom gnus-view-pseudos nil | 682 | (defcustom gnus-view-pseudos nil |
| 672 | "*If `automatic', pseudo-articles will be viewed automatically. | 683 | "*If `automatic', pseudo-articles will be viewed automatically. |
| 673 | If `not-confirm', pseudos will be viewed automatically, and the user | 684 | If `not-confirm', pseudos will be viewed automatically, and the user |
| @@ -9753,11 +9764,12 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." | |||
| 9753 | (list (cdr art-group))))) | 9764 | (list (cdr art-group))))) |
| 9754 | 9765 | ||
| 9755 | ;; See whether the article is to be put in the cache. | 9766 | ;; See whether the article is to be put in the cache. |
| 9756 | (let ((marks (if (gnus-group-auto-expirable-p to-group) | 9767 | (let* ((expirable (gnus-group-auto-expirable-p to-group)) |
| 9757 | gnus-article-mark-lists | 9768 | (marks (if expirable |
| 9758 | (delete '(expirable . expire) | 9769 | gnus-article-mark-lists |
| 9759 | (copy-sequence gnus-article-mark-lists)))) | 9770 | (delete '(expirable . expire) |
| 9760 | (to-article (cdr art-group))) | 9771 | (copy-sequence gnus-article-mark-lists)))) |
| 9772 | (to-article (cdr art-group))) | ||
| 9761 | 9773 | ||
| 9762 | ;; Enter the article into the cache in the new group, | 9774 | ;; Enter the article into the cache in the new group, |
| 9763 | ;; if that is required. | 9775 | ;; if that is required. |
| @@ -9796,6 +9808,17 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." | |||
| 9796 | to-group (cdar marks) (list to-article) info))) | 9808 | to-group (cdar marks) (list to-article) info))) |
| 9797 | (setq marks (cdr marks))) | 9809 | (setq marks (cdr marks))) |
| 9798 | 9810 | ||
| 9811 | (when (and expirable | ||
| 9812 | gnus-mark-copied-or-moved-articles-as-expirable | ||
| 9813 | (not (memq 'expire to-marks))) | ||
| 9814 | ;; Mark this article as expirable. | ||
| 9815 | (push 'expire to-marks) | ||
| 9816 | (when (equal to-group gnus-newsgroup-name) | ||
| 9817 | (push to-article gnus-newsgroup-expirable)) | ||
| 9818 | ;; Copy the expirable mark to other group. | ||
| 9819 | (gnus-add-marked-articles | ||
| 9820 | to-group 'expire (list to-article) info)) | ||
| 9821 | |||
| 9799 | (gnus-request-set-mark | 9822 | (gnus-request-set-mark |
| 9800 | to-group (list (list (list to-article) 'add to-marks)))) | 9823 | to-group (list (list (list to-article) 'add to-marks)))) |
| 9801 | 9824 | ||
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 6028ce8b205..796470bd17f 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -1292,15 +1292,14 @@ body) or \"attachment\" (separate from the body)." | |||
| 1292 | (description (mml-minibuffer-read-description)) | 1292 | (description (mml-minibuffer-read-description)) |
| 1293 | (disposition (mml-minibuffer-read-disposition type nil file))) | 1293 | (disposition (mml-minibuffer-read-disposition type nil file))) |
| 1294 | (list file type description disposition))) | 1294 | (list file type description disposition))) |
| 1295 | (save-excursion | 1295 | (unless (message-in-body-p) (goto-char (point-max))) |
| 1296 | (unless (message-in-body-p) (goto-char (point-max))) | 1296 | (mml-insert-empty-tag 'part |
| 1297 | (mml-insert-empty-tag 'part | 1297 | 'type type |
| 1298 | 'type type | 1298 | ;; icicles redefines read-file-name and returns a |
| 1299 | ;; icicles redefines read-file-name and returns a | 1299 | ;; string w/ text properties :-/ |
| 1300 | ;; string w/ text properties :-/ | 1300 | 'filename (mm-substring-no-properties file) |
| 1301 | 'filename (mm-substring-no-properties file) | 1301 | 'disposition (or disposition "attachment") |
| 1302 | 'disposition (or disposition "attachment") | 1302 | 'description description)) |
| 1303 | 'description description))) | ||
| 1304 | 1303 | ||
| 1305 | (defun mml-dnd-attach-file (uri action) | 1304 | (defun mml-dnd-attach-file (uri action) |
| 1306 | "Attach a drag and drop file. | 1305 | "Attach a drag and drop file. |
| @@ -1336,11 +1335,10 @@ BUFFER is the name of the buffer to attach. See | |||
| 1336 | (description (mml-minibuffer-read-description)) | 1335 | (description (mml-minibuffer-read-description)) |
| 1337 | (disposition (mml-minibuffer-read-disposition type nil))) | 1336 | (disposition (mml-minibuffer-read-disposition type nil))) |
| 1338 | (list buffer type description disposition))) | 1337 | (list buffer type description disposition))) |
| 1339 | (save-excursion | 1338 | (unless (message-in-body-p) (goto-char (point-max))) |
| 1340 | (unless (message-in-body-p) (goto-char (point-max))) | 1339 | (mml-insert-empty-tag 'part 'type type 'buffer buffer |
| 1341 | (mml-insert-empty-tag 'part 'type type 'buffer buffer | 1340 | 'disposition disposition |
| 1342 | 'disposition disposition | 1341 | 'description description)) |
| 1343 | 'description description))) | ||
| 1344 | 1342 | ||
| 1345 | (defun mml-attach-external (file &optional type description) | 1343 | (defun mml-attach-external (file &optional type description) |
| 1346 | "Attach an external file into the buffer. | 1344 | "Attach an external file into the buffer. |
| @@ -1351,10 +1349,9 @@ TYPE is the MIME type to use." | |||
| 1351 | (type (mml-minibuffer-read-type file)) | 1349 | (type (mml-minibuffer-read-type file)) |
| 1352 | (description (mml-minibuffer-read-description))) | 1350 | (description (mml-minibuffer-read-description))) |
| 1353 | (list file type description))) | 1351 | (list file type description))) |
| 1354 | (save-excursion | 1352 | (unless (message-in-body-p) (goto-char (point-max))) |
| 1355 | (unless (message-in-body-p) (goto-char (point-max))) | 1353 | (mml-insert-empty-tag 'external 'type type 'name file |
| 1356 | (mml-insert-empty-tag 'external 'type type 'name file | 1354 | 'disposition "attachment" 'description description)) |
| 1357 | 'disposition "attachment" 'description description))) | ||
| 1358 | 1355 | ||
| 1359 | (defun mml-insert-multipart (&optional type) | 1356 | (defun mml-insert-multipart (&optional type) |
| 1360 | (interactive (list (completing-read "Multipart type (default mixed): " | 1357 | (interactive (list (completing-read "Multipart type (default mixed): " |