annotate lisp/mb-depth.el @ 110410:f2e111723c3a

Merge changes made in Gnus trunk. Reimplement nnimap, and do tweaks to the rest of the code to support that. * gnus-int.el (gnus-finish-retrieve-group-infos) (gnus-retrieve-group-data-early): New functions. * gnus-range.el (gnus-range-nconcat): New function. * gnus-start.el (gnus-get-unread-articles): Support early retrieval of data. (gnus-read-active-for-groups): Support finishing the early retrieval of data. * gnus-sum.el (gnus-summary-move-article): Pass the move-to group name if the move is internal, so that nnimap can do fast internal moves. * gnus.el (gnus-article-special-mark-lists): Add uid/active tuples, for nnimap usage. * nnimap.el: Rewritten. * nnmail.el (nnmail-inhibit-default-split-group): New internal variable to allow the mail splitting to not return a default group. This is useful for nnimap, which will leave unmatched mail in the inbox. * utf7.el (utf7-encode): Autoload. Implement shell connection. * nnimap.el (nnimap-open-shell-stream): New function. (nnimap-open-connection): Use it. Get the number of lines by using BODYSTRUCTURE. (nnimap-transform-headers): Get the number of lines in each message. (nnimap-retrieve-headers): Query for BODYSTRUCTURE so that we get the number of lines. Not all servers return UIDNEXT. Work past this problem. Remove junk from end of file. Fix typo in "bogus" section. Make capabilties be case-insensitive. Require cl when compiling. Don't bug out if the LIST command doesn't have any parameters. 2010-09-17 Knut Anders Hatlen <kahatlen@gmail.com> (tiny change) * nnimap.el (nnimap-get-groups): Don't bug out if the LIST command doesn't have any parameters. (mm-text-html-renderer): Document gnus-article-html. 2010-09-17 Julien Danjou <julien@danjou.info> (tiny fix) * mm-decode.el (mm-text-html-renderer): Document gnus-article-html. * dgnushack.el: Define netrc-credentials. If the user doesn't have a /etc/services, supply some sensible port defaults. Have `unseen-or-unread' select an unread unseen article first. (nntp-open-server): Return whether the open was successful or not. Throughout all files, replace (save-excursion (set-buffer ...)) with (with-current-buffer ... ). Save result so that it doesn't say "failed" all the time. Add ~/.authinfo to the default, since that's probably most useful for users. Don't use the "finish" method when we're reading from the agent. Add some more nnimap-relevant agent stuff to nnagent.el. * nnimap.el (nnimap-with-process-buffer): Removed. Revert one line that was changed by mistake in the last checkin. (nnimap-open-connection): Don't error out when we can't make a connection nnimap-related changes to avoid bugging out if we can't contact a server. * gnus-start.el (gnus-get-unread-articles): Don't try to scan groups from methods that are denied. * nnimap.el (nnimap-possibly-change-group): Return nil if we can't log in. (nnimap-finish-retrieve-group-infos): Make sure we're not waiting for nothing. * gnus-sum.el (gnus-select-newsgroup): Indent.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sat, 18 Sep 2010 10:02:19 +0000
parents 1d1d5d9bd884
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1 ;;; mb-depth.el --- Indicate minibuffer-depth in prompt
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
2 ;;
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
3 ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
4 ;;
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
5 ;; Author: Miles Bader <miles@gnu.org>
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
6 ;; Keywords: convenience
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
7
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
9
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
13 ;; (at your option) any later version.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
14
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
18 ;; GNU General Public License for more details.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
19
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
94678
ee5932bf781d Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
22
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
23 ;;; Commentary:
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
24 ;;
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
25 ;; Defines the minor mode `minibuffer-depth-indicate-mode'.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
26 ;;
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
27 ;; When active, any recursive use of the minibuffer will show
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
28 ;; the recursion depth in the minibuffer prompt. This is only
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
29 ;; useful if `enable-recursive-minibuffers' is non-nil.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
30
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
31 ;;; Code:
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
32
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
33 (defvar minibuffer-depth-indicator-function nil
85085
20e6cbaf918a (minibuf-depth-indicator-function): New variable.
Juanma Barranquero <lekktu@gmail.com>
parents: 82160
diff changeset
34 "If non-nil, function to set up the minibuffer depth indicator.
20e6cbaf918a (minibuf-depth-indicator-function): New variable.
Juanma Barranquero <lekktu@gmail.com>
parents: 82160
diff changeset
35 It is called with one argument, the minibuffer depth,
20e6cbaf918a (minibuf-depth-indicator-function): New variable.
Juanma Barranquero <lekktu@gmail.com>
parents: 82160
diff changeset
36 and must return a string.")
20e6cbaf918a (minibuf-depth-indicator-function): New variable.
Juanma Barranquero <lekktu@gmail.com>
parents: 82160
diff changeset
37
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
38 ;; An overlay covering the prompt. This is a buffer-local variable in
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
39 ;; each affected minibuffer.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
40 ;;
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
41 (defvar minibuffer-depth-overlay)
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
42 (make-variable-buffer-local 'minibuffer-depth-overlay)
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
43
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
44 ;; This function goes on minibuffer-setup-hook
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
45 (defun minibuffer-depth-setup ()
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
46 "Set up a minibuffer for `minibuffer-depth-indicate-mode'.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
47 The prompt should already have been inserted."
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
48 (when (> (minibuffer-depth) 1)
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
49 (setq minibuffer-depth-overlay (make-overlay (point-min) (1+ (point-min))))
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
50 (overlay-put minibuffer-depth-overlay 'before-string
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
51 (if minibuffer-depth-indicator-function
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
52 (funcall minibuffer-depth-indicator-function (minibuffer-depth))
85085
20e6cbaf918a (minibuf-depth-indicator-function): New variable.
Juanma Barranquero <lekktu@gmail.com>
parents: 82160
diff changeset
53 (propertize (format "[%d]" (minibuffer-depth)) 'face 'highlight)))
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
54 (overlay-put minibuffer-depth-overlay 'evaporate t)))
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
55
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
56 ;;;###autoload
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
57 (define-minor-mode minibuffer-depth-indicate-mode
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
58 "Toggle Minibuffer Depth Indication mode.
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
59 When active, any recursive use of the minibuffer will show
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
60 the recursion depth in the minibuffer prompt. This is only
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
61 useful if `enable-recursive-minibuffers' is non-nil.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
62
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
63 With prefix argument ARG, turn on if positive, otherwise off.
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
64 Returns non-nil if the new state is enabled."
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
65 :global t
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
66 :group 'minibuffer
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
67 (if minibuffer-depth-indicate-mode
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
68 ;; Enable the mode
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
69 (add-hook 'minibuffer-setup-hook 'minibuffer-depth-setup)
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
70 ;; Disable the mode
97157
5e1a3afd2217 Unify all names under one common name prefix
Juri Linkov <juri@jurta.org>
parents: 94678
diff changeset
71 (remove-hook 'minibuffer-setup-hook 'minibuffer-depth-setup)))
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
72
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
73 (provide 'mb-depth)
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
74
81452
56a3f23e0e74 Add arch tagline
Miles Bader <miles@gnu.org>
parents: 81441
diff changeset
75 ;; arch-tag: 50224089-5bf5-46f8-803d-18f018c5eacf
81441
cf1f1c774776 New file.
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
76 ;;; mb-depth.el ends here