Mercurial > emacs
annotate lisp/=gnus-uu.el @ 14596:afb84c1d7750
(decipher-mode, decipher-set-map, decipher-insert,
decipher-make-checkpoint, decipher-resync): Added special support
for font-lock.
(decipher-use-font-lock, decipher-font-lock-keywords): New vars.
(decipher-toggle-font-lock, decipher-turn-on-font-lock): New funcs.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 19 Feb 1996 07:52:24 +0000 |
parents | fc93b587543c |
children |
rev | line source |
---|---|
6728 | 1 ;;; gnus-uu.el --- extract, view or save (uu)encoded files from gnus |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2 |
6729 | 3 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc. |
4 | |
6728 | 5 ;; Author: Lars Ingebrigtsen <larsi@ifi.uio.no> |
6 ;; Created: 2 Oct 1993 | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
7 ;; Version: v2.8 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
8 ;; Last Modified: 1994/06/01 |
9504 | 9 ;; Keywords: news |
6729 | 10 |
11 ;; This file is part of GNU Emacs. | |
12 | |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
14 ;; it under the terms of the GNU General Public License as published by | |
15 ;; the Free Software Foundation; either version 2, or (at your option) | |
16 ;; any later version. | |
17 | |
18 ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 ;; GNU General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
24 ;; along with GNU Emacs; see the file COPYING. If not, write to | |
25 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
26 | |
27 ;;; Commentary: | |
28 | |
6728 | 29 ;; All gnus-uu commands start with `C-c C-v'. |
30 ;; | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
31 ;; Short user manual for this package: |
6728 | 32 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
33 ;; Type `C-c C-v C-v' to decode and view all articles of the current |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
34 ;; series. The defaults should be reasonable for most systems. |
6728 | 35 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
36 ;; Type `C-c C-v C-i' to toggle interactive mode. When using |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
37 ;; interactive mode, gnus-uu will which display a buffer that will let |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
38 ;; you see the suggested commands to be executed. |
6728 | 39 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
40 ;; To post an uuencoded file, type `C-c C-v p', which will enter you |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
41 ;; into a buffer analogous to the one you will get when typing `a'. Do |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
42 ;; an `M-x describe-mode' in this buffer to get a description of what |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
43 ;; this buffer lets you do. |
6728 | 44 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
45 ;; Read the documentation of the `gnus-uu' dummy function for a more |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
46 ;; complete description of what this package does and how you can |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
47 ;; customize it to fit your needs. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
48 ;; |
6728 | 49 ;; |
50 ;; | |
51 ;; History | |
52 ;; | |
53 ;; v1.0: First version released Oct 2 1992. | |
54 ;; | |
55 ;; v1.1: Changed `C-c C-r' to `C-c C-e' and `C-c C-p' to `C-c C-k'. | |
56 ;; Changed (setq gnus-exit-group-hook) to (add-hook). Removed | |
57 ;; checking for "Re:" for finding parts. | |
58 ;; | |
59 ;; v2.2: Fixed handling of currupted archives. Changed uudecoding to | |
60 ;; an asynchronous process to avoid loading tons of data into emacs | |
61 ;; buffers. No longer reads articles emacs already have aboard. Fixed | |
62 ;; a firmer support for shar files. Made regexp searches for files | |
63 ;; more convenient. Added `C-c C-l' for editing uucode begin | |
64 ;; lines. Added multi-system decoder entry point. Added interactive | |
65 ;; view mode. Added function for decoding and saving all uuencoded | |
66 ;; articles in the current newsgroup. | |
67 ;; | |
68 ;; v2.3: After suggestions I have changed all the gnus-uu key bindings | |
69 ;; to avoid hogging all the user keys (C-c LETTER). Also added | |
70 ;; (provide) and fixed some saving stuff. First posted version to | |
71 ;; gnu.emacs.sources. | |
72 ;; | |
73 ;; v2.4: Fixed some more in the save-all category. Automatic fixing of | |
74 ;; uucode "begin" lines: names on the form of "dir/file" are | |
75 ;; translated into "dir-file". Added a function for fixing stripped | |
76 ;; uucode articles. Added binhex save. | |
77 ;; | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
78 ;; v2.5: First version copyrighted by FSF. Changed lots of |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
79 ;; documentation strings. |
6728 | 80 ;; |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
81 ;; v2.5.1: Added uuencode/posting code to post binary files. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
82 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
83 ;; v2.6: Thread support. gnus-uu is now able to decode uuencoded files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
84 ;; posted in threads. gnus-uu can also post in threads. I don't know |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
85 ;; if this ability is of much use - I've never seen anyone post |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
86 ;; uuencoded files in threads. |
6728 | 87 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
88 ;; v2.7: gnus-uu is now able to decode (and view/save) multiple |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
89 ;; encoded files in one big gulp. Also added pseudo-mime support |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
90 ;; (users can use metamail to view files), posting uuencoded/mime |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
91 ;; files and various other bits and pieces. |
6728 | 92 ;; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
93 ;; v2.7.1: New functions for decoding/saving threads bound to `C-c |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
94 ;; C-v C-j'. Handy to save entire threads, not very useful for |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
95 ;; decoding, as nobody posts encoded files in threads... |
6728 | 96 ;; |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
97 ;; v2.7.2: New functions for digesting and forwarding articles added |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
98 ;; on the suggestion of Per Abrahamsen. Also added a function for |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
99 ;; marking threads. |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
100 ;; |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
101 ;; v2.8: Fixed saving original files in interactive mode. Fixed ask |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
102 ;; before/save after view. Fixed setting up interactive buffers. Added |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
103 ;; scanning and rescanning from interactive mode. Added the |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
104 ;; `gnus-uu-ignore-file-by-name' and `...-by-type' variables to allow |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
105 ;; users to sift files they don't want to view. At the suggestion of |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
106 ;; boris@cs.rochester.edu, `C-c C-v C-h' has been undefined to allow |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
107 ;; users to view list of binding beginning with `C-c C-v'. Fixed |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
108 ;; viewing with `gnus-uu-asynchronous' set. The |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
109 ;; "decode-and-save/view-all-articles" functions now accepts the |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
110 ;; numeric prefix to delimit the maximum number of files to be |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
111 ;; decoded. |
6728 | 112 |
6729 | 113 ;;; Code: |
114 | |
6728 | 115 (require 'gnus) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
116 (require 'gnuspost) |
6728 | 117 |
118 ;; Binding of keys to the gnus-uu functions. | |
119 | |
120 (defvar gnus-uu-ctl-map nil) | |
121 (define-prefix-command 'gnus-uu-ctl-map) | |
122 (define-key gnus-summary-mode-map "\C-c\C-v" gnus-uu-ctl-map) | |
123 | |
124 (define-key gnus-uu-ctl-map "\C-v" 'gnus-uu-decode-and-view) | |
125 (define-key gnus-uu-ctl-map "v" 'gnus-uu-decode-and-save) | |
126 (define-key gnus-uu-ctl-map "\C-s" 'gnus-uu-shar-and-view) | |
127 (define-key gnus-uu-ctl-map "s" 'gnus-uu-shar-and-save) | |
128 (define-key gnus-uu-ctl-map "\C-m" 'gnus-uu-multi-decode-and-view) | |
129 (define-key gnus-uu-ctl-map "m" 'gnus-uu-multi-decode-and-save) | |
130 | |
131 (define-key gnus-uu-ctl-map "\C-b" 'gnus-uu-decode-and-show-in-buffer) | |
132 | |
133 (define-key gnus-summary-mode-map "#" 'gnus-uu-mark-article) | |
134 (define-key gnus-summary-mode-map "\M-#" 'gnus-uu-unmark-article) | |
135 (define-key gnus-uu-ctl-map "\C-u" 'gnus-uu-unmark-all-articles) | |
136 (define-key gnus-uu-ctl-map "\C-r" 'gnus-uu-mark-by-regexp) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
137 (define-key gnus-uu-ctl-map "r" 'gnus-uu-mark-by-regexp) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
138 (define-key gnus-uu-ctl-map "t" 'gnus-uu-mark-thread) |
6728 | 139 |
140 (define-key gnus-uu-ctl-map "\M-\C-v" 'gnus-uu-marked-decode-and-view) | |
141 (define-key gnus-uu-ctl-map "\M-v" 'gnus-uu-marked-decode-and-save) | |
142 (define-key gnus-uu-ctl-map "\M-\C-s" 'gnus-uu-marked-shar-and-view) | |
143 (define-key gnus-uu-ctl-map "\M-s" 'gnus-uu-marked-shar-and-save) | |
144 (define-key gnus-uu-ctl-map "\M-\C-m" 'gnus-uu-marked-multi-decode-and-view) | |
145 (define-key gnus-uu-ctl-map "\M-m" 'gnus-uu-marked-multi-decode-and-save) | |
146 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
147 (define-key gnus-uu-ctl-map "f" 'gnus-uu-digest-and-forward) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
148 (define-key gnus-uu-ctl-map "\M-f" 'gnus-uu-marked-digest-and-forward) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
149 |
6728 | 150 (define-key gnus-uu-ctl-map "\C-i" 'gnus-uu-toggle-interactive-view) |
151 (define-key gnus-uu-ctl-map "\C-t" 'gnus-uu-toggle-any-variable) | |
152 | |
153 (define-key gnus-uu-ctl-map "\C-l" 'gnus-uu-edit-begin-line) | |
154 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
155 (define-key gnus-uu-ctl-map "a" 'gnus-uu-decode-and-save-all-unread-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
156 (define-key gnus-uu-ctl-map "w" 'gnus-uu-decode-and-save-all-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
157 (define-key gnus-uu-ctl-map "\C-a" 'gnus-uu-decode-and-view-all-unread-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
158 (define-key gnus-uu-ctl-map "\C-w" 'gnus-uu-decode-and-view-all-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
159 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
160 (define-key gnus-uu-ctl-map "\C-j" 'gnus-uu-threaded-multi-decode-and-view) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
161 (define-key gnus-uu-ctl-map "j" 'gnus-uu-threaded-multi-decode-and-save) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
162 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
163 (define-key gnus-uu-ctl-map "p" 'gnus-uu-post-news) |
6728 | 164 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
165 ;; Dummy function gnus-uu |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
166 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
167 (defun gnus-uu () |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
168 "gnus-uu is a package for uudecoding and viewing articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
169 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
170 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
171 Keymap overview: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
172 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
173 By default, all gnus-uu keystrokes begin with `C-c C-v'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
174 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
175 There four decoding commands categories: |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
176 All commands for viewing are `C-c C-v C-LETTER'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
177 All commands for saving are `C-c C-v LETTER'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
178 All commands for marked viewing are `C-c C-v C-M-LETTER'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
179 All commands for marked saving are `C-c C-v M-LETTER'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
180 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
181 \\<gnus-summary-mode-map>\\[gnus-uu-decode-and-view]\tDecode and view articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
182 \\[gnus-uu-decode-and-save]\tDecode and save articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
183 \\[gnus-uu-shar-and-view]\tUnshar and view articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
184 \\[gnus-uu-shar-and-save]\tUnshar and save articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
185 \\[gnus-uu-multi-decode-and-view]\tChoose a decoding method, decode and view articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
186 \\[gnus-uu-multi-decode-and-save]\tChoose a decoding method, decode and save articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
187 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
188 \\[gnus-uu-threaded-multi-decode-and-view]\tDecode a thread and view |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
189 \\[gnus-uu-threaded-multi-decode-and-save]\tDecode a thread and save |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
190 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
191 \\[gnus-uu-decode-and-show-in-buffer]\tDecode the current article and view the result in a buffer |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
192 \\[gnus-uu-edit-begin-line]\tEdit the 'begin' line of an uuencoded article |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
193 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
194 \\[gnus-uu-decode-and-save-all-unread-articles]\tDecode and save all unread articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
195 \\[gnus-uu-decode-and-save-all-articles]\tDecode and save all articles |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
196 \\[gnus-uu-decode-and-view-all-unread-articles]\tDecode and view all unread articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
197 \\[gnus-uu-decode-and-view-all-articles]\tDecode and view all articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
198 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
199 \\[gnus-uu-digest-and-forward]\tDigest and forward a series of articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
200 \\[gnus-uu-marked-digest-and-forward]\tDigest and forward all marked articles |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
201 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
202 \\[gnus-uu-mark-article]\tMark the current article for decoding |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
203 \\[gnus-uu-unmark-article]\tUnmark the current article |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
204 \\[gnus-uu-unmark-all-articles]\tUnmark all articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
205 \\[gnus-uu-mark-by-regexp]\tMark articles for decoding by regexp |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
206 \\[gnus-uu-mark-thread]\tMark articles in this thread |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
207 \\[gnus-uu-marked-decode-and-view]\tDecode and view marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
208 \\[gnus-uu-marked-decode-and-save]\tDecode and save marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
209 \\[gnus-uu-marked-shar-and-view]\tUnshar and view marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
210 \\[gnus-uu-marked-shar-and-save]\tUnshar and save marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
211 \\[gnus-uu-marked-multi-decode-and-view]\tChoose decoding method, decode and view marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
212 \\[gnus-uu-marked-multi-decode-and-save]\tChoose decoding method, decode and save marked articles |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
213 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
214 \\[gnus-uu-toggle-asynchronous]\tToggle asynchronous viewing mode |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
215 \\[gnus-uu-toggle-query]\tToggle whether to ask before viewing a file |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
216 \\[gnus-uu-toggle-always-ask]\tToggle whether to ask to save a file after viewing |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
217 \\[gnus-uu-toggle-kill-carriage-return]\tToggle whether to strip trailing carriage returns |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
218 \\[gnus-uu-toggle-interactive-view]\tToggle whether to use interactive viewing mode |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
219 \\[gnus-uu-toggle-correct-stripped-articles]\tToggle whether to 'correct' articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
220 \\[gnus-uu-toggle-view-with-metamail]\tToggle whether to use metamail for viewing |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
221 \\[gnus-uu-toggle-any-variable]\tToggle any of the things above |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
222 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
223 \\[gnus-uu-post-news]\tPost an uuencoded article |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
224 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
225 Function description: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
226 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
227 `gnus-uu-decode-and-view' will try to find all articles in the same |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
228 series, uudecode them and view the resulting file(s). |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
229 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
230 gnus-uu guesses what articles are in the series according to the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
231 following simplish rule: The subjects must be (nearly) identical, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
232 except for the last two numbers of the line. (Spaces are largely |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
233 ignored, however.) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
234 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
235 For example: If you choose a subject called |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
236 \"cat.gif (2/3)\" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
237 gnus-uu will find all the articles that matches |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
238 \"^cat.gif ([0-9]+/[0-9]+).*$\". |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
239 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
240 Subjects that are nonstandard, like |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
241 \"cat.gif (2/3) Part 6 of a series\", |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
242 will not be properly recognized by any of the automatic viewing |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
243 commands, and you have to mark the articles manually with '#'. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
244 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
245 `gnus-uu-decode-and-save' will do the same as |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
246 `gnus-uu-decode-and-view', except that it will not display the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
247 resulting file, but save it instead. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
248 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
249 `gnus-uu-shar-and-view' and `gnus-uu-shar-and-save' are the \"shar\" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
250 equivalents to the uudecode functions. Instead of feeding the articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
251 to uudecode, they are run through /bin/sh. Most shar files can be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
252 viewed and/or saved with the normal uudecode commands, which is much |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
253 safer, as no foreign code is run. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
254 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
255 Instead of having windows popping up automatically, it can be handy to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
256 view files interactivly, especially when viewing archives. Use |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
257 `gnus-uu-toggle-interactive-mode' to toggle interactive mode. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
258 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
259 `gnus-uu-mark-article' marks an article for later |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
260 decoding/unsharing/saving/viewing. The files will be decoded in the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
261 sequence they were marked. To decode the files after you've marked the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
262 articles you are interested in, type the corresponding key strokes as |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
263 the normal decoding commands, but put a `M-' in the last |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
264 keystroke. For instance, to perform a standard uudecode and view, you |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
265 would type `C-c C-v C-v'. To perform a marked uudecode and view, say |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
266 `C-v C-v M-C-v'. All the other view and save commands are handled the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
267 same way; marked uudecode and save is then `C-c C-v M-v'. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
268 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
269 `gnus-uu-unmark-article' will remove the mark from a previosly marked |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
270 article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
271 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
272 `gnus-uu-unmark-all-articles' will remove the mark from all marked |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
273 articles. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
274 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
275 `gnus-uu-mark-by-regexp' will prompt for a regular expression and mark |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
276 all articles matching that regular expression. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
277 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
278 `gnus-uu-mark-thread' will mark all articles downward in the current |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
279 thread. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
280 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
281 There's an additional way to reach the decoding functions to make |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
282 future expansions easier: `gnus-uu-multi-decode-and-view' and the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
283 corresponding save, marked view and marked save functions. You will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
284 prompted for a decoding method, like uudecode, shar, binhex or plain |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
285 save. Note that methods like binhex and save doesn't have view modes; |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
286 even if you issue a view command (`C-c C-v C-m' and \"binhex\"), |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
287 gnus-uu will just save the resulting binhex file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
288 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
289 `gnus-uu-decode-and-show-in-buffer' will decode the current article |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
290 and display the results in an emacs buffer. This might be useful if |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
291 there's jsut some text in the current article that has been uuencoded |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
292 by some perverse poster. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
293 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
294 `gnus-uu-decode-and-save-all-articles' looks at all the articles in |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
295 the current newsgroup and tries to uudecode everything it can |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
296 find. The user will be prompted for a directory where the resulting |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
297 files (if any) will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
298 saved. `gnus-uu-decode-and-save-unread-articles' does only checks |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
299 unread articles. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
300 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
301 `gnus-uu-decode-and-view-all-articles' does the same as the function |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
302 above, only viewing files instead of saving them. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
303 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
304 `gnus-uu-edit-begin-line' lets you edit the begin line of an uuencoded |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
305 file in the current article. Useful to change a corrupted begin line. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
306 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
307 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
308 When using the view commands, `gnus-uu-decode-and-view' for instance, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
309 gnus-uu will (normally, see below) try to view the file according to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
310 the rules given in `gnus-uu-default-view-rules' and |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
311 `gnus-uu-user-view-rules'. If it recognizes the file, it will display |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
312 it immediately. If the file is some sort of archive, gnus-uu will |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
313 attempt to unpack the archive and see if any of the files in the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
314 archive can be viewed. For instance, if you have a gzipped tar file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
315 \"pics.tar.gz\" containing the files \"pic1.jpg\" and \"pic2.gif\", |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
316 gnus-uu will uncompress and detar the main file, and then view the two |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
317 pictures. This unpacking process is recursive, so if the archive |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
318 contains archives of archives, it'll all be unpacked. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
319 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
320 If the view command doesn't recognise the file type, or can't view it |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
321 because you don't have the viewer, or can't view *any* of the files in |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
322 the archive, the user will be asked if she wishes to have the file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
323 saved somewhere. Note that if the decoded file is an archive, and |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
324 gnus-uu manages to view some of the files in the archive, it won't |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
325 tell the user that there were some files that were unviewable. Try |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
326 interactive view for a different approach. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
327 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
328 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
329 Note that gnus-uu adds a function to `gnus-exit-group-hook' to clear |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
330 the list of marked articles and check for any generated files that |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
331 might have escaped deletion if the user typed `C-g' during viewing. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
332 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
333 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
334 `gnus-uu-toggle-asynchronous' toggles the `gnus-uu-asynchronous' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
335 variable. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
336 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
337 `gnus-uu-toggle-query' toggles the `gnus-uu-ask-before-view' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
338 variable. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
339 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
340 `gnus-uu-toggle-always-ask' toggles the `gnus-uu-view-and-save' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
341 variable. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
342 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
343 `gnus-uu-toggle-kill-carriage-return' toggles the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
344 `gnus-uu-kill-carriage-return' variable. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
345 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
346 `gnus-uu-toggle-interactive-view' toggles interactive mode. If it is |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
347 turned on, gnus-uu won't view files immediately, but will give you a |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
348 buffer with the default commands and files and let you edit the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
349 commands and execute them at leisure. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
350 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
351 `gnus-uu-toggle-correct-stripped-articles' toggles whether to check |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
352 and correct uuencoded articles that may have had trailing spaces |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
353 stripped by mailers. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
354 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
355 `gnus-uu-toggle-view-with-metamail' toggles whether to skip the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
356 gnus-uu viewing methods and just guess at an content-type based on the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
357 file name suffix and feed it to metamail. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
358 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
359 `gnus-uu-toggle-any-variable' is an interface to the toggle commands |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
360 listed above. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
361 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
362 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
363 Customization |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
364 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
365 Rule Variables |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
366 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
367 gnus-uu uses \"rule\" variables to decide how to view a file. All |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
368 these variables are of the form |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
369 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
370 (list '(regexp1 command2) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
371 '(regexp2 command2) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
372 ...) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
373 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
374 `gnus-uu-user-view-rules' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
375 This variable is consulted first when viewing files. If you wish |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
376 to use, for instance, sox to convert an .au sound file, you could |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
377 say something like: |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
378 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
379 (setq gnus-uu-user-view-rules |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
380 (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\"))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
381 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
382 `gnus-uu-user-view-rules-end' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
383 This variable is consulted if gnus-uu couldn't make any matches |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
384 from the user and default view rules. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
385 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
386 `gnus-uu-user-interactive-view-rules' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
387 This is the variable used instead of `gnus-uu-user-view-rules' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
388 when in interactive mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
389 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
390 `gnus-uu-user-interactive-view-rules-end' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
391 This variable is used instead of `gnus-uu-user-view-rules-end' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
392 when in interactive mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
393 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
394 `gnus-uu-user-archive-rules` |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
395 This variable can be used to say what comamnds should be used to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
396 unpack archives. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
397 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
398 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
399 Other Variables |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
400 |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
401 `gnus-uu-ignore-files-by-name' |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
402 Files with name matching this regular expression won't be viewed. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
403 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
404 `gnus-uu-ignore-files-by-type' |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
405 Files with a MIME type matching this variable won't be viewed. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
406 Note that gnus-uu tries to guess what type the file is based on |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
407 the name. gnus-uu is not a MIME package, so this is slightly |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
408 kludgy. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
409 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
410 `gnus-uu-tmp-dir' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
411 Where gnus-uu does its work. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
412 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
413 `gnus-uu-do-not-unpack-archives' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
414 Non-nil means that gnus-uu won't peek inside archives looking for |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
415 files to dispay. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
416 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
417 `gnus-uu-view-and-save' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
418 Non-nil means that the user will always be asked to save a file |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
419 after viewing it. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
420 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
421 `gnus-uu-asynchronous' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
422 Non-nil means that files will be viewed asynchronously. This can |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
423 be useful if you're viewing long .mod files, for instance, which |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
424 often takes several minutes. Note, however, that since gnus-uu |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
425 doesn't ask, and if you are viewing an archive with lots of |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
426 viewable files, you'll get them all up more or less at once, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
427 which can be confusing, to say the least. To get gnus-uu to ask |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
428 you before viewing a file, set the `gnus-uu-ask-before-view' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
429 variable. |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
430 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
431 `gnus-uu-ask-before-view' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
432 Non-nil means that gnus-uu will ask you before viewing each file |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
433 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
434 `gnus-uu-ignore-default-view-rules' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
435 Non-nil means that gnus-uu will ignore the default viewing rules. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
436 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
437 `gnus-uu-ignore-default-archive-rules' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
438 Non-nil means that gnus-uu will ignore the default archive |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
439 unpacking commands. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
440 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
441 `gnus-uu-kill-carriage-return' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
442 Non-nil means that gnus-uu will strip all carriage returns from |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
443 articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
444 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
445 `gnus-uu-unmark-articles-not-decoded' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
446 Non-nil means that gnus-uu will mark articles that were |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
447 unsuccessfully decoded as unread. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
448 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
449 `gnus-uu-output-window-height' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
450 This variable says how tall the output buffer window is to be |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
451 when using interactive view mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
452 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
453 `gnus-uu-correct-stripped-uucode' |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
454 Non-nil means that gnus-uu will *try* to fix uuencoded files that |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
455 have had traling spaces deleted. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
456 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
457 `gnus-uu-use-interactive-view' |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
458 Non-nil means that gnus-uu will use interactive viewing mode. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
459 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
460 `gnus-uu-view-with-metamail' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
461 Non-nil means that gnus-uu will ignore the viewing commands |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
462 defined by the rule variables and just fudge a MIME content type |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
463 based on the file name. The result will be fed to metamail for |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
464 viewing. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
465 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
466 `gnus-uu-save-in-digest' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
467 Non-nil means that gnus-uu, when asked to save without decoding, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
468 will save in digests. If this variable is nil, gnus-uu will just |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
469 save everything in a file without any embellishments. The |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
470 digesting almost conforms to RFC1153 - no easy way to specify any |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
471 meaningful volume and issue numbers were found, so I simply |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
472 dropped them. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
473 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
474 `gnus-uu-post-include-before-composing' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
475 Non-nil means that gnus-uu will ask for a file to encode before |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
476 you compose the article. If this variable is t, you can either |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
477 include an encoded file with \\<gnus-uu-post-reply-mode-map>\\[gnus-uu-post-insert-binary-in-article] or have one included for you when you |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
478 post the article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
479 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
480 `gnus-uu-post-length' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
481 Maximum length of an article. The encoded file will be split |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
482 into how many articles it takes to post the entire file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
483 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
484 `gnus-uu-post-threaded' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
485 Non-nil means that gnus-uu will post the encoded file in a |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
486 thread. This may not be smart, as no other decoder I have seen |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
487 are able to follow threads when collecting uuencoded |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
488 articles. (Well, I have seen one package that does that - |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
489 gnus-uu, but somehow, I don't think that counts...) Default is |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
490 nil. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
491 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
492 `gnus-uu-post-separate-description' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
493 Non-nil means that the description will be posted in a separate |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
494 article. The first article will typically be numbered (0/x). If |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
495 this variable is nil, the description the user enters will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
496 included at the beginning of the first article, which will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
497 numbered (1/x). Default is t. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
498 " |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
499 (interactive) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
500 ) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
501 |
6728 | 502 ;; Default viewing action rules |
503 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
504 (defvar gnus-uu-default-view-rules |
6728 | 505 (list |
506 '("\\.\\(jpe?g\\|gif\\|tiff?\\|p[pgb]m\\|xwd\\|xbm\\|pcx\\)$" "xv") | |
507 '("\\.tga$" "tgatoppm %s | xv -") | |
508 '("\\.te?xt$\\|\\.doc$\\|read.*me" "xterm -e less") | |
509 '("\\.\\(wav\\|aiff\\|hcom\\|u[blw]\\|s[bfw]\\|voc\\|smp\\)$" | |
510 "sox -v .5 %s -t .au -u - > /dev/audio") | |
511 '("\\.au$" "cat %s > /dev/audio") | |
512 '("\\.mod$" "str32") | |
513 '("\\.ps$" "ghostview") | |
514 '("\\.dvi$" "xdvi") | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
515 '("\\.[1-6]$" "xterm -e man -l") |
6728 | 516 '("\\.html$" "xmosaic") |
517 '("\\.mpe?g$" "mpeg_play") | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
518 '("\\.\\(flc\\|fli\\|rle\\|iff\\|pfx\\|avi\\|sme\\|rpza\\|dl\\|qt\\|rsrc\\)$" "xanim") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
519 '("\\.\\(tar\\|arj\\|zip\\|zoo\\|arc\\|gz\\|Z\\|lzh\\|ar\\|lha\\)$" |
6728 | 520 "gnus-uu-archive")) |
521 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
522 "Default actions to be taken when the user asks to view a file. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
523 To change the behaviour, you can either edit this variable or set |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
524 `gnus-uu-user-view-rules' to something useful. |
6728 | 525 |
526 For example: | |
527 | |
528 To make gnus-uu use 'xli' to display JPEG and GIF files, put the | |
529 following in your .emacs file | |
530 | |
531 (setq gnus-uu-user-view-rules (list '(\"jpg$\\\\|gif$\" \"xli\"))) | |
532 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
533 Both these variables are lists of lists with two string elements. The |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
534 first string is a regular expression. If the file name matches this |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
535 regular expression, the command in the second string is executed with |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
536 the file as an argument. |
6728 | 537 |
538 If the command string contains \"%s\", the file name will be inserted | |
539 at that point in the command string. If there's no \"%s\" in the | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
540 command string, the file name will be appended to the command string |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
541 before executing. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
542 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
543 There are several user variables to tailor the behaviour of gnus-uu to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
544 your needs. First we have `gnus-uu-user-view-rules', which is the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
545 variable gnus-uu first consults when trying to decide how to view a |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
546 file. If this variable contains no matches, gnus-uu examines the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
547 default rule vaiable provided in this package. If gnus-uu finds no |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
548 match here, it uses `gnus-uu-user-view-rules-end' to try to make a |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
549 match. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
550 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
551 Unless, of course, you are using the interactive view mode. Then |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
552 `gnus-uu-user-interactive-view-rules' and |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
553 `gnus-uu-user-interactive-view-rules-end' will be used instead.") |
6728 | 554 |
555 (defvar gnus-uu-user-view-rules nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
556 "Variable detailing what actions are to be taken to view a file. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
557 See the documentation on the `gnus-uu-default-view-rules' variable for |
6728 | 558 details.") |
559 | |
560 (defvar gnus-uu-user-view-rules-end nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
561 "Variable saying what actions are to be taken if no rule matched the file name. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
562 See the documentation on the `gnus-uu-default-view-rules' variable for |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
563 details.") |
6728 | 564 |
565 (defvar gnus-uu-user-interactive-view-rules nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
566 "Variable detailing what actions are to be taken to view a file when using interactive mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
567 See the documentation on the `gnus-uu-default-view-rules' variable for |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
568 details.") |
6728 | 569 |
570 (defvar gnus-uu-user-interactive-view-rules-end nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
571 "Variable saying what actions are to be taken if no rule matched the file name when using interactive mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
572 See the documentation on the `gnus-uu-default-view-rules' variable for |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
573 details.") |
6728 | 574 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
575 (defvar gnus-uu-default-interactive-view-rules-begin |
6728 | 576 (list |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
577 '("\\.te?xt$\\|\\.doc$\\|read.*me\\|\\.c?$\\|\\.h$\\|\\.bat$\\|\\.asm$\\|makefile" "cat %s | sed s/\r//g") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
578 '("\\.pas$" "cat %s | sed s/\r//g") |
6728 | 579 )) |
580 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
581 (defvar gnus-uu-default-interactive-view-rules-end |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
582 (list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
583 '(".*" "file"))) |
6728 | 584 |
585 ;; Default unpacking commands | |
586 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
587 (defvar gnus-uu-default-archive-rules |
6728 | 588 (list '("\\.tar$" "tar xf") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
589 '("\\.zip$" "unzip -o") |
6728 | 590 '("\\.ar$" "ar x") |
591 '("\\.arj$" "unarj x") | |
592 '("\\.zoo$" "zoo -e") | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
593 '("\\.\\(lzh\\|lha\\)$" "lha x") |
6728 | 594 '("\\.Z$" "uncompress") |
595 '("\\.gz$" "gunzip") | |
596 '("\\.arc$" "arc -x")) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
597 ) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
598 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
599 (defvar gnus-uu-destructive-archivers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
600 (list "uncompress" "gunzip")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
601 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
602 (defvar gnus-uu-user-archive-rules nil |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
603 "A list that can be set to override the default archive unpacking commands. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
604 To use, for instance, 'untar' to unpack tar files and 'zip -x' to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
605 unpack zip files, say the following: |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
606 (setq gnus-uu-user-archive-rules |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
607 (list '(\"\\\\.tar$\" \"untar\") |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
608 '(\"\\\\.zip$\" \"zip -x\")))") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
609 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
610 (defvar gnus-uu-ignore-files-by-name nil |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
611 "A regular expression saying what files should not be viewed based on name. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
612 If, for instance, you want gnus-uu to ignore all .au and .wav files, |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
613 you could say something like |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
614 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
615 (setq gnus-uu-ignore-files-by-name \"\\\\.au$\\\\|\\\\.wav$\") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
616 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
617 Note that this variable can be used in conjunction with the |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
618 `gnus-uu-ignore-files-by-type' variable.") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
619 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
620 (defvar gnus-uu-ignore-files-by-type nil |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
621 "A regular expression saying what files that shouldn't be viewed, based on MIME file type. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
622 If, for instance, you want gnus-uu to ignore all audio files and all mpegs, |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
623 you could say something like |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
624 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
625 (setq gnus-uu-ignore-files-by-type \"audio/\\\\|video/mpeg\") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
626 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
627 Note that this variable can be used in conjunction with the |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
628 `gnus-uu-ignore-files-by-name' variable.") |
6728 | 629 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
630 ;; Pseudo-MIME support |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
631 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
632 (defconst gnus-uu-ext-to-mime-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
633 (list '("\\.gif$" "image/gif") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
634 '("\\.jpe?g$" "image/jpeg") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
635 '("\\.tiff?$" "image/tiff") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
636 '("\\.xwd$" "image/xwd") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
637 '("\\.pbm$" "image/pbm") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
638 '("\\.pgm$" "image/pgm") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
639 '("\\.ppm$" "image/ppm") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
640 '("\\.xbm$" "image/xbm") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
641 '("\\.pcx$" "image/pcx") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
642 '("\\.tga$" "image/tga") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
643 '("\\.ps$" "image/postscript") |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
644 '("\\.fli$" "video/fli") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
645 '("\\.wav$" "audio/wav") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
646 '("\\.aiff$" "audio/aiff") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
647 '("\\.hcom$" "audio/hcom") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
648 '("\\.voc$" "audio/voc") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
649 '("\\.smp$" "audio/smp") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
650 '("\\.mod$" "audio/mod") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
651 '("\\.dvi$" "image/dvi") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
652 '("\\.mpe?g$" "video/mpeg") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
653 '("\\.au$" "audio/basic") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
654 '("\\.\\(te?xt\\|doc\\|c\\|h\\)$" "text/plain") |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
655 '("\\.\\(c\\|h\\)$" "text/source") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
656 '("read.*me" "text/plain") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
657 '("\\.html$" "text/html") |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
658 '("\\.bat$" "text/bat") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
659 '("\\.[1-6]$" "text/man") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
660 '("\\.flc$" "video/flc") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
661 '("\\.rle$" "video/rle") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
662 '("\\.pfx$" "video/pfx") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
663 '("\\.avi$" "video/avi") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
664 '("\\.sme$" "video/sme") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
665 '("\\.rpza$" "video/prza") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
666 '("\\.dl$" "video/dl") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
667 '("\\.qt$" "video/qt") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
668 '("\\.rsrc$" "video/rsrc") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
669 '("\\..*$" "unknown/unknown"))) |
6728 | 670 |
671 ;; Various variables users may set | |
672 | |
673 (defvar gnus-uu-tmp-dir "/tmp/" | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
674 "Variable saying where gnus-uu is to do its work. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
675 Default is \"/tmp/\".") |
6728 | 676 |
677 (defvar gnus-uu-do-not-unpack-archives nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
678 "Non-nil means that gnus-uu won't peek inside archives looking for files to dispay. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
679 Default is nil.") |
6728 | 680 |
681 (defvar gnus-uu-view-and-save nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
682 "Non-nil means that the user will always be asked to save a file after viewing it. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
683 If the variable is nil, the suer will only be asked to save if the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
684 viewing is unsuccessful. Default is nil.") |
6728 | 685 |
686 (defvar gnus-uu-asynchronous nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
687 "Non-nil means that files will be viewed asynchronously. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
688 Default is nil.") |
6728 | 689 |
690 (defvar gnus-uu-ask-before-view nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
691 "Non-nil means that gnus-uu will ask you before viewing each file. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
692 Especially useful when `gnus-uu-asynchronous' is set. Default is |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
693 nil.") |
6728 | 694 |
695 (defvar gnus-uu-ignore-default-view-rules nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
696 "Non-nil means that gnus-uu will ignore the default viewing rules. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
697 Only the user viewing rules will be consulted. Default is nil.") |
6728 | 698 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
699 (defvar gnus-uu-ignore-default-archive-rules nil |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
700 "Non-nil means that gnus-uu will ignore the default archive unpacking commands. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
701 Only the user unpacking commands will be consulted. Default is nil.") |
6728 | 702 |
703 (defvar gnus-uu-kill-carriage-return t | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
704 "Non-nil means that gnus-uu will strip all carriage returns from articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
705 Default is t.") |
6728 | 706 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
707 (defvar gnus-uu-view-with-metamail nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
708 "Non-nil means that files will be viewed with metamail. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
709 The gnus-uu viewing functions will be ignored and gnus-uu will try |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
710 to guess at a content-type based on file name suffixes. Default |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
711 it nil.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
712 |
6728 | 713 (defvar gnus-uu-unmark-articles-not-decoded nil |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
714 "Non-nil means that gnus-uu will mark articles that were unsuccessfully decoded as unread. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
715 Default is nil.") |
6728 | 716 |
717 (defvar gnus-uu-output-window-height 20 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
718 "This variable says how tall the output buffer window is to be when using interactive view mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
719 Change it at your convenience. Default is 20.") |
6728 | 720 |
721 (defvar gnus-uu-correct-stripped-uucode nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
722 "Non-nil means that gnus-uu will *try* to fix uuencoded files that have had traling spaces deleted. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
723 Default is nil.") |
6728 | 724 |
725 (defvar gnus-uu-use-interactive-view nil | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
726 "Non-nil means that gnus-uu will use interactive viewing mode. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
727 Gnus-uu will create a special buffer where the user may choose |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
728 interactively which files to view and how. Default is nil.") |
6728 | 729 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
730 (defvar gnus-uu-save-in-digest nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
731 "Non-nil means that gnus-uu, when asked to save without decoding, will save in digests. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
732 If this variable is nil, gnus-uu will just save everything in a |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
733 file without any embellishments. The digesting almost conforms to RFC1153 - |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
734 no easy way to specify any meaningful volume and issue numbers were found, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
735 so I simply dropped them.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
736 |
6728 | 737 |
738 ;; Internal variables | |
739 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
740 (defconst gnus-uu-begin-string "^begin[ \t]+[0-7][0-7][0-7][ \t]+\\(.*\\)$") |
6728 | 741 (defconst gnus-uu-end-string "^end[ \t]*$") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
742 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
743 (defconst gnus-uu-body-line "^M") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
744 (let ((i 61)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
745 (while (> (setq i (1- i)) 0) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
746 (setq gnus-uu-body-line (concat gnus-uu-body-line "[^a-z]"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
747 (setq gnus-uu-body-line (concat gnus-uu-body-line ".?$"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
748 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
749 ;"^M.............................................................?$" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
750 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
751 (defconst gnus-uu-shar-begin-string "^#! */bin/sh") |
6728 | 752 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
753 (defvar gnus-uu-shar-file-name nil) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
754 (defconst gnus-uu-shar-name-marker "begin [0-7][0-7][0-7][ \t]+\\(\\(\\w\\|\\.\\)*\\b\\)") |
6728 | 755 (defvar gnus-uu-shar-directory nil) |
756 | |
757 (defvar gnus-uu-file-name nil) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
758 (defvar gnus-uu-list-of-files-decoded nil) |
6728 | 759 (defconst gnus-uu-uudecode-process nil) |
760 | |
761 (defvar gnus-uu-interactive-file-list nil) | |
762 (defvar gnus-uu-marked-article-list nil) | |
763 (defvar gnus-uu-generated-file-list nil) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
764 (defvar gnus-uu-work-dir nil) |
6728 | 765 |
766 (defconst gnus-uu-interactive-buffer-name "*gnus-uu interactive*") | |
767 (defconst gnus-uu-output-buffer-name "*Gnus UU Output*") | |
768 (defconst gnus-uu-result-buffer "*Gnus UU Result Buffer*") | |
769 | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
770 (defconst gnus-uu-highest-article-number 1) |
6728 | 771 |
772 ;; Interactive functions | |
773 | |
774 ;; UUdecode and view | |
775 | |
776 (defun gnus-uu-decode-and-view () | |
777 "UUdecodes and 'views' (if possible) the resulting file. | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
778 'Viewing' can be any action at all, as defined in the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
779 `gnus-uu-file-action-list' variable. Running 'xv' on gifs and 'cat |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
780 >/dev/audio' on au files are popular actions. If the file can't be |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
781 viewed, the user is asked if she would like to save the file instead." |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
782 (interactive) |
6728 | 783 (gnus-uu-decode-and-view-or-save t nil)) |
784 | |
785 (defun gnus-uu-decode-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
786 "Decodes and saves the resulting file." |
6728 | 787 (interactive) |
788 (gnus-uu-decode-and-view-or-save nil nil)) | |
789 | |
790 (defun gnus-uu-marked-decode-and-view () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
791 "Decodes and views articles marked. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
792 The marked equivalent to `gnus-uu-decode-and-view'." |
6728 | 793 (interactive) |
794 (gnus-uu-decode-and-view-or-save t t)) | |
795 | |
796 (defun gnus-uu-marked-decode-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
797 "Decodes and saves articles marked. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
798 The marked equivalent to `gnus-uu-decode-and-save'." |
6728 | 799 (interactive) |
800 (gnus-uu-decode-and-view-or-save nil t)) | |
801 | |
802 | |
803 ;; Unshar and view | |
804 | |
805 (defun gnus-uu-shar-and-view () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
806 "Unshars and views articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
807 The shar equivalent of `gnus-uu-decode-and-view'." |
6728 | 808 (interactive) |
809 (gnus-uu-unshar-and-view-or-save t nil)) | |
810 | |
811 (defun gnus-uu-shar-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
812 "Unshars and saves files. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
813 The shar equivalent to `gnus-uu-decode-and-save'." |
6728 | 814 (interactive) |
815 (gnus-uu-unshar-and-view-or-save nil nil)) | |
816 | |
817 (defun gnus-uu-marked-shar-and-view () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
818 "Unshars and views articles marked. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
819 The marked equivalent to `gnus-uu-shar-and-view'." |
6728 | 820 (interactive) |
821 (gnus-uu-unshar-and-view-or-save t t)) | |
822 | |
823 (defun gnus-uu-marked-shar-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
824 "Unshars and saves articles marked. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
825 The marked equivalent to `gnus-uu-shar-and-save'." |
6728 | 826 (interactive) |
827 (gnus-uu-unshar-and-view-or-save nil t)) | |
828 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
829 ;; Threaded decode |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
830 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
831 (defun gnus-uu-threaded-decode-and-view () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
832 "Decodes and saves the resulting file." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
833 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
834 (gnus-uu-threaded-decode-and-view-or-save t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
835 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
836 (defun gnus-uu-threaded-decode-and-save () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
837 "Decodes and saves the resulting file." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
838 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
839 (gnus-uu-threaded-decode-and-view-or-save nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
840 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
841 (defun gnus-uu-threaded-multi-decode-and-view () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
842 "Decodes and saves the resulting file." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
843 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
844 (gnus-uu-threaded-multi-decode-and-view-or-save t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
845 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
846 (defun gnus-uu-threaded-multi-decode-and-save () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
847 "Decodes and saves the resulting file." |
6728 | 848 (interactive) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
849 (gnus-uu-threaded-multi-decode-and-view-or-save nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
850 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
851 (defun gnus-uu-threaded-decode-and-view-or-save (&optional view) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
852 (gnus-uu-unmark-all-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
853 (gnus-uu-mark-thread) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
854 (gnus-uu-decode-and-view-or-save view t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
855 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
856 (defun gnus-uu-threaded-multi-decode-and-view-or-save (view) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
857 (let (type) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
858 (message "Decode type: [u]udecode, (s)har, s(a)ve, (b)inhex: ") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
859 (setq type (read-char)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
860 (if (not (or (= type ?u) (= type ?s) (= type ?b) (= type ?a))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
861 (error "No such decoding method '%c'" type)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
862 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
863 (gnus-uu-unmark-all-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
864 (gnus-uu-mark-thread) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
865 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
866 (if (= type ?\r) (setq type ?u)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
867 (cond ((= type ?u) (gnus-uu-decode-and-view-or-save view t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
868 ((= type ?s) (gnus-uu-unshar-and-view-or-save view t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
869 ((= type ?b) (gnus-uu-binhex-and-save view t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
870 ((= type ?a) (gnus-uu-save-articles view t))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
871 |
6728 | 872 |
873 ;; Toggle commands | |
874 | |
875 (defun gnus-uu-toggle-asynchronous () | |
876 "This function toggles asynchronous viewing." | |
877 (interactive) | |
878 (if (setq gnus-uu-asynchronous (not gnus-uu-asynchronous)) | |
879 (message "gnus-uu will now view files asynchronously") | |
880 (message "gnus-uu will now view files synchronously"))) | |
881 | |
882 (defun gnus-uu-toggle-query () | |
883 "This function toggles whether to ask before viewing or not." | |
884 (interactive) | |
885 (if (setq gnus-uu-ask-before-view (not gnus-uu-ask-before-view)) | |
886 (message "gnus-uu will now ask before viewing") | |
887 (message "gnus-uu will now view without asking first"))) | |
888 | |
889 (defun gnus-uu-toggle-always-ask () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
890 "This function toggles whether to always ask to save a file after viewing." |
6728 | 891 (interactive) |
892 (if (setq gnus-uu-view-and-save (not gnus-uu-view-and-save)) | |
893 (message "gnus-uu will now ask to save the file after viewing") | |
894 (message "gnus-uu will now not ask to save after successful viewing"))) | |
895 | |
896 (defun gnus-uu-toggle-interactive-view () | |
897 "This function toggles whether to use interactive view." | |
898 (interactive) | |
899 (if (setq gnus-uu-use-interactive-view (not gnus-uu-use-interactive-view)) | |
900 (message "gnus-uu will now use interactive view") | |
901 (message "gnus-uu will now use non-interactive view"))) | |
902 | |
903 (defun gnus-uu-toggle-unmark-undecoded () | |
904 "This function toggles whether to unmark articles not decoded." | |
905 (interactive) | |
906 (if (setq gnus-uu-unmark-articles-not-decoded | |
907 (not gnus-uu-unmark-articles-not-decoded)) | |
908 (message "gnus-uu will now unmark articles not decoded") | |
909 (message "gnus-uu will now not unmark articles not decoded"))) | |
910 | |
911 (defun gnus-uu-toggle-kill-carriage-return () | |
912 "This function toggles the stripping of carriage returns from the articles." | |
913 (interactive) | |
914 (if (setq gnus-uu-kill-carriage-return (not gnus-uu-kill-carriage-return)) | |
915 (message "gnus-uu will now strip carriage returns") | |
916 (message "gnus-uu won't strip carriage returns"))) | |
917 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
918 (defun gnus-uu-toggle-view-with-metamail () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
919 "This function toggles whether to view files with metamail." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
920 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
921 (if (setq gnus-uu-view-with-metamail (not gnus-uu-view-with-metamail)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
922 (message "gnus-uu will now view with metamail") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
923 (message "gnus-uu will now view with the gnus-uu viewing functions"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
924 |
6728 | 925 (defun gnus-uu-toggle-correct-stripped-uucode () |
926 "This function toggles whether to correct stripped uucode." | |
927 (interactive) | |
928 (if (setq gnus-uu-correct-stripped-uucode | |
929 (not gnus-uu-correct-stripped-uucode)) | |
930 (message "gnus-uu will now correct stripped uucode") | |
931 (message "gnus-uu won't check and correct stripped uucode"))) | |
932 | |
933 (defun gnus-uu-toggle-any-variable () | |
934 "This function ask what variable the user wants to toggle." | |
935 (interactive) | |
936 (let (rep) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
937 (message "(a)sync, (q)uery, (p)ask, (k)ill CR, (i)nteract, (u)nmark, (c)orrect, (m)eta") |
6728 | 938 (setq rep (read-char)) |
939 (if (= rep ?a) | |
940 (gnus-uu-toggle-asynchronous)) | |
941 (if (= rep ?q) | |
942 (gnus-uu-toggle-query)) | |
943 (if (= rep ?p) | |
944 (gnus-uu-toggle-always-ask)) | |
945 (if (= rep ?k) | |
946 (gnus-uu-toggle-kill-carriage-return)) | |
947 (if (= rep ?u) | |
948 (gnus-uu-toggle-unmark-undecoded)) | |
949 (if (= rep ?c) | |
950 (gnus-uu-toggle-correct-stripped-uucode)) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
951 (if (= rep ?m) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
952 (gnus-uu-toggle-view-with-metamail)) |
6728 | 953 (if (= rep ?i) |
954 (gnus-uu-toggle-interactive-view)))) | |
955 | |
956 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
957 ;; Misc interactive functions |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
958 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
959 (defun gnus-uu-decode-and-show-in-buffer () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
960 "Uudecodes the current article and displays the result in a buffer. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
961 Might be useful if someone has, for instance, some text uuencoded in |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
962 their sigs. (Stranger things have happened.)" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
963 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
964 (gnus-uu-initialize) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
965 (let ((uu-buffer (get-buffer-create gnus-uu-output-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
966 file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
967 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
968 (and |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
969 (gnus-summary-select-article) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
970 (gnus-uu-grab-articles (list gnus-current-article) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
971 'gnus-uu-uustrip-article-as) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
972 (setq file-name (concat gnus-uu-work-dir gnus-uu-file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
973 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
974 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
975 (set-buffer uu-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
976 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
977 (insert-file-contents file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
978 (set-window-buffer (get-buffer-window gnus-article-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
979 uu-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
980 (message "Showing file %s in buffer" file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
981 (delete-file file-name)))))) |
6728 | 982 |
983 (defun gnus-uu-edit-begin-line () | |
984 "Edit the begin line of the current article." | |
985 (interactive) | |
986 (let ((buffer-read-only nil) | |
987 begin b) | |
988 (save-excursion | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
989 (gnus-summary-select-article) |
6728 | 990 (set-buffer gnus-article-buffer) |
991 (goto-line 1) | |
992 (if (not (re-search-forward "begin " nil t)) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
993 (error "No begin line in the current article") |
6728 | 994 (beginning-of-line) |
995 (setq b (point)) | |
996 (end-of-line) | |
997 (setq begin (buffer-substring b (point))) | |
998 (setq begin (read-string "" begin)) | |
999 (setq buffer-read-only nil) | |
1000 (delete-region b (point)) | |
1001 (insert-string begin))))) | |
1002 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1003 |
6728 | 1004 ;; Multi functions |
1005 | |
1006 (defun gnus-uu-multi-decode-and-view () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1007 "Choose a method of decoding and then decode and view. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1008 This function lets the user decide what method to use for decoding. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1009 Other than that, it's equivalent to the other decode-and-view |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1010 functions." |
6728 | 1011 (interactive) |
1012 (gnus-uu-multi-decode-and-view-or-save t nil)) | |
1013 | |
1014 (defun gnus-uu-multi-decode-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1015 "Choose a method of decoding and then decode and save. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1016 This function lets the user decide what method to use for decoding. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1017 Other than that, it's equivalent to the other decode-and-save |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1018 functions." |
6728 | 1019 (interactive) |
1020 (gnus-uu-multi-decode-and-view-or-save nil nil)) | |
1021 | |
1022 (defun gnus-uu-marked-multi-decode-and-view () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1023 "Choose a method of decoding and then decode and view the marked articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1024 This function lets the user decide what method to use for decoding. |
6728 | 1025 Other than that, it's equivalent to the other marked decode-and-view |
1026 functions." | |
1027 (interactive) | |
1028 (gnus-uu-multi-decode-and-view-or-save t t)) | |
1029 | |
1030 (defun gnus-uu-marked-multi-decode-and-save () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1031 "Choose a method of decoding and then decode and save the marked articles. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1032 This function lets the user decide what method to use for decoding. |
6728 | 1033 Other than that, it's equivalent to the other marked decode-and-save |
1034 functions." | |
1035 (interactive) | |
1036 (gnus-uu-multi-decode-and-view-or-save t t)) | |
1037 | |
1038 (defun gnus-uu-multi-decode-and-view-or-save (view marked) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1039 (let (type) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1040 (message "[u]udecode, (s)har, s(a)ve, (b)inhex: ") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1041 (setq type (read-char)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1042 (if (= type ?\r) (setq type ?u)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1043 (cond ((= type ?u) (gnus-uu-decode-and-view-or-save view marked)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1044 ((= type ?s) (gnus-uu-unshar-and-view-or-save view marked)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1045 ((= type ?b) (gnus-uu-binhex-and-save view marked)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1046 ((= type ?a) (gnus-uu-save-articles view marked)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1047 (t (error "Unknown decode method '%c'." type))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1048 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1049 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1050 ;; "All articles" commands |
6728 | 1051 |
1052 (defconst gnus-uu-rest-of-articles nil) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1053 (defvar gnus-uu-current-save-dir nil) |
6728 | 1054 |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1055 (defun gnus-uu-decode-and-view-all-articles (arg &optional unread) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1056 "Try to decode all articles and view the result. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1057 ARG delimits the number of files to be decoded." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1058 (interactive "p") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1059 (if (not (setq gnus-uu-marked-article-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1060 (nreverse (gnus-uu-get-list-of-articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1061 "^." nil unread t)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1062 (error "No%s articles to be decoded" (if unread " unread" ""))) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1063 (gnus-uu-decode-and-view-or-save t t nil (if (> arg 1) arg nil))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1064 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1065 (defun gnus-uu-decode-and-view-all-unread-articles (arg) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1066 "Try to decode all unread articles and view the result. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1067 ARG delimits the number of files to be decoded." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1068 (interactive "p") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1069 (gnus-uu-decode-and-view-all-articles arg t)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1070 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1071 (defun gnus-uu-decode-and-save-all-unread-articles (arg) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1072 "Try to decode all unread articles and saves the result. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1073 This function reads all unread articles in the current group and sees |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1074 whether it can uudecode the articles. The user will be prompted for an |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1075 directory to put the resulting (if any) files. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1076 ARG delimits the number of files to be decoded." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1077 (interactive "p") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1078 (gnus-uu-decode-and-save-articles arg t t)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1079 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1080 (defun gnus-uu-decode-and-save-all-articles (arg) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1081 "Try to decode all articles and saves the result. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1082 Does the same as `gnus-uu-decode-and-save-all-unread-articles', except |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1083 that it grabs all articles visible, unread or not. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1084 ARG delimits the number of files to be decoded." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1085 (interactive "p") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1086 (gnus-uu-decode-and-save-articles arg nil t)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1087 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1088 (defun gnus-uu-decode-and-save-articles (arg &optional unread unmark) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1089 (let (dir) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1090 (if (not (setq gnus-uu-marked-article-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1091 (nreverse (gnus-uu-get-list-of-articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1092 "^." nil unread t)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1093 (error "No%s articles to be decoded." (if unread " unread" "")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1094 (setq dir (gnus-uu-read-directory "Where do you want the files? ")) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1095 (gnus-uu-decode-and-view-or-save nil t dir (if (> arg 1) arg nil)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1096 (message "Saved.")))) |
6728 | 1097 |
1098 | |
1099 ;; Work functions | |
1100 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1101 ; All the interactive uudecode/view/save/marked functions are interfaces |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1102 ; to this function, which does the rest. |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1103 (defun gnus-uu-decode-and-view-or-save (view marked &optional save-dir limit) |
6728 | 1104 (gnus-uu-initialize) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1105 (let (decoded) |
6728 | 1106 (save-excursion |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1107 (if (gnus-uu-decode-and-strip nil marked limit) |
6728 | 1108 (progn |
1109 (setq decoded t) | |
1110 (if view | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1111 (gnus-uu-view-directory gnus-uu-work-dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1112 gnus-uu-use-interactive-view) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1113 (gnus-uu-save-directory gnus-uu-work-dir save-dir save-dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1114 (gnus-uu-check-for-generated-files))))) |
6728 | 1115 |
1116 (gnus-uu-summary-next-subject) | |
1117 | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1118 (if (and gnus-uu-use-interactive-view view decoded) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1119 (gnus-uu-do-interactive)) |
6728 | 1120 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1121 (if (or (not view) (not gnus-uu-use-interactive-view) (not decoded)) |
6728 | 1122 (gnus-uu-clean-up)))) |
1123 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1124 ; Unshars and views/saves marked/unmarked articles. |
6728 | 1125 (defun gnus-uu-unshar-and-view-or-save (view marked) |
1126 (gnus-uu-initialize) | |
1127 (let (tar-file files decoded) | |
1128 (save-excursion | |
1129 (setq gnus-uu-shar-directory | |
1130 (make-temp-name (concat gnus-uu-tmp-dir "gnusuush"))) | |
1131 (make-directory gnus-uu-shar-directory) | |
1132 (gnus-uu-add-file gnus-uu-shar-directory) | |
1133 (if (gnus-uu-decode-and-strip t marked) | |
1134 (progn | |
1135 (setq decoded t) | |
1136 (setq files (directory-files gnus-uu-shar-directory t)) | |
1137 (setq gnus-uu-generated-file-list | |
1138 (append files gnus-uu-generated-file-list)) | |
1139 (if (> (length files) 3) | |
1140 (progn | |
1141 (setq tar-file | |
1142 (concat | |
1143 (make-temp-name (concat gnus-uu-tmp-dir "gnusuuar")) | |
1144 ".tar")) | |
1145 (gnus-uu-add-file tar-file) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1146 (call-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1147 "sh" nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1148 (get-buffer-create gnus-uu-output-buffer-name) nil "-c" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1149 (format "cd %s ; tar cf %s * ; cd .. ; rm -r %s" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1150 gnus-uu-shar-directory tar-file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1151 gnus-uu-shar-directory)) |
6728 | 1152 (if view |
1153 (gnus-uu-view-file tar-file) | |
1154 (gnus-uu-save-file tar-file))) | |
1155 (if view | |
1156 (gnus-uu-view-file (elt files 2)) | |
1157 (gnus-uu-save-file (elt files 2))))))) | |
1158 | |
1159 (gnus-uu-summary-next-subject) | |
1160 | |
1161 (if (and gnus-uu-use-interactive-view view decoded) | |
1162 (gnus-uu-do-interactive)) | |
1163 | |
1164 (if (or (not gnus-uu-use-interactive-view) (not decoded)) | |
1165 (gnus-uu-clean-up)))) | |
1166 | |
1167 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1168 ;; Functions for saving and possibly digesting articles without |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1169 ;; any decoding. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1170 |
6728 | 1171 (defconst gnus-uu-saved-article-name nil) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1172 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1173 ; VIEW isn't used, but is here anyway, to provide similar interface to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1174 ; the other related functions. If MARKED is non-nil, the list of |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1175 ; marked articles is used. If NO-SAVE is non-nil, the articles aren't |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1176 ; actually saved in a permanent location, but the collecting is done |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1177 ; and a temporary file with the result is returned. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1178 (defun gnus-uu-save-articles (view marked &optional no-save) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1179 (let (list-of-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1180 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1181 (gnus-uu-initialize) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1182 (if (not marked) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1183 (setq list-of-articles (gnus-uu-get-list-of-articles)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1184 (setq list-of-articles (reverse gnus-uu-marked-article-list)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1185 (setq gnus-uu-marked-article-list nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1186 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1187 (if (not list-of-articles) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1188 (error "No list of articles")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1189 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1190 (setq gnus-uu-saved-article-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1191 (concat gnus-uu-work-dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1192 (if no-save |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1193 gnus-newsgroup-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1194 (read-file-name "Enter file name: " gnus-newsgroup-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1195 gnus-newsgroup-name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1196 (gnus-uu-add-file gnus-uu-saved-article-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1197 (if (and (gnus-uu-grab-articles list-of-articles 'gnus-uu-save-article t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1198 (not no-save)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1199 (gnus-uu-save-file gnus-uu-saved-article-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1200 gnus-uu-saved-article-name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1201 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1202 ; Function called by gnus-uu-grab-articles to treat each article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1203 (defun gnus-uu-save-article (buffer in-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1204 (if (not gnus-uu-save-in-digest) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1205 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1206 (set-buffer buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1207 (write-region 1 (point-max) gnus-uu-saved-article-name t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1208 (cond ((eq in-state 'first) (list gnus-uu-saved-article-name 'begin)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1209 ((eq in-state 'first-and-last) (list gnus-uu-saved-article-name 'begin 'end)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1210 ((eq in-state 'last) (list 'end)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1211 (t (list 'middle)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1212 (let (beg subj name headers headline sorthead body end-string state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1213 (string-match "/\\([^/]*\\)$" gnus-uu-saved-article-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1214 (setq name (substring gnus-uu-saved-article-name (match-beginning 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1215 (match-end 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1216 (if (or (eq in-state 'first) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1217 (eq in-state 'first-and-last)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1218 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1219 (setq state (list 'begin)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1220 (save-excursion (set-buffer (get-buffer-create "*gnus-uu-body*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1221 (erase-buffer)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1222 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1223 (set-buffer (get-buffer-create "*gnus-uu-pre*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1224 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1225 (insert (format |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1226 "Date: %s\nFrom: %s\nSubject: %s Digest\n\nTopics:\n" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1227 (current-time-string) name name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1228 (if (not (eq in-state 'end)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1229 (setq state (list 'middle)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1230 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1231 (set-buffer (get-buffer "*gnus-uu-body*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1232 (goto-char (setq beg (point-max))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1233 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1234 (save-restriction |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1235 (set-buffer buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1236 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1237 (re-search-forward "\n\n") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1238 (setq body (buffer-substring (1- (point)) (point-max))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1239 (narrow-to-region 1 (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1240 (setq headers (list "Date:" "From:" "To:" "Cc:" "Subject:" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1241 "Message-ID:" "Keywords:" "Summary:")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1242 (while headers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1243 (setq headline (car headers)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1244 (setq headers (cdr headers)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1245 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1246 (if (re-search-forward (concat "^" headline ".*$") nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1247 (setq sorthead |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1248 (concat sorthead (buffer-substring |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1249 (match-beginning 0) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1250 (match-end 0)) "\n")))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1251 (widen))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1252 (insert sorthead)(goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1253 (insert body)(goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1254 (insert (concat "\n" (make-string 30 ?-) "\n\n")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1255 (goto-char beg) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1256 (if (re-search-forward "^Subject: \\(.*\\)$" nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1257 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1258 (setq subj (buffer-substring (match-beginning 1) (match-end 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1259 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1260 (set-buffer (get-buffer "*gnus-uu-pre*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1261 (insert (format " %s\n" subj)))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1262 (if (or (eq in-state 'last) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1263 (eq in-state 'first-and-last)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1264 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1265 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1266 (set-buffer (get-buffer "*gnus-uu-pre*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1267 (insert (format "\n\n%s\n\n" (make-string 70 ?-))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1268 (write-region 1 (point-max) gnus-uu-saved-article-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1269 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1270 (set-buffer (get-buffer "*gnus-uu-body*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1271 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1272 (insert |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1273 (concat (setq end-string (format "End of %s Digest" name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1274 "\n")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1275 (insert (concat (make-string (length end-string) ?*) "\n")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1276 (write-region 1 (point-max) gnus-uu-saved-article-name t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1277 (kill-buffer (get-buffer "*gnus-uu-pre*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1278 (kill-buffer (get-buffer "*gnus-uu-body*")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1279 (setq state (cons 'end state)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1280 (if (memq 'begin state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1281 (cons gnus-uu-saved-article-name state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1282 state)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1283 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1284 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1285 ;; Digest and forward articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1286 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1287 (autoload 'gnus-mail-forward-using-mail "gnusmail" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1288 "Forward the current message to another user." t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1289 (autoload 'gnus-mail-forward-using-mhe "gnusmail" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1290 "Forward the current message to another user." t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1291 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1292 (defun gnus-uu-digest-and-forward (&optional marked) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1293 "Digests and forwards all articles in this series." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1294 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1295 (let ((gnus-uu-save-in-digest t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1296 file buf) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1297 (setq file (gnus-uu-save-articles nil marked t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1298 (switch-to-buffer (setq buf (get-buffer-create "*gnus-uu-forward*"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1299 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1300 (delete-other-windows) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1301 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1302 (insert-file file) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1303 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1304 (bury-buffer buf) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1305 (funcall gnus-mail-forward-method))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1306 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1307 (defun gnus-uu-marked-digest-and-forward (&optional marked) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1308 "Digests and forwards all marked articles." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1309 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1310 (gnus-uu-digest-and-forward t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1311 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1312 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1313 ;; Binhex treatment - not very advanced. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1314 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1315 (defconst gnus-uu-binhex-body-line |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1316 "^[^:]...............................................................$") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1317 (defconst gnus-uu-binhex-begin-line |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1318 "^:...............................................................$") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1319 (defconst gnus-uu-binhex-end-line |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1320 ":$") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1321 (defvar gnus-uu-binhex-article-name nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1322 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1323 ; This just concatenates and strips stuff from binhexed articles. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1324 ; No actual unbinhexing takes place. VIEW is ignored. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1325 (defun gnus-uu-binhex-and-save (view marked) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1326 (gnus-uu-initialize) |
6728 | 1327 (let (list-of-articles) |
1328 (save-excursion | |
1329 (if (not marked) | |
1330 (setq list-of-articles (gnus-uu-get-list-of-articles)) | |
1331 (setq list-of-articles (reverse gnus-uu-marked-article-list)) | |
1332 (setq gnus-uu-marked-article-list nil)) | |
1333 (if (not list-of-articles) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1334 (error "No list of articles")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1335 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1336 (setq gnus-uu-binhex-article-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1337 (concat gnus-uu-work-dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1338 (read-file-name "Enter binhex file name: " |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1339 gnus-newsgroup-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1340 gnus-newsgroup-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1341 (gnus-uu-add-file gnus-uu-binhex-article-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1342 (if (gnus-uu-grab-articles list-of-articles 'gnus-uu-binhex-article t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1343 (gnus-uu-save-file gnus-uu-binhex-article-name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1344 (gnus-uu-check-for-generated-files) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1345 (gnus-uu-summary-next-subject)) |
6728 | 1346 |
1347 (defun gnus-uu-binhex-article (buffer in-state) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1348 (let (state start-char) |
6728 | 1349 (save-excursion |
1350 (set-buffer buffer) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1351 (widen) |
6728 | 1352 (goto-char 1) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1353 (if (not (re-search-forward gnus-uu-binhex-begin-line nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1354 (if (not (re-search-forward gnus-uu-binhex-body-line nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1355 (setq state (list 'wrong-type)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1356 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1357 (if (memq 'wrong-type state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1358 () |
6728 | 1359 (beginning-of-line) |
1360 (setq start-char (point)) | |
1361 (if (looking-at gnus-uu-binhex-begin-line) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1362 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1363 (setq state (list 'begin)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1364 (write-region 1 1 gnus-uu-binhex-article-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1365 (setq state (list 'middle))) |
6728 | 1366 (goto-char (point-max)) |
1367 (re-search-backward (concat gnus-uu-binhex-body-line "\\|" | |
1368 gnus-uu-binhex-end-line) nil t) | |
1369 (if (looking-at gnus-uu-binhex-end-line) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1370 (setq state (if (memq 'begin state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1371 (cons 'end state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1372 (list 'end)))) |
6728 | 1373 (beginning-of-line) |
1374 (forward-line 1) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1375 (if (file-exists-p gnus-uu-binhex-article-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1376 (append-to-file start-char (point) gnus-uu-binhex-article-name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1377 (if (memq 'begin state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1378 (cons gnus-uu-binhex-article-name state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1379 state))) |
6728 | 1380 |
1381 | |
1382 ;; Internal view commands | |
1383 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1384 ; This function takes two parameters. The first is name of the file to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1385 ; be viewed. `gnus-uu-view-file' will look for an action associated |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1386 ; with the file type of the file. If it finds an appropriate action, |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1387 ; the file will be attempted displayed. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1388 ; |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1389 ; The second parameter specifies if the user is to be asked whether to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1390 ; save the file if viewing is unsuccessful. t means "do not ask." |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1391 ; |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1392 ; Note that the file given will be deleted by this function, one way |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1393 ; or another. If `gnus-uu-asynchronous' is set, it won't be deleted |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1394 ; right away, but sometime later. If the user is offered to save the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1395 ; file, it'll be moved to wherever the user wants it. |
6728 | 1396 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1397 ; `gnus-uu-view-file' returns t if viewing is successful. |
6728 | 1398 |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1399 (defun gnus-uu-view-file (file &optional silent) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1400 (let (action did-view) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1401 (cond |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1402 ((not (setq action (gnus-uu-get-action file))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1403 (if (and (not silent) (not gnus-uu-use-interactive-view)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1404 (progn |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1405 (message "Couldn't find any rule for file '%s'" file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1406 (sleep-for 2) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1407 (gnus-uu-ask-to-save-file file)))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1408 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1409 ((and gnus-uu-use-interactive-view |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1410 (not (string= (or action "") "gnus-uu-archive"))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1411 (gnus-uu-enter-interactive-file (or action "") file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1412 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1413 (gnus-uu-ask-before-view |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1414 (if (y-or-n-p (format "Do you want to view %s? " file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1415 (setq did-view (gnus-uu-call-file-action file action))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1416 (message "")) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1417 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1418 ((setq did-view (gnus-uu-call-file-action file action))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1419 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1420 ((not silent) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1421 (gnus-uu-ask-to-save-file file))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1422 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1423 (if (and (file-exists-p file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1424 (not gnus-uu-use-interactive-view) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1425 (or |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1426 (not (and gnus-uu-asynchronous did-view)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1427 (string= (or action "") "gnus-uu-archive"))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1428 (delete-file file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1429 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1430 did-view)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1431 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1432 (defun gnus-uu-call-file-action (file action) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1433 (prog1 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1434 (if gnus-uu-asynchronous |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1435 (gnus-uu-call-asynchronous file action) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1436 (gnus-uu-call-synchronous file action)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1437 (if gnus-uu-view-and-save |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1438 (gnus-uu-ask-to-save-file file)))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1439 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1440 (defun gnus-uu-ask-to-save-file (file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1441 (if (y-or-n-p (format "Do you want to save the file %s? " file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1442 (gnus-uu-save-file file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1443 (message "")) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1444 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1445 (defun gnus-uu-get-action (file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1446 (let (action) |
6728 | 1447 (setq action |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1448 (gnus-uu-choose-action |
6728 | 1449 file-name |
1450 (append | |
1451 (if (and gnus-uu-use-interactive-view | |
1452 gnus-uu-user-interactive-view-rules) | |
1453 gnus-uu-user-interactive-view-rules | |
1454 gnus-uu-user-view-rules) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1455 (if (or gnus-uu-ignore-default-view-rules |
6728 | 1456 (not gnus-uu-use-interactive-view)) |
1457 () | |
1458 gnus-uu-default-interactive-view-rules-begin) | |
1459 (if gnus-uu-ignore-default-view-rules | |
1460 nil | |
1461 gnus-uu-default-view-rules) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1462 (if gnus-uu-use-interactive-view |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1463 (append gnus-uu-user-interactive-view-rules-end |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1464 (if gnus-uu-ignore-default-view-rules |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1465 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1466 gnus-uu-default-interactive-view-rules-end)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1467 gnus-uu-user-view-rules-end)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1468 (if (and (not (string= (or action "") "gnus-uu-archive")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1469 gnus-uu-view-with-metamail) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1470 (if (setq action |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1471 (gnus-uu-choose-action file-name gnus-uu-ext-to-mime-list)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1472 (setq action (format "metamail -d -b -c \"%s\"" action)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1473 action)) |
6728 | 1474 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1475 ; `gnus-uu-call-synchronous' takes two parameters: The name of the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1476 ; file to be displayed and the command to display it with. Returns t |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1477 ; on success and nil if the file couldn't be displayed. |
6728 | 1478 (defun gnus-uu-call-synchronous (file-name action) |
1479 (let (did-view command) | |
1480 (save-excursion | |
1481 (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) | |
1482 (erase-buffer) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1483 (setq command (gnus-uu-command action file-name)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1484 (message "Viewing with '%s'" command) |
6728 | 1485 (if (not (= 0 (call-process "sh" nil t nil "-c" command))) |
1486 (progn | |
1487 (goto-char 1) | |
1488 (while (re-search-forward "\n" nil t) | |
1489 (replace-match " ")) | |
1490 (message (concat "Error: " (buffer-substring 1 (point-max)))) | |
1491 (sit-for 2)) | |
1492 (message "") | |
1493 (setq did-view t))) | |
1494 did-view)) | |
1495 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1496 ; `gnus-uu-call-asyncronous' takes two parameters: The name of the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1497 ; file to be displayed and the command to display it with. Since the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1498 ; view command is executed asynchronously, it's kinda hard to decide |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1499 ; whether the command succeded or not, so this function always returns |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1500 ; t. It also adds "; rm -f file-name" to the end of the execution |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1501 ; string, so the file will be removed after viewing has ended. |
6728 | 1502 (defun gnus-uu-call-asynchronous (file-name action) |
1503 (let (command file tmp-file start) | |
1504 (while (string-match "/" file-name start) | |
1505 (setq start (1+ (match-beginning 0)))) | |
1506 (setq file (substring file-name start)) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1507 (setq tmp-file (concat gnus-uu-work-dir file)) |
6728 | 1508 (if (string= tmp-file file-name) |
1509 () | |
1510 (rename-file file-name tmp-file t) | |
1511 (setq file-name tmp-file)) | |
1512 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1513 (setq command (gnus-uu-command action file-name)) |
6728 | 1514 (setq command (format "%s ; rm -f %s" command file-name)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1515 (message "Viewing with %s" command) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1516 (start-process "gnus-uu-view" nil "sh" "-c" command) |
6728 | 1517 t)) |
1518 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1519 ; `gnus-uu-decode-and-strip' does all the main work. It finds out what |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1520 ; articles to grab, grabs them, strips the result and decodes. If any |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1521 ; of these operations fail, it returns nil, t otherwise. If shar is |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1522 ; t, it will pass this on to `gnus-uu-grab-articles', which will |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1523 ; (probably) unshar the articles. If use-marked is non-nil, it won't |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1524 ; try to find articles, but use the marked list. |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1525 (defun gnus-uu-decode-and-strip (&optional shar use-marked limit) |
6728 | 1526 (let (list-of-articles) |
1527 (save-excursion | |
1528 | |
1529 (if use-marked | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1530 (if (not gnus-uu-marked-article-list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1531 (message "No articles marked") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1532 (setq list-of-articles (reverse gnus-uu-marked-article-list)) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1533 (setq gnus-uu-marked-article-list nil)) |
6728 | 1534 (setq list-of-articles (gnus-uu-get-list-of-articles))) |
1535 | |
1536 (and list-of-articles | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1537 (gnus-uu-grab-articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1538 list-of-articles |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1539 (if shar 'gnus-uu-unshar-article 'gnus-uu-uustrip-article-as) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1540 t limit))))) |
6728 | 1541 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1542 ; Takes a string and puts a \ in front of every special character; |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1543 ; ignores any leading "version numbers" thingies that they use in the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1544 ; comp.binaries groups, and either replaces anything that looks like |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1545 ; "2/3" with "[0-9]+/[0-9]+" or, if it can't find something like that, |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1546 ; replaces the last two numbers with "[0-9]+". This, in my experience, |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1547 ; should get most postings of a series." |
6728 | 1548 (defun gnus-uu-reginize-string (string) |
1549 (let ((count 2) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1550 (vernum "v[0-9]+[a-z][0-9]+:") |
6728 | 1551 reg beg) |
1552 (save-excursion | |
1553 (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) | |
1554 (erase-buffer) | |
1555 (insert (regexp-quote string)) | |
1556 (setq beg 1) | |
1557 | |
1558 (setq case-fold-search nil) | |
1559 (goto-char 1) | |
1560 (if (looking-at vernum) | |
1561 (progn | |
1562 (replace-match vernum t t) | |
1563 (setq beg (length vernum)))) | |
1564 | |
1565 (goto-char beg) | |
1566 (if (re-search-forward "[ \t]*[0-9]+/[0-9]+" nil t) | |
1567 (replace-match " [0-9]+/[0-9]+") | |
1568 | |
1569 (goto-char beg) | |
1570 (if (re-search-forward "[0-9]+[ \t]*of[ \t]*[0-9]+" nil t) | |
1571 (replace-match "[0-9]+ of [0-9]+") | |
1572 | |
1573 (end-of-line) | |
1574 (while (and (re-search-backward "[0-9]" nil t) (> count 0)) | |
1575 (while (and | |
1576 (looking-at "[0-9]") | |
1577 (< 1 (goto-char (1- (point)))))) | |
1578 (re-search-forward "[0-9]+" nil t) | |
1579 (replace-match "[0-9]+") | |
1580 (backward-char 5) | |
1581 (setq count (1- count))))) | |
1582 | |
1583 (goto-char beg) | |
1584 (while (re-search-forward "[ \t]+" nil t) | |
1585 (replace-match "[ \t]*" t t)) | |
1586 | |
1587 (buffer-substring 1 (point-max))))) | |
1588 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1589 ; Finds all articles that matches the regular expression given. |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1590 ; Returns the resulting list. SUBJECT is the regular expression to be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1591 ; matched. If it is nil, the current article name will be used. If |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1592 ; MARK-ARTICLES is non-nil, articles found are marked. If ONLY-UNREAD |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1593 ; is non-nil, only unread articles are chose. If DO-NOT-TRANSLATE is |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1594 ; non-nil, article names are not equialized before sorting. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1595 (defun gnus-uu-get-list-of-articles (&optional subject mark-articles only-unread do-not-translate) |
6728 | 1596 (let (beg end reg-subject list-of-subjects list-of-numbers art-num) |
1597 (save-excursion | |
1598 | |
1599 ; If the subject is not given, this function looks at the current subject | |
1600 ; and takes that. | |
1601 | |
1602 (if subject | |
1603 (setq reg-subject subject) | |
1604 (end-of-line) | |
1605 (setq end (point)) | |
1606 (beginning-of-line) | |
1607 (if (not (re-search-forward "\\] " end t)) | |
1608 (progn (message "No valid subject chosen") (sit-for 2)) | |
1609 (setq subject (buffer-substring (point) end)) | |
1610 (setq reg-subject | |
1611 (concat "\\[.*\\] " (gnus-uu-reginize-string subject))))) | |
1612 | |
1613 ; (message reg-subject)(sleep-for 2) | |
1614 | |
1615 (if reg-subject | |
1616 (progn | |
1617 | |
1618 ; Collect all subjects matching reg-subject. | |
1619 | |
1620 (let ((case-fold-search t)) | |
1621 (goto-char 1) | |
1622 (while (re-search-forward reg-subject nil t) | |
1623 (beginning-of-line) | |
1624 (setq beg (point)) | |
1625 (if (or (not only-unread) (looking-at " \\|-")) | |
1626 (progn | |
1627 (end-of-line) | |
1628 (setq list-of-subjects (cons | |
1629 (buffer-substring beg (point)) | |
1630 list-of-subjects))) | |
1631 (end-of-line)))) | |
1632 | |
1633 ; Expand all numbers in all the subjects: (hi9 -> hi0009, etc). | |
1634 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1635 (setq list-of-subjects (gnus-uu-expand-numbers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1636 list-of-subjects |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1637 (not do-not-translate))) |
6728 | 1638 |
1639 ; Sort the subjects. | |
1640 | |
1641 (setq list-of-subjects (sort list-of-subjects 'gnus-uu-string<)) | |
1642 | |
1643 ; Get the article numbers from the sorted list of subjects. | |
1644 | |
1645 (while list-of-subjects | |
1646 (setq art-num (gnus-uu-article-number (car list-of-subjects))) | |
1647 (if mark-articles (gnus-summary-mark-as-read art-num ?#)) | |
1648 (setq list-of-numbers (cons art-num list-of-numbers)) | |
1649 (setq list-of-subjects (cdr list-of-subjects))) | |
1650 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1651 (setq list-of-numbers (nreverse list-of-numbers)))) |
6728 | 1652 |
1653 list-of-numbers))) | |
1654 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1655 ; Takes a list of strings and "expands" all numbers in all the |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1656 ; strings. That is, this function makes all numbers equal length by |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1657 ; prepending lots of zeroes before each number. This is to ease later |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1658 ; sorting to find out what sequence the articles are supposed to be |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1659 ; decoded in. Returns the list of expanded strings. |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1660 (defun gnus-uu-expand-numbers (string-list &optional translate) |
6728 | 1661 (let (string out-list pos num) |
1662 (save-excursion | |
1663 (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) | |
1664 (while string-list | |
1665 (erase-buffer) | |
1666 (setq string (car string-list)) | |
1667 (setq string-list (cdr string-list)) | |
1668 (insert string) | |
1669 (goto-char 1) | |
1670 (while (re-search-forward "[ \t]+" nil t) | |
1671 (replace-match " ")) | |
1672 (goto-char 1) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1673 (if translate |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1674 (while (re-search-forward "[A-Za-z]" nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1675 (replace-match "a" t t))) |
6728 | 1676 |
1677 (goto-char 1) | |
1678 (if (not (search-forward "] " nil t)) | |
1679 () | |
1680 (while (re-search-forward "[0-9]+" nil t) | |
1681 (replace-match | |
1682 (format "%06d" | |
1683 (string-to-int (buffer-substring | |
1684 (match-beginning 0) (match-end 0)))))) | |
1685 (setq string (buffer-substring 1 (point-max))) | |
1686 (setq out-list (cons string out-list))))) | |
1687 out-list)) | |
1688 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1689 ; Used in a sort for finding out what string is bigger, but ignoring |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1690 ; everything before the subject part. |
6728 | 1691 (defun gnus-uu-string< (string1 string2) |
1692 (string< (substring string1 (string-match "\\] " string1)) | |
1693 (substring string2 (string-match "\\] " string2)))) | |
1694 | |
1695 | |
1696 ;; gnus-uu-grab-article | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1697 ; |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1698 ; This is the general multi-article treatment function. It takes a |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1699 ; list of articles to be grabbed and a function to apply to each |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1700 ; article. It puts the result in `gnus-uu-result-buffer'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1701 ; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1702 ; The function to be called should take two parameters. The first |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1703 ; parameter is the article buffer. The function should leave the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1704 ; result, if any, in this buffer. This result is then appended on to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1705 ; the `gnus-uu-result-buffer'. Most treatment functions will just |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1706 ; generate files... |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1707 ; |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1708 ; The second parameter is the state of the list of articles, and can |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1709 ; have four values: `first', `middle', `last' and `first-and-last'. |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1710 ; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1711 ; The function should return a list. The list may contain the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1712 ; following symbols: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1713 ; `error' if an error occurred |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1714 ; `begin' if the beginning of an encoded file has been received |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1715 ; If the list returned contains a `begin', the first element of |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1716 ; the list *must* be a string with the file name of the decoded |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1717 ; file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1718 ; `end' if the the end of an encoded file has been received |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1719 ; `middle' if the article was a body part of an encoded file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1720 ; `wrong-type' if the article was not a part of an encoded file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1721 ; `ok', which can be used everything is ok |
6728 | 1722 |
1723 (defvar gnus-uu-has-been-grabbed nil) | |
1724 | |
1725 (defun gnus-uu-unmark-list-of-grabbed (&optional dont-unmark-last-article) | |
1726 (let (art) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1727 (if (not (and gnus-uu-has-been-grabbed |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1728 gnus-uu-unmark-articles-not-decoded)) |
6728 | 1729 () |
1730 (if dont-unmark-last-article | |
1731 (progn | |
1732 (setq art (car gnus-uu-has-been-grabbed)) | |
1733 (setq gnus-uu-has-been-grabbed (cdr gnus-uu-has-been-grabbed)))) | |
1734 (while gnus-uu-has-been-grabbed | |
1735 (gnus-summary-mark-as-unread (car gnus-uu-has-been-grabbed) t) | |
1736 (setq gnus-uu-has-been-grabbed (cdr gnus-uu-has-been-grabbed))) | |
1737 (if dont-unmark-last-article | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1738 (setq gnus-uu-has-been-grabbed (list art)))))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1739 |
6728 | 1740 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1741 ; This function takes a list of articles and a function to apply to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1742 ; each article grabbed. The result of the function is appended on to |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1743 ; `gnus-uu-result-buffer'. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1744 ; |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1745 ; This function returns a list of files decoded if the grabbing and |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1746 ; the process-function has been successful and nil otherwise. |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1747 (defun gnus-uu-grab-articles (list-of-articles process-function &optional sloppy limit) |
6728 | 1748 (let ((result-buffer (get-buffer-create gnus-uu-result-buffer)) |
1749 (state 'first) | |
1750 (wrong-type t) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1751 has-been-begin has-been-end |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1752 article result-file result-files process-state) |
6728 | 1753 |
1754 (save-excursion | |
1755 (set-buffer result-buffer) | |
1756 (erase-buffer)) | |
1757 (setq gnus-uu-has-been-grabbed nil) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1758 |
6728 | 1759 (while (and list-of-articles |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1760 (not (memq 'error process-state)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1761 (or sloppy |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1762 (not (memq 'end process-state)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1763 |
6728 | 1764 (setq article (car list-of-articles)) |
1765 (setq list-of-articles (cdr list-of-articles)) | |
1766 (setq gnus-uu-has-been-grabbed (cons article gnus-uu-has-been-grabbed)) | |
1767 | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1768 (if (> article gnus-uu-highest-article-number) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1769 (setq gnus-uu-highest-article-number article)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1770 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1771 (if (eq list-of-articles ()) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1772 (if (eq state 'first) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1773 (setq state 'first-and-last) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1774 (setq state 'last))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1775 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1776 (message "Getting article %d" article) |
6728 | 1777 (if (not (= (or gnus-current-article 0) article)) |
1778 (gnus-summary-display-article article)) | |
1779 (gnus-summary-mark-as-read article) | |
1780 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1781 (save-excursion (set-buffer gnus-article-buffer) (widen)) |
6728 | 1782 |
1783 (setq process-state (funcall process-function gnus-article-buffer state)) | |
1784 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1785 ; (message "process-state er %s" process-state)(sleep-for 3) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1786 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1787 (if (or (memq 'begin process-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1788 (and (or (eq state 'first) (eq state 'first-and-last)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1789 (memq 'ok process-state))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1790 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1791 (if has-been-begin |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1792 (if (file-exists-p result-file) (delete-file result-file))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1793 (setq result-file (car process-state)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1794 (setq has-been-begin t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1795 (setq has-been-end nil))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1796 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1797 (if (memq 'end process-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1798 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1799 (setq gnus-uu-has-been-grabbed nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1800 (setq result-files (cons result-file result-files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1801 (setq has-been-end t) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1802 (setq has-been-begin nil) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1803 (if (and limit (= (length result-files) limit)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1804 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1805 (setq list-of-articles nil) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1806 (setq gnus-uu-marked-article-list nil))))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1807 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1808 (if (and (or (eq state 'last) (eq state 'first-and-last)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1809 (not (memq 'end process-state))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1810 (if (and result-file (file-exists-p result-file)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1811 (delete-file result-file))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1812 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1813 (setq result-file nil) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1814 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1815 (if (not (memq 'wrong-type process-state)) |
6728 | 1816 (setq wrong-type nil) |
1817 (if gnus-uu-unmark-articles-not-decoded | |
1818 (gnus-summary-mark-as-unread article t))) | |
1819 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1820 (if sloppy (setq wrong-type nil)) |
6728 | 1821 |
1822 (if (and (not has-been-begin) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1823 (not sloppy) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1824 (or (memq 'end process-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1825 (memq 'middle process-state))) |
6728 | 1826 (progn |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1827 (setq process-state (list 'error)) |
6728 | 1828 (message "No begin part at the beginning") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1829 (sleep-for 2)) |
6728 | 1830 (setq state 'middle))) |
1831 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1832 (if result-files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1833 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1834 (if (not has-been-begin) |
6728 | 1835 (message "Wrong type file") |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1836 (if (memq 'error process-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1837 (setq result-files nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1838 (if (not (or (memq 'ok process-state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1839 (memq 'end process-state))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1840 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1841 (message "End of articles reached before end of file") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1842 (setq result-files nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1843 (gnus-uu-unmark-list-of-grabbed))))) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1844 (setq gnus-uu-list-of-files-decoded result-files) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1845 result-files)) |
6728 | 1846 |
1847 (defun gnus-uu-uudecode-sentinel (process event) | |
1848 (delete-process (get-process process))) | |
1849 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1850 ; Uudecodes a file asynchronously. |
6728 | 1851 (defun gnus-uu-uustrip-article-as (process-buffer in-state) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1852 (let ((state (list 'ok)) |
6728 | 1853 (process-connection-type nil) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1854 start-char pst name-beg name-end) |
6728 | 1855 (save-excursion |
1856 (set-buffer process-buffer) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1857 (let ((case-fold-search nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1858 (buffer-read-only nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1859 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1860 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1861 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1862 (if gnus-uu-kill-carriage-return |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1863 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1864 (while (search-forward "\r" nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1865 (delete-backward-char 1)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1866 (goto-char 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1867 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1868 (if (not (re-search-forward gnus-uu-begin-string nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1869 (if (not (re-search-forward gnus-uu-body-line nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1870 (setq state (list 'wrong-type)))) |
6728 | 1871 |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1872 (if (memq 'wrong-type state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1873 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1874 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1875 (setq start-char (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1876 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1877 (if (looking-at gnus-uu-begin-string) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1878 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1879 (setq name-end (match-end 1)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1880 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1881 ; Replace any slashes and spaces in file names before decoding |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1882 (goto-char (setq name-beg (match-beginning 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1883 (while (re-search-forward "/" name-end t) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1884 (replace-match ",")) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1885 (goto-char name-beg) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1886 (while (re-search-forward " " name-end t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1887 (replace-match "_")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1888 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1889 (setq gnus-uu-file-name (buffer-substring name-beg name-end)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1890 (and gnus-uu-uudecode-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1891 (setq pst (process-status |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1892 (or gnus-uu-uudecode-process "nevair"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1893 (if (or (eq pst 'stop) (eq pst 'run)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1894 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1895 (delete-process gnus-uu-uudecode-process) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1896 (gnus-uu-unmark-list-of-grabbed t)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1897 (setq gnus-uu-uudecode-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1898 (start-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1899 "*uudecode*" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1900 (get-buffer-create gnus-uu-output-buffer-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1901 "sh" "-c" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1902 (format "cd %s ; uudecode" gnus-uu-work-dir))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1903 (set-process-sentinel |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1904 gnus-uu-uudecode-process 'gnus-uu-uudecode-sentinel) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1905 (setq state (list 'begin)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1906 (gnus-uu-add-file (concat gnus-uu-work-dir gnus-uu-file-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1907 (setq state (list 'middle))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1908 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1909 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1910 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1911 (re-search-backward |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1912 (concat gnus-uu-body-line "\\|" gnus-uu-end-string) nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1913 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1914 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1915 (if (looking-at gnus-uu-end-string) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1916 (setq state (cons 'end state))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1917 (forward-line 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1918 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1919 (and gnus-uu-uudecode-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1920 (setq pst (process-status |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1921 (or gnus-uu-uudecode-process "nevair"))) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1922 (if (or (eq pst 'run) (eq pst 'stop)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1923 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1924 (if gnus-uu-correct-stripped-uucode |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1925 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1926 (gnus-uu-check-correct-stripped-uucode |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1927 start-char (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1928 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1929 (re-search-backward |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1930 (concat gnus-uu-body-line "\\|" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1931 gnus-uu-end-string) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1932 nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1933 (forward-line 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1934 (condition-case err |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1935 (process-send-region gnus-uu-uudecode-process |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1936 start-char (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1937 (error |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1938 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1939 (message "gnus-uu: Couldn't uudecode") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1940 (sleep-for 2) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1941 (setq state (list 'wrong-type)) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1942 (delete-process gnus-uu-uudecode-process)))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1943 (if (memq 'end state) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1944 (accept-process-output gnus-uu-uudecode-process))) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1945 (setq state (list 'wrong-type)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1946 (if (not gnus-uu-uudecode-process) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1947 (setq state (list 'wrong-type))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1948 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1949 (if (memq 'begin state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1950 (cons (concat gnus-uu-work-dir gnus-uu-file-name) state) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1951 state)))) |
6728 | 1952 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1953 ; This function is used by `gnus-uu-grab-articles' to treat |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1954 ; a shared article. |
6728 | 1955 (defun gnus-uu-unshar-article (process-buffer in-state) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1956 (let ((state (list 'ok)) |
6728 | 1957 start-char) |
1958 (save-excursion | |
1959 (set-buffer process-buffer) | |
1960 (goto-char 1) | |
1961 (if (not (re-search-forward gnus-uu-shar-begin-string nil t)) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
1962 (setq state (list 'wrong-type)) |
6728 | 1963 (beginning-of-line) |
1964 (setq start-char (point)) | |
1965 (call-process-region | |
1966 start-char (point-max) "sh" nil | |
1967 (get-buffer-create gnus-uu-output-buffer-name) nil | |
1968 "-c" (concat "cd " gnus-uu-shar-directory " ; sh")))) | |
1969 state)) | |
1970 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1971 ; Returns the name of what the shar file is going to unpack. |
6728 | 1972 (defun gnus-uu-find-name-in-shar () |
1973 (let ((oldpoint (point)) | |
1974 res) | |
1975 (goto-char 1) | |
1976 (if (re-search-forward gnus-uu-shar-name-marker nil t) | |
1977 (setq res (buffer-substring (match-beginning 1) (match-end 1)))) | |
1978 (goto-char oldpoint) | |
1979 res)) | |
1980 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1981 ; Returns the article number of the given subject. |
6728 | 1982 (defun gnus-uu-article-number (subject) |
1983 (let (end) | |
1984 (string-match "[0-9]+[^0-9]" subject 1) | |
1985 (setq end (match-end 0)) | |
1986 (string-to-int | |
1987 (substring subject (string-match "[0-9]" subject 1) end)))) | |
1988 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1989 ; `gnus-uu-choose-action' chooses what action to perform given the name |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1990 ; and `gnus-uu-file-action-list'. Returns either nil if no action is |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
1991 ; found, or the name of the command to run if such a rule is found. |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1992 (defun gnus-uu-choose-action (file-name file-action-list &optional no-ignore) |
6728 | 1993 (let ((action-list (copy-sequence file-action-list)) |
1994 rule action) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1995 (and |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1996 (or no-ignore |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1997 (and (not |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1998 (and gnus-uu-ignore-files-by-name |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
1999 (string-match gnus-uu-ignore-files-by-name file-name))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2000 (not |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2001 (and gnus-uu-ignore-files-by-type |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2002 (string-match gnus-uu-ignore-files-by-type |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2003 (or (gnus-uu-choose-action |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2004 file-name gnus-uu-ext-to-mime-list t) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2005 "")))))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2006 (while (not (or (eq action-list ()) action)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2007 (setq rule (car action-list)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2008 (setq action-list (cdr action-list)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2009 (if (string-match (car rule) file-name) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2010 (setq action (car (cdr rule)))))) |
6728 | 2011 action)) |
2012 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2013 (defun gnus-uu-save-directory (from-dir &optional default-dir ignore-existing) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2014 (let (dir file-name command files file) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2015 (setq files (directory-files from-dir t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2016 (if default-dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2017 (setq dir default-dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2018 (setq dir (gnus-uu-read-directory |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2019 (concat "Where do you want the file" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2020 (if (< 3 (length files)) "s" "") "? ")))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2021 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2022 (while files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2023 (setq file (car files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2024 (setq files (cdr files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2025 (string-match "/[^/]*$" file) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2026 (setq file-name (substring file (1+ (match-beginning 0)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2027 (if (string-match "^\\.\\.?$" file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2028 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2029 (if (and (not ignore-existing) (file-exists-p (concat dir file-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2030 (setq file-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2031 (read-file-name "File exists. Enter a new name: " dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2032 (concat dir file-name) nil file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2033 (setq file-name (concat dir file-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2034 (rename-file file file-name t))))) |
6728 | 2035 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2036 ; Moves the file from the tmp directory to where the user wants it. |
6728 | 2037 (defun gnus-uu-save-file (from-file-name &optional default-dir ignore-existing) |
2038 (let (dir file-name command) | |
2039 (string-match "/[^/]*$" from-file-name) | |
2040 (setq file-name (substring from-file-name (1+ (match-beginning 0)))) | |
2041 (if default-dir | |
2042 (setq dir default-dir) | |
2043 (setq dir (gnus-uu-read-directory "Where do you want the file? "))) | |
2044 (if (and (not ignore-existing) (file-exists-p (concat dir file-name))) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2045 (setq file-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2046 (read-file-name "File exist. Enter a new name: " dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2047 (concat dir file-name) nil file-name)) |
6728 | 2048 (setq file-name (concat dir file-name))) |
2049 (rename-file from-file-name file-name t))) | |
2050 | |
2051 (defun gnus-uu-read-directory (prompt &optional default) | |
2052 (let (dir ok create) | |
2053 (while (not ok) | |
2054 (setq ok t) | |
2055 (setq dir (if default default | |
2056 (read-file-name prompt gnus-uu-current-save-dir | |
2057 gnus-uu-current-save-dir))) | |
2058 (while (string-match "/$" dir) | |
2059 (setq dir (substring dir 0 (match-beginning 0)))) | |
2060 (if (file-exists-p dir) | |
2061 (if (not (file-directory-p dir)) | |
2062 (progn | |
2063 (setq ok nil) | |
2064 (message "%s is a file" dir) | |
2065 (sit-for 2))) | |
2066 (setq create ?o) | |
2067 (while (not (or (= create ?y) (= create ?n))) | |
2068 (message "%s: No such directory. Do you want to create it? (y/n)" | |
2069 dir) | |
2070 (setq create (read-char))) | |
2071 (if (= create ?y) (make-directory dir)))) | |
2072 (setq gnus-uu-current-save-dir (concat dir "/")))) | |
2073 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2074 ; Unpacks an archive and views all the files in it. Returns t if |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2075 ; viewing one or more files is successful. |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2076 (defun gnus-uu-treat-archive (file-path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2077 (let ((did-unpack t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2078 action command files file file-name dir) |
6728 | 2079 (setq action (gnus-uu-choose-action |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2080 file-path (append gnus-uu-user-archive-rules |
6728 | 2081 (if gnus-uu-ignore-default-archive-rules |
2082 nil | |
2083 gnus-uu-default-archive-rules)))) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2084 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2085 (if (not action) (error "No unpackers for the file %s" file-path)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2086 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2087 (string-match "/[^/]*$" file-path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2088 (setq file-name (substring file-path (1+ (match-beginning 0)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2089 (setq dir (substring file-path 0 (match-beginning 0))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2090 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2091 (if (gnus-uu-string-in-list action gnus-uu-destructive-archivers) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2092 (copy-file file-path (concat file-path "~") t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2093 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2094 (setq command (format "cd %s ; %s" dir (gnus-uu-command action file-path))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2095 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2096 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2097 (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2098 (erase-buffer)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2099 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2100 (message "Unpacking: %s..." (gnus-uu-command action file-path)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2101 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2102 (if (= 0 (call-process "sh" nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2103 (get-buffer-create gnus-uu-output-buffer-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2104 nil "-c" command)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2105 (message "") |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2106 (if (not gnus-uu-use-interactive-view) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2107 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2108 (message "Error during unpacking of archive") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2109 (sleep-for 2))) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2110 (setq did-unpack nil)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2111 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2112 (if (gnus-uu-string-in-list action gnus-uu-destructive-archivers) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2113 (rename-file (concat file-path "~") file-path t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2114 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2115 did-unpack)) |
6728 | 2116 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2117 ; Tries to view all the files in the given directory. Returns t if |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2118 ; viewing one or more files is successful. |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2119 (defun gnus-uu-view-directory (dir &optional dont-delete-files not-top) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2120 (let ((first t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2121 files file did-view ignore-files) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2122 (setq files (directory-files dir t "[^/][^\\.][^\\.]?$")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2123 (gnus-uu-add-file files) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2124 (setq ignore-files files) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2125 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2126 (while (gnus-uu-unpack-archives |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2127 files (if not-top (list ".") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2128 (if first () ignore-files))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2129 (setq first nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2130 (gnus-uu-add-file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2131 (setq files (directory-files dir t "[^/][^\\.][^\\.]?$")))) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2132 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2133 (gnus-uu-add-file (directory-files dir t "[^/][^\\.][^\\.]?$")) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2134 |
6728 | 2135 (while files |
2136 (setq file (car files)) | |
2137 (setq files (cdr files)) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2138 (if (not (string= (or (gnus-uu-get-action file) "") "gnus-uu-archive")) |
6728 | 2139 (progn |
2140 (set-file-modes file 448) | |
2141 (if (file-directory-p file) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2142 (setq did-view (or (gnus-uu-view-directory file |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2143 dont-delete-files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2144 t) |
6728 | 2145 did-view)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2146 (setq did-view (or (gnus-uu-view-file file t) did-view))))) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2147 (if (and (not dont-delete-files) (not gnus-uu-asynchronous) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2148 (file-exists-p file)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2149 (delete-file file))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2150 |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2151 (if (and (not gnus-uu-asynchronous) (not dont-delete-files)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2152 (if (string-match "/$" dir) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2153 (delete-directory (substring dir 0 (match-beginning 0))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2154 (delete-directory dir))) |
6728 | 2155 did-view)) |
2156 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2157 (defun gnus-uu-unpack-archives (files &optional ignore) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2158 (let (path did-unpack) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2159 (while files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2160 (setq path (car files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2161 (setq files (cdr files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2162 (if (not (gnus-uu-string-in-list path ignore)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2163 (if (string= (or (gnus-uu-get-action |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2164 (gnus-uu-name-from-path path)) "") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2165 "gnus-uu-archive") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2166 (progn |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2167 (if (and (not (setq did-unpack (gnus-uu-treat-archive path))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2168 gnus-uu-use-interactive-view) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2169 (gnus-uu-enter-interactive-file |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2170 "# error during unpacking of" path)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2171 (if ignore (delete-file path)))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2172 did-unpack)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2173 |
6728 | 2174 |
2175 ;; Manual marking | |
2176 | |
2177 (defun gnus-uu-enter-mark-in-list () | |
2178 (let (article beg) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2179 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2180 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2181 (setq beg (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2182 (end-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2183 (setq article (gnus-uu-article-number |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2184 (buffer-substring beg (point)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2185 (message "Adding article %d to list" article) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2186 (setq gnus-uu-marked-article-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2187 (cons article gnus-uu-marked-article-list))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2188 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2189 (defun gnus-uu-mark-article (&optional dont-move) |
6728 | 2190 "Marks the current article to be decoded later." |
2191 (interactive) | |
2192 (gnus-uu-enter-mark-in-list) | |
2193 (gnus-summary-mark-as-read nil ?#) | |
2194 (gnus-summary-next-subject 1 nil)) | |
2195 | |
2196 (defun gnus-uu-unmark-article () | |
2197 "Unmarks the current article." | |
2198 (interactive) | |
2199 (let ((in (copy-sequence gnus-uu-marked-article-list)) | |
2200 out article beg found | |
2201 (old-point (point))) | |
2202 (beginning-of-line) | |
2203 (setq beg (point)) | |
2204 (end-of-line) | |
2205 (setq article (gnus-uu-article-number (buffer-substring beg (point)))) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2206 (message "Removing article %d" article) |
6728 | 2207 (while in |
2208 (if (not (= (car in) article)) | |
2209 (setq out (cons (car in) out)) | |
2210 (setq found t) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2211 (message "Removing article %d" article)) |
6728 | 2212 (setq in (cdr in))) |
2213 (if (not found) (message "Not a marked article.")) | |
2214 (setq gnus-uu-marked-article-list (reverse out)) | |
2215 (gnus-summary-mark-as-unread nil t) | |
2216 (gnus-summary-next-subject 1 nil))) | |
2217 | |
2218 (defun gnus-uu-unmark-all-articles () | |
2219 "Removes the mark from all articles marked for decoding." | |
2220 (interactive) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2221 (while gnus-uu-marked-article-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2222 (gnus-summary-goto-subject (car gnus-uu-marked-article-list)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2223 (gnus-summary-mark-as-unread nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2224 (setq gnus-uu-marked-article-list (cdr gnus-uu-marked-article-list)))) |
6728 | 2225 |
2226 (defun gnus-uu-mark-by-regexp () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2227 "Asks for a regular expression and marks all articles that match." |
6728 | 2228 (interactive) |
2229 (let (exp) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2230 (setq exp (read-from-minibuffer "Mark (regexp): ")) |
6728 | 2231 (setq gnus-uu-marked-article-list |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2232 (append gnus-uu-marked-article-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2233 (reverse (gnus-uu-get-list-of-articles exp t)))) |
6728 | 2234 (message ""))) |
2235 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2236 (defun gnus-uu-mark-thread () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2237 "Marks all articles downwards in this thread." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2238 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2239 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2240 (let (level) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2241 (if (not (search-forward ":" nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2242 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2243 (setq level (current-column)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2244 (gnus-uu-enter-mark-in-list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2245 (gnus-summary-mark-as-read nil ?#) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2246 (gnus-summary-search-forward) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2247 (while (< level (current-column)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2248 (gnus-uu-enter-mark-in-list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2249 (gnus-summary-mark-as-read nil ?#) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2250 (gnus-summary-search-forward)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2251 (gnus-summary-search-backward)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2252 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2253 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2254 ;; Various stuff |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2255 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2256 (defun gnus-uu-string-in-list (string list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2257 (while (and list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2258 (not (string= (car list) string)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2259 (setq list (cdr list)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2260 list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2261 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2262 (defun gnus-uu-name-from-path (path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2263 (string-match "/[^/]*$" path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2264 (substring path (1+ (match-beginning 0)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2265 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2266 (defun gnus-uu-directory-files (dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2267 (let (files out file) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2268 (setq files (directory-files dir t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2269 (while files |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2270 (setq file (car files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2271 (setq files (cdr files)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2272 (if (not (string-match "/\\.\\.?$" file)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2273 (setq out (cons file out)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2274 (setq out (reverse out)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2275 out)) |
6728 | 2276 |
2277 (defun gnus-uu-check-correct-stripped-uucode (start end) | |
2278 (let (found beg length short) | |
2279 (if (not gnus-uu-correct-stripped-uucode) | |
2280 () | |
2281 (goto-char start) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2282 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2283 (if (re-search-forward " \\|`" end t) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2284 (progn |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2285 (goto-char start) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2286 (while (not (eobp)) |
6728 | 2287 (progn |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2288 (if (looking-at "\n") (replace-match "")) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2289 (forward-line 1)))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2290 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2291 (while (not (eobp)) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2292 (if (looking-at (concat gnus-uu-begin-string "\\|" |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2293 gnus-uu-end-string)) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2294 () |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2295 (if (not found) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2296 (progn |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2297 (beginning-of-line) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2298 (setq beg (point)) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2299 (end-of-line) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2300 (setq length (- (point) beg)))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2301 (setq found t) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2302 (beginning-of-line) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2303 (setq beg (point)) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2304 (end-of-line) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2305 (if (not (= length (- (point) beg))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2306 (insert (make-string (- length (- (point) beg)) ? )))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2307 (forward-line 1)))))) |
6728 | 2308 |
2309 (defun gnus-uu-initialize () | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2310 (setq gnus-uu-highest-article-number 1) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2311 (gnus-uu-check-for-generated-files) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2312 (setq gnus-uu-tmp-dir (expand-file-name gnus-uu-tmp-dir)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2313 (if (string-match "[^/]$" gnus-uu-tmp-dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2314 (setq gnus-uu-tmp-dir (concat gnus-uu-tmp-dir "/"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2315 (if (not (file-directory-p gnus-uu-tmp-dir)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2316 (error "Temp directory %s doesn't exist" gnus-uu-tmp-dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2317 (if (not (file-writable-p gnus-uu-tmp-dir)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2318 (error "Temp directory %s can't be written to" gnus-uu-tmp-dir))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2319 (setq gnus-uu-work-dir |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2320 (concat gnus-uu-tmp-dir (make-temp-name "gnus"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2321 (gnus-uu-add-file gnus-uu-work-dir) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2322 (if (not (file-directory-p gnus-uu-work-dir)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2323 (make-directory gnus-uu-work-dir)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2324 (setq gnus-uu-work-dir (concat gnus-uu-work-dir "/")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2325 (setq gnus-uu-interactive-file-list nil)) |
6728 | 2326 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2327 ; Kills the temporary uu buffers, kills any processes, etc. |
6728 | 2328 (defun gnus-uu-clean-up () |
2329 (let (buf pst) | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2330 (and gnus-uu-uudecode-process |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2331 (setq pst (process-status (or gnus-uu-uudecode-process "nevair"))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2332 (if (or (eq pst 'stop) (eq pst 'run)) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2333 (delete-process gnus-uu-uudecode-process))) |
6728 | 2334 (and (not gnus-uu-asynchronous) |
2335 (setq buf (get-buffer gnus-uu-output-buffer-name)) | |
2336 (kill-buffer buf)) | |
2337 (and (setq buf (get-buffer gnus-uu-result-buffer)) | |
2338 (kill-buffer buf)))) | |
2339 | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2340 ; `gnus-uu-check-for-generated-files' deletes any generated files that |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2341 ; hasn't been deleted, if, for instance, the user terminated decoding |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2342 ; with `C-g'. |
6728 | 2343 (defun gnus-uu-check-for-generated-files () |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2344 (let (file dirs) |
6728 | 2345 (while gnus-uu-generated-file-list |
2346 (setq file (car gnus-uu-generated-file-list)) | |
2347 (setq gnus-uu-generated-file-list (cdr gnus-uu-generated-file-list)) | |
2348 (if (not (string-match "/\\.[\\.]?$" file)) | |
2349 (progn | |
2350 (if (file-directory-p file) | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2351 (setq dirs (cons file dirs)) |
6728 | 2352 (if (file-exists-p file) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2353 (delete-file file)))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2354 (setq dirs (nreverse dirs)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2355 (while dirs |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2356 (setq file (car dirs)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2357 (setq dirs (cdr dirs)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2358 (if (file-directory-p file) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2359 (if (string-match "/$" file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2360 (delete-directory (substring file 0 (match-beginning 0))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2361 (delete-directory file)))))) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2362 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2363 ; Add a file (or a list of files) to be checked (and deleted if it/they |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2364 ; still exists upon exiting the newsgroup). |
6728 | 2365 (defun gnus-uu-add-file (file) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2366 (if (stringp file) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2367 (setq gnus-uu-generated-file-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2368 (cons file gnus-uu-generated-file-list)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2369 (setq gnus-uu-generated-file-list |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2370 (append file gnus-uu-generated-file-list)))) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2371 |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2372 ; Go to the next unread subject. If there is no further unread |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2373 ; subjects, go to the last subject in the buffer. |
6728 | 2374 (defun gnus-uu-summary-next-subject () |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2375 (let (opi) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2376 (if (not (gnus-summary-search-forward t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2377 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2378 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2379 (sit-for 0) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2380 (gnus-summary-goto-subject gnus-uu-highest-article-number))) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2381 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2382 ; You may well find all this a bit puzzling - so do I, but I seem |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2383 ; to have to do something like this to move to the next unread article, |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2384 ; as `sit-for' seems to do some rather strange things here. Might |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2385 ; be a bug in my head, probably. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2386 (setq opi (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2387 (sit-for 0) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2388 (goto-char opi) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2389 (gnus-summary-recenter))) |
6728 | 2390 |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2391 ; Inputs an action and a file and returns a full command, putting |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2392 ; ticks round the file name and escaping any ticks in the file name. |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2393 (defun gnus-uu-command (action file) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2394 (let ((ofile "")) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2395 (while (string-match "`\\|\"\\|\\$\\|\\\\" file) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2396 (progn |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2397 (setq ofile |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2398 (concat ofile (substring file 0 (match-beginning 0)) "\\" |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2399 (substring file (match-beginning 0) (match-end 0)))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2400 (setq file (substring file (1+ (match-beginning 0)))))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2401 (setq ofile (concat "\"" ofile file "\"")) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2402 (if (string-match "%s" action) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2403 (format action ofile) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2404 (concat action " " ofile)))) |
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2405 |
6728 | 2406 |
2407 ;; Initializing | |
2408 (add-hook 'gnus-exit-group-hook | |
2409 '(lambda () | |
2410 (gnus-uu-clean-up) | |
2411 (setq gnus-uu-marked-article-list nil) | |
2412 (gnus-uu-check-for-generated-files))) | |
2413 | |
2414 | |
2415 ;; Interactive exec mode | |
2416 | |
2417 (defvar gnus-uu-output-window nil) | |
2418 (defvar gnus-uu-mode-hook nil) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2419 |
6728 | 2420 (defvar gnus-uu-mode-map nil) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2421 (if gnus-uu-mode-map |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2422 () |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2423 (setq gnus-uu-mode-map (make-sparse-keymap)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2424 (define-key gnus-uu-mode-map "\C-c\C-x" 'gnus-uu-interactive-execute) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2425 (define-key gnus-uu-mode-map "\C-c\C-v" 'gnus-uu-interactive-execute) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2426 (define-key gnus-uu-mode-map "\C-m" 'gnus-uu-interactive-execute) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2427 (define-key gnus-uu-mode-map "\C-c\C-c" 'gnus-uu-interactive-end) |
11662
fc93b587543c
(gnus-uu-interactive-scan-directory): Change to C-c C-d.
Karl Heuer <kwzh@gnu.org>
parents:
10873
diff
changeset
|
2428 (define-key gnus-uu-mode-map "\C-c\C-z" |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2429 'gnus-uu-interactive-save-current-file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2430 (define-key gnus-uu-mode-map "\C-c\C-s" |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2431 'gnus-uu-interactive-save-current-file-silent) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2432 (define-key gnus-uu-mode-map "\C-c\C-w" 'gnus-uu-interactive-save-all-files) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2433 (define-key gnus-uu-mode-map "\C-c\C-o" 'gnus-uu-interactive-save-original-file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2434 (define-key gnus-uu-mode-map "\C-c\C-r" 'gnus-uu-interactive-rescan-directory) |
11662
fc93b587543c
(gnus-uu-interactive-scan-directory): Change to C-c C-d.
Karl Heuer <kwzh@gnu.org>
parents:
10873
diff
changeset
|
2435 (define-key gnus-uu-mode-map "\C-c\C-d" 'gnus-uu-interactive-scan-directory) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2436 ) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2437 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2438 (defun gnus-uu-interactive-set-up-windows () |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2439 (let (int-buf out-buf) |
6728 | 2440 (set-buffer |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2441 (setq int-buf (get-buffer-create gnus-uu-interactive-buffer-name))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2442 (if (not (get-buffer-window int-buf)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2443 (switch-to-buffer-other-window int-buf)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2444 (pop-to-buffer int-buf) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2445 (setq out-buf (get-buffer-create gnus-uu-output-buffer-name)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2446 (if (not (get-buffer-window out-buf)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2447 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2448 (setq gnus-uu-output-window |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2449 (split-window nil (- (window-height) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2450 gnus-uu-output-window-height))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2451 (set-window-buffer gnus-uu-output-window out-buf))))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2452 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2453 (defun gnus-uu-do-interactive (&optional dont-do-windows) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2454 (if (not gnus-uu-interactive-file-list) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2455 (gnus-uu-enter-interactive-file "#" "")) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2456 (if (not dont-do-windows) (gnus-uu-interactive-set-up-windows)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2457 (save-excursion |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2458 (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2459 (erase-buffer)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2460 (set-buffer (get-buffer-create gnus-uu-interactive-buffer-name)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2461 (goto-char 1) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2462 (forward-line 3) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2463 (run-hooks 'gnus-uu-mode-hook)) |
6728 | 2464 |
2465 (defun gnus-uu-enter-interactive-file (action file) | |
2466 (let (command) | |
2467 (save-excursion | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2468 (set-buffer (get-buffer-create gnus-uu-interactive-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2469 (if (not gnus-uu-interactive-file-list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2470 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2471 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2472 (gnus-uu-mode) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2473 (insert |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2474 "# Press return to execute a command. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2475 # Press `C-c C-c' to exit interactive view. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2476 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2477 "))) |
6728 | 2478 (setq gnus-uu-interactive-file-list |
2479 (cons file gnus-uu-interactive-file-list)) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2480 ; (if (string-match (concat "^" gnus-uu-work-dir) file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2481 ; (setq file (substring file (match-end 0)))) |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2482 (setq command (gnus-uu-command action file)) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2483 (goto-char (point-max)) |
6728 | 2484 (insert (format "%s\n" command))))) |
2485 | |
2486 (defun gnus-uu-interactive-execute () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2487 "Executes the command on the current line in interactive mode." |
6728 | 2488 (interactive) |
2489 (let (beg out-buf command) | |
2490 (beginning-of-line) | |
2491 (setq beg (point)) | |
2492 (end-of-line) | |
2493 (setq command (buffer-substring beg (point))) | |
2494 (setq out-buf (get-buffer-create gnus-uu-output-buffer-name)) | |
2495 (save-excursion | |
2496 (set-buffer out-buf) | |
2497 (erase-buffer) | |
2498 (insert (format "$ %s \n\n" command))) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2499 (setq command (format "cd %s ; %s" gnus-uu-work-dir command)) |
6728 | 2500 (message "Executing...") |
2501 (if gnus-uu-asynchronous | |
2502 (start-process "gnus-uu-view" out-buf "sh" "-c" command) | |
2503 (call-process "sh" nil out-buf nil "-c" command) | |
2504 (message "")) | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2505 (end-of-line) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2506 (if (= (forward-line 1) 1) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2507 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2508 (end-of-line) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2509 (insert "\n"))) |
6728 | 2510 (beginning-of-line))) |
2511 | |
2512 (defun gnus-uu-interactive-end () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2513 "This function exits interactive view mode and returns to summary mode." |
6728 | 2514 (interactive) |
2515 (let (buf) | |
2516 (delete-window gnus-uu-output-window) | |
2517 (gnus-uu-clean-up) | |
2518 (if (not gnus-uu-asynchronous) (gnus-uu-check-for-generated-files)) | |
2519 (setq buf (get-buffer gnus-uu-interactive-buffer-name)) | |
2520 (if gnus-article-buffer (switch-to-buffer gnus-article-buffer)) | |
2521 (if buf (kill-buffer buf)) | |
2522 (pop-to-buffer gnus-summary-buffer))) | |
2523 | |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2524 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2525 (defun gnus-uu-interactive-scan-directory (dir) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2526 "Read any directory and view the files. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2527 When used in interactive mode, the files and commands will be displayed, |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2528 as usual, in the interactive mode buffer." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2529 (interactive "DDirectory: ") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2530 (setq gnus-uu-interactive-file-list nil) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2531 (gnus-uu-view-directory dir gnus-uu-use-interactive-view) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2532 (gnus-uu-do-interactive t)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2533 |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2534 (defun gnus-uu-interactive-rescan-directory () |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2535 "Reread the directory and view the files. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2536 When used in interactive mode, the files and commands will be displayed, |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2537 as usual, in the interactive mode buffer." |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2538 (interactive) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2539 (gnus-uu-interactive-scan-directory gnus-uu-work-dir)) |
6728 | 2540 |
2541 (defun gnus-uu-interactive-save-original-file () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2542 "Saves the file from whence the file on the current line came from." |
6728 | 2543 (interactive) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2544 (let ((files gnus-uu-list-of-files-decoded) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2545 (filestr "") |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2546 file did dir) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2547 (while files |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2548 (setq file (car files)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2549 (setq files (cdr files)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2550 (if (file-exists-p file) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2551 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2552 (if (not did) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2553 (progn |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2554 (setq dir (gnus-uu-read-directory |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2555 (format "Where do you want the file%s? " |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2556 (if (> (length files) 1) "s" "")))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2557 (setq did t))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2558 (setq filestr (concat filestr (gnus-uu-name-from-path file) " ")) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2559 (gnus-uu-save-file file dir t))) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2560 (if did |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2561 (message "Saved %s" filestr) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2562 (message "Already saved."))))) |
6728 | 2563 |
2564 (defun gnus-uu-interactive-save-current-file-silent () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2565 "Saves the file referred to on the current line in the current directory." |
6728 | 2566 (interactive) |
2567 (gnus-uu-interactive-save-current-file t)) | |
2568 | |
2569 (defun gnus-uu-interactive-save-current-file (&optional dont-ask silent) | |
2570 "Saves the file referred to on the current line." | |
2571 (interactive) | |
2572 (let (files beg line file) | |
2573 (setq files (copy-sequence gnus-uu-interactive-file-list)) | |
2574 (beginning-of-line) | |
2575 (setq beg (point)) | |
2576 (end-of-line) | |
2577 (setq line (buffer-substring beg (point))) | |
2578 (while (and files | |
2579 (not (string-match | |
2580 (concat "" (regexp-quote (setq file (car files))) "") | |
2581 line))) | |
2582 (setq files (cdr files))) | |
2583 (beginning-of-line) | |
2584 (forward-line 1) | |
2585 (if (not files) | |
2586 (if (not silent) | |
2587 (progn (message "Could not find file") (sit-for 2))) | |
2588 (gnus-uu-save-file file (if dont-ask gnus-uu-current-save-dir nil) silent) | |
2589 (delete-region beg (point))))) | |
2590 | |
2591 (defun gnus-uu-interactive-save-all-files () | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2592 "Saves all files referred to in the interactive buffer." |
6728 | 2593 (interactive) |
2594 (let (dir) | |
2595 (goto-char 1) | |
2596 (setq dir (gnus-uu-read-directory "Where do you want the files? ")) | |
2597 (while (not (eobp)) | |
2598 (gnus-uu-interactive-save-current-file t t)))) | |
2599 | |
2600 (defun gnus-uu-mode () | |
2601 "Major mode for editing view commands in gnus-uu. | |
2602 | |
2603 Commands: | |
6904
b264fb73cfe7
(gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents:
6729
diff
changeset
|
2604 \\<gnus-uu-mode-map>Return, C-c C-v, C-c C-x Execute the current command |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2605 \\[gnus-uu-interactive-end]\tEnd interactive mode |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2606 \\[gnus-uu-interactive-save-current-file]\tSave the current file |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2607 \\[gnus-uu-interactive-save-current-file-silent]\tSave the current file without asking |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2608 \twhere to put it |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2609 \\[gnus-uu-interactive-save-all-files]\tSave all files |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2610 \\[gnus-uu-interactive-save-original-file]\tSave the original file: If the files |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2611 \toriginated in an archive, the archive |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2612 \tfile is saved. |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2613 \\[gnus-uu-interactive-rescan-directory]\tRescan the directory |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
2614 \\[gnus-uu-interactive-scan-directory]\tScan any directory |
6728 | 2615 " |
2616 (interactive) | |
2617 (kill-all-local-variables) | |
2618 (use-local-map gnus-uu-mode-map) | |
2619 (setq mode-name "gnus-uu") | |
2620 (setq major-mode 'gnus-uu-mode) | |
2621 ) | |
2622 | |
2623 (define-key gnus-uu-mode-map "\C-c\C-x" 'gnus-uu-interactive-execute) | |
2624 (define-key gnus-uu-mode-map "\C-c\C-v" 'gnus-uu-interactive-execute) | |
2625 (define-key gnus-uu-mode-map "\C-m" 'gnus-uu-interactive-execute) | |
2626 (define-key gnus-uu-mode-map "\C-c\C-c" 'gnus-uu-interactive-end) | |
2627 (define-key gnus-uu-mode-map "\C-cs" | |
2628 'gnus-uu-interactive-save-current-file) | |
2629 (define-key gnus-uu-mode-map "\C-c\C-s" | |
2630 'gnus-uu-interactive-save-current-file-silent) | |
2631 (define-key gnus-uu-mode-map "\C-c\C-a" 'gnus-uu-interactive-save-all-files) | |
2632 (define-key gnus-uu-mode-map "\C-c\C-o" 'gnus-uu-interactive-save-original-file) | |
2633 | |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2634 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2635 ;; Major mode for posting encoded articles. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2636 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2637 (require 'sendmail) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2638 (require 'rnews) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2639 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2640 ; Any function that is to be used as and encoding method will take two |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2641 ; parameters: PATH-NAME and FILE-NAME. (E.g. "/home/gaga/spiral.jpg" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2642 ; and "spiral.jpg", respectively.) The function should return nil if |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2643 ; the encoding wasn't successful. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2644 (defvar gnus-uu-post-encode-method 'gnus-uu-post-encode-uuencode |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2645 "Function used for encoding binary files. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2646 There are three functions supplied with gnus-uu for encoding files: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2647 `gnus-uu-post-encode-uuencode', which does straight uuencoding; |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2648 `gnus-uu-post-encode-mime', which encodes with base64 and adds MIME |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2649 headers; and `gnus-uu-post-encode-mime-uuencode', which encodes with |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2650 uuencode and adds MIME headers.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2651 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2652 (defvar gnus-uu-post-include-before-composing nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2653 "Non-nil means that gnus-uu will ask for a file to encode before you compose the article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2654 If this variable is t, you can either include an encoded file with |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2655 \\<gnus-uu-post-reply-mode-map>\\[gnus-uu-post-insert-binary-in-article] or have one included for you when you post the article.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2656 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2657 (defvar gnus-uu-post-length 990 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2658 "Maximum length of an article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2659 The encoded file will be split into how many articles it takes to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2660 post the entire file.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2661 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2662 (defvar gnus-uu-post-threaded nil |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2663 "Non-nil means that gnus-uu will post the encoded file in a thread. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2664 This may not be smart, as no other decoder I have seen are able to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2665 follow threads when collecting uuencoded articles. (Well, I have seen |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2666 one package that does that - gnus-uu, but somehow, I don't think that |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2667 counts...) Default is nil.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2668 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2669 (defvar gnus-uu-post-separate-description t |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2670 "Non-nil means that the description will be posted in a separate article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2671 The first article will typically be numbered (0/x). If this variable |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2672 is nil, the description the user enters will be included at the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2673 beginning of the first article, which will be numbered (1/x). Default |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2674 is t.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2675 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2676 (defconst gnus-uu-post-binary-separator "--binary follows this line--") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2677 (defvar gnus-uu-post-message-id nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2678 (defvar gnus-uu-post-inserted-file-name nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2679 (defvar gnus-uu-winconf-post-news nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2680 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2681 ; The following map and mode was taken from rnewspost.el and edited |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2682 ; somewhat. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2683 (defvar gnus-uu-post-reply-mode-map () "Mode map used by gnus-uu-post-reply.") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2684 (or gnus-uu-post-reply-mode-map |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2685 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2686 (setq gnus-uu-post-reply-mode-map (make-keymap)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2687 (define-key gnus-uu-post-reply-mode-map "\C-c?" 'describe-mode) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2688 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-d" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2689 'news-reply-distribution) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2690 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-k" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2691 'news-reply-keywords) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2692 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-n" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2693 'news-reply-newsgroups) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2694 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2695 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-f" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2696 'news-reply-followup-to) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2697 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-s" 'mail-subject) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2698 (define-key gnus-uu-post-reply-mode-map "\C-c\C-f\C-a" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2699 'gnus-uu-post-reply-summary) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2700 (define-key gnus-uu-post-reply-mode-map "\C-c\C-r" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2701 'news-caesar-buffer-body) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2702 (define-key gnus-uu-post-reply-mode-map "\C-c\C-w" 'news-reply-signature) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2703 (define-key gnus-uu-post-reply-mode-map "\C-c\C-y" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2704 'news-reply-yank-original) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2705 (define-key gnus-uu-post-reply-mode-map "\C-c\C-q" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2706 'mail-fill-yanked-message) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2707 (define-key gnus-uu-post-reply-mode-map "\C-c\C-c" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2708 'gnus-uu-post-news-inews) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2709 (define-key gnus-uu-post-reply-mode-map "\C-c\C-s" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2710 'gnus-uu-post-news-inews) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2711 (define-key gnus-uu-post-reply-mode-map "\C-c\C-i" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2712 'gnus-uu-post-insert-binary-in-article) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2713 )) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2714 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2715 ; This mode was taken from rnewspost.el and modified slightly. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2716 (defun gnus-uu-post-reply-mode () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2717 "Major mode for editing binary news to be posted on USENET. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2718 First-time posters are asked to please read the articles in newsgroup: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2719 news.announce.newusers . |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2720 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2721 Like news-reply-mode, which is like Text Mode, but with these |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2722 additional commands: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2723 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2724 \\<gnus-uu-post-reply-mode-map>\\[gnus-uu-post-news-inews] post the message. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2725 C-c C-f move to a header field (and create it if there isn't): |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2726 C-c C-f C-n move to Newsgroups: C-c C-f C-s move to Subj: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2727 C-c C-f C-f move to Followup-To: C-c C-f C-k move to Keywords: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2728 C-c C-f C-d move to Distribution: C-c C-f C-a move to Summary: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2729 C-c C-y news-reply-yank-original (insert current message, in NEWS). |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2730 C-c C-q mail-fill-yanked-message (fill what was yanked). |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2731 C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2732 \\[gnus-uu-post-insert-binary-in-article] encode and include a file in this article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2733 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2734 This mode is almost identical to news-reply-mode, but has some |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2735 additional commands for treating encoded binary articles. In |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2736 particular, \\[gnus-uu-post-news-inews] will ask for a file to include, if |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2737 one hasn't been included already. It will post, first, the message |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2738 composed, and then it will post as many additional articles it takes |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2739 to post the entire encoded files. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2740 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2741 Relevant Variables |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2742 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2743 `gnus-uu-post-encode-method' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2744 There are three functions supplied with gnus-uu for encoding files: |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2745 `gnus-uu-post-encode-uuencode', which does straight uuencoding; |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2746 `gnus-uu-post-encode-mime', which encodes with base64 and adds MIME |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2747 headers; and `gnus-uu-post-encode-mime-uuencode', which encodes with |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2748 uuencode and adds MIME headers. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2749 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2750 `gnus-uu-post-include-before-composing' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2751 Non-nil means that gnus-uu will ask for a file to encode before you |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2752 compose the article. If this variable is t, you can either include |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2753 an encoded file with `C-c C-i' or have one included for you when you |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2754 post the article. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2755 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2756 `gnus-uu-post-length' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2757 Maximum length of an article. The encoded file will be split into how |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2758 many articles it takes to post the entire file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2759 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2760 `gnus-uu-post-separate-description' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2761 Non-nil means that the description will be posted in a separate |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2762 article. The first article will typically be numbered (0/x). If |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2763 this variable is nil, the description the user enters will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2764 included at the beginning of the first article, which will be |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2765 numbered (1/x). Default is t. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2766 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2767 `gnus-uu-post-threaded' |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2768 Non-nil means that gnus-uu will post the encoded file in a thread. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2769 This may not be smart, as no other decoder I have seen are able to |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2770 follow threads when collecting uuencoded articles. (Well, I have seen |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2771 one package that does that - gnus-uu, but somehow, I don't think that |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2772 counts...) Default is nil. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2773 " |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2774 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2775 ;; require... |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2776 (or (fboundp 'mail-setup) (load "sendmail")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2777 (kill-all-local-variables) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2778 (make-local-variable 'mail-reply-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2779 (setq mail-reply-buffer nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2780 (set-syntax-table text-mode-syntax-table) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2781 (use-local-map gnus-uu-post-reply-mode-map) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2782 (setq local-abbrev-table text-mode-abbrev-table) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2783 (setq major-mode 'gnus-uu-post-reply-mode) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2784 (setq mode-name "Gnus UU News") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2785 (make-local-variable 'paragraph-separate) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2786 (make-local-variable 'paragraph-start) |
10873
1f8938c2c3a8
(gnus-uu-post-reply-mode): Remove ^ from paragraph-start & paragraph-separate.
Boris Goldowsky <boris@gnu.org>
parents:
9504
diff
changeset
|
2787 (setq paragraph-start (concat mail-header-separator "$\\|" |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2788 paragraph-start)) |
10873
1f8938c2c3a8
(gnus-uu-post-reply-mode): Remove ^ from paragraph-start & paragraph-separate.
Boris Goldowsky <boris@gnu.org>
parents:
9504
diff
changeset
|
2789 (setq paragraph-separate (concat mail-header-separator "$\\|" |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2790 paragraph-separate)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2791 (run-hooks 'text-mode-hook 'gnus-uu-post-reply-mode-hook)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2792 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2793 (defun gnus-uu-post-news () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2794 "Compose an article and post an encoded file." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2795 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2796 (setq gnus-uu-post-inserted-file-name nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2797 (setq gnus-uu-winconf-post-news (current-window-configuration)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2798 (let (news-reply-mode) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2799 (fset 'news-reply-mode 'gnus-uu-post-reply-mode) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2800 (gnus-summary-post-news) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2801 (if gnus-uu-post-include-before-composing |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2802 (save-excursion (setq gnus-uu-post-inserted-file-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2803 (gnus-uu-post-insert-binary)))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2804 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2805 (defun gnus-uu-post-insert-binary-in-article () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2806 "Inserts an encoded file in the buffer. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2807 The user will be asked for a file name." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2808 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2809 (if (not (eq (current-buffer) (get-buffer gnus-post-news-buffer))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2810 (error "Not in post-news buffer")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2811 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2812 (setq gnus-uu-post-inserted-file-name (gnus-uu-post-insert-binary)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2813 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2814 ; Encodes with uuencode and substitutes all spaces with backticks. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2815 (defun gnus-uu-post-encode-uuencode (path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2816 (if (gnus-uu-post-encode-file "uuencode" path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2817 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2818 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2819 (forward-line 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2820 (while (re-search-forward " " nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2821 (replace-match "`")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2822 t))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2823 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2824 ; Encodes with uuencode and adds MIME headers. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2825 (defun gnus-uu-post-encode-mime-uuencode (path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2826 (if (gnus-uu-post-encode-uuencode path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2827 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2828 (gnus-uu-post-make-mime file-name "x-uue") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2829 t))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2830 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2831 ; Encodes with base64 and adds MIME headers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2832 (defun gnus-uu-post-encode-mime (path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2833 (if (gnus-uu-post-encode-file "mmencode" path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2834 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2835 (gnus-uu-post-make-mime file-name "base64") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2836 t))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2837 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2838 ; Adds MIME headers. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2839 (defun gnus-uu-post-make-mime (file-name encoding) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2840 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2841 (insert (format "Content-Type: %s; name=\"%s\"\n" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2842 (gnus-uu-choose-action file-name gnus-uu-ext-to-mime-list) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2843 file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2844 (insert (format "Content-Transfer-Encoding: %s\n\n" encoding)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2845 (save-restriction |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2846 (set-buffer gnus-post-news-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2847 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2848 (re-search-forward mail-header-separator) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2849 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2850 (forward-line -1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2851 (narrow-to-region 1 (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2852 (or (mail-fetch-field "mime-version") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2853 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2854 (widen) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2855 (insert "MIME-Version: 1.0\n"))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2856 (widen))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2857 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2858 ; Encodes a file PATH with COMMAND, leaving the result in the |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2859 ; current buffer. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2860 (defun gnus-uu-post-encode-file (command path file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2861 (= 0 (call-process "sh" nil t nil "-c" |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2862 (format "%s %s %s" command path file-name)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2863 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2864 (defun gnus-uu-post-news-inews () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2865 "Posts the composed news article and encoded file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2866 If no file has been included, the user will be asked for a file." |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2867 (interactive) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2868 (if (not (eq (current-buffer) (get-buffer gnus-post-news-buffer))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2869 (error "Not in post news buffer")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2870 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2871 (let (file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2872 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2873 (if gnus-uu-post-inserted-file-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2874 (setq file-name gnus-uu-post-inserted-file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2875 (setq file-name (gnus-uu-post-insert-binary))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2876 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2877 (if gnus-uu-post-threaded |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2878 (let ((gnus-required-headers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2879 (if (memq 'Message-ID gnus-required-headers) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2880 gnus-required-headers |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2881 (cons 'Message-ID gnus-required-headers))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2882 gnus-inews-article-hook elem) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2883 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2884 (setq gnus-inews-article-hook (if (listp gnus-inews-article-hook) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2885 gnus-inews-article-hook |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2886 (list gnus-inews-article-hook))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2887 (setq gnus-inews-article-hook |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2888 (cons |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2889 '(lambda () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2890 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2891 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2892 (if (re-search-forward "^Message-ID: \\(.*\\)$" nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2893 (setq gnus-uu-post-message-id |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2894 (buffer-substring |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2895 (match-beginning 1) (match-end 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2896 (setq gnus-uu-post-message-id nil)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2897 gnus-inews-article-hook)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2898 (gnus-uu-post-encoded file-name t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2899 (gnus-uu-post-encoded file-name nil))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2900 (setq gnus-uu-post-inserted-file-name nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2901 (and gnus-uu-winconf-post-news |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2902 (set-window-configuration gnus-uu-winconf-post-news))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2903 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2904 ; Asks for a file to encode, encodes it and inserts the result in |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2905 ; the current buffer. Returns the file name the user gave. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2906 (defun gnus-uu-post-insert-binary () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2907 (let ((uuencode-buffer-name "*uuencode buffer*") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2908 file-path post-buf uubuf file-name) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2909 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2910 (setq file-path (read-file-name |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2911 "What file do you want to encode? ")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2912 (if (not (file-exists-p file-path)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2913 (error "%s: No such file" file-path)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2914 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2915 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2916 (insert (format "\n%s\n" gnus-uu-post-binary-separator)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2917 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2918 (if (string-match "^~/" file-path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2919 (setq file-path (concat "$HOME" (substring file-path 1)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2920 (if (string-match "/[^/]*$" file-path) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2921 (setq file-name (substring file-path (1+ (match-beginning 0)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2922 (setq file-name file-path)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2923 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2924 (unwind-protect |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2925 (if (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2926 (set-buffer (setq uubuf |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2927 (get-buffer-create uuencode-buffer-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2928 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2929 (funcall gnus-uu-post-encode-method file-path file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2930 (insert-buffer uubuf) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2931 (error "Encoding unsuccessful")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2932 (kill-buffer uubuf)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2933 file-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2934 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2935 ; Posts the article and all of the encoded file. |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2936 (defun gnus-uu-post-encoded (file-name &optional threaded) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2937 (let ((send-buffer-name "*uuencode send buffer*") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2938 (encoded-buffer-name "*encoded buffer*") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2939 (top-string "[ cut here %s (%s %d/%d) %s gnus-uu ]") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2940 (separator (concat mail-header-separator "\n\n")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2941 file uubuf length parts header i end beg |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2942 beg-line minlen buf post-buf whole-len beg-binary end-binary) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2943 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2944 (setq post-buf (current-buffer)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2945 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2946 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2947 (if (not (re-search-forward |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2948 (if gnus-uu-post-separate-description |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2949 gnus-uu-post-binary-separator |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2950 mail-header-separator) nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2951 (error "Internal error: No binary/header separator")) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2952 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2953 (forward-line 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2954 (setq beg-binary (point)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2955 (setq end-binary (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2956 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2957 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2958 (set-buffer (setq uubuf (get-buffer-create encoded-buffer-name))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2959 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2960 (insert-buffer-substring post-buf beg-binary end-binary) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2961 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2962 (setq length (count-lines 1 (point-max))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2963 (setq parts (/ length gnus-uu-post-length)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2964 (if (not (< (% length gnus-uu-post-length) 4)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2965 (setq parts (1+ parts)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2966 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2967 (if gnus-uu-post-separate-description |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2968 (forward-line -1)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2969 (kill-region (point) (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2970 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2971 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2972 (search-forward mail-header-separator nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2973 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2974 (setq header (buffer-substring 1 (point))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2975 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2976 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2977 (if (not gnus-uu-post-separate-description) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2978 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2979 (if (and (not threaded) (re-search-forward "^Subject: " nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2980 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2981 (end-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2982 (insert (format " (0/%d)" parts)))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2983 (gnus-inews-news)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2984 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2985 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2986 (setq i 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2987 (setq beg 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2988 (while (not (> i parts)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2989 (set-buffer (get-buffer-create send-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2990 (erase-buffer) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2991 (insert header) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2992 (if (and threaded gnus-uu-post-message-id) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2993 (insert (format "References: %s\n" gnus-uu-post-message-id))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2994 (insert separator) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2995 (setq whole-len |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2996 (- 62 (length (format top-string "" file-name i parts "")))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2997 (if (> 1 (setq minlen (/ whole-len 2))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2998 (setq minlen 1)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
2999 (setq |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3000 beg-line |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3001 (format top-string |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3002 (make-string minlen ?-) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3003 file-name i parts |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3004 (make-string |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3005 (if (= 0 (% whole-len 2)) (1- minlen) minlen) ?-))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3006 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3007 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3008 (if (not (re-search-forward "^Subject: " nil t)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3009 () |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3010 (if (not threaded) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3011 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3012 (end-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3013 (insert (format " (%d/%d)" i parts))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3014 (if (or (and (= i 2) gnus-uu-post-separate-description) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3015 (and (= i 1) (not gnus-uu-post-separate-description))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3016 (replace-match "Subject: Re: ")))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3017 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3018 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3019 (save-excursion |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3020 (set-buffer uubuf) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3021 (goto-char beg) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3022 (if (= i parts) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3023 (goto-char (point-max)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3024 (forward-line gnus-uu-post-length)) |
7977
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
3025 (if (and (= (1+ i) parts) (< (count-lines (point) (point-max)) 4)) |
ebee036f5d20
(gnus-uu-view-directory): Fixed viewing with the
Richard M. Stallman <rms@gnu.org>
parents:
7763
diff
changeset
|
3026 (forward-line -4)) |
7291
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3027 (setq end (point))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3028 (insert-buffer-substring uubuf beg end) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3029 (insert beg-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3030 (insert "\n") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3031 (setq beg end) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3032 (setq i (1+ i)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3033 (goto-char 1) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3034 (re-search-forward mail-header-separator nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3035 (beginning-of-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3036 (forward-line 2) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3037 (if (re-search-forward gnus-uu-post-binary-separator nil t) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3038 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3039 (replace-match "") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3040 (forward-line 1))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3041 (insert beg-line) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3042 (insert "\n") |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3043 (gnus-inews-news))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3044 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3045 (and (setq buf (get-buffer send-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3046 (kill-buffer buf)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3047 (and (setq buf (get-buffer encoded-buffer-name)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3048 (kill-buffer buf)) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3049 |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3050 (if (not gnus-uu-post-separate-description) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3051 (progn |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3052 (set-buffer-modified-p nil) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3053 (and (fboundp 'bury-buffer) (bury-buffer)))))) |
373b9db3c71c
Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents:
6904
diff
changeset
|
3054 |
6728 | 3055 (provide 'gnus-uu) |
3056 | |
6729 | 3057 ;; gnus-uu.el ends here |