annotate lisp/=gnus-uu.el @ 7311:b4ef2060b171

(lib-src): Undo previous change. (blessmail): New target to run maybe-blessmail in lib-src. (all): Depend on blessmail.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 May 1994 05:15:26 +0000
parents 373b9db3c71c
children 6c08927dfafc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; gnus-uu.el --- extract, view or save (uu)encoded files from gnus
6729
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
2 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc.
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
3
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 ;; Author: Lars Ingebrigtsen <larsi@ifi.uio.no>
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Created: 2 Oct 1993
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
6 ;; Version: v2.7.2
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
7 ;; Last Modified: 1994/05/03
6729
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
8 ;; Keyword: news
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
9
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
10 ;; This file is part of GNU Emacs.
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
11
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
15 ;; any later version.
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
16
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
20 ;; GNU General Public License for more details.
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
21
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
22 ;; You should have received a copy of the GNU General Public License
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
24 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
25
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
26 ;;; Commentary:
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
27
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; All gnus-uu commands start with `C-c C-v'.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
30 ;; Short user manual for this package:
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
32 ;; 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
33 ;; series. The defaults should be reasonable for most systems.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
35 ;; 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
36 ;; 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
37 ;; you see the suggested commands to be executed.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
39 ;; 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
40 ;; 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
41 ;; 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
42 ;; this buffer lets you do.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
44 ;; 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
45 ;; 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
46 ;; customize it to fit your needs.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
47 ;;
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 ;; History
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 ;; v1.0: First version released Oct 2 1992.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 ;; v1.1: Changed `C-c C-r' to `C-c C-e' and `C-c C-p' to `C-c C-k'.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 ;; Changed (setq gnus-exit-group-hook) to (add-hook). Removed
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 ;; checking for "Re:" for finding parts.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 ;; v2.2: Fixed handling of currupted archives. Changed uudecoding to
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 ;; an asynchronous process to avoid loading tons of data into emacs
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 ;; buffers. No longer reads articles emacs already have aboard. Fixed
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 ;; a firmer support for shar files. Made regexp searches for files
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 ;; more convenient. Added `C-c C-l' for editing uucode begin
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 ;; lines. Added multi-system decoder entry point. Added interactive
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 ;; view mode. Added function for decoding and saving all uuencoded
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 ;; articles in the current newsgroup.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 ;; v2.3: After suggestions I have changed all the gnus-uu key bindings
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 ;; to avoid hogging all the user keys (C-c LETTER). Also added
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 ;; (provide) and fixed some saving stuff. First posted version to
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 ;; gnu.emacs.sources.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 ;;
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 ;; v2.4: Fixed some more in the save-all category. Automatic fixing of
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 ;; uucode "begin" lines: names on the form of "dir/file" are
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 ;; translated into "dir-file". Added a function for fixing stripped
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 ;; uucode articles. Added binhex save.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 ;;
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
77 ;; 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
78 ;; documentation strings.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 ;;
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
80 ;; 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
81 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
82 ;; 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
83 ;; 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
84 ;; 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
85 ;; uuencoded files in threads.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
87 ;; 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
88 ;; 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
89 ;; (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
90 ;; files and various other bits and pieces.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
92 ;; 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
93 ;; 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
94 ;; decoding, as nobody posts encoded files in threads...
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 ;;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
96 ;; V2.7.2: New functions for digesting and forwarding articles added
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
97 ;; 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
98 ;; marking threads.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
6729
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
100 ;;; Code:
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
101
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 (require 'gnus)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
103 (require 'gnuspost)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 ;; Binding of keys to the gnus-uu functions.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 (defvar gnus-uu-ctl-map nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 (define-prefix-command 'gnus-uu-ctl-map)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 (define-key gnus-summary-mode-map "\C-c\C-v" gnus-uu-ctl-map)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 (define-key gnus-uu-ctl-map "\C-v" 'gnus-uu-decode-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 (define-key gnus-uu-ctl-map "v" 'gnus-uu-decode-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 (define-key gnus-uu-ctl-map "\C-s" 'gnus-uu-shar-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 (define-key gnus-uu-ctl-map "s" 'gnus-uu-shar-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 (define-key gnus-uu-ctl-map "\C-m" 'gnus-uu-multi-decode-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 (define-key gnus-uu-ctl-map "m" 'gnus-uu-multi-decode-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 (define-key gnus-uu-ctl-map "\C-b" 'gnus-uu-decode-and-show-in-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 (define-key gnus-summary-mode-map "#" 'gnus-uu-mark-article)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (define-key gnus-summary-mode-map "\M-#" 'gnus-uu-unmark-article)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 (define-key gnus-uu-ctl-map "\C-u" 'gnus-uu-unmark-all-articles)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 (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
124 (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
125 (define-key gnus-uu-ctl-map "t" 'gnus-uu-mark-thread)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 (define-key gnus-uu-ctl-map "\M-\C-v" 'gnus-uu-marked-decode-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 (define-key gnus-uu-ctl-map "\M-v" 'gnus-uu-marked-decode-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 (define-key gnus-uu-ctl-map "\M-\C-s" 'gnus-uu-marked-shar-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 (define-key gnus-uu-ctl-map "\M-s" 'gnus-uu-marked-shar-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 (define-key gnus-uu-ctl-map "\M-\C-m" 'gnus-uu-marked-multi-decode-and-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 (define-key gnus-uu-ctl-map "\M-m" 'gnus-uu-marked-multi-decode-and-save)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
134 (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
135 (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
136
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 (define-key gnus-uu-ctl-map "\C-i" 'gnus-uu-toggle-interactive-view)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 (define-key gnus-uu-ctl-map "\C-t" 'gnus-uu-toggle-any-variable)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 (define-key gnus-uu-ctl-map "\C-l" 'gnus-uu-edit-begin-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
142 (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
143 (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
144 (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
145 (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
146
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 "\C-h" 'gnus-uu-threaded-decode-and-view)
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 "h" 'gnus-uu-threaded-decode-and-save)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
149 (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
150 (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
151
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
152 (define-key gnus-uu-ctl-map "p" 'gnus-uu-post-news)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
154 ;; Dummy function gnus-uu
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
155
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
156 (defun gnus-uu ()
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
157 "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
158
7291
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 Keymap overview:
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
161
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
162 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
163
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
164 There four decoding commands categories:
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
165 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
166 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
167 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
168 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
169
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
170 \\<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
171 \\[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
172 \\[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
173 \\[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
174 \\[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
175 \\[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
176
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
177 \\[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
178 \\[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
179
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
180 \\[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
181 \\[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
182
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
183 \\[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
184 \\[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
185 \\[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
186 \\[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
187
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
188 \\[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
189 \\[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
190
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
191 \\[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
192 \\[gnus-uu-unmark-article]\tUnmark the current article
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
193 \\[gnus-uu-unmark-all-articles]\tUnmark all articles
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
194 \\[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
195 \\[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
196 \\[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
197 \\[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
198 \\[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
199 \\[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
200 \\[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
201 \\[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
202
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
203 \\[gnus-uu-toggle-asynchronous]\tToggle asynchronous viewing mode
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
204 \\[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
205 \\[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
206 \\[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
207 \\[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
208 \\[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
209 \\[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
210 \\[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
211
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
212 \\[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
213
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
214 Function description:
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
215
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
216 `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
217 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
218
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
219 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
220 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
221 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
222 ignored, however.)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
223
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
224 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
225 \"cat.gif (2/3)\"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
226 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
227 \"^cat.gif ([0-9]+/[0-9]+).*$\".
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
228
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
229 Subjects that are nonstandard, like
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
230 \"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
231 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
232 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
233
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
234 `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
235 `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
236 resulting file, but save it instead.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
237
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
238 `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
239 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
240 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
241 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
242 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
243
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
244 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
245 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
246 `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
247
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
248 `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
249 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
250 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
251 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
252 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
253 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
254 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
255 `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
256 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
257
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
258 `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
259 article.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
260
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
261 `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
262 articles.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
263
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
264 `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
265 all articles matching that regular expression.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
266
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
267 `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
268 thread.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
269
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
270 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
271 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
272 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
273 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
274 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
275 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
276 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
277
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
278 `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
279 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
280 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
281 by some perverse poster.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
282
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
283 `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
284 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
285 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
286 files (if any) will be
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
287 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
288 unread articles.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
289
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
290 `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
291 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
292
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
293 `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
294 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
295
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
296
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
297 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
298 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
299 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
300 `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
301 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
302 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
303 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
304 \"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
305 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
306 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
307 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
308
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
309 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
310 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
311 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
312 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
313 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
314 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
315 interactive view for a different approach.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
316
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
317
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
318 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
319 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
320 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
321
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
322
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
323 `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
324 variable.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
325
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
326 `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
327 variable.
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 `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
330 variable.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
331
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
332 `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
333 `gnus-uu-kill-carriage-return' variable.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
334
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
335 `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
336 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
337 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
338 commands and execute them at leisure.
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-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
341 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
342 stripped by mailers.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
343
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
344 `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
345 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
346 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
347
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
348 `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
349 listed above.
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
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
352 Customization
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
353
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
354 Rule Variables
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
355
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
356 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
357 these variables are of the form
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
358
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
359 (list '(regexp1 command2)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
360 '(regexp2 command2)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
361 ...)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
362
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
363 `gnus-uu-user-view-rules'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
364 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
365 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
366 say something like:
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
367
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
368 (setq gnus-uu-user-view-rules
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
369 (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
370
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
371 `gnus-uu-user-view-rules-end'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
372 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
373 from the user and default view rules.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
374
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
375 `gnus-uu-user-interactive-view-rules'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
376 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
377 when in interactive mode.
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 `gnus-uu-user-interactive-view-rules-end'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
380 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
381 when in interactive mode.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
382
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
383 `gnus-uu-user-archive-rules`
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
384 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
385 unpack archives.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
386
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
387
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
388 Other Variables
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-tmp-dir'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
391 Where gnus-uu does its work.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
392
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
393 `gnus-uu-do-not-unpack-archives'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
394 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
395 files to dispay.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
396
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
397 `gnus-uu-view-and-save'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
398 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
399 after viewing it.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
400
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
401 `gnus-uu-asynchronous'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
402 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
403 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
404 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
405 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
406 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
407 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
408 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
409 variable.
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
410
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
411 `gnus-uu-ask-before-view'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
412 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
413
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
414 `gnus-uu-ignore-default-view-rules'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
415 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
416
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
417 `gnus-uu-ignore-default-archive-rules'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
418 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
419 unpacking commands.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
420
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
421 `gnus-uu-kill-carriage-return'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
422 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
423 articles.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
424
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
425 `gnus-uu-unmark-articles-not-decoded'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
426 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
427 unsuccessfully decoded as unread.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
428
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
429 `gnus-uu-output-window-height'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
430 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
431 when using interactive view mode.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
432
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
433 `gnus-uu-correct-stripped-uucode'
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
434 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
435 have had traling spaces deleted.
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-use-interactive-view'
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
438 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
439
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
440 `gnus-uu-view-with-metamail'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
441 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
442 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
443 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
444 viewing.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
445
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
446 `gnus-uu-save-in-digest'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
447 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
448 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
449 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
450 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
451 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
452 dropped them.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
453
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
454 `gnus-uu-post-include-before-composing'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
455 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
456 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
457 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
458 post the article.
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-post-length'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
461 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
462 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
463
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
464 `gnus-uu-post-threaded'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
465 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
466 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
467 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
468 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
469 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
470 nil.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
471
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
472 `gnus-uu-post-separate-description'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
473 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
474 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
475 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
476 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
477 numbered (1/x). Default is t.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
478 "
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
479 (interactive)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
480 )
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
481
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
482 ;; Default viewing action rules
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
483
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
484 (defvar gnus-uu-default-view-rules
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485 (list
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
486 '("\\.\\(jpe?g\\|gif\\|tiff?\\|p[pgb]m\\|xwd\\|xbm\\|pcx\\)$" "xv")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
487 '("\\.tga$" "tgatoppm %s | xv -")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
488 '("\\.te?xt$\\|\\.doc$\\|read.*me" "xterm -e less")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
489 '("\\.\\(wav\\|aiff\\|hcom\\|u[blw]\\|s[bfw]\\|voc\\|smp\\)$"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
490 "sox -v .5 %s -t .au -u - > /dev/audio")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491 '("\\.au$" "cat %s > /dev/audio")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 '("\\.mod$" "str32")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 '("\\.ps$" "ghostview")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
494 '("\\.dvi$" "xdvi")
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
495 '("\\.[1-6]$" "xterm -e man -l")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
496 '("\\.html$" "xmosaic")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
497 '("\\.mpe?g$" "mpeg_play")
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
498 '("\\.fli$" "xflick")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
499 '("\\.flc$" "xanim")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
500 '("\\.\\(tar\\|arj\\|zip\\|zoo\\|arc\\|gz\\|Z\\|lzh\\|ar\\|lha\\)$"
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
501 "gnus-uu-archive"))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
502
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
503 "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
504 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
505 `gnus-uu-user-view-rules' to something useful.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
506
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
507 For example:
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 To make gnus-uu use 'xli' to display JPEG and GIF files, put the
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510 following in your .emacs file
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
511
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512 (setq gnus-uu-user-view-rules (list '(\"jpg$\\\\|gif$\" \"xli\")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
514 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
515 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
516 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
517 the file as an argument.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
518
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
519 If the command string contains \"%s\", the file name will be inserted
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
520 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
521 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
522 before executing.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
523
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
524 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
525 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
526 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
527 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
528 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
529 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
530 match.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
531
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
532 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
533 `gnus-uu-user-interactive-view-rules' and
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
534 `gnus-uu-user-interactive-view-rules-end' will be used instead.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
535
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
536 (defvar gnus-uu-user-view-rules nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
537 "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
538 See the documentation on the `gnus-uu-default-view-rules' variable for
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
539 details.")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
540
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
541 (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
542 "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
543 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
544 details.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
545
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
546 (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
547 "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
548 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
549 details.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
550
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
551 (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
552 "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
553 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
554 details.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
555
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
556 (defvar gnus-uu-default-interactive-view-rules-begin
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557 (list
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
558 '("\\.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
559 '("\\.pas$" "cat %s | sed s/\r//g")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560 ))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
562 (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
563 (list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
564 '(".*" "file")))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
565
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 ;; Default unpacking commands
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
568 (defvar gnus-uu-default-archive-rules
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
569 (list '("\\.tar$" "tar xf")
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
570 '("\\.zip$" "unzip -o")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
571 '("\\.ar$" "ar x")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
572 '("\\.arj$" "unarj x")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
573 '("\\.zoo$" "zoo -e")
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
574 '("\\.\\(lzh\\|lha\\)$" "lha x")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
575 '("\\.Z$" "uncompress")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576 '("\\.gz$" "gunzip")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
577 '("\\.arc$" "arc -x"))
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
578 )
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
579
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
580 (defvar gnus-uu-destructive-archivers
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
581 (list "uncompress" "gunzip"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
582
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
583 (defvar gnus-uu-user-archive-rules nil
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
584 "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
585 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
586 unpack zip files, say the following:
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
587 (setq gnus-uu-user-archive-rules
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
588 (list '(\"\\\\.tar$\" \"untar\")
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
589 '(\"\\\\.zip$\" \"zip -x\")))"
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
590 )
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
592 ;; Pseudo-MIME support
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
593
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
594 (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
595 (list '("\\.gif$" "image/gif")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
596 '("\\.jpe?g$" "image/jpeg")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
597 '("\\.tiff?$" "image/tiff")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
598 '("\\.xwd$" "image/xwd")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
599 '("\\.pbm$" "image/pbm")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
600 '("\\.pgm$" "image/pgm")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
601 '("\\.ppm$" "image/ppm")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
602 '("\\.xbm$" "image/xbm")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
603 '("\\.pcx$" "image/pcx")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
604 '("\\.tga$" "image/tga")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
605 '("\\.ps$" "image/postscript")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
606 '("\\.fli$" "video/xflick")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
607 '("\\.wav$" "audio/wav")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
608 '("\\.aiff$" "audio/aiff")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
609 '("\\.hcom$" "audio/hcom")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
610 '("\\.voc$" "audio/voc")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
611 '("\\.smp$" "audio/smp")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
612 '("\\.mod$" "audio/mod")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
613 '("\\.dvi$" "image/dvi")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
614 '("\\.mpe?g$" "video/mpeg")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
615 '("\\.au$" "audio/basic")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
616 '("\\.\\(te?xt\\|doc\\|c\\|h\\)$" "text/plain")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
617 '("read.*me" "text/plain")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
618 '("\\.html$" "text/html")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
619 '("\\..*$" "unknown/unknown")))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
620
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 ;; Various variables users may set
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
622
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623 (defvar gnus-uu-tmp-dir "/tmp/"
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
624 "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
625 Default is \"/tmp/\".")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 (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
628 "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
629 Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
630
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
631 (defvar gnus-uu-view-and-save nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
632 "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
633 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
634 viewing is unsuccessful. Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636 (defvar gnus-uu-asynchronous nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
637 "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
638 Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
640 (defvar gnus-uu-ask-before-view nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
641 "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
642 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
643 nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
644
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
645 (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
646 "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
647 Only the user viewing rules will be consulted. Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
648
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
649 (defvar gnus-uu-ignore-default-archive-rules nil
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
650 "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
651 Only the user unpacking commands will be consulted. Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
652
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
653 (defvar gnus-uu-kill-carriage-return t
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
654 "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
655 Default is t.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
656
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
657 (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
658 "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
659 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
660 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
661 it nil.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
662
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
663 (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
664 "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
665 Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
666
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
667 (defvar gnus-uu-output-window-height 20
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
668 "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
669 Change it at your convenience. Default is 20.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
671 (defvar gnus-uu-correct-stripped-uucode nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
672 "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
673 Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
674
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
675 (defvar gnus-uu-use-interactive-view nil
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
676 "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
677 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
678 interactively which files to view and how. Default is nil.")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
680 (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
681 "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
682 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
683 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
684 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
685 so I simply dropped them.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
686
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
687
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
688 ;; Internal variables
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
689
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
690 (defconst gnus-uu-begin-string "^begin[ \t]+[0-7][0-7][0-7][ \t]+\\(.*\\)$")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691 (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
692
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
693 (defconst gnus-uu-body-line "^M")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
694 (let ((i 61))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
695 (while (> (setq i (1- i)) 0)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
696 (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
697 (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
698
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
699 ;"^M.............................................................?$"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
700
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
701 (defconst gnus-uu-shar-begin-string "^#! */bin/sh")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
702
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
703 (defvar gnus-uu-shar-file-name nil)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
704 (defconst gnus-uu-shar-name-marker "begin [0-7][0-7][0-7][ \t]+\\(\\(\\w\\|\\.\\)*\\b\\)")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
705 (defvar gnus-uu-shar-directory nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
706
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
707 (defvar gnus-uu-file-name nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
708 (defconst gnus-uu-uudecode-process nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
709
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
710 (defvar gnus-uu-interactive-file-list nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
711 (defvar gnus-uu-marked-article-list nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
712 (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
713 (defvar gnus-uu-work-dir nil)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715 (defconst gnus-uu-interactive-buffer-name "*gnus-uu interactive*")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716 (defconst gnus-uu-output-buffer-name "*Gnus UU Output*")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717 (defconst gnus-uu-result-buffer "*Gnus UU Result Buffer*")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
718
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
719 (defconst gnus-uu-error-during-unarching nil)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
720
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721 ;; Interactive functions
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723 ;; UUdecode and view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
724
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
725 (defun gnus-uu-decode-and-view ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
726 "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
727 '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
728 `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
729 >/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
730 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
731 (interactive)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
732 (gnus-uu-decode-and-view-or-save t nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
733
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
734 (defun gnus-uu-decode-and-save ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
735 "Decodes and saves the resulting file."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
736 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
737 (gnus-uu-decode-and-view-or-save nil nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
739 (defun gnus-uu-marked-decode-and-view ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
740 "Decodes and views articles marked.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
741 The marked equivalent to `gnus-uu-decode-and-view'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
742 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743 (gnus-uu-decode-and-view-or-save t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
744
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
745 (defun gnus-uu-marked-decode-and-save ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
746 "Decodes and saves articles marked.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
747 The marked equivalent to `gnus-uu-decode-and-save'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749 (gnus-uu-decode-and-view-or-save nil t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752 ;; Unshar and view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 (defun gnus-uu-shar-and-view ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
755 "Unshars and views articles.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
756 The shar equivalent of `gnus-uu-decode-and-view'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
757 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 (gnus-uu-unshar-and-view-or-save t nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
759
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
760 (defun gnus-uu-shar-and-save ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
761 "Unshars and saves files.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
762 The shar equivalent to `gnus-uu-decode-and-save'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764 (gnus-uu-unshar-and-view-or-save nil nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766 (defun gnus-uu-marked-shar-and-view ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
767 "Unshars and views articles marked.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
768 The marked equivalent to `gnus-uu-shar-and-view'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
769 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
770 (gnus-uu-unshar-and-view-or-save t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
771
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
772 (defun gnus-uu-marked-shar-and-save ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
773 "Unshars and saves articles marked.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
774 The marked equivalent to `gnus-uu-shar-and-save'."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
775 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
776 (gnus-uu-unshar-and-view-or-save nil t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
777
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
778 ;; Threaded decode
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
779
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
780 (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
781 "Decodes and saves the resulting file."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
782 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
783 (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
784
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
785 (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
786 "Decodes and saves the resulting file."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
787 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
788 (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
789
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
790 (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
791 "Decodes and saves the resulting file."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
792 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
793 (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
794
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
795 (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
796 "Decodes and saves the resulting file."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
797 (interactive)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
798 (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
799
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
800 (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
801 (gnus-uu-unmark-all-articles)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
802 (gnus-uu-mark-thread)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
803 (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
804
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
805 (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
806 (let (type)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
807 (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
808 (setq type (read-char))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
809 (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
810 (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
811
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
812 (gnus-uu-unmark-all-articles)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
813 (gnus-uu-mark-thread)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
814
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
815 (if (= type ?\r) (setq type ?u))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
816 (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
817 ((= 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
818 ((= 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
819 ((= 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
820
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822 ;; Toggle commands
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
823
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 (defun gnus-uu-toggle-asynchronous ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
825 "This function toggles asynchronous viewing."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
826 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827 (if (setq gnus-uu-asynchronous (not gnus-uu-asynchronous))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
828 (message "gnus-uu will now view files asynchronously")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
829 (message "gnus-uu will now view files synchronously")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
831 (defun gnus-uu-toggle-query ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832 "This function toggles whether to ask before viewing or not."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
833 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
834 (if (setq gnus-uu-ask-before-view (not gnus-uu-ask-before-view))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
835 (message "gnus-uu will now ask before viewing")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
836 (message "gnus-uu will now view without asking first")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
837
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
838 (defun gnus-uu-toggle-always-ask ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
839 "This function toggles whether to always ask to save a file after viewing."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
841 (if (setq gnus-uu-view-and-save (not gnus-uu-view-and-save))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
842 (message "gnus-uu will now ask to save the file after viewing")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
843 (message "gnus-uu will now not ask to save after successful viewing")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
845 (defun gnus-uu-toggle-interactive-view ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 "This function toggles whether to use interactive view."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
847 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
848 (if (setq gnus-uu-use-interactive-view (not gnus-uu-use-interactive-view))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
849 (message "gnus-uu will now use interactive view")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 (message "gnus-uu will now use non-interactive view")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
851
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
852 (defun gnus-uu-toggle-unmark-undecoded ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
853 "This function toggles whether to unmark articles not decoded."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
854 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855 (if (setq gnus-uu-unmark-articles-not-decoded
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
856 (not gnus-uu-unmark-articles-not-decoded))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
857 (message "gnus-uu will now unmark articles not decoded")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
858 (message "gnus-uu will now not unmark articles not decoded")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
859
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860 (defun gnus-uu-toggle-kill-carriage-return ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
861 "This function toggles the stripping of carriage returns from the articles."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863 (if (setq gnus-uu-kill-carriage-return (not gnus-uu-kill-carriage-return))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 (message "gnus-uu will now strip carriage returns")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 (message "gnus-uu won't strip carriage returns")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
867 (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
868 "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
869 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
870 (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
871 (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
872 (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
873
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
874 (defun gnus-uu-toggle-correct-stripped-uucode ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
875 "This function toggles whether to correct stripped uucode."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
877 (if (setq gnus-uu-correct-stripped-uucode
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
878 (not gnus-uu-correct-stripped-uucode))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
879 (message "gnus-uu will now correct stripped uucode")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 (message "gnus-uu won't check and correct stripped uucode")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
882 (defun gnus-uu-toggle-any-variable ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 "This function ask what variable the user wants to toggle."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885 (let (rep)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
886 (message "(a)sync, (q)uery, (p)ask, (k)ill CR, (i)nteract, (u)nmark, (c)orrect, (m)eta")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 (setq rep (read-char))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 (if (= rep ?a)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
889 (gnus-uu-toggle-asynchronous))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
890 (if (= rep ?q)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 (gnus-uu-toggle-query))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 (if (= rep ?p)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893 (gnus-uu-toggle-always-ask))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
894 (if (= rep ?k)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895 (gnus-uu-toggle-kill-carriage-return))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
896 (if (= rep ?u)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
897 (gnus-uu-toggle-unmark-undecoded))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
898 (if (= rep ?c)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
899 (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
900 (if (= rep ?m)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
901 (gnus-uu-toggle-view-with-metamail))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
902 (if (= rep ?i)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903 (gnus-uu-toggle-interactive-view))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
904
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
905
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
906 ;; Misc interactive functions
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
907
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
908 (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
909 "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
910 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
911 their sigs. (Stranger things have happened.)"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
912 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
913 (gnus-uu-initialize)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
914 (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
915 file-name)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
916 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
917 (and
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
918 (gnus-summary-select-article)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
919 (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
920 'gnus-uu-uustrip-article-as)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
921 (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
922 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
923 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
924 (set-buffer uu-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
925 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
926 (insert-file-contents file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
927 (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
928 uu-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
929 (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
930 (delete-file file-name))))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
932 (defun gnus-uu-edit-begin-line ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
933 "Edit the begin line of the current article."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
934 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
935 (let ((buffer-read-only nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
936 begin b)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
937 (save-excursion
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
938 (gnus-summary-select-article)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
939 (set-buffer gnus-article-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
940 (goto-line 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
941 (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
942 (error "No begin line in the current article")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
943 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
944 (setq b (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
946 (setq begin (buffer-substring b (point)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
947 (setq begin (read-string "" begin))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
948 (setq buffer-read-only nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
949 (delete-region b (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 (insert-string begin)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
951
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
952
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953 ;; Multi functions
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
954
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
955 (defun gnus-uu-multi-decode-and-view ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
956 "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
957 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
958 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
959 functions."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
960 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
961 (gnus-uu-multi-decode-and-view-or-save t nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
962
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
963 (defun gnus-uu-multi-decode-and-save ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
964 "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
965 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
966 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
967 functions."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
968 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
969 (gnus-uu-multi-decode-and-view-or-save nil nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
970
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
971 (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
972 "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
973 This function lets the user decide what method to use for decoding.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974 Other than that, it's equivalent to the other marked decode-and-view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
975 functions."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
976 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
977 (gnus-uu-multi-decode-and-view-or-save t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
978
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
979 (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
980 "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
981 This function lets the user decide what method to use for decoding.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
982 Other than that, it's equivalent to the other marked decode-and-save
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
983 functions."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
984 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
985 (gnus-uu-multi-decode-and-view-or-save t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
986
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
987 (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
988 (let (type)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
989 (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
990 (setq type (read-char))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
991 (if (= type ?\r) (setq type ?u))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
992 (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
993 ((= 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
994 ((= 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
995 ((= 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
996 (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
997
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
998
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
999 ;; "All articles" commands
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1000
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1001 (defconst gnus-uu-rest-of-articles nil)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1002 (defvar gnus-uu-current-save-dir nil)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1003
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1004 (defun gnus-uu-decode-and-view-all-articles (&optional unread)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1005 "Try to decode all articles and view the result."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1006 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1007 (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
1008 (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
1009 "^." nil unread t))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1010 (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
1011 (gnus-uu-decode-and-view-or-save t t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1012
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1013 (defun gnus-uu-decode-and-view-all-unread-articles (&optional unread)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1014 "Try to decode all unread articles and view the result."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1015 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1016 (gnus-uu-decode-and-view-all-articles t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1017
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1018 (defun gnus-uu-decode-and-save-all-unread-articles ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1019 "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
1020 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
1021 whether it can uudecode the articles. The user will be prompted for an
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1022 directory to put the resulting (if any) files."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1023 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1024 (gnus-uu-decode-and-save-articles t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1025
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1026 (defun gnus-uu-decode-and-save-all-articles ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1027 "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
1028 Does the same as `gnus-uu-decode-and-save-all-unread-articles', except
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1029 that it grabs all articles visible, unread or not."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1030 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1031 (gnus-uu-decode-and-save-articles nil t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1032
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1033 (defun gnus-uu-decode-and-save-articles (&optional unread unmark)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1034 (let ((gnus-uu-unmark-articles-not-decoded t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1035 dir)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1036 (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
1037 (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
1038 "^." nil unread t))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1039 (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
1040 (setq dir (gnus-uu-read-directory "Where do you want the files? "))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1041 (gnus-uu-decode-and-view-or-save nil t dir)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1042 (message "Saved."))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1043
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1044
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1045 ;; Work functions
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1046
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1047 ; 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
1048 ; to this function, which does the rest.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1049 (defun gnus-uu-decode-and-view-or-save (view marked &optional save-dir)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1050 (gnus-uu-initialize)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1051 (let (decoded)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1052 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1053 (if (gnus-uu-decode-and-strip nil marked)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1054 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1055 (setq decoded t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1056 (if view
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1057 (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
1058 gnus-uu-use-interactive-view)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1059 (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
1060 (gnus-uu-check-for-generated-files)))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1061
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1062 (gnus-uu-summary-next-subject)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1063
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1064 (if gnus-uu-error-during-unarching
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1065 (gnus-uu-clean-up)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1066 (if (and gnus-uu-use-interactive-view view decoded)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1067 (gnus-uu-do-interactive)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1068
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1069 (if (or (not view) (not gnus-uu-use-interactive-view) (not decoded))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1070 (gnus-uu-clean-up))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1071
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1072 ; Unshars and views/saves marked/unmarked articles.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1073 (defun gnus-uu-unshar-and-view-or-save (view marked)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1074 (gnus-uu-initialize)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1075 (let (tar-file files decoded)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1076 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1077 (setq gnus-uu-shar-directory
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1078 (make-temp-name (concat gnus-uu-tmp-dir "gnusuush")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1079 (make-directory gnus-uu-shar-directory)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1080 (gnus-uu-add-file gnus-uu-shar-directory)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1081 (if (gnus-uu-decode-and-strip t marked)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1082 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1083 (setq decoded t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1084 (setq files (directory-files gnus-uu-shar-directory t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1085 (setq gnus-uu-generated-file-list
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1086 (append files gnus-uu-generated-file-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1087 (if (> (length files) 3)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1088 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1089 (setq tar-file
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1090 (concat
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1091 (make-temp-name (concat gnus-uu-tmp-dir "gnusuuar"))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1092 ".tar"))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1093 (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
1094 (call-process
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1095 "sh" nil
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1096 (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
1097 (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
1098 gnus-uu-shar-directory tar-file
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1099 gnus-uu-shar-directory))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1100 (if view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1101 (gnus-uu-view-file tar-file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1102 (gnus-uu-save-file tar-file)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1103 (if view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1104 (gnus-uu-view-file (elt files 2))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1105 (gnus-uu-save-file (elt files 2)))))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1106
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1107 (gnus-uu-summary-next-subject)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1108
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1109 (if (and gnus-uu-use-interactive-view view decoded)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1110 (gnus-uu-do-interactive))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1111
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1112 (if (or (not gnus-uu-use-interactive-view) (not decoded))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1113 (gnus-uu-clean-up))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1114
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1115
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1116 ;; 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
1117 ;; any decoding.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1118
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1119 (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
1120
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1121 ; 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
1122 ; 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
1123 ; 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
1124 ; 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
1125 ; 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
1126 (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
1127 (let (list-of-articles)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1128 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1129 (gnus-uu-initialize)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1130 (if (not marked)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1131 (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
1132 (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
1133 (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
1134
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1135 (if (not list-of-articles)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1136 (error "No list of articles"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1137
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1138 (setq gnus-uu-saved-article-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1139 (concat gnus-uu-work-dir
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1140 (if no-save
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1141 gnus-newsgroup-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1142 (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
1143 gnus-newsgroup-name))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1144 (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
1145 (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
1146 (not no-save))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1147 (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
1148 gnus-uu-saved-article-name))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1149
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1150 ; 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
1151 (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
1152 (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
1153 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1154 (set-buffer buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1155 (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
1156 (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
1157 ((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
1158 ((eq in-state 'last) (list 'end))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1159 (t (list 'middle))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1160 (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
1161 (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
1162 (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
1163 (match-end 1)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1164 (if (or (eq in-state 'first)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1165 (eq in-state 'first-and-last))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1166 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1167 (setq state (list 'begin))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1168 (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
1169 (erase-buffer))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1170 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1171 (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
1172 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1173 (insert (format
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1174 "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
1175 (current-time-string) name name))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1176 (if (not (eq in-state 'end))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1177 (setq state (list 'middle))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1178 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1179 (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
1180 (goto-char (setq beg (point-max)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1181 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1182 (save-restriction
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1183 (set-buffer buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1184 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1185 (re-search-forward "\n\n")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1186 (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
1187 (narrow-to-region 1 (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1188 (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
1189 "Message-ID:" "Keywords:" "Summary:"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1190 (while headers
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1191 (setq headline (car headers))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1192 (setq headers (cdr headers))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1193 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1194 (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
1195 (setq sorthead
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1196 (concat sorthead (buffer-substring
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1197 (match-beginning 0)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1198 (match-end 0)) "\n"))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1199 (widen)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1200 (insert sorthead)(goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1201 (insert body)(goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1202 (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
1203 (goto-char beg)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1204 (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
1205 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1206 (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
1207 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1208 (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
1209 (insert (format " %s\n" subj))))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1210 (if (or (eq in-state 'last)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1211 (eq in-state 'first-and-last))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1212 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1213 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1214 (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
1215 (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
1216 (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
1217 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1218 (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
1219 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1220 (insert
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1221 (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
1222 "\n"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1223 (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
1224 (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
1225 (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
1226 (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
1227 (setq state (cons 'end state))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1228 (if (memq 'begin state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1229 (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
1230 state))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1231
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1232
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1233 ;; Digest and forward articles
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1234
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1235 (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
1236 "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
1237 (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
1238 "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
1239
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1240 (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
1241 "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
1242 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1243 (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
1244 file buf)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1245 (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
1246 (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
1247 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1248 (delete-other-windows)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1249 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1250 (insert-file file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1251 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1252 (bury-buffer buf)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1253 (funcall gnus-mail-forward-method)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1254
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1255 (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
1256 "Digests and forwards all marked articles."
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1257 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1258 (gnus-uu-digest-and-forward t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1259
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1260
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1261 ;; Binhex treatment - not very advanced.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1262
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1263 (defconst gnus-uu-binhex-body-line
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1264 "^[^:]...............................................................$")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1265 (defconst gnus-uu-binhex-begin-line
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1266 "^:...............................................................$")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1267 (defconst gnus-uu-binhex-end-line
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1268 ":$")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1269 (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
1270
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1271 ; 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
1272 ; 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
1273 (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
1274 (gnus-uu-initialize)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1275 (let (list-of-articles)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1276 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1277 (if (not marked)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1278 (setq list-of-articles (gnus-uu-get-list-of-articles))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1279 (setq list-of-articles (reverse gnus-uu-marked-article-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1280 (setq gnus-uu-marked-article-list nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1281 (if (not list-of-articles)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1282 (error "No list of articles"))
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 (setq gnus-uu-binhex-article-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1285 (concat gnus-uu-work-dir
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1286 (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
1287 gnus-newsgroup-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1288 gnus-newsgroup-name)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1289 (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
1290 (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
1291 (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
1292 (gnus-uu-check-for-generated-files)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1293 (gnus-uu-summary-next-subject))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1294
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1295 (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
1296 (let (state start-char)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1297 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1298 (set-buffer buffer)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1299 (widen)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1300 (goto-char 1)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1301 (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
1302 (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
1303 (setq state (list 'wrong-type))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1304
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1305 (if (memq 'wrong-type state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1306 ()
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1307 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1308 (setq start-char (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1309 (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
1310 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1311 (setq state (list 'begin))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1312 (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
1313 (setq state (list 'middle)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1314 (goto-char (point-max))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1315 (re-search-backward (concat gnus-uu-binhex-body-line "\\|"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1316 gnus-uu-binhex-end-line) nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1317 (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
1318 (setq state (if (memq 'begin state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1319 (cons 'end state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1320 (list 'end))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1321 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1322 (forward-line 1)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1323 (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
1324 (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
1325 (if (memq 'begin state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1326 (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
1327 state)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1328
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1329
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1330 ;; Internal view commands
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1331
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1332 ; 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
1333 ; 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
1334 ; 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
1335 ; the file will be attempted displayed.
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1336 ;
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1337 ; 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
1338 ; 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
1339 ;
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1340 ; 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
1341 ; 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
1342 ; 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
1343 ; file, it'll be moved to wherever the user wants it.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1344
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1345 ; `gnus-uu-view-file' returns t if viewing is successful.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1346
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1347 (defun gnus-uu-view-file (file-name &optional dont-ask)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1348 (let (action did-view
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1349 (didnt-want t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1350 (do-view t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1351
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1352 (setq action (gnus-uu-get-action file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1353
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1354 ; Do interactive view if that is wanted and it is not an archive
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1355 (if (and gnus-uu-use-interactive-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1356 (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
1357 (gnus-uu-enter-interactive-file (or action "") file-name)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1358
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1359 (if action
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1360 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1361
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1362 (if gnus-uu-ask-before-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1363 (setq didnt-want
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1364 (or (not (setq do-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1365 (y-or-n-p
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1366 (format "Do you want to view %s? "
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1367 file-name))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1368 didnt-want)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1369
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1370 (if do-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1371 (setq did-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1372 (if gnus-uu-asynchronous
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1373 (gnus-uu-call-asynchronous file-name action)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1374 (gnus-uu-call-synchronous file-name action)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1375
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1376 (if (and (not dont-ask) (not gnus-uu-use-interactive-view))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1377 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1378 (if (and
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1379 didnt-want
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1380 (or (not action)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1381 (and (string= action "gnus-uu-archive")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1382 (not did-view))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1383 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1384 (message
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1385 (format "Could find no rule for %s" file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1386 (sit-for 2)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1387 (and (or (not did-view) gnus-uu-view-and-save)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1388 (y-or-n-p
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1389 (format "Do you want to save the file %s? "
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1390 file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1391 (gnus-uu-save-file file-name)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1392
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1393 (if (and (file-exists-p file-name)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1394 (not gnus-uu-use-interactive-view)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1395 (or
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1396 (not (and gnus-uu-asynchronous did-view))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1397 (string= action "gnus-uu-archive")))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1398 (delete-file file-name)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1399
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1400 did-view))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1401
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1402 (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
1403 (let (action)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1404 (setq action
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1405 (gnus-uu-choose-action
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1406 file-name
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1407 (append
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1408 (if (and gnus-uu-use-interactive-view
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1409 gnus-uu-user-interactive-view-rules)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1410 gnus-uu-user-interactive-view-rules
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1411 gnus-uu-user-view-rules)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1412 (if (or gnus-uu-ignore-default-view-rules
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1413 (not gnus-uu-use-interactive-view))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1414 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1415 gnus-uu-default-interactive-view-rules-begin)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1416 (if gnus-uu-ignore-default-view-rules
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1417 nil
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1418 gnus-uu-default-view-rules)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1419 (if gnus-uu-use-interactive-view
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1420 (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
1421 (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
1422 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1423 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
1424 gnus-uu-user-view-rules-end))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1425 (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
1426 gnus-uu-view-with-metamail)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1427 (if (setq action
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1428 (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
1429 (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
1430 action))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1431
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1432 ; `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
1433 ; 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
1434 ; on success and nil if the file couldn't be displayed.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1435 (defun gnus-uu-call-synchronous (file-name action)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1436 (let (did-view command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1437 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1438 (set-buffer (get-buffer-create gnus-uu-output-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1439 (erase-buffer)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1440 (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
1441 (message "Viewing with '%s'" command)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1442 (if (not (= 0 (call-process "sh" nil t nil "-c" command)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1443 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1444 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1445 (while (re-search-forward "\n" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1446 (replace-match " "))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1447 (message (concat "Error: " (buffer-substring 1 (point-max))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1448 (sit-for 2))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1449 (message "")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1450 (setq did-view t)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1451 did-view))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1452
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1453 ; `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
1454 ; 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
1455 ; 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
1456 ; 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
1457 ; 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
1458 ; string, so the file will be removed after viewing has ended.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1459 (defun gnus-uu-call-asynchronous (file-name action)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1460 (let (command file tmp-file start)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1461 (while (string-match "/" file-name start)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1462 (setq start (1+ (match-beginning 0))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1463 (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
1464 (setq tmp-file (concat gnus-uu-work-dir file))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1465 (if (string= tmp-file file-name)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1466 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1467 (rename-file file-name tmp-file t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1468 (setq file-name tmp-file))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1469
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1470 (setq command (gnus-uu-command action file-name))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1471 (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
1472 (message "Viewing with %s" command)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1473 (start-process "gnus-uu-view" nil "sh" "-c" command)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1474 t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1475
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1476 ; `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
1477 ; 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
1478 ; 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
1479 ; 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
1480 ; (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
1481 ; try to find articles, but use the marked list.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1482 (defun gnus-uu-decode-and-strip (&optional shar use-marked)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1483 (let (list-of-articles)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1484 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1485
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1486 (if use-marked
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1487 (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
1488 (message "No articles marked")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1489 (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
1490 (gnus-uu-unmark-all-articles))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1491 (setq list-of-articles (gnus-uu-get-list-of-articles)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1492
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1493 (and list-of-articles
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1494 (gnus-uu-grab-articles
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1495 list-of-articles
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1496 (if shar 'gnus-uu-unshar-article 'gnus-uu-uustrip-article-as)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1497 t)))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1498
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1499 ; 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
1500 ; 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
1501 ; 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
1502 ; "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
1503 ; 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
1504 ; should get most postings of a series."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1505 (defun gnus-uu-reginize-string (string)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1506 (let ((count 2)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1507 (vernum "v[0-9]+[a-z][0-9]+:")
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1508 reg beg)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1509 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1510 (set-buffer (get-buffer-create gnus-uu-output-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1511 (erase-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1512 (insert (regexp-quote string))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1513 (setq beg 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1514
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1515 (setq case-fold-search nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1516 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1517 (if (looking-at vernum)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1518 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1519 (replace-match vernum t t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1520 (setq beg (length vernum))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1521
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1522 (goto-char beg)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1523 (if (re-search-forward "[ \t]*[0-9]+/[0-9]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1524 (replace-match " [0-9]+/[0-9]+")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1525
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1526 (goto-char beg)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1527 (if (re-search-forward "[0-9]+[ \t]*of[ \t]*[0-9]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1528 (replace-match "[0-9]+ of [0-9]+")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1529
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1530 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1531 (while (and (re-search-backward "[0-9]" nil t) (> count 0))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1532 (while (and
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1533 (looking-at "[0-9]")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1534 (< 1 (goto-char (1- (point))))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1535 (re-search-forward "[0-9]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1536 (replace-match "[0-9]+")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1537 (backward-char 5)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1538 (setq count (1- count)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1539
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1540 (goto-char beg)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1541 (while (re-search-forward "[ \t]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1542 (replace-match "[ \t]*" t t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1543
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1544 (buffer-substring 1 (point-max)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1545
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1546 ; 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
1547 ; 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
1548 ; 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
1549 ; 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
1550 ; 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
1551 ; 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
1552 (defun gnus-uu-get-list-of-articles (&optional subject mark-articles only-unread do-not-translate)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1553 (let (beg end reg-subject list-of-subjects list-of-numbers art-num)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1554 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1555
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1556 ; If the subject is not given, this function looks at the current subject
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1557 ; and takes that.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1558
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1559 (if subject
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1560 (setq reg-subject subject)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1561 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1562 (setq end (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1563 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1564 (if (not (re-search-forward "\\] " end t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1565 (progn (message "No valid subject chosen") (sit-for 2))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1566 (setq subject (buffer-substring (point) end))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1567 (setq reg-subject
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1568 (concat "\\[.*\\] " (gnus-uu-reginize-string subject)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1569
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1570 ; (message reg-subject)(sleep-for 2)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1571
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1572 (if reg-subject
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1573 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1574
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1575 ; Collect all subjects matching reg-subject.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1576
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1577 (let ((case-fold-search t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1578 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1579 (while (re-search-forward reg-subject nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1580 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1581 (setq beg (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1582 (if (or (not only-unread) (looking-at " \\|-"))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1583 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1584 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1585 (setq list-of-subjects (cons
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1586 (buffer-substring beg (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1587 list-of-subjects)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1588 (end-of-line))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1589
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1590 ; Expand all numbers in all the subjects: (hi9 -> hi0009, etc).
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1591
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1592 (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
1593 list-of-subjects
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1594 (not do-not-translate)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1595
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1596 ; Sort the subjects.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1597
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1598 (setq list-of-subjects (sort list-of-subjects 'gnus-uu-string<))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1599
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1600 ; Get the article numbers from the sorted list of subjects.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1601
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1602 (while list-of-subjects
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1603 (setq art-num (gnus-uu-article-number (car list-of-subjects)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1604 (if mark-articles (gnus-summary-mark-as-read art-num ?#))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1605 (setq list-of-numbers (cons art-num list-of-numbers))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1606 (setq list-of-subjects (cdr list-of-subjects)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1607
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1608 (setq list-of-numbers (nreverse list-of-numbers))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1609
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1610 list-of-numbers)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1611
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1612 ; 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
1613 ; 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
1614 ; 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
1615 ; 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
1616 ; 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
1617 (defun gnus-uu-expand-numbers (string-list &optional translate)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1618 (let (string out-list pos num)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1619 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1620 (set-buffer (get-buffer-create gnus-uu-output-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1621 (while string-list
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1622 (erase-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1623 (setq string (car string-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1624 (setq string-list (cdr string-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1625 (insert string)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1626 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1627 (while (re-search-forward "[ \t]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1628 (replace-match " "))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1629 (goto-char 1)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1630 (if translate
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1631 (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
1632 (replace-match "a" t t)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1633
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1634 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1635 (if (not (search-forward "] " nil t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1636 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1637 (while (re-search-forward "[0-9]+" nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1638 (replace-match
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1639 (format "%06d"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1640 (string-to-int (buffer-substring
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1641 (match-beginning 0) (match-end 0))))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1642 (setq string (buffer-substring 1 (point-max)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1643 (setq out-list (cons string out-list)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1644 out-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1645
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1646 ; 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
1647 ; everything before the subject part.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1648 (defun gnus-uu-string< (string1 string2)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1649 (string< (substring string1 (string-match "\\] " string1))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1650 (substring string2 (string-match "\\] " string2))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1651
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1652
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1653 ;; gnus-uu-grab-article
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1654 ;
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1655 ; 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
1656 ; 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
1657 ; 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
1658 ;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1659 ; 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
1660 ; 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
1661 ; 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
1662 ; 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
1663 ; generate files...
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1664 ;
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1665 ; 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
1666 ; 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
1667 ;
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1668 ; 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
1669 ; following symbols:
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1670 ; `error' if an error occurred
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1671 ; `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
1672 ; 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
1673 ; 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
1674 ; file.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1675 ; `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
1676 ; `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
1677 ; `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
1678 ; `ok', which can be used everything is ok
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1679
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1680 (defvar gnus-uu-has-been-grabbed nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1681
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1682 (defun gnus-uu-unmark-list-of-grabbed (&optional dont-unmark-last-article)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1683 (let (art)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1684 (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
1685 gnus-uu-unmark-articles-not-decoded))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1686 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1687 (if dont-unmark-last-article
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1688 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1689 (setq art (car gnus-uu-has-been-grabbed))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1690 (setq gnus-uu-has-been-grabbed (cdr gnus-uu-has-been-grabbed))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1691 (while gnus-uu-has-been-grabbed
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1692 (gnus-summary-mark-as-unread (car gnus-uu-has-been-grabbed) t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1693 (setq gnus-uu-has-been-grabbed (cdr gnus-uu-has-been-grabbed)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1694 (if dont-unmark-last-article
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1695 (setq gnus-uu-has-been-grabbed (list art))))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1696
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1697
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1698 ; 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
1699 ; 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
1700 ; `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 ; 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
1703 ; the process-function has been successful and nil otherwise.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1704 (defun gnus-uu-grab-articles (list-of-articles process-function &optional sloppy)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1705 (let ((result-buffer (get-buffer-create gnus-uu-result-buffer))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1706 (state 'first)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1707 (wrong-type t)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1708 has-been-begin has-been-end
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1709 article result-file result-files process-state)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1710
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1711 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1712 (set-buffer result-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1713 (erase-buffer))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1714 (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
1715
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1716 (while (and list-of-articles
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1717 (not (memq 'error process-state))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1718 (or sloppy
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1719 (not (memq 'end process-state))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1720
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1721 (setq article (car list-of-articles))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1722 (setq list-of-articles (cdr list-of-articles))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1723 (setq gnus-uu-has-been-grabbed (cons article gnus-uu-has-been-grabbed))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1724
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1725 (if (eq list-of-articles ())
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1726 (if (eq state 'first)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1727 (setq state 'first-and-last)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1728 (setq state 'last)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1729
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1730 (message "Getting article %d" article)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1731 (if (not (= (or gnus-current-article 0) article))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1732 (gnus-summary-display-article article))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1733 (gnus-summary-mark-as-read article)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1734
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1735 (save-excursion (set-buffer gnus-article-buffer) (widen))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1736
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1737 (setq process-state (funcall process-function gnus-article-buffer state))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1738
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1739 ; (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
1740
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1741 (if (or (memq 'begin process-state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1742 (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
1743 (memq 'ok process-state)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1744 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1745 (if has-been-begin
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1746 (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
1747 (setq result-file (car process-state))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1748 (setq has-been-begin t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1749 (setq has-been-end nil)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1750
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1751 (if (memq 'end process-state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1752 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1753 (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
1754 (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
1755 (setq has-been-end t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1756 (setq has-been-begin nil)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1757
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1758 (if (not (memq 'wrong-type process-state))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1759 (setq wrong-type nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1760 (if gnus-uu-unmark-articles-not-decoded
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1761 (gnus-summary-mark-as-unread article t)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1762
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1763 (if sloppy (setq wrong-type nil))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1764
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1765 (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
1766 (not sloppy)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1767 (or (memq 'end process-state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1768 (memq 'middle process-state)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1769 (progn
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1770 (setq process-state (list 'error))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1771 (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
1772 (sleep-for 2))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1773 (setq state 'middle)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1774
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1775 (if result-files
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1776 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1777 (if (not has-been-begin)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1778 (message "Wrong type file")
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1779 (if (memq 'error process-state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1780 (setq result-files nil)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1781 (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
1782 (memq 'end process-state)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1783 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1784 (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
1785 (setq result-files nil))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1786 (gnus-uu-unmark-list-of-grabbed)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1787 result-files))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1788
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1789 (defun gnus-uu-uudecode-sentinel (process event)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1790 (delete-process (get-process process)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1791
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1792 ; Uudecodes a file asynchronously.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1793 (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
1794 (let ((state (list 'ok))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1795 (process-connection-type nil)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1796 start-char pst name-beg name-end)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1797 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1798 (set-buffer process-buffer)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1799 (let ((case-fold-search nil)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1800 (buffer-read-only nil))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1801
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1802 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1803
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1804 (if gnus-uu-kill-carriage-return
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1805 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1806 (while (search-forward "\r" nil t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1807 (delete-backward-char 1))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1808 (goto-char 1)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1809
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1810 (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
1811 (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
1812 (setq state (list 'wrong-type))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1813
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1814 (if (memq 'wrong-type state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1815 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1816 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1817 (setq start-char (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1818
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1819 (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
1820 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1821 (setq name-end (match-end 1))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1822
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1823 ; 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
1824 (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
1825 (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
1826 (replace-match "-"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1827 (goto-char name-beg)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1828 (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
1829 (replace-match "_"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1830
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1831 (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
1832 (and gnus-uu-uudecode-process
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1833 (setq pst (process-status
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1834 (or gnus-uu-uudecode-process "nevair")))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1835 (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
1836 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1837 (delete-process gnus-uu-uudecode-process)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1838 (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
1839 (setq gnus-uu-uudecode-process
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1840 (start-process
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1841 "*uudecode*"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1842 (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
1843 "sh" "-c"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1844 (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
1845 (set-process-sentinel
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1846 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
1847 (setq state (list 'begin))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1848 (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
1849 (setq state (list 'middle)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1850
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1851 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1852
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1853 (re-search-backward
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1854 (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
1855 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1856
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1857 (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
1858 (setq state (cons 'end state)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1859 (forward-line 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1860
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1861 (and gnus-uu-uudecode-process
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1862 (setq pst (process-status
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1863 (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
1864 (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
1865 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1866 (if gnus-uu-correct-stripped-uucode
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1867 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1868 (gnus-uu-check-correct-stripped-uucode
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1869 start-char (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1870 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1871 (re-search-backward
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1872 (concat gnus-uu-body-line "\\|"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1873 gnus-uu-end-string)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1874 nil t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1875 (forward-line 1)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1876 (condition-case err
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1877 (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
1878 start-char (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1879 (error
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1880 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1881 (message "gnus-uu: Couldn't uudecode")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1882 (sleep-for 2)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1883 (setq state (list 'wrong-type))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1884 (delete-process gnus-uu-uudecode-process)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1885 (setq state (list 'wrong-type))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1886 (if (not gnus-uu-uudecode-process)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1887 (setq state (list 'wrong-type)))))
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 (if (memq 'begin state)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1890 (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
1891 state))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1892
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1893 ; 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
1894 ; a shared article.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1895 (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
1896 (let ((state (list 'ok))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1897 start-char)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1898 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1899 (set-buffer process-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1900 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1901 (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
1902 (setq state (list 'wrong-type))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1903 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1904 (setq start-char (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1905 (call-process-region
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1906 start-char (point-max) "sh" nil
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1907 (get-buffer-create gnus-uu-output-buffer-name) nil
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1908 "-c" (concat "cd " gnus-uu-shar-directory " ; sh"))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1909 state))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1910
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1911 ; Returns the name of what the shar file is going to unpack.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1912 (defun gnus-uu-find-name-in-shar ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1913 (let ((oldpoint (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1914 res)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1915 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1916 (if (re-search-forward gnus-uu-shar-name-marker nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1917 (setq res (buffer-substring (match-beginning 1) (match-end 1))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1918 (goto-char oldpoint)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1919 res))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1920
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1921 ; Returns the article number of the given subject.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1922 (defun gnus-uu-article-number (subject)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1923 (let (end)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1924 (string-match "[0-9]+[^0-9]" subject 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1925 (setq end (match-end 0))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1926 (string-to-int
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1927 (substring subject (string-match "[0-9]" subject 1) end))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1928
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1929 ; `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
1930 ; 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
1931 ; found, or the name of the command to run if such a rule is found.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1932 (defun gnus-uu-choose-action (file-name file-action-list)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1933 (let ((action-list (copy-sequence file-action-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1934 rule action)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1935 (while (not (or (eq action-list ()) action))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1936 (setq rule (car action-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1937 (setq action-list (cdr action-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1938 (if (string-match (car rule) file-name)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1939 (setq action (car (cdr rule)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1940 action))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1941
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1942 (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
1943 (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
1944 (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
1945 (if default-dir
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1946 (setq dir default-dir)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1947 (setq dir (gnus-uu-read-directory
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1948 (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
1949 (if (< 3 (length files)) "s" "") "? "))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1950
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1951 (while files
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1952 (setq file (car files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1953 (setq files (cdr files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1954 (string-match "/[^/]*$" file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1955 (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
1956 (if (string-match "^\\.\\.?$" file-name)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1957 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1958 (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
1959 (setq file-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1960 (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
1961 (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
1962 (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
1963 (rename-file file file-name t)))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1964
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
1965 ; Moves the file from the tmp directory to where the user wants it.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1966 (defun gnus-uu-save-file (from-file-name &optional default-dir ignore-existing)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1967 (let (dir file-name command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1968 (string-match "/[^/]*$" from-file-name)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1969 (setq file-name (substring from-file-name (1+ (match-beginning 0))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1970 (if default-dir
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1971 (setq dir default-dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1972 (setq dir (gnus-uu-read-directory "Where do you want the file? ")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1973 (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
1974 (setq file-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
1975 (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
1976 (concat dir file-name) nil file-name))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1977 (setq file-name (concat dir file-name)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1978 (rename-file from-file-name file-name t)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1979
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1980 (defun gnus-uu-read-directory (prompt &optional default)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1981 (let (dir ok create)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1982 (while (not ok)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1983 (setq ok t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1984 (setq dir (if default default
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1985 (read-file-name prompt gnus-uu-current-save-dir
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1986 gnus-uu-current-save-dir)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1987 (while (string-match "/$" dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1988 (setq dir (substring dir 0 (match-beginning 0))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1989 (if (file-exists-p dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1990 (if (not (file-directory-p dir))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1991 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1992 (setq ok nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1993 (message "%s is a file" dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1994 (sit-for 2)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1995 (setq create ?o)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1996 (while (not (or (= create ?y) (= create ?n)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1997 (message "%s: No such directory. Do you want to create it? (y/n)"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1998 dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1999 (setq create (read-char)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2000 (if (= create ?y) (make-directory dir))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2001 (setq gnus-uu-current-save-dir (concat dir "/"))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2002
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2003 ; 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
2004 ; 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
2005 (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
2006 (let ((did-unpack t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2007 action command files file file-name dir)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2008 (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
2009 file-path (append gnus-uu-user-archive-rules
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2010 (if gnus-uu-ignore-default-archive-rules
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2011 nil
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2012 gnus-uu-default-archive-rules))))
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2013
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2014 (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
2015
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2016 (string-match "/[^/]*$" file-path)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2017 (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
2018 (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
2019
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2020 (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
2021 (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
2022
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2023 (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
2024
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2025 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2026 (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
2027 (erase-buffer))
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 (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
2030
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2031 (if (= 0 (call-process "sh" nil
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2032 (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
2033 nil "-c" command))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2034 (message "")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2035 (message "Error during unpacking of archive")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2036 (sleep-for 2)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2037 (setq did-unpack nil))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2038
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2039 (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
2040 (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
2041
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2042 did-unpack))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2043
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2044 ; 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
2045 ; 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
2046 (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
2047 (let ((first t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2048 files file did-view ignore-files)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2049 (setq files (directory-files dir t "[^/][^\\.][^\\.]?$"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2050 (gnus-uu-add-file files)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2051 (setq ignore-files files)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2052
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2053 (while (gnus-uu-unpack-archives
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2054 files (if not-top (list ".")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2055 (if first () ignore-files)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2056 (setq first nil)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2057 (gnus-uu-add-file
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2058 (setq files (directory-files dir t "[^/][^\\.][^\\.]?$"))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2059
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2060 (while files
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2061 (setq file (car files))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2062 (setq files (cdr files))
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2063 (if (not (string= (or (gnus-uu-get-action file) "") "gnus-uu-archive"))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2064 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2065 (set-file-modes file 448)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2066 (if (file-directory-p file)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2067 (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
2068 dont-delete-files
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2069 t)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2070 did-view))
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2071 (setq did-view (or (gnus-uu-view-file file t) did-view)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2072 (if (and (not dont-delete-files) (file-exists-p file))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2073 (delete-file file)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2074
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2075 (if (not dont-delete-files) (delete-directory dir))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2076 did-view))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2077
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2078 (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
2079 (let (path did-unpack)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2080 (while files
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2081 (setq path (car files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2082 (setq files (cdr files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2083 (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
2084 (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
2085 (gnus-uu-name-from-path path)) "")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2086 "gnus-uu-archive")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2087 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2088 (setq did-unpack t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2089 (setq gnus-uu-error-during-unarching
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2090 (not (gnus-uu-treat-archive path)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2091 (if ignore (delete-file path))))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2092 did-unpack))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2093
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2094
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2095 ;; Manual marking
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2096
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2097 (defun gnus-uu-enter-mark-in-list ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2098 (let (article beg)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2099 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2100 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2101 (setq beg (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2102 (end-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2103 (setq article (gnus-uu-article-number
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2104 (buffer-substring beg (point))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2105 (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
2106 (setq gnus-uu-marked-article-list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2107 (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
2108
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2109 (defun gnus-uu-mark-article (&optional dont-move)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2110 "Marks the current article to be decoded later."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2111 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2112 (gnus-uu-enter-mark-in-list)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2113 (gnus-summary-mark-as-read nil ?#)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2114 (gnus-summary-next-subject 1 nil))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2115
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2116 (defun gnus-uu-unmark-article ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2117 "Unmarks the current article."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2118 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2119 (let ((in (copy-sequence gnus-uu-marked-article-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2120 out article beg found
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2121 (old-point (point)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2122 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2123 (setq beg (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2124 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2125 (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
2126 (message "Removing article %d" article)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2127 (while in
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2128 (if (not (= (car in) article))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2129 (setq out (cons (car in) out))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2130 (setq found t)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2131 (message "Removing article %d" article))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2132 (setq in (cdr in)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2133 (if (not found) (message "Not a marked article."))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2134 (setq gnus-uu-marked-article-list (reverse out))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2135 (gnus-summary-mark-as-unread nil t)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2136 (gnus-summary-next-subject 1 nil)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2137
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2138 (defun gnus-uu-unmark-all-articles ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2139 "Removes the mark from all articles marked for decoding."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2140 (interactive)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2141 (while gnus-uu-marked-article-list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2142 (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
2143 (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
2144 (setq gnus-uu-marked-article-list (cdr gnus-uu-marked-article-list))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2145
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2146 (defun gnus-uu-mark-by-regexp ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2147 "Asks for a regular expression and marks all articles that match."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2148 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2149 (let (exp)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2150 (setq exp (read-from-minibuffer "Mark (regexp): "))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2151 (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
2152 (append gnus-uu-marked-article-list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2153 (reverse (gnus-uu-get-list-of-articles exp t))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2154 (message "")))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2155
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2156 (defun gnus-uu-mark-thread ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2157 "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
2158 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2159 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2160 (let (level)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2161 (if (not (search-forward ":" nil t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2162 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2163 (setq level (current-column))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2164 (gnus-uu-enter-mark-in-list)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2165 (gnus-summary-mark-as-read nil ?#)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2166 (gnus-summary-search-forward)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2167 (while (< level (current-column))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2168 (gnus-uu-enter-mark-in-list)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2169 (gnus-summary-mark-as-read nil ?#)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2170 (gnus-summary-search-forward))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2171 (gnus-summary-search-backward))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2172
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2173
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2174 ;; Various stuff
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2175
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2176 (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
2177 (while (and list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2178 (not (string= (car list) string))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2179 (setq list (cdr list))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2180 list)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2181
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2182 (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
2183 (string-match "/[^/]*$" path)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2184 (substring path (1+ (match-beginning 0))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2185
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2186 (defun gnus-uu-directory-files (dir)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2187 (let (files out file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2188 (setq files (directory-files dir t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2189 (while files
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2190 (setq file (car files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2191 (setq files (cdr files))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2192 (if (not (string-match "/\\.\\.?$" file))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2193 (setq out (cons file out))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2194 (setq out (reverse out))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2195 (message "dir-files %s er %s" dir out)(sleep-for 2)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2196 out))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2197
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2198 (defun gnus-uu-check-correct-stripped-uucode (start end)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2199 (let (found beg length short)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2200 (if (not gnus-uu-correct-stripped-uucode)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2201 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2202 (goto-char start)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2203
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2204 (if (re-search-forward " \\|`" end t)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2205 (progn
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2206 (goto-char start)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2207 (while (not (eobp))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2208 (progn
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2209 (if (looking-at "\n") (replace-match ""))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2210 (forward-line 1))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2211
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2212 (while (not (eobp))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2213 (if (looking-at (concat gnus-uu-begin-string "\\|"
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2214 gnus-uu-end-string))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2215 ()
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2216 (if (not found)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2217 (progn
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2218 (beginning-of-line)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2219 (setq beg (point))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2220 (end-of-line)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2221 (setq length (- (point) beg))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2222 (setq found t)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2223 (beginning-of-line)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2224 (setq beg (point))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2225 (end-of-line)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2226 (if (not (= length (- (point) beg)))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2227 (insert (make-string (- length (- (point) beg)) ? ))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2228 (forward-line 1))))))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2229
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2230 (defun gnus-uu-initialize ()
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2231 (gnus-uu-check-for-generated-files)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2232 (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
2233 (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
2234 (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
2235 (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
2236 (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
2237 (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
2238 (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
2239 (setq gnus-uu-work-dir
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2240 (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
2241 (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
2242 (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
2243 (make-directory gnus-uu-work-dir))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2244 (setq gnus-uu-work-dir (concat gnus-uu-work-dir "/"))
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2245 (setq gnus-uu-error-during-unarching nil)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2246 (setq gnus-uu-interactive-file-list nil))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2247
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2248 ; Kills the temporary uu buffers, kills any processes, etc.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2249 (defun gnus-uu-clean-up ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2250 (let (buf pst)
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2251 (and gnus-uu-uudecode-process
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2252 (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
2253 (if (or (eq pst 'stop) (eq pst 'run))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2254 (delete-process gnus-uu-uudecode-process)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2255 (and (not gnus-uu-asynchronous)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2256 (setq buf (get-buffer gnus-uu-output-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2257 (kill-buffer buf))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2258 (and (setq buf (get-buffer gnus-uu-result-buffer))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2259 (kill-buffer buf))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2260
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2261 ; `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
2262 ; 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
2263 ; with `C-g'.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2264 (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
2265 (let (file dirs)
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2266 (while gnus-uu-generated-file-list
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2267 (setq file (car gnus-uu-generated-file-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2268 (setq gnus-uu-generated-file-list (cdr gnus-uu-generated-file-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2269 (if (not (string-match "/\\.[\\.]?$" file))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2270 (progn
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2271 (if (file-directory-p file)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2272 (setq dirs (cons file dirs))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2273 (if (file-exists-p file)
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2274 (delete-file file))))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2275 (setq dirs (nreverse dirs))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2276 (while dirs
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2277 (setq file (car dirs))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2278 (setq dirs (cdr dirs))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2279 (if (file-directory-p file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2280 (delete-directory file)))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2281
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2282 ; 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
2283 ; still exists upon exiting the newsgroup).
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2284 (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
2285 (if (stringp file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2286 (setq gnus-uu-generated-file-list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2287 (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
2288 (setq gnus-uu-generated-file-list
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2289 (append file gnus-uu-generated-file-list))))
6904
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 ; 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
2292 ; subjects, go to the last subject in the buffer.
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2293 (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
2294 (let (opi)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2295 (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
2296 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2297 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2298 (sit-for 0)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2299 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2300 (forward-line -1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2301 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2302 (search-forward ":" nil t)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2303
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2304 ; 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
2305 ; 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
2306 ; 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
2307 ; 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
2308 (setq opi (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2309 (sit-for 0)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2310 (goto-char opi)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2311 (gnus-summary-recenter)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2312
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2313 ; 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
2314 ; 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
2315 (defun gnus-uu-command (action file)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2316 (let ((ofile ""))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2317 (while (string-match "`\\|\"\\|\\$\\|\\\\" file)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2318 (progn
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2319 (setq ofile
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2320 (concat ofile (substring file 0 (match-beginning 0)) "\\"
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2321 (substring file (match-beginning 0) (match-end 0))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2322 (setq file (substring file (1+ (match-beginning 0))))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2323 (setq ofile (concat "\"" ofile file "\""))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2324 (if (string-match "%s" action)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2325 (format action ofile)
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2326 (concat action " " ofile))))
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2327
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2328
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2329 ;; Initializing
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2330 (add-hook 'gnus-exit-group-hook
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2331 '(lambda ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2332 (gnus-uu-clean-up)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2333 (setq gnus-uu-marked-article-list nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2334 (gnus-uu-check-for-generated-files)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2335
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2336
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2337 ;; Interactive exec mode
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2338
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2339 (defvar gnus-uu-output-window nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2340 (defvar gnus-uu-mode-hook nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2341 (defvar gnus-uu-mode-map nil)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2342
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2343 (defun gnus-uu-do-interactive ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2344 (let (int-buffer out-buf)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2345 (set-buffer
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2346 (setq int-buffer (get-buffer gnus-uu-interactive-buffer-name)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2347 (switch-to-buffer-other-window int-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2348 (pop-to-buffer int-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2349 (setq gnus-uu-output-window
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2350 (split-window nil (- (window-height) gnus-uu-output-window-height)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2351 (set-window-buffer gnus-uu-output-window
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2352 (setq out-buf
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2353 (get-buffer-create gnus-uu-output-buffer-name)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2354 (save-excursion (set-buffer out-buf) (erase-buffer))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2355 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2356 (forward-line 3)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2357 (run-hooks 'gnus-uu-mode-hook)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2358
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2359 (defun gnus-uu-enter-interactive-file (action file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2360 (let (command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2361 (save-excursion
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2362 (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
2363 (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
2364 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2365 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2366 (gnus-uu-mode)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2367 (insert
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2368 "# Press return to execute a command.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2369 # 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
2370
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2371 ")))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2372 (setq gnus-uu-interactive-file-list
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2373 (cons file gnus-uu-interactive-file-list))
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2374 (setq command (gnus-uu-command action file))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2375 (insert (format "%s\n" command)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2376
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2377 (defun gnus-uu-interactive-execute ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2378 "Executes the command on the current line in interactive mode."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2379 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2380 (let (beg out-buf command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2381 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2382 (setq beg (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2383 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2384 (setq command (buffer-substring beg (point)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2385 (setq out-buf (get-buffer-create gnus-uu-output-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2386 (save-excursion
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2387 (set-buffer out-buf)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2388 (erase-buffer)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2389 (insert (format "$ %s \n\n" command)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2390 (message "Executing...")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2391 (if gnus-uu-asynchronous
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2392 (start-process "gnus-uu-view" out-buf "sh" "-c" command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2393 (call-process "sh" nil out-buf nil "-c" command)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2394 (message ""))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2395 (forward-line 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2396 (beginning-of-line)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2397
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2398 (defun gnus-uu-interactive-end ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2399 "This function exits interactive view mode and returns to summary mode."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2400 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2401 (let (buf)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2402 (delete-window gnus-uu-output-window)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2403 (gnus-uu-clean-up)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2404 (if (not gnus-uu-asynchronous) (gnus-uu-check-for-generated-files))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2405 (setq buf (get-buffer gnus-uu-interactive-buffer-name))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2406 (if gnus-article-buffer (switch-to-buffer gnus-article-buffer))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2407 (if buf (kill-buffer buf))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2408 (pop-to-buffer gnus-summary-buffer)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2409
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2410 (if gnus-uu-mode-map
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2411 ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2412 (setq gnus-uu-mode-map (make-sparse-keymap))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2413 (define-key gnus-uu-mode-map "\C-c\C-x" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2414 (define-key gnus-uu-mode-map "\C-c\C-v" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2415 (define-key gnus-uu-mode-map "\C-m" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2416 (define-key gnus-uu-mode-map "\C-c\C-c" 'gnus-uu-interactive-end)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2417 (define-key gnus-uu-mode-map "\C-cs"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2418 'gnus-uu-interactive-save-current-file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2419 (define-key gnus-uu-mode-map "\C-c\C-s"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2420 'gnus-uu-interactive-save-current-file-silent)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2421 (define-key gnus-uu-mode-map "\C-c\C-w" 'gnus-uu-interactive-save-all-files)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2422 (define-key gnus-uu-mode-map "\C-c\C-o" 'gnus-uu-interactive-save-original-file))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2423
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2424 (defun gnus-uu-interactive-save-original-file ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2425 "Saves the file from whence the file on the current line came from."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2426 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2427 (let (file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2428 (if (file-exists-p
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2429 (setq file (concat gnus-uu-work-dir
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2430 (or gnus-uu-file-name gnus-uu-shar-file-name))))
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2431 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2432 (gnus-uu-save-file file)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2433 (message "Saved file %s"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2434 (or gnus-uu-file-name gnus-uu-shar-file-name)))
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2435 (message "Already saved."))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2436
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2437 (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
2438 "Saves the file referred to on the current line in the current directory."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2439 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2440 (gnus-uu-interactive-save-current-file t))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2441
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2442 (defun gnus-uu-interactive-save-current-file (&optional dont-ask silent)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2443 "Saves the file referred to on the current line."
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2444 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2445 (let (files beg line file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2446 (setq files (copy-sequence gnus-uu-interactive-file-list))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2447 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2448 (setq beg (point))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2449 (end-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2450 (setq line (buffer-substring beg (point)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2451 (while (and files
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2452 (not (string-match
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2453 (concat "" (regexp-quote (setq file (car files))) "")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2454 line)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2455 (setq files (cdr files)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2456 (beginning-of-line)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2457 (forward-line 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2458 (if (not files)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2459 (if (not silent)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2460 (progn (message "Could not find file") (sit-for 2)))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2461 (gnus-uu-save-file file (if dont-ask gnus-uu-current-save-dir nil) silent)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2462 (delete-region beg (point)))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2463
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2464 (defun gnus-uu-interactive-save-all-files ()
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2465 "Saves all files referred to in the interactive buffer."
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2466 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2467 (let (dir)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2468 (goto-char 1)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2469 (setq dir (gnus-uu-read-directory "Where do you want the files? "))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2470 (while (not (eobp))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2471 (gnus-uu-interactive-save-current-file t t))))
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2472
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2473 (defun gnus-uu-mode ()
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2474 "Major mode for editing view commands in gnus-uu.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2475
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2476 Commands:
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2477 \\<gnus-uu-mode-map>Return, C-c C-v, C-c C-x Execute the current command
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2478 \\[gnus-uu-interactive-end] End interactive mode
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2479 \\[gnus-uu-interactive-save-current-file] Save the current file
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2480 \\[gnus-uu-interactive-save-current-file-silent] Save the current file without asking
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2481 where to put it
6904
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2482 \\[gnus-uu-interactive-save-all-files] Save all files
b264fb73cfe7 (gnus-uu-enter-interactive-file):
Richard M. Stallman <rms@gnu.org>
parents: 6729
diff changeset
2483 \\[gnus-uu-interactive-save-original-file] Save the original file: If the files
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2484 originated in an archive, the archive
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2485 file is saved.
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2486 "
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2487 (interactive)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2488 (kill-all-local-variables)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2489 (use-local-map gnus-uu-mode-map)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2490 (setq mode-name "gnus-uu")
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2491 (setq major-mode 'gnus-uu-mode)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2492 )
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2493
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2494 (define-key gnus-uu-mode-map "\C-c\C-x" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2495 (define-key gnus-uu-mode-map "\C-c\C-v" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2496 (define-key gnus-uu-mode-map "\C-m" 'gnus-uu-interactive-execute)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2497 (define-key gnus-uu-mode-map "\C-c\C-c" 'gnus-uu-interactive-end)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2498 (define-key gnus-uu-mode-map "\C-cs"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2499 'gnus-uu-interactive-save-current-file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2500 (define-key gnus-uu-mode-map "\C-c\C-s"
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2501 'gnus-uu-interactive-save-current-file-silent)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2502 (define-key gnus-uu-mode-map "\C-c\C-a" 'gnus-uu-interactive-save-all-files)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2503 (define-key gnus-uu-mode-map "\C-c\C-o" 'gnus-uu-interactive-save-original-file)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2504
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2505
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2506 ;; Major mode for posting encoded articles.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2507
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2508 (require 'sendmail)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2509 (require 'rnews)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2510
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2511 ; 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
2512 ; 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
2513 ; 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
2514 ; the encoding wasn't successful.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2515 (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
2516 "Function used for encoding binary files.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2517 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
2518 `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
2519 `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
2520 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
2521 uuencode and adds MIME headers.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2522
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2523 (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
2524 "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
2525 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
2526 \\<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
2527
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2528 (defvar gnus-uu-post-length 990
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2529 "Maximum length of an article.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2530 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
2531 post the entire file.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2532
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2533 (defvar gnus-uu-post-threaded nil
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2534 "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
2535 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
2536 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
2537 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
2538 counts...) Default is nil.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2539
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2540 (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
2541 "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
2542 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
2543 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
2544 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
2545 is t.")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2546
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2547 (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
2548 (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
2549 (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
2550 (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
2551
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2552 ; 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
2553 ; somewhat.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2554 (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
2555 (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
2556 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2557 (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
2558 (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
2559 (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
2560 'news-reply-distribution)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2561 (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
2562 'news-reply-keywords)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2563 (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
2564 'news-reply-newsgroups)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2565
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2566 (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
2567 'news-reply-followup-to)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2568 (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
2569 (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
2570 'gnus-uu-post-reply-summary)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2571 (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
2572 'news-caesar-buffer-body)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2573 (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
2574 (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
2575 'news-reply-yank-original)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2576 (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
2577 'mail-fill-yanked-message)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2578 (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
2579 'gnus-uu-post-news-inews)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2580 (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
2581 'gnus-uu-post-news-inews)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2582 (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
2583 '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
2584 ))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2585
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2586 ; 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
2587 (defun gnus-uu-post-reply-mode ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2588 "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
2589 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
2590 news.announce.newusers .
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2591
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2592 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
2593 additional commands:
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2594
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2595 \\<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
2596 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
2597 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
2598 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
2599 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
2600 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
2601 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
2602 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
2603 \\[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
2604
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2605 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
2606 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
2607 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
2608 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
2609 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
2610 to post the entire encoded files.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2611
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2612 Relevant Variables
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2613
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2614 `gnus-uu-post-encode-method'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2615 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
2616 `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
2617 `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
2618 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
2619 uuencode and adds MIME headers.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2620
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2621 `gnus-uu-post-include-before-composing'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2622 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
2623 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
2624 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
2625 post the article.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2626
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2627 `gnus-uu-post-length'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2628 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
2629 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
2630
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2631 `gnus-uu-post-separate-description'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2632 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
2633 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
2634 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
2635 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
2636 numbered (1/x). Default is t.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2637
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2638 `gnus-uu-post-threaded'
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2639 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
2640 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
2641 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
2642 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
2643 counts...) Default is nil.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2644 "
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2645 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2646 ;; require...
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2647 (or (fboundp 'mail-setup) (load "sendmail"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2648 (kill-all-local-variables)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2649 (make-local-variable 'mail-reply-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2650 (setq mail-reply-buffer nil)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2651 (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
2652 (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
2653 (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
2654 (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
2655 (setq mode-name "Gnus UU News")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2656 (make-local-variable 'paragraph-separate)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2657 (make-local-variable 'paragraph-start)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2658 (setq paragraph-start (concat "^" mail-header-separator "$\\|"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2659 paragraph-start))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2660 (setq paragraph-separate (concat "^" mail-header-separator "$\\|"
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2661 paragraph-separate))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2662 (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
2663
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2664 (defun gnus-uu-post-news ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2665 "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
2666 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2667 (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
2668 (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
2669 (let (news-reply-mode)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2670 (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
2671 (gnus-summary-post-news)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2672 (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
2673 (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
2674 (gnus-uu-post-insert-binary))))))
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 (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
2677 "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
2678 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
2679 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2680 (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
2681 (error "Not in post-news buffer"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2682 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2683 (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
2684
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2685 ; 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
2686 (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
2687 (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
2688 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2689 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2690 (forward-line 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2691 (while (re-search-forward " " nil t)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2692 (replace-match "`"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2693 t)))
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 ; 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
2696 (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
2697 (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
2698 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2699 (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
2700 t)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2701
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2702 ; 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
2703 (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
2704 (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
2705 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2706 (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
2707 t)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2708
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2709 ; Adds MIME headers.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2710 (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
2711 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2712 (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
2713 (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
2714 file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2715 (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
2716 (save-restriction
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2717 (set-buffer gnus-post-news-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2718 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2719 (re-search-forward mail-header-separator)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2720 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2721 (forward-line -1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2722 (narrow-to-region 1 (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2723 (or (mail-fetch-field "mime-version")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2724 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2725 (widen)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2726 (insert "MIME-Version: 1.0\n")))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2727 (widen)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2728
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2729 ; 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
2730 ; current buffer.
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2731 (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
2732 (= 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
2733 (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
2734
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2735 (defun gnus-uu-post-news-inews ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2736 "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
2737 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
2738 (interactive)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2739 (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
2740 (error "Not in post news buffer"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2741
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2742 (let (file-name)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2743
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2744 (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
2745 (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
2746 (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
2747
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2748 (if gnus-uu-post-threaded
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2749 (let ((gnus-required-headers
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2750 (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
2751 gnus-required-headers
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2752 (cons 'Message-ID gnus-required-headers)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2753 gnus-inews-article-hook elem)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2754
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2755 (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
2756 gnus-inews-article-hook
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2757 (list gnus-inews-article-hook)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2758 (setq gnus-inews-article-hook
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2759 (cons
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2760 '(lambda ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2761 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2762 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2763 (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
2764 (setq gnus-uu-post-message-id
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2765 (buffer-substring
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2766 (match-beginning 1) (match-end 1)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2767 (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
2768 gnus-inews-article-hook))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2769 (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
2770 (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
2771 (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
2772 (and gnus-uu-winconf-post-news
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2773 (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
2774
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2775 ; 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
2776 ; 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
2777 (defun gnus-uu-post-insert-binary ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2778 (let ((uuencode-buffer-name "*uuencode buffer*")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2779 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
2780
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2781 (setq file-path (read-file-name
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2782 "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
2783 (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
2784 (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
2785
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2786 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2787 (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
2788
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2789 (if (string-match "^~/" file-path)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2790 (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
2791 (if (string-match "/[^/]*$" file-path)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2792 (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
2793 (setq file-name file-path))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2794
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2795 (unwind-protect
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2796 (if (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2797 (set-buffer (setq uubuf
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2798 (get-buffer-create uuencode-buffer-name)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2799 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2800 (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
2801 (insert-buffer uubuf)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2802 (error "Encoding unsuccessful"))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2803 (kill-buffer uubuf))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2804 file-name))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2805
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2806 ; 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
2807 (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
2808 (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
2809 (encoded-buffer-name "*encoded buffer*")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2810 (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
2811 (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
2812 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
2813 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
2814
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2815 (setq post-buf (current-buffer))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2816
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2817 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2818 (if (not (re-search-forward
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2819 (if gnus-uu-post-separate-description
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2820 gnus-uu-post-binary-separator
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2821 mail-header-separator) nil t))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2822 (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
2823 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2824 (forward-line 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2825 (setq beg-binary (point))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2826 (setq end-binary (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2827
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2828 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2829 (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
2830 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2831 (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
2832 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2833 (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
2834 (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
2835 (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
2836 (setq parts (1+ parts))))
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 (if gnus-uu-post-separate-description
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2839 (forward-line -1))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2840 (kill-region (point) (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2841
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2842 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2843 (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
2844 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2845 (setq header (buffer-substring 1 (point)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2846
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 (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
2849 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2850 (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
2851 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2852 (end-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2853 (insert (format " (0/%d)" parts))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2854 (gnus-inews-news))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2855
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2856 (save-excursion
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2857 (setq i 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2858 (setq beg 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2859 (while (not (> i parts))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2860 (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
2861 (erase-buffer)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2862 (insert header)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2863 (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
2864 (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
2865 (insert separator)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2866 (setq whole-len
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2867 (- 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
2868 (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
2869 (setq minlen 1))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2870 (setq
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2871 beg-line
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2872 (format top-string
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2873 (make-string minlen ?-)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2874 file-name i parts
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2875 (make-string
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2876 (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
2877
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2878 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2879 (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
2880 ()
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2881 (if (not threaded)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2882 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2883 (end-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2884 (insert (format " (%d/%d)" i parts)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2885 (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
2886 (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
2887 (replace-match "Subject: Re: "))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2888
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2889 (goto-char (point-max))
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 (set-buffer uubuf)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2892 (goto-char beg)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2893 (if (= i parts)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2894 (goto-char (point-max))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2895 (forward-line gnus-uu-post-length))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2896 (setq end (point)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2897 (insert-buffer-substring uubuf beg end)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2898 (insert beg-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2899 (insert "\n")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2900 (setq beg end)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2901 (setq i (1+ i))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2902 (goto-char 1)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2903 (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
2904 (beginning-of-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2905 (forward-line 2)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2906 (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
2907 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2908 (replace-match "")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2909 (forward-line 1)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2910 (insert beg-line)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2911 (insert "\n")
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2912 (gnus-inews-news)))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2913
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2914 (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
2915 (kill-buffer buf))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2916 (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
2917 (kill-buffer buf))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2918
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2919 (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
2920 (progn
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2921 (set-buffer-modified-p nil)
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2922 (and (fboundp 'bury-buffer) (bury-buffer))))))
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2923
6728
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2924 (provide 'gnus-uu)
cee7995fefe5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2925
6729
77494db73d5b entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 6728
diff changeset
2926 ;; gnus-uu.el ends here
7291
373b9db3c71c Removed some keystrokes for obscure toggle commands:
Richard M. Stallman <rms@gnu.org>
parents: 6904
diff changeset
2927