Mercurial > emacs
annotate etc/gnus-tut.txt @ 83004:7900111db01c
Converted display hooks to be display-local. Plus many bugfixes.
lib-src/emacsclient.c (window_change_signal): Renamed to pass_signal_to_emacs.
(init_signal): Pass SIGINT and SIGQUIT to the emacs process.
lisp/faces.el (face-valid-attribute-values): Use the window-system
function, not the variable.
(read-face-attribute, face-spec-set-match-display, frame-set-background-mode)
(face-set-after-frame-default): Ditto.
lisp/frame.el (make-frame-on-tty): Added interactive declaration
(suggested by Robert J. Chassell). Use tty-create-frame-with-faces,
not make-terminal-frame.
src/termhooks.h (struct display_method): Renamed to display for brevity.
(struct display): Added all display hook variables as members of this structure.
Added next_display, reference_count, type and display_info components.
(FRAME_MUST_WRITE_SPACES, FRAME_FAST_CLEAR_END_OF_LINE, FRAME_LINE_INS_DEL_OK)
(FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK, FRAME_SCROLL_REGION_COST)
(FRAME_MEMORY_BELOW_FRAME, FRAME_RIF): Updated for struct display.
(FRAME_DISPLAY): New macro.
(create_display, delete_display): New prototypes.
src/frame.h (struct frame): Added `display' member, removed display_method.
(FRAME_LIVE_P): Look at f->display, not f->output_data.
src/termchar.h (struct tty_display_info): Removed display_method component.
(FRAME_TTY): Use the display structure, not output_data.
src/term.c (display_list): New variable.
(cursor_to_hook, raw_cursor_to_hook, clear_to_end_hook, clear_frame_hook)
(clear_end_of_line_hook, ins_del_lines_hook, delete_glyphs_hook)
(ring_bell_hook, reset_terminal_modes_hook, set_terminal_modes_hook)
(update_begin_hook, update_end_hook, set_terminal_window_hook)
(insert_glyphs_hook, write_glyphs_hook, delete_glyphs_hoo, read_socket_hook)
(frame_up_to_date_hook, mouse_position_hook, frame_rehighlight_hook)
(frame_raise_lower_hook, set_vertical_scroll_bar_hook, condemn_scroll_bars_hook)
(redeem_scroll_bar_hook, judge_scroll_bars_hook): Moved to struct display.
(tty_display_method_template): Removed.
(syms_of_term): Don't initialize tty_display_method_template.
(ring_bell, set_terminal_modes, reset_terminal_modes, update_begin)
(update_end, set_terminal_window, cursor_to, raw_cursor_to, clear_to_end)
(clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Access display hooks through the frame pointer.
(Ftty_display_color_p): Use the frame given as a parameter, or else return nil.
(Ftty_display_color_cells): Ditto.
(get_named_tty): Renamed to get_named_tty_display, changed return type to struct display.
(term_dummy_init): Renamed to initial_term_init. Create and return an initial display.
(term_init): Initialize a new struct display and return a pointer to
it instead of tty_display_info. Removed frame initialization kludge.
(Fdelete_tty): Updated for struct display.
(delete_tty): The parameter type is now struct display, not tty_display_info.
Delete the display, too.
(create_tty_output): New function for creating tty_output structures.
(delete_tty_output): New function for deleting tty_output structures.
(create_display): New function for creating and registering display structures.
(delete_display): New function for deleting and unregistering display structures.
src/dispextern.h: Updated prototypes.
src/dispnew.c: Include frame.h before termhooks.h.
(init_display): Updated term_init call to new signature.
src/emacs.c: Include frame.h (for termhooks.h).
src/keymap.c: Ditto.
src/lread.c: Ditto.
src/xsmfns.c: Ditto.
src/process.c: Include frame.h before termhooks.h.
src/frame.c (Fwindow_system): New function.
(syms_of_frame): Initialize it.
(make_terminal_frame): Open the terminal device before creating the new frame.
Disable scrollbars here, term_init cannot do that anymore.
(Fdelete_frame): Use the new delete_frame_hook, don't do display-specific
frame deletion here. Ditto for delete_display_hook.
(Fmouse_position, Fmouse_pixel_position, Fraise_frame, Flower_frame)
(Fredirect_frame_focus): Access display hooks through the frame pointer.
src/keyboard.c: Include frame.h before termhooks.h.
(start_polling, input_polling_used, stop_polling, gobble_input): Ignore read_socket_hook.
(kbd_buffer_get_event, Fset_input_mode): Access display hooks through the frame pointer.
(read_avail_input): Loop through all display devices for and call all read_socket_hook functions. Check ttys even if read_socket_hook returned an error.
src/sysdep.c (discard_tty_input): Ignore read_socket_hook.
(stuff_char): Don't do anything if the current frame is not on a termcap display.
(request_sigio, unrequest_sigio): Ignore read_socket_hook.
(init_sys_modes): Always call narrow_foreground_group. Set up terminal modes and sigio even under X.
src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window): Access display hooks through the frame pointer.
(echo_area_display): Don't be afraid of termcap frames during an X+tty combo session.
src/xfaces.c: Include termhooks.h.
(Ftty_supports_face_attributes_p): Use the given frame, not selected_frame.
src/xfns.c (x_set_scroll_bar_foreground, x_set_scroll_bar_background): Access display hooks through the frame pointer.
(Fx_create_frame, x_create_tip_frame): Initialize the frame's display structure.
src/xmenu.c: Include termhooks.h after frame.h.
src/xselect.c (x_own_selection, some_frame_on_display, x_get_foreign_selection)
(Fx_disown_selection_internal, Fx_get_cut_buffer_internal)
(Fx_store_cut_buffer_internal, Fx_rotate_cut_buffers_internal): Don't do anything
if the selected frame is not an X frame.
src/xterm.c (x_display_method): Removed.
(x_create_frame_display, x_delete_frame_display): New functions for handling struct display objects.
(x_term_init): Set up a new struct display object, too.
(x_delete_display): Delete the struct display corresponding to the X display.
(x_initialize): Moved hook initialization to x_create_frame_display.
src/xterm.h (x_display_method): Removed.
(struct x_display_info): Added frame_display component.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-44
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 05 Jan 2004 05:54:35 +0000 |
parents | 23a1cea22d13 |
children | 23a17af379b1 d7ddb3e565de |
rev | line source |
---|---|
25852 | 1 From lars Thu Feb 23 23:20:38 1995 |
2 From: larsi@ifi.uio.no (ding) | |
3 Date: Fri Feb 24 13:40:45 1995 | |
4 Subject: So you want to use the new Gnus | |
5 Message-ID: <lars-doc1@eyesore.no> | |
6 | |
7 Actually, since you are reading this, chances are you are already | |
8 using the new Gnus. Congratulations. | |
9 | |
10 This entire newsgroup you are reading is, in fact, no real newsgroup | |
11 at all, in the traditional sense. It is an example of one of the | |
12 "foreign" select methods that Gnus may use. | |
13 | |
14 The text you are now reading is stored in the "etc" directory with the | |
15 rest of the Emacs sources. You are using the "nndoc" backend for | |
16 accessing it. Scary, isn't it? | |
17 | |
18 This isn't the real documentation. `M-x info', `m gnus <RET>' to read | |
19 that. This "newsgroup" is intended as a kinder, gentler way of getting | |
20 people started. | |
21 | |
22 Gnus is a rewrite of GNUS 4.1, written by Masanobu Umeda. The rewrite | |
23 was done by moi, yours truly, your humble servant, Lars Magne | |
24 Ingebrigtsen. If you have a WWW browser, you can investigate to your | |
25 heart's delight at <URL:http://www.ifi.uio.no/~larsi/larsi.html>. | |
26 | |
27 ;; Copyright (C) 1995 Free Software Foundation, Inc. | |
28 | |
29 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> | |
30 ;; Keywords: news | |
31 | |
32 ;; This file is part of GNU Emacs. | |
33 | |
34 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
35 ;; it under the terms of the GNU General Public License as published by | |
36 ;; the Free Software Foundation; either version 2, or (at your option) | |
37 ;; any later version. | |
38 | |
39 ;; GNU Emacs is distributed in the hope that it will be useful, | |
40 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
41 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
42 ;; GNU General Public License for more details. | |
43 | |
44 ;; You should have received a copy of the GNU General Public License | |
45 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
46 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
47 ;; Boston, MA 02111-1307, USA. | |
48 | |
49 From lars Thu Feb 23 23:20:38 1995 | |
50 From: larsi@ifi.uio.no (ding) | |
51 Date: Fri Feb 24 13:40:45 1995 | |
52 Subject: Starting up | |
53 Message-ID: <lars-doc2@eyesore.no> | |
54 | |
55 If you are having problems with Gnus not finding your server, you have | |
56 to set `gnus-select-method'. A "method" is a way of specifying *how* | |
57 the news is to be found, and from *where*. | |
58 | |
59 Say you want to read news from you local, friendly nntp server | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
60 "news.my.local.server". |
25852 | 61 |
62 (setq gnus-select-method '(nntp "news.my.local.server")) | |
63 | |
64 Quite easy, huh? | |
65 | |
66 From the news spool: | |
67 | |
68 (setq gnus-select-method '(nnspool "")) | |
69 | |
70 From your mh-e spool: | |
71 | |
72 (setq gnus-select-method '(nnmh "")) | |
73 | |
74 There's a whole bunch of other methods for reading mail and news, see | |
75 the "Foreign groups" article for that. | |
76 | |
77 | |
78 From lars Thu Feb 23 23:20:38 1995 | |
79 From: larsi@ifi.uio.no (ding) | |
80 Date: Fri Feb 24 13:40:45 1995 | |
81 Subject: Where are all the groups, then? | |
82 Message-ID: <lars-doc3@eyesore.no> | |
83 | |
84 If this is the first time you have used a newsreader, you won't have a | |
85 .newsrc file. This means that Gnus will think that all the newsgroups | |
86 on the server are "new", and kill them all. | |
87 | |
88 If you have a .newsrc file, the new groups will be processed with the | |
89 function in the `gnus-subscribe-newsgroup-method' variable, which is | |
90 `gnus-subscribe-zombies' by default. | |
91 | |
92 This means that all the groups have been made into "zombies" - not | |
93 quite dead, but not exactly alive, either. | |
94 | |
95 Jump back to the *Group* buffer, and type `A z' to list all the zombie | |
96 groups. Look though the list, and subscribe to the groups you want to | |
97 read by pressing `u' on the one you think look interesting. | |
98 | |
99 If all the groups have been killed, type `A k' to list all the killed | |
100 groups. Subscribe to them the same way. | |
101 | |
102 When you are satisfied, press `S z' to kill all the zombie groups. | |
103 | |
104 Now you should have a nice list of all groups you are interested in. | |
105 | |
106 (If you later want to subscribe to more groups, press `A k' to | |
107 list all the kill groups, and repeat. You can also type `U' and be | |
108 prompted for groups to subscribe to.) | |
109 | |
110 | |
111 From lars Thu Feb 23 23:20:38 1995 | |
112 From: larsi@ifi.uio.no (ding) | |
113 Date: Fri Feb 24 13:40:45 1995 | |
114 Subject: I want to read my mail! | |
115 Message-ID: <lars-doc4@eyesore.no> | |
116 | |
117 Yes, Virginia, you can read mail with Gnus. | |
118 | |
119 First you have to decide which mail backend you want to use. You have | |
120 nnml, which is a one-file-one-mail backend, which is quite nice, but | |
121 apt to make your systems administrator go crazy and come after you | |
122 with a shotgun. | |
123 | |
124 nnmbox uses a Unix mail box to store mail. Nice, but slow. | |
125 | |
126 nnmh uses mh-e folders, which is also a one-file-one-mail thingie, but | |
127 slower than nnml. (It doesn't support NOV files.) | |
128 | |
129 So if you want to go with nnmbox, you can simply say: | |
130 | |
131 (setq gnus-secondary-select-methods '((nnmbox ""))) | |
132 | |
133 (The same for the other methods, kind of.) | |
134 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
135 You should also set `nnmail-split-methods' to something sensible: |
25852 | 136 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
137 (setq nnmail-split-methods |
25852 | 138 '(("mail.junk" "From:.*Lars") |
139 ("mail.misc ""))) | |
140 | |
141 This will put all mail from me in you junk mail group, and the rest in | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
142 "mail.misc". |
25852 | 143 |
144 These groups will be subscribe the same way as the normal groups, so | |
145 you will probably find them among the zombie groups after you set | |
146 these variables and re-start Gnus. | |
147 | |
148 | |
149 From lars Thu Feb 23 23:20:38 1995 | |
150 From: larsi@ifi.uio.no (ding) | |
151 Date: Fri Feb 24 13:40:45 1995 | |
152 Subject: Foreign newsgroups | |
153 Message-ID: <lars-doc5@eyesore.no> | |
154 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
155 These are groups that do not come from `gnus-select-method'. |
25852 | 156 |
157 Say you want to read "alt.furniture.couches" from "news.funet.fi". You | |
158 can then either type `B news.funet.fi <RET>' to browse that server and | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
159 subscribe to that group, or you can type |
25852 | 160 `G m alt.furniture.couches<RET>nntp<RET>news.funet.fi<RET>', if you |
161 like to type a lot. | |
162 | |
163 If you want to read a directory as a newsgroup, you can create an | |
164 nndir group, much the same way. There's a shorthand for that, | |
165 though. If, for instance, you want to read the (ding) list archives, | |
166 you could type `G d /ftp <RET>'. | |
167 | |
168 There's lots more to know about foreign groups, but you have to read | |
169 the info pages to find out more. | |
170 | |
171 | |
172 From lars Thu Feb 23 23:20:38 1995 | |
173 From: larsi@ifi.uio.no (ding) | |
174 Date: Fri Feb 24 13:40:45 1995 | |
175 Subject: Low level changes in GNUS, or, Wrong type argument: stringp, nil | |
176 Message-ID: <lars-doc6@eyesore.no> | |
177 | |
178 Gnus really isn't GNUS, even though it looks like it. If you scrape | |
179 the surface, you'll find that most things have changed. | |
180 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
181 This means that old code that relies on GNUS internals will fail. |
25852 | 182 |
183 In particular, `gnus-newsrc-hashtb', `gnus-newsrc-assoc', | |
184 `gnus-killed-list', the `nntp-header-' macros and the display formats | |
185 have all changed. If you have some code lying around that depend on | |
186 these, or change these, you'll have to re-write your code. | |
187 | |
188 Old hilit19 code does not work at all. In fact, you should probably | |
189 remove all hilit code from all the Gnus hooks | |
190 (`gnus-group-prepare-hook', `gnus-summary-prepare-hook' and | |
191 `gnus-summary-article-hook'). (Well, at the very least the first | |
192 two.) Gnus provides various integrated functions for highlighting, | |
193 which are both faster and more accurated. | |
194 | |
195 There is absolutely no chance, whatsoever, of getting Gnus to work | |
196 with Emacs 18. It won't even work on Emacsen older than Emacs | |
197 19.30/XEmacs 19.13. Upgrade your Emacs or die. | |
198 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
199 |
25852 | 200 From lars Thu Feb 23 23:20:38 1995 |
201 From: larsi@ifi.uio.no (ding) | |
202 Date: Fri Feb 24 13:40:45 1995 | |
203 Subject: How do I re-scan my mail groups? | |
204 Message-ID: <lars-doc8@eyesore.no> | |
205 | |
206 Reading the active file from the nntp server is a drag. | |
207 | |
208 Just press `M-g' on the mail groups, and they will be re-scanned. | |
209 | |
210 You can also re-scan all the mail groups by putting them on level 1 | |
211 (`S l 1'), and saying `1 g' to re-scan all level 1 groups. | |
212 | |
213 | |
214 From lars Thu Feb 23 23:20:38 1995 | |
215 From: larsi@ifi.uio.no (ding) | |
216 Date: Fri Feb 24 13:40:45 1995 | |
217 Subject: How do I set up virtual newsgroups? | |
218 Message-ID: <lars-doc9@eyesore.no> | |
219 | |
220 Virtual newsgroups are collections of other newsgroups. Why people | |
221 want this is beyond me, but here goes: | |
222 | |
223 Create the group by saying | |
224 | |
225 `M-a my.virtual.newsgroup<RET>nnvirtual<RET>^rec\.aquaria\.*<RET>' | |
226 | |
227 This will create the group "nnvirtual:my.virtual.newsgroup", which | |
228 will collect all articles from all the groups in the "rec.aquaria" | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
229 hierarchy. |
25852 | 230 |
231 If you want to edit the regular expression, just type `M-e' on the | |
232 group line. | |
233 | |
234 Note that all the groups that are part of the virtual group have to be | |
235 alive. This means that the cannot, absolutely not, be zombie or | |
236 killed. They can be unsubscribed; that's no problem. | |
237 | |
238 You can combine groups from different servers in the same virtual | |
239 newsgroup, something that may actually be useful. Say you have the | |
240 group "comp.headers" on the server "news.server.no" and the same group | |
241 on "news.server.edu". If people have posted articles with Distribution | |
242 headers that stop propagation of their articles, combining these two | |
243 newsgroups into one virtual newsgroup should give you a better view of | |
244 what's going on. | |
245 | |
246 One caveat, though: The virtual group article numbers from the first | |
247 source group (group A) will always be lower than the article numbers | |
248 from the second (group B). This means that Gnus will believe that | |
249 articles from group A are older than articles from group B. Threading | |
250 will lessen these problems, but it might be a good idea to sort the | |
251 threads over the date of the articles to get a correct feel for the | |
252 flow of the groups: | |
253 | |
254 (setq gnus-thread-sort-functions '(gnus-thread-sort-by-date)) | |
255 | |
256 If you only want this in virtual groups, you could say something along | |
257 the lines of: | |
258 | |
259 (setq gnus-select-group-hook | |
260 (lambda () | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
261 (if (eq 'nnvirtual (car (gnus-find-method-for-group |
25852 | 262 gnus-newsgroup-name))) |
263 (progn | |
264 (make-local-variable 'gnus-thread-sort-functions) | |
265 (setq gnus-thread-sort-functions '(gnus-thread-sort-by-date)))))) | |
266 | |
267 | |
268 From lars Thu Feb 23 23:20:38 1995 | |
269 From: larsi@ifi.uio.no (ding) | |
270 Date: Fri Feb 24 13:40:45 1995 | |
271 Subject: Bugs & stuff | |
272 Message-ID: <lars-doc7@eyesore.no> | |
273 | |
274 If you want to report a bug, please type `M-x gnus-bug'. This will | |
275 give me a precise overview of your Gnus and Emacs version numbers, | |
276 along with a look at all Gnus variables you have changed. | |
277 | |
278 Du not expect a reply back, but your bug should be fixed in the next | |
279 version. If the bug persists, please re-submit your bug report. | |
280 | |
281 When a bug occurs, I need a recipe for how to trigger the bug. You | |
282 have to tell me exactly what you do to uncover the bug, and you should | |
283 (setq debug-on-error t) and send me the backtrace along with the bug | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
25852
diff
changeset
|
284 report. |
25852 | 285 |
286 If I am not able to reproduce the bug, I won't be able to fix it. | |
287 | |
288 I would, of course, prefer that you locate the bug, fix it, and mail | |
289 me the patches, but one can't have everything. | |
290 | |
291 If you have any questions on usage, the "ding@ifi.uio.no" mailing list | |
292 is where to post the questions. | |
293 | |
294 |