Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101625. ------------------------------------------------------------ revno: 101625 committer: Ted Zlatanov branch nick: quickfixes timestamp: Sun 2010-09-26 01:06:28 -0500 message: Set up GnuTLS support. * configure.in: Set up GnuTLS. * lisp/net/gnutls.el: GnuTLS glue code to set up a connection. * src/Makefile.in (LIBGNUTLS_LIBS, LIBGNUTLS_CFLAGS, ALL_CFLAGS) (obj, LIBES): Set up GnuTLS support. * src/config.in: Set up GnuTLS support. * src/emacs.c: Set up GnuTLS support and call syms_of_gnutls. * src/gnutls.c: The source code for GnuTLS support in Emacs. * src/gnutls.h: The GnuTLS glue for Emacs, macros and enums. * src/process.c (make_process, Fstart_process) (read_process_output, send_process): Set up GnuTLS support for process input/output file descriptors. * src/process.h: Set up GnuTLS support. diff: === modified file 'ChangeLog' --- ChangeLog 2010-09-22 03:10:16 +0000 +++ ChangeLog 2010-09-26 06:06:28 +0000 @@ -1,3 +1,7 @@ +2010-09-26 Teodor Zlatanov + + * configure.in: Set up GnuTLS. + 2010-09-22 Chong Yidong * configure.in: Announce whether libxml2 is linked to. === modified file 'configure.in' --- configure.in 2010-09-22 03:10:16 +0000 +++ configure.in 2010-09-26 06:06:28 +0000 @@ -171,6 +171,7 @@ OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) +OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. @@ -1999,6 +2000,13 @@ fi AC_SUBST(LIBSELINUX_LIBS) +HAVE_GNUTLS=no +if test "${with_gnutls}" = "yes" ; then + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4]) + AC_DEFINE(HAVE_GNUTLS) + HAVE_GNUTLS=yes +fi + dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no @@ -3701,6 +3709,7 @@ echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" +echo " Does Emacs use -lgnutls (BROKEN)? ${HAVE_GNUTLS}" echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 21:57:02 +0000 +++ lisp/ChangeLog 2010-09-26 06:06:28 +0000 @@ -1,3 +1,7 @@ +2010-09-26 Teodor Zlatanov + + * net/gnutls.el: GnuTLS glue code to set up a connection. + 2010-09-25 Julien Danjou * notifications.el: Call dbus-register-signal only if it is bound. === added file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 1970-01-01 00:00:00 +0000 +++ lisp/net/gnutls.el 2010-09-26 06:06:28 +0000 @@ -0,0 +1,128 @@ +;;; gnutls.el --- Support SSL and TLS connections through GnuTLS +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Author: Ted Zlatanov +;; Keywords: comm, tls, ssl, encryption +;; Originally-By: Simon Josefsson (See http://josefsson.org/emacs-security/) + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This package provides language bindings for the GnuTLS library +;; using the corresponding core functions in gnutls.c. + +;; Simple test: +;; +;; (setq jas (open-ssl-stream "ssl" (current-buffer) "www.pdc.kth.se" 443)) +;; (process-send-string jas "GET /\r\n\r\n") + +;;; Code: + +(defun open-ssl-stream (name buffer host service) + "Open a SSL connection for a service to a host. +Returns a subprocess-object to represent the connection. +Input and output work as for subprocesses; `delete-process' closes it. +Args are NAME BUFFER HOST SERVICE. +NAME is name for process. It is modified if necessary to make it unique. +BUFFER is the buffer (or `buffer-name') to associate with the process. + Process output goes at end of that buffer, unless you specify + an output stream or filter function to handle the output. + BUFFER may be also nil, meaning that this process is not associated + with any buffer +Third arg is name of the host to connect to, or its IP address. +Fourth arg SERVICE is name of the service desired, or an integer +specifying a port number to connect to." + (let ((proc (open-network-stream name buffer host service))) + (starttls-negotiate proc nil 'gnutls-x509pki))) + +;; (open-ssl-stream "tls" "tls-buffer" "yourserver.com" "https") +(defun starttls-negotiate (proc &optional priority-string + credentials credentials-file) + "Negotiate a SSL or TLS connection. +PROC is the process returned by `starttls-open-stream'. +PRIORITY-STRING is as per the GnuTLS docs. +CREDENTIALS is `gnutls-x509pki' or `gnutls-anon'. +CREDENTIALS-FILE is a filename with meaning dependent on CREDENTIALS." + (let* ((credentials (or credentials 'gnutls-x509pki)) + (credentials-file (or credentials-file + "/etc/ssl/certs/ca-certificates.crt" + ;"/etc/ssl/certs/ca.pem" + )) + + (priority-string (or priority-string + (cond + ((eq credentials 'gnutls-anon) + "NORMAL:+ANON-DH:!ARCFOUR-128") + ((eq credentials 'gnutls-x509pki) + "NORMAL")))) + ret) + + (gnutls-message-maybe + (setq ret (gnutls-boot proc priority-string credentials credentials-file)) + "boot: %s") + + (when (gnutls-errorp ret) + (error "Could not boot GnuTLS for this process")); + + (let ((ret 'gnutls-e-again) + (n 25000)) + (while (and (not (gnutls-error-fatalp ret)) + (> n 0)) + (decf n) + (gnutls-message-maybe + (setq ret (gnutls-handshake proc)) + "handshake: %s") + ;(debug "handshake ret" ret (gnutls-error-string ret))) + ) + (if (gnutls-errorp ret) + (progn + (message "Ouch, error return %s (%s)" + ret (gnutls-error-string ret)) + (setq proc nil)) + (message "Handshake complete %s." ret))) + proc)) + +(defun starttls-open-stream (name buffer host service) + "Open a TLS connection for a service to a host. +Returns a subprocess-object to represent the connection. +Input and output work as for subprocesses; `delete-process' closes it. +Args are NAME BUFFER HOST SERVICE. +NAME is name for process. It is modified if necessary to make it unique. +BUFFER is the buffer (or `buffer-name') to associate with the process. + Process output goes at end of that buffer, unless you specify + an output stream or filter function to handle the output. + BUFFER may be also nil, meaning that this process is not associated + with any buffer +Third arg is name of the host to connect to, or its IP address. +Fourth arg SERVICE is name of the service desired, or an integer +specifying a port number to connect to." + (open-network-stream name buffer host service)) + +(defun gnutls-message-maybe (doit format &rest params) + "When DOIT, message with the caller name followed by FORMAT on PARAMS." + ;; (apply 'debug format (or params '(nil))) + (when (gnutls-errorp doit) + (message "%s: (err=[%s] %s) %s" + "gnutls.el" + doit (gnutls-error-string doit) + (apply 'format format (or params '(nil)))))) + +(provide 'ssl) +(provide 'gnutls) +(provide 'starttls) + +;;; gnutls.el ends here === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-26 01:39:24 +0000 +++ src/ChangeLog 2010-09-26 06:06:28 +0000 @@ -1,3 +1,22 @@ +2010-09-26 Teodor Zlatanov + + * process.h: Set up GnuTLS support. + + * process.c (make_process, Fstart_process) + (read_process_output, send_process): Set up GnuTLS support for + process input/output file descriptors. + + * gnutls.h: The GnuTLS glue for Emacs, macros and enums. + + * gnutls.c: The source code for GnuTLS support in Emacs. + + * emacs.c: Set up GnuTLS support and call syms_of_gnutls. + + * config.in: Set up GnuTLS support. + + * Makefile.in (LIBGNUTLS_LIBS, LIBGNUTLS_CFLAGS, ALL_CFLAGS) + (obj, LIBES): Set up GnuTLS support. + 2010-09-26 Juanma Barranquero * w32.c (get_emacs_configuration_options): Fix previous change. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-09-20 22:35:37 +0000 +++ src/Makefile.in 2010-09-26 06:06:28 +0000 @@ -286,6 +286,9 @@ LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ +LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ +LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ + INTERVALS_H = dispextern.h intervals.h composite.h GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ @@ -325,6 +328,7 @@ ${LIBXML2_CFLAGS} ${DBUS_CFLAGS} \ ${GCONF_CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \ ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} ${PROFILING_CFLAGS} \ + $(LIBGNUTLS_CFLAGS) \ ${C_WARNINGS_SWITCH} ${CFLAGS} ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) @@ -349,7 +353,7 @@ alloc.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o font.o print.o lread.o \ syntax.o $(UNEXEC_OBJ) bytecode.o \ - process.o callproc.o \ + process.o gnutls.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o strftime.o intervals.o textprop.o composite.o md5.o xml.o \ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) @@ -601,6 +605,7 @@ ${LIBXML2_LIBS} $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ + $(LIBGNUTLS_LIBS) \ $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC) all: emacs${EXEEXT} $(OTHER_FILES) === modified file 'src/config.in' --- src/config.in 2010-09-10 16:44:35 +0000 +++ src/config.in 2010-09-26 06:06:28 +0000 @@ -255,6 +255,9 @@ /* Define to 1 if you have a gif (or ungif) library. */ #undef HAVE_GIF +/* Define if we have the GNU TLS library. */ +#undef HAVE_GNUTLS + /* Define to 1 if you have the gpm library (-lgpm). */ #undef HAVE_GPM @@ -1094,6 +1097,12 @@ #include config_opsysfile #include config_machfile +#if HAVE_GNUTLS +#define LIBGNUTLS $(LIBGNUTLS_LIBS) +#else /* not HAVE_GNUTLS */ +#define LIBGNUTLS +#endif /* not HAVE_GNUTLS */ + /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep. (There is probably a better place to do this, but right now the Cocoa side does this in s/darwin.h and we cannot === modified file 'src/emacs.c' --- src/emacs.c 2010-09-21 11:13:36 +0000 +++ src/emacs.c 2010-09-26 06:06:28 +0000 @@ -59,6 +59,10 @@ #include "keyboard.h" #include "keymap.h" +#ifdef HAVE_GNUTLS +#include "gnutls.h" +#endif + #ifdef HAVE_NS #include "nsterm.h" #endif @@ -1569,6 +1573,10 @@ syms_of_fontset (); #endif /* HAVE_NS */ +#ifdef HAVE_GNUTLS + syms_of_gnutls (); +#endif + #ifdef HAVE_DBUS syms_of_dbusbind (); #endif /* HAVE_DBUS */ === added file 'src/gnutls.c' --- src/gnutls.c 1970-01-01 00:00:00 +0000 +++ src/gnutls.c 2010-09-26 06:06:28 +0000 @@ -0,0 +1,551 @@ +/* GnuTLS glue for GNU Emacs. + Copyright (C) 2010 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#include +#include +#include + +#include "lisp.h" +#include "process.h" + +#ifdef HAVE_GNUTLS +#include + +Lisp_Object Qgnutls_code; +Lisp_Object Qgnutls_anon, Qgnutls_x509pki; +Lisp_Object Qgnutls_e_interrupted, Qgnutls_e_again, + Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake; +int global_initialized; + +int +emacs_gnutls_write (int fildes, gnutls_session_t state, char *buf, + unsigned int nbyte) +{ + register int rtnval, bytes_written; + + bytes_written = 0; + + while (nbyte > 0) + { + rtnval = gnutls_write (state, buf, nbyte); + + if (rtnval == -1) + { + if (errno == EINTR) + continue; + else + return (bytes_written ? bytes_written : -1); + } + + buf += rtnval; + nbyte -= rtnval; + bytes_written += rtnval; + } + fsync (STDOUT_FILENO); + + return (bytes_written); +} + +int +emacs_gnutls_read (int fildes, gnutls_session_t state, char *buf, + unsigned int nbyte) +{ + register int rtnval; + + do { + rtnval = gnutls_read (state, buf, nbyte); + } while (rtnval == GNUTLS_E_INTERRUPTED || rtnval == GNUTLS_E_AGAIN); + fsync (STDOUT_FILENO); + + return (rtnval); +} + +/* convert an integer error to a Lisp_Object; it will be either a + known symbol like `gnutls_e_interrupted' and `gnutls_e_again' or + simply the integer value of the error. GNUTLS_E_SUCCESS is mapped + to Qt. */ +Lisp_Object gnutls_make_error (int error) +{ + switch (error) + { + case GNUTLS_E_SUCCESS: + return Qt; + case GNUTLS_E_AGAIN: + return Qgnutls_e_again; + case GNUTLS_E_INTERRUPTED: + return Qgnutls_e_interrupted; + case GNUTLS_E_INVALID_SESSION: + return Qgnutls_e_invalid_session; + } + + return make_number (error); +} + +DEFUN ("gnutls-get-initstage", Fgnutls_get_initstage, Sgnutls_get_initstage, 1, 1, 0, + doc: /* Return the GnuTLS init stage of PROCESS. +See also `gnutls-boot'. */) + (Lisp_Object proc) +{ + CHECK_PROCESS (proc); + + return make_number (GNUTLS_INITSTAGE (proc)); +} + +DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0, + doc: /* Returns t if ERROR (as generated by gnutls_make_error) +indicates a GnuTLS problem. */) + (Lisp_Object error) +{ + if (EQ (error, Qt)) return Qnil; + + return Qt; +} + +DEFUN ("gnutls-error-fatalp", Fgnutls_error_fatalp, Sgnutls_error_fatalp, 1, 1, 0, + doc: /* Checks if ERROR is fatal. +ERROR is an integer or a symbol with an integer `gnutls-code' property. */) + (Lisp_Object err) +{ + Lisp_Object code; + + if (EQ (err, Qt)) return Qnil; + + if (SYMBOLP (err)) + { + code = Fget (err, Qgnutls_code); + if (NUMBERP (code)) + { + err = code; + } + else + { + error ("Symbol has no numeric gnutls-code property"); + } + } + + if (!NUMBERP (err)) + error ("Not an error symbol or code"); + + if (0 == gnutls_error_is_fatal (XINT (err))) + return Qnil; + + return Qt; +} + +DEFUN ("gnutls-error-string", Fgnutls_error_string, Sgnutls_error_string, 1, 1, 0, + doc: /* Returns a description of ERROR. +ERROR is an integer or a symbol with an integer `gnutls-code' property. */) + (Lisp_Object err) +{ + Lisp_Object code; + + if (EQ (err, Qt)) return build_string ("Not an error"); + + if (SYMBOLP (err)) + { + code = Fget (err, Qgnutls_code); + if (NUMBERP (code)) + { + err = code; + } + else + { + return build_string ("Symbol has no numeric gnutls-code property"); + } + } + + if (!NUMBERP (err)) + return build_string ("Not an error symbol or code"); + + return build_string (gnutls_strerror (XINT (err))); +} + +DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0, + doc: /* Deallocate GNU TLS resources associated with PROCESS. +See also `gnutls-init'. */) + (Lisp_Object proc) +{ + gnutls_session_t state; + + CHECK_PROCESS (proc); + state = XPROCESS (proc)->gnutls_state; + + if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT) + { + gnutls_deinit (state); + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT - 1; + } + + return Qt; +} + +/* Initializes global GNU TLS state to defaults. +Call `gnutls-global-deinit' when GNU TLS usage is no longer needed. +Returns zero on success. */ +Lisp_Object gnutls_emacs_global_init (void) +{ + int ret = GNUTLS_E_SUCCESS; + + if (!global_initialized) + ret = gnutls_global_init (); + + global_initialized = 1; + + return gnutls_make_error (ret); +} + +/* Deinitializes global GNU TLS state. +See also `gnutls-global-init'. */ +Lisp_Object gnutls_emacs_global_deinit (void) +{ + if (global_initialized) + gnutls_global_deinit (); + + global_initialized = 0; + + return gnutls_make_error (GNUTLS_E_SUCCESS); +} + +DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 6, 0, + doc: /* Initializes client-mode GnuTLS for process PROC. +Currently only client mode is supported. Returns a success/failure +value you can check with `gnutls-errorp'. + +PRIORITY_STRING is a string describing the priority. +TYPE is either `gnutls-anon' or `gnutls-x509pki'. +TRUSTFILE is a PEM encoded trust file for `gnutls-x509pki'. +KEYFILE is ... for `gnutls-x509pki' (TODO). +CALLBACK is ... for `gnutls-x509pki' (TODO). + +Note that the priority is set on the client. The server does not use +the protocols's priority except for disabling protocols that were not +specified. + +Processes must be initialized with this function before other GNU TLS +functions are used. This function allocates resources which can only +be deallocated by calling `gnutls-deinit' or by calling it again. + +Each authentication type may need additional information in order to +work. For X.509 PKI (`gnutls-x509pki'), you need TRUSTFILE and +KEYFILE and optionally CALLBACK. */) + (Lisp_Object proc, Lisp_Object priority_string, Lisp_Object type, + Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback) +{ + int ret = GNUTLS_E_SUCCESS; + + /* TODO: GNUTLS_X509_FMT_DER is also an option. */ + int file_format = GNUTLS_X509_FMT_PEM; + + gnutls_session_t state; + gnutls_certificate_credentials_t x509_cred; + gnutls_anon_client_credentials_t anon_cred; + gnutls_srp_client_credentials_t srp_cred; + gnutls_datum_t data; + Lisp_Object global_init; + + CHECK_PROCESS (proc); + CHECK_SYMBOL (type); + CHECK_STRING (priority_string); + + state = XPROCESS (proc)->gnutls_state; + + /* always initialize globals. */ + global_init = gnutls_emacs_global_init (); + if (! NILP (Fgnutls_errorp (global_init))) + return global_init; + + /* deinit and free resources. */ + if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_CRED_ALLOC) + { + message ("gnutls: deallocating certificates"); + + if (EQ (type, Qgnutls_x509pki)) + { + message ("gnutls: deallocating x509 certificates"); + + x509_cred = XPROCESS (proc)->x509_cred; + gnutls_certificate_free_credentials (x509_cred); + } + else if (EQ (type, Qgnutls_anon)) + { + message ("gnutls: deallocating anon certificates"); + + anon_cred = XPROCESS (proc)->anon_cred; + gnutls_anon_free_client_credentials (anon_cred); + } + else + { + error ("unknown credential type"); + ret = GNUTLS_EMACS_ERROR_INVALID_TYPE; + } + + if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT) + { + message ("gnutls: deinitializing"); + + Fgnutls_deinit (proc); + } + } + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_EMPTY; + + message ("gnutls: allocating credentials"); + + if (EQ (type, Qgnutls_x509pki)) + { + message ("gnutls: allocating x509 credentials"); + + x509_cred = XPROCESS (proc)->x509_cred; + if (gnutls_certificate_allocate_credentials (&x509_cred) < 0) + memory_full (); + } + else if (EQ (type, Qgnutls_anon)) + { + message ("gnutls: allocating anon credentials"); + + anon_cred = XPROCESS (proc)->anon_cred; + if (gnutls_anon_allocate_client_credentials (&anon_cred) < 0) + memory_full (); + } + else + { + error ("unknown credential type"); + ret = GNUTLS_EMACS_ERROR_INVALID_TYPE; + } + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_ALLOC; + + message ("gnutls: setting the trustfile"); + + if (EQ (type, Qgnutls_x509pki)) + { + if (STRINGP (trustfile)) + { + ret = gnutls_certificate_set_x509_trust_file + (x509_cred, + XSTRING (trustfile)->data, + file_format); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + message ("gnutls: processed %d CA certificates", ret); + } + + message ("gnutls: setting the keyfile"); + + if (STRINGP (keyfile)) + { + ret = gnutls_certificate_set_x509_crl_file + (x509_cred, + XSTRING (keyfile)->data, + file_format); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + message ("gnutls: processed %d CRL(s)", ret); + } + } + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_FILES; + + message ("gnutls: gnutls_init"); + + ret = gnutls_init (&state, GNUTLS_CLIENT); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + XPROCESS (proc)->gnutls_state = state; + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT; + + message ("gnutls: setting the priority string"); + + ret = gnutls_priority_set_direct(state, + (char*) SDATA (priority_string), + NULL); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY; + + message ("gnutls: setting the credentials"); + + if (EQ (type, Qgnutls_x509pki)) + { + message ("gnutls: setting the x509 credentials"); + + ret = gnutls_cred_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred); + } + else if (EQ (type, Qgnutls_anon)) + { + message ("gnutls: setting the anon credentials"); + + ret = gnutls_cred_set (state, GNUTLS_CRD_ANON, anon_cred); + } + else + { + error ("unknown credential type"); + ret = GNUTLS_EMACS_ERROR_INVALID_TYPE; + } + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + + XPROCESS (proc)->anon_cred = anon_cred; + XPROCESS (proc)->x509_cred = x509_cred; + XPROCESS (proc)->gnutls_cred_type = type; + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_SET; + + return gnutls_make_error (GNUTLS_E_SUCCESS); +} + +DEFUN ("gnutls-bye", Fgnutls_bye, + Sgnutls_bye, 2, 2, 0, + doc: /* Terminate current GNU TLS connection for PROCESS. +The connection should have been initiated using `gnutls-handshake'. + +If CONT is not nil the TLS connection gets terminated and further +receives and sends will be disallowed. If the return value is zero you +may continue using the connection. If CONT is nil, GnuTLS actually +sends an alert containing a close request and waits for the peer to +reply with the same message. In order to reuse the connection you +should wait for an EOF from the peer. + +This function may also return `gnutls-e-again', or +`gnutls-e-interrupted'. */) + (Lisp_Object proc, Lisp_Object cont) +{ + gnutls_session_t state; + int ret; + + CHECK_PROCESS (proc); + + state = XPROCESS (proc)->gnutls_state; + + ret = gnutls_bye (state, + NILP (cont) ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR); + + return gnutls_make_error (ret); +} + +DEFUN ("gnutls-handshake", Fgnutls_handshake, + Sgnutls_handshake, 1, 1, 0, + doc: /* Perform GNU TLS handshake for PROCESS. +The identity of the peer is checked automatically. This function will +fail if any problem is encountered, and will return a negative error +code. In case of a client, if it has been asked to resume a session, +but the server didn't, then a full handshake will be performed. + +If the error `gnutls-e-not-ready-for-handshake' is returned, you +didn't call `gnutls-boot' first. + +This function may also return the non-fatal errors `gnutls-e-again', +or `gnutls-e-interrupted'. In that case you may resume the handshake +(by calling this function again). */) + (Lisp_Object proc) +{ + gnutls_session_t state; + int ret; + + CHECK_PROCESS (proc); + state = XPROCESS (proc)->gnutls_state; + + if (GNUTLS_INITSTAGE (proc) < GNUTLS_STAGE_HANDSHAKE_CANDO) + return Qgnutls_e_not_ready_for_handshake; + + + if (GNUTLS_INITSTAGE (proc) < GNUTLS_STAGE_TRANSPORT_POINTERS_SET) + { + /* for a network process in Emacs infd and outfd are the same + but this shows our intent more clearly. */ + message ("gnutls: handshake: setting the transport pointers to %d/%d", + XPROCESS (proc)->infd, XPROCESS (proc)->outfd); + + gnutls_transport_set_ptr2 (state, XPROCESS (proc)->infd, + XPROCESS (proc)->outfd); + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_TRANSPORT_POINTERS_SET; + } + + message ("gnutls: handshake: handshaking"); + ret = gnutls_handshake (state); + + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_HANDSHAKE_TRIED; + + if (GNUTLS_E_SUCCESS == ret) + { + /* here we're finally done. */ + GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_READY; + } + + return gnutls_make_error (ret); +} + +void +syms_of_gnutls (void) +{ + global_initialized = 0; + + Qgnutls_code = intern_c_string ("gnutls-code"); + staticpro (&Qgnutls_code); + + Qgnutls_anon = intern_c_string ("gnutls-anon"); + staticpro (&Qgnutls_anon); + + Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); + staticpro (&Qgnutls_x509pki); + + Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted"); + staticpro (&Qgnutls_e_interrupted); + Fput (Qgnutls_e_interrupted, Qgnutls_code, + make_number (GNUTLS_E_INTERRUPTED)); + + Qgnutls_e_again = intern_c_string ("gnutls-e-again"); + staticpro (&Qgnutls_e_again); + Fput (Qgnutls_e_again, Qgnutls_code, + make_number (GNUTLS_E_AGAIN)); + + Qgnutls_e_invalid_session = intern_c_string ("gnutls-e-invalid-session"); + staticpro (&Qgnutls_e_invalid_session); + Fput (Qgnutls_e_invalid_session, Qgnutls_code, + make_number (GNUTLS_E_INVALID_SESSION)); + + Qgnutls_e_not_ready_for_handshake = + intern_c_string ("gnutls-e-not-ready-for-handshake"); + staticpro (&Qgnutls_e_not_ready_for_handshake); + Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code, + make_number (GNUTLS_E_APPLICATION_ERROR_MIN)); + + defsubr (&Sgnutls_get_initstage); + defsubr (&Sgnutls_errorp); + defsubr (&Sgnutls_error_fatalp); + defsubr (&Sgnutls_error_string); + defsubr (&Sgnutls_boot); + defsubr (&Sgnutls_deinit); + defsubr (&Sgnutls_handshake); + defsubr (&Sgnutls_bye); +} +#endif === added file 'src/gnutls.h' --- src/gnutls.h 1970-01-01 00:00:00 +0000 +++ src/gnutls.h 2010-09-26 06:06:28 +0000 @@ -0,0 +1,60 @@ +/* GnuTLS glue for GNU Emacs. + Copyright (C) 2010 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + +#ifndef EMACS_GNUTLS_DEFINED +#define EMACS_GNUTLS_DEFINED + +#ifdef HAVE_GNUTLS +#include + +typedef enum +{ + /* Initialization stages. */ + GNUTLS_STAGE_EMPTY = 0, + GNUTLS_STAGE_CRED_ALLOC, + GNUTLS_STAGE_FILES, + GNUTLS_STAGE_INIT, + GNUTLS_STAGE_PRIORITY, + GNUTLS_STAGE_CRED_SET, + + /* Handshake stages. */ + GNUTLS_STAGE_HANDSHAKE_CANDO = GNUTLS_STAGE_CRED_SET, + GNUTLS_STAGE_TRANSPORT_POINTERS_SET, + GNUTLS_STAGE_HANDSHAKE_TRIED, + + GNUTLS_STAGE_READY, +} gnutls_initstage_t; + +#define GNUTLS_EMACS_ERROR_INVALID_TYPE GNUTLS_E_APPLICATION_ERROR_MIN + +#define GNUTLS_INITSTAGE(proc) (XPROCESS (proc)->gnutls_initstage) + +#define GNUTLS_PROCESS_USABLE(proc) (GNUTLS_INITSTAGE(proc) >= GNUTLS_STAGE_READY) + +int +emacs_gnutls_write (int fildes, gnutls_session_t state, char *buf, + unsigned int nbyte); +int +emacs_gnutls_read (int fildes, gnutls_session_t state, char *buf, + unsigned int nbyte); + +extern void syms_of_gnutls (void); + +#endif + +#endif === modified file 'src/process.c' --- src/process.c 2010-09-25 12:31:15 +0000 +++ src/process.c 2010-09-26 06:06:28 +0000 @@ -105,6 +105,9 @@ #include "sysselect.h" #include "syssignal.h" #include "syswait.h" +#ifdef HAVE_GNUTLS +#include "gnutls.h" +#endif #if defined (USE_GTK) || defined (HAVE_GCONF) #include "xgselect.h" @@ -583,6 +586,10 @@ p->read_output_skip = 0; #endif +#ifdef HAVE_GNUTLS + p->gnutls_initstage = GNUTLS_STAGE_EMPTY; +#endif + /* If name is already in use, modify it until it is unused. */ name1 = name; @@ -1526,6 +1533,12 @@ XPROCESS (proc)->filter = Qnil; XPROCESS (proc)->command = Flist (nargs - 2, args + 2); +#ifdef HAVE_GNUTLS + /* AKA GNUTLS_INITSTAGE(proc). */ + XPROCESS (proc)->gnutls_initstage = GNUTLS_STAGE_EMPTY; + XPROCESS (proc)->gnutls_cred_type = Qnil; +#endif + #ifdef ADAPTIVE_READ_BUFFERING XPROCESS (proc)->adaptive_read_buffering = (NILP (Vprocess_adaptive_read_buffering) ? 0 @@ -5099,7 +5112,13 @@ #endif if (proc_buffered_char[channel] < 0) { - nbytes = emacs_read (channel, chars + carryover, readmax); +#ifdef HAVE_GNUTLS + if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) + nbytes = emacs_gnutls_read (channel, XPROCESS (proc)->gnutls_state, + chars + carryover, readmax); + else +#endif + nbytes = emacs_read (channel, chars + carryover, readmax); #ifdef ADAPTIVE_READ_BUFFERING if (nbytes > 0 && p->adaptive_read_buffering) { @@ -5132,7 +5151,13 @@ { chars[carryover] = proc_buffered_char[channel]; proc_buffered_char[channel] = -1; - nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); +#ifdef HAVE_GNUTLS + if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) + nbytes = emacs_gnutls_read (channel, XPROCESS (proc)->gnutls_state, + chars + carryover + 1, readmax - 1); + else +#endif + nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); if (nbytes < 0) nbytes = 1; else @@ -5542,7 +5567,14 @@ else #endif { - rv = emacs_write (outfd, (char *) buf, this); +#ifdef HAVE_GNUTLS + if (NETCONN_P(proc) && GNUTLS_PROCESS_USABLE (proc)) + rv = emacs_gnutls_write (outfd, + XPROCESS (proc)->gnutls_state, + (char *) buf, this); + else +#endif + rv = emacs_write (outfd, (char *) buf, this); #ifdef ADAPTIVE_READ_BUFFERING if (p->read_output_delay > 0 && p->adaptive_read_buffering == 1) === modified file 'src/process.h' --- src/process.h 2010-08-11 12:34:46 +0000 +++ src/process.h 2010-09-26 06:06:28 +0000 @@ -24,6 +24,10 @@ #include #endif +#ifdef HAVE_GNUTLS +#include "gnutls.h" +#endif + /* This structure records information about a subprocess or network connection. @@ -76,6 +80,10 @@ /* Working buffer for encoding. */ Lisp_Object encoding_buf; +#ifdef HAVE_GNUTLS + Lisp_Object gnutls_cred_type; +#endif + /* After this point, there are no Lisp_Objects any more. */ /* alloc.c assumes that `pid' is the first such non-Lisp slot. */ @@ -121,6 +129,13 @@ needs to be synced to `status'. */ unsigned int raw_status_new : 1; int raw_status; + +#ifdef HAVE_GNUTLS + gnutls_initstage_t gnutls_initstage; + gnutls_session_t gnutls_state; + gnutls_certificate_client_credentials x509_cred; + gnutls_anon_client_credentials_t anon_cred; +#endif }; /* Every field in the preceding structure except for the first two ------------------------------------------------------------ revno: 101624 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2010-09-26 04:03:19 +0000 message: Merge changes made in Gnus trunk. nnimap.el: Implement partial IMAP article fetch. nnimap.el: Have nnimap not update the infos if it can't get info from the server. Implement functions for showing the complete articles. gnus-int.el (gnus-open-server): Don't query whether to go offline -- just do it. gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when there isn't a single byte. nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested by Jay Berkenbilt. mm-decode.el (mm-save-part): Allow saving to other directories the normal Emacs way. gnus-html.el (gnus-html-rescale-image): Use our defalias gnus-window-inside-pixel-edges. gnus-srvr.el (gnus-server-copy-server): Add documentation. gnus.texi (Using IMAP): Document the new nnimap. nnimap.el (nnimap-wait-for-response): Search further when we're not using streaming. gnus-int.el (gnus-check-server): Say what the error was when opening failed. nnheader.el (nnheader-get-report-string): New function. gnus-int.el (gnus-check-server): Use report-string. nnimap.el (nnimap-open-connection): Add more error reporting when nnimap fails early. gnus-start.el (gnus-get-unread-articles): Don't try to open failed servers twice. nnimap.el (nnimap-wait-for-response): Reversed logic in the nnimap-streaming test. gnus-art.el: Removed CTAN button stuff, which I don't think is very relevant any more. Remove NoCeM support, since nobody seems to use it any more. Remove earcon and gnus-audio. gnus.el (gnus): Silence gnus-load message. gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email address to the To list for easier response. gnus.texi (Connecting to an IMAP Server): Show how to use as primary method instead of secondary. diff: === modified file 'doc/misc/gnus-news.texi' --- doc/misc/gnus-news.texi 2010-09-20 23:08:33 +0000 +++ doc/misc/gnus-news.texi 2010-09-26 04:03:19 +0000 @@ -246,6 +246,16 @@ @code{message-insert-formatted-citation-line} as well. @end itemize +@item Changes in Browse Server mode + +@itemize @bullet +@item Gnus' sophisticated subscription methods are now available in +Browse Server buffers as well using the variable +@code{gnus-browse-subscribe-newsgroup-method}. + +@end itemize + + @item Changes in back ends @itemize @bullet @@ -336,6 +346,8 @@ moving articles to a group that has not turned auto-expire on. @xref{Expiring Mail}. +@item NoCeM support has been removed. + @end itemize @end itemize === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-09-25 12:49:02 +0000 +++ doc/misc/gnus.texi 2010-09-26 04:03:19 +0000 @@ -629,9 +629,9 @@ * Server Buffer:: Making and editing virtual servers. * Getting News:: Reading USENET news with Gnus. +* Using @acronym{IMAP}:: Reading mail from @acronym{IMAP}. * Getting Mail:: Reading your personal mail with Gnus. * Browsing the Web:: Getting messages from a plethora of Web sources. -* IMAP:: Using Gnus as a @acronym{IMAP} client. * Other Sources:: Reading directories, files. * Combined Groups:: Combining groups into one group. * Email Based Diary:: Using mails to manage diary events in Gnus. @@ -698,15 +698,6 @@ * RSS:: Reading RDF site summary. * Customizing W3:: Doing stuff to Emacs/W3 from Gnus. -@acronym{IMAP} - -* Splitting in IMAP:: Splitting mail with nnimap. -* Expiring in IMAP:: Expiring mail with nnimap. -* Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox. -* Expunging mailboxes:: Equivalent of a ``compress mailbox'' button. -* A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus. -* Debugging IMAP:: What to do when things don't work. - Other Sources * Directory Groups:: You can read a directory as if it was a newsgroup. @@ -808,7 +799,6 @@ * Highlighting and Menus:: Making buffers look all nice and cozy. * Buttons:: Get tendinitis in ten easy steps! * Daemons:: Gnus can do things behind your back. -* NoCeM:: How to avoid spam and other fatty foods. * Undo:: Some actions can be undone. * Predicate Specifiers:: Specifying predicates. * Moderation:: What to do if you're a moderator. @@ -1637,15 +1627,6 @@ @vindex gnus-no-groups-message Message displayed by Gnus when no groups are available. -@item gnus-play-startup-jingle -@vindex gnus-play-startup-jingle -If non-@code{nil}, play the Gnus jingle at startup. - -@item gnus-startup-jingle -@vindex gnus-startup-jingle -Jingle to be played if the above variable is non-@code{nil}. The -default is @samp{Tuxedomoon.Jingle4.au}. - @item gnus-use-backend-marks @vindex gnus-use-backend-marks If non-@code{nil}, Gnus will store article marks both in the @@ -3617,8 +3598,12 @@ @item u @kindex u (Browse) @findex gnus-browse-unsubscribe-current-group +@vindex gnus-browse-subscribe-newsgroup-method Unsubscribe to the current group, or, as will be the case here, -subscribe to it (@code{gnus-browse-unsubscribe-current-group}). +subscribe to it (@code{gnus-browse-unsubscribe-current-group}). You +can affect the way the new group is entered into the Group buffer +using the variable @code{gnus-browse-subscribe-newsgroup-method}. See +@pxref{Subscription Methods} for available options. @item l @itemx q @@ -10086,18 +10071,6 @@ An alist of @code{(RATE . REGEXP)} pairs used by the function @code{gnus-button-mid-or-mail-heuristic}. -@c Stuff related to gnus-button-tex-level - -@item gnus-button-ctan-handler -@findex gnus-button-ctan-handler -The function to use for displaying CTAN links. It must take one -argument, the string naming the URL. - -@item gnus-ctan-url -@vindex gnus-ctan-url -Top directory of a CTAN (Comprehensive TeX Archive Network) archive used -by @code{gnus-button-ctan-handler}. - @c Misc stuff @item gnus-article-button-face @@ -10170,14 +10143,6 @@ @code{gnus-button-mid-or-mail-heuristic}, and @code{gnus-button-mid-or-mail-heuristic-alist}. -@item gnus-button-tex-level -@vindex gnus-button-tex-level -Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN -URLs. See the variables @code{gnus-ctan-url}, -@code{gnus-button-ctan-handler}, -@code{gnus-button-ctan-directory-regexp}, and -@code{gnus-button-handle-ctan-bogus-regexp}. - @end table @@ -10829,6 +10794,16 @@ be run just before printing the buffer. An alternative way to print article is to use Muttprint (@pxref{Saving Articles}). +@item A C +@vindex gnus-fetch-partial-articles +@findex gnus-summary-show-complete-article +If @code{gnus-fetch-partial-articles} is non-@code{nil}, Gnus will +fetch partial articles, if the backend it fetches them from supports +it. Currently only @code{nnimap} does. If you're looking at a +partial article, and want to see the complete article instead, then +the @kbd{A C} command (@code{gnus-summary-show-complete-article}) will +do so. + @end table @@ -11877,8 +11852,7 @@ posted it to several groups separately. Posting the same article to several groups (not cross-posting) is called @dfn{spamming}, and you are by law required to send nasty-grams to anyone who perpetrates such a -heinous crime. You may want to try NoCeM handling to filter out spam -(@pxref{NoCeM}). +heinous crime. Remember: Cross-posting is kinda ok, but posting the same article separately to several groups is not. Massive cross-posting (aka. @@ -12009,7 +11983,7 @@ install an OpenPGP implementation such as GnuPG. The Lisp interface to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG, epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg, -PGG Manual}), Mailcrypt, and gpg.el are also supported. +PGG Manual}), and Mailcrypt are also supported. @item To handle @acronym{S/MIME} message, you need to install OpenSSL. OpenSSL 0.9.6 @@ -12048,7 +12022,7 @@ @vindex mml1991-use Symbol indicating elisp interface to OpenPGP implementation for @acronym{PGP} messages. The default is @code{epg}, but @code{pgg}, -@code{mailcrypt}, and @code{gpg} are also supported although +and @code{mailcrypt} are also supported although deprecated. By default, Gnus uses the first available interface in this order. @@ -12056,7 +12030,7 @@ @vindex mml2015-use Symbol indicating elisp interface to OpenPGP implementation for @acronym{PGP/MIME} messages. The default is @code{epg}, but -@code{pgg}, @code{mailcrypt}, and @code{gpg} are also supported +@code{pgg}, and @code{mailcrypt} are also supported although deprecated. By default, Gnus uses the first available interface in this order. @@ -13726,9 +13700,9 @@ @menu * Server Buffer:: Making and editing virtual servers. * Getting News:: Reading USENET news with Gnus. +* Using @acronym{IMAP}:: Reading mail from @acronym{IMAP}. * Getting Mail:: Reading your personal mail with Gnus. * Browsing the Web:: Getting messages from a plethora of Web sources. -* IMAP:: Using Gnus as a @acronym{IMAP} client. * Other Sources:: Reading directories, files. * Combined Groups:: Combining groups into one group. * Email Based Diary:: Using mails to manage diary events in Gnus. @@ -14141,6 +14115,14 @@ Remove all marks to whether Gnus was denied connection from any servers (@code{gnus-server-remove-denials}). +@item c +@kindex c (Server) +@findex gnus-server-copy-server +Copy a server and give it a new name +(@code{gnus-server-copy-server}). This can be useful if you have a +complex method definition, and want to use the same definition towards +a different (physical) server. + @item L @kindex L (Server) @findex gnus-server-offline-server @@ -14805,6 +14787,121 @@ @end table +@node Using @acronym{IMAP} +@section Using @acronym{IMAP} +@cindex imap + +The most popular mail backend is probably @code{nnimap}, which +provides access to @acronym{IMAP} servers. @acronym{IMAP} servers +store mail remotely, so the client doesn't store anything locally. +This means that it's a convenient choice when you're reading your mail +from different locations, or with different user agents. + +@menu +* Connecting to an @acronym{IMAP} Server:: Getting started with @acronym{IMAP}. +* Customizing the @acronym{IMAP} Connection:: Variables for @acronym{IMAP} connection. +* Client-Side @acronym{IMAP} Splitting:: Put mail in the correct mail box. +@end menu + + +@node Connecting to an @acronym{IMAP} Server +@subsection Connecting to an @acronym{IMAP} Server + +Connecting to an @acronym{IMAP} can be very easy. Type @kbd{B} in the +group buffer, or (if your primary interest is reading email), say +something like: + +@example +(setq gnus-select-method + '(nnimap "imap.gmail.com")) +@end example + +You'll be prompted for a user name and password. If you grow tired of +that, then add the following to your @file{~/.authinfo} file: + +@example +machine imap.gmail.com login password port imap +@end example + +That should basically be it for most users. + + +@node Customizing the @acronym{IMAP} Connection +@subsection Customizing the @acronym{IMAP} Connection + +Here's an example method that's more complex: + +@example +(nnimap "imap.gmail.com" + (nnimap-inbox "INBOX") + (nnimap-split-methods ,nnmail-split-methods) + (nnimap-expunge t) + (nnimap-stream 'ssl) + (nnir-search-engine imap) + (nnimap-expunge-inbox t)) +@end example + +@table @code +@item nnimap-address +The address of the server, like @samp{imap.gmail.com}. + +@item nnimap-server-port +If the server uses a non-standard port, that can be specified here. A +typical port would be @samp{imap} or @samp{imaps}. + +@item nnimap-stream +How @code{nnimap} should connect to the server. Possible values are: + +@table @code +@item ssl +This is the default, and this uses standard +@acronym{TLS}/@acronym{SSL} connection. + +@item network +Non-encrypted and unsafe straight socket connection. + +@item starttls +Encrypted @acronym{STARTTLS} over the normal @acronym{IMAP} port. + +@item shell +If you need to tunnel via other systems to connect to the server, you +can use this option, and customize @code{nnimap-shell-program} to be +what you need. + +@end table + +@item nnimap-authenticator +Some @acronym{IMAP} servers allow anonymous logins. In that case, +this should be set to @code{anonymous}. + +@item nnimap-streaming +Virtually all @code{IMAP} server support fast streaming of data. If +you have problems connecting to the server, try setting this to @code{nil}. + +@end table + + +@node Client-Side @acronym{IMAP} Splitting +@subsection Client-Side @acronym{IMAP} Splitting + +Many people prefer to do the sorting/splitting of mail into their mail +boxes on the @acronym{IMAP} server. That way they don't have to +download the mail they're not all that interested in. + +If you do want to do client-side mail splitting, then the following +variables are relevant: + +@table @code +@item nnimap-inbox +This is the @acronym{IMAP} mail box that will be scanned for new mail. + +@item nnimap-split-methods +Uses the same syntax as @code{nnmail-split-methods} (@pxref{Splitting +Mail}). + +@end table + + @node Getting Mail @section Getting Mail @cindex reading mail @@ -15363,10 +15460,7 @@ @acronym{IMAP} as intended, as a network mail reading protocol (ie with nnimap), for some reason or other, Gnus let you treat it similar to a @acronym{POP} server and fetches articles from a given -@acronym{IMAP} mailbox. @xref{IMAP}, for more information. - -Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you -may need external programs and libraries, @xref{IMAP}. +@acronym{IMAP} mailbox. @xref{Using @acronym{IMAP}}, for more information. Keywords: @@ -15835,7 +15929,7 @@ above. Also note that with the nnimap backend, message bodies will not be downloaded by default. You need to set @code{nnimap-split-download-body} to @code{t} to do that -(@pxref{Splitting in IMAP}). +(@pxref{Client-Side @acronym{IMAP} Splitting}). @item (! @var{func} @var{split}) If the split is a list, and the first element is @code{!}, then @@ -16599,6 +16693,7 @@ @end menu + @node Unix Mail Box @subsubsection Unix Mail Box @cindex nnmbox @@ -17724,739 +17819,6 @@ follow the link. -@node IMAP -@section IMAP -@cindex nnimap -@cindex @acronym{IMAP} - -@acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}), -think of it as a modernized @acronym{NNTP}. Connecting to a @acronym{IMAP} -server is much similar to connecting to a news server, you just -specify the network address of the server. - -@acronym{IMAP} has two properties. First, @acronym{IMAP} can do -everything that @acronym{POP} can, it can hence be viewed as a -@acronym{POP++}. Secondly, @acronym{IMAP} is a mail storage protocol, -similar to @acronym{NNTP} being a news storage protocol---however, -@acronym{IMAP} offers more features than @acronym{NNTP} because news -is more or less read-only whereas mail is read-write. - -If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap -entry in @code{mail-sources}. With this, Gnus will fetch mails from -the @acronym{IMAP} server and store them on the local disk. This is -not the usage described in this section---@xref{Mail Sources}. - -If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap -entry in @code{gnus-secondary-select-methods}. With this, Gnus will -manipulate mails stored on the @acronym{IMAP} server. This is the kind of -usage explained in this section. - -A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} -servers might look something like the following. (Note that for -@acronym{TLS}/@acronym{SSL}, you need external programs and libraries, -see below.) - -@lisp -(setq gnus-secondary-select-methods - '((nnimap "simpleserver") ; @r{no special configuration} - ; @r{perhaps a ssh port forwarded server:} - (nnimap "dolk" - (nnimap-address "localhost") - (nnimap-server-port 1430)) - ; @r{a UW server running on localhost} - (nnimap "barbar" - (nnimap-server-port 143) - (nnimap-address "localhost") - (nnimap-list-pattern ("INBOX" "mail/*"))) - ; @r{anonymous public cyrus server:} - (nnimap "cyrus.andrew.cmu.edu" - (nnimap-authenticator anonymous) - (nnimap-list-pattern "archive.*") - (nnimap-stream network)) - ; @r{a ssl server on a non-standard port:} - (nnimap "vic20" - (nnimap-address "vic20.somewhere.com") - (nnimap-server-port 9930) - (nnimap-stream ssl)))) -@end lisp - -After defining the new server, you can subscribe to groups on the -server using normal Gnus commands such as @kbd{U} in the Group Buffer -(@pxref{Subscription Commands}) or via the Server Buffer -(@pxref{Server Buffer}). - -The following variables can be used to create a virtual @code{nnimap} -server: - -@table @code - -@item nnimap-address -@vindex nnimap-address - -The address of the remote @acronym{IMAP} server. Defaults to the virtual -server name if not specified. - -@item nnimap-server-port -@vindex nnimap-server-port -Port on server to contact. Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}. - -Note that this should be an integer, example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-server-port 4711)) -@end lisp - -@item nnimap-list-pattern -@vindex nnimap-list-pattern -String or list of strings of mailboxes to limit available groups to. -This is used when the server has very many mailboxes and you're only -interested in a few---some servers export your home directory via -@acronym{IMAP}, you'll probably want to limit the mailboxes to those in -@file{~/Mail/*} then. - -The string can also be a cons of REFERENCE and the string as above, what -REFERENCE is used for is server specific, but on the University of -Washington server it's a directory that will be concatenated with the -mailbox. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*" - ("~friend/Mail/" . "list/*")))) -@end lisp - -@item nnimap-stream -@vindex nnimap-stream -The type of stream used to connect to your server. By default, nnimap -will detect and automatically use all of the below, with the exception -of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over -@acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can -be automatically detected, but it's not widely deployed yet.) - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-stream ssl)) -@end lisp - -Please note that the value of @code{nnimap-stream} is a symbol! - -@itemize @bullet -@item -@dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the -@samp{gsasl} or @samp{imtest} program. -@item -@dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program. -@item -@dfn{starttls:} Connect via the STARTTLS extension (similar to -@acronym{TLS}/@acronym{SSL}). Requires the external library @samp{starttls.el} and program -@samp{starttls}. -@item -@dfn{tls:} Connect through @acronym{TLS}. Requires GNUTLS (the program -@samp{gnutls-cli}). -@item -@dfn{ssl:} Connect through @acronym{SSL}. Requires OpenSSL (the program -@samp{openssl}) or SSLeay (@samp{s_client}). -@item -@dfn{shell:} Use a shell command to start @acronym{IMAP} connection. -@item -@dfn{network:} Plain, TCP/IP network connection. -@end itemize - -@vindex imap-kerberos4-program -The @samp{imtest} program is shipped with Cyrus IMAPD. If you're -using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version -1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type} -to make @code{imap.el} use a pty instead of a pipe when communicating -with @samp{imtest}. You will then suffer from a line length -restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang -indefinitely if you have many articles in a mailbox. The variable -@code{imap-kerberos4-program} contain parameters to pass to the imtest -program. - -For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is -needed. It is available from -@uref{http://www.gnu.org/software/gnutls/}. - -@vindex imap-gssapi-program -This parameter specifies a list of command lines that invoke a GSSAPI -authenticated @acronym{IMAP} stream in a subshell. They are tried -sequentially until a connection is made, or the list has been -exhausted. By default, @samp{gsasl} from GNU SASL, available from -@uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest} -program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are -tried. - -@vindex imap-ssl-program -For @acronym{SSL} connections, the OpenSSL program is available from -@uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay, -and nnimap support it too---although the most recent versions of -SSLeay, 0.9.x, are known to have serious bugs making it -useless. Earlier versions, especially 0.8.x, of SSLeay are known to -work. The variable @code{imap-ssl-program} contain parameters to pass -to OpenSSL/SSLeay. - -@vindex imap-shell-program -@vindex imap-shell-host -For @acronym{IMAP} connections using the @code{shell} stream, the -variable @code{imap-shell-program} specify what program to call. Make -sure nothing is interfering with the output of the program, e.g., don't -forget to redirect the error output to the void. - -@item nnimap-authenticator -@vindex nnimap-authenticator - -The authenticator used to connect to the server. By default, nnimap -will use the most secure authenticator your server is capable of. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-authenticator anonymous)) -@end lisp - -Please note that the value of @code{nnimap-authenticator} is a symbol! - -@itemize @bullet -@item -@dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires -external program @code{gsasl} or @code{imtest}. -@item -@dfn{kerberos4:} Kerberos 4 authentication. Requires external program -@code{imtest}. -@item -@dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires -external library @code{digest-md5.el}. -@item -@dfn{cram-md5:} Encrypted username/password via CRAM-MD5. -@item -@dfn{login:} Plain-text username/password via LOGIN. -@item -@dfn{anonymous:} Login as ``anonymous'', supplying your email address as password. -@end itemize - -@item nnimap-expunge-on-close -@cindex expunging -@vindex nnimap-expunge-on-close -Unlike Parmenides the @acronym{IMAP} designers have decided things that -don't exist actually do exist. More specifically, @acronym{IMAP} has -this concept of marking articles @code{Deleted} which doesn't actually -delete them, and this (marking them @code{Deleted}, that is) is what -nnimap does when you delete an article in Gnus (with @kbd{B DEL} or -similar). - -Since the articles aren't really removed when we mark them with the -@code{Deleted} flag we'll need a way to actually delete them. Feel like -running in circles yet? - -Traditionally, nnimap has removed all articles marked as @code{Deleted} -when closing a mailbox but this is now configurable by this server -variable. - -The possible options are: - -@table @code - -@item always -The default behavior, delete all articles marked as ``Deleted'' when -closing a mailbox. -@item never -Never actually delete articles. Currently there is no way of showing -the articles marked for deletion in nnimap, but other @acronym{IMAP} clients -may allow you to do this. If you ever want to run the EXPUNGE command -manually, @xref{Expunging mailboxes}. -@item ask -When closing mailboxes, nnimap will ask if you wish to expunge deleted -articles or not. - -@end table - -@item nnimap-importantize-dormant -@vindex nnimap-importantize-dormant - -If non-@code{nil} (the default), marks dormant articles as ticked (as -well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will -naturally still (only) be marked as dormant. This is to make dormant -articles stand out, just like ticked articles, in other @acronym{IMAP} -clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP} -has only one.) - -Probably the only reason for frobbing this would be if you're trying -enable per-user persistent dormant flags, using something like: - -@lisp -(setcdr (assq 'dormant nnimap-mark-to-flag-alist) - (format "gnus-dormant-%s" (user-login-name))) -(setcdr (assq 'dormant nnimap-mark-to-predicate-alist) - (format "KEYWORD gnus-dormant-%s" (user-login-name))) -@end lisp - -In this case, you would not want the per-user dormant flag showing up -as ticked for other users. - -@item nnimap-expunge-search-string -@cindex expunging -@vindex nnimap-expunge-search-string -@cindex expiring @acronym{IMAP} mail - -This variable contain the @acronym{IMAP} search command sent to server when -searching for articles eligible for expiring. The default is -@code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by -UID set and the second @code{%s} is replaced by a date. - -Probably the only useful value to change this to is -@code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in -messages instead of the internal article date. See section 6.4.4 of -RFC 2060 for more information on valid strings. - -However, if @code{nnimap-search-uids-not-since-is-evil} -is true, this variable has no effect since the search logic -is reversed, as described below. - -@item nnimap-authinfo-file -@vindex nnimap-authinfo-file - -A file containing credentials used to log in on servers. The format is -(almost) the same as the @code{ftp} @file{~/.netrc} file. See the -variable @code{nntp-authinfo-file} for exact syntax; also see -@ref{NNTP}. An example of an .authinfo line for an IMAP server, is: - -@example -machine students.uio.no login larsi password geheimnis port imap -@end example - -Note that it should be @code{port imap}, or @code{port 143}, if you -use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the -actual port number used is port 993 for secured IMAP. For -convenience, Gnus will accept @code{port imaps} as a synonym of -@code{port imap}. - -@item nnimap-need-unselect-to-notice-new-mail -@vindex nnimap-need-unselect-to-notice-new-mail - -Unselect mailboxes before looking for new mail in them. Some servers -seem to need this under some circumstances; it was reported that -Courier 1.7.1 did. - -@item nnimap-nov-is-evil -@vindex nnimap-nov-is-evil -@cindex Courier @acronym{IMAP} server -@cindex @acronym{NOV} - -Never generate or use a local @acronym{NOV} database. Defaults to the -value of @code{gnus-agent}. - -Using a @acronym{NOV} database usually makes header fetching much -faster, but it uses the @code{UID SEARCH UID} command, which is very -slow on some servers (notably some versions of Courier). Since the Gnus -Agent caches the information in the @acronym{NOV} database without using -the slow command, this variable defaults to true if the Agent is in use, -and false otherwise. - -@item nnimap-search-uids-not-since-is-evil -@vindex nnimap-search-uids-not-since-is-evil -@cindex Courier @acronym{IMAP} server -@cindex expiring @acronym{IMAP} mail - -Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE -@var{date}} command, which is slow on some @acronym{IMAP} servers -(notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE -@var{date}} and prune the list of expirable articles within Gnus. - -When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a -list of expirable articles and asks the IMAP server questions like ``Of -these articles, which ones are older than a week?'' While this seems -like a perfectly reasonable question, some IMAP servers take a long time -to answer it, since they seemingly go looking into every old article to -see if it is one of the expirable ones. Curiously, the question ``Of -@emph{all} articles, which ones are newer than a week?'' seems to be -much faster to answer, so setting this variable causes Gnus to ask this -question and figure out the answer to the real question itself. - -This problem can really sneak up on you: when you first configure Gnus, -everything works fine, but once you accumulate a couple thousand -messages, you start cursing Gnus for being so slow. On the other hand, -if you get a lot of email within a week, setting this variable will -cause a lot of network traffic between Gnus and the IMAP server. - -@item nnimap-logout-timeout -@vindex nnimap-logout-timeout - -There is a case where a connection to a @acronym{IMAP} server is unable -to close, when connecting to the server via a certain kind of network, -e.g. @acronym{VPN}. In that case, it will be observed that a connection -between Emacs and the local network looks alive even if the server has -closed a connection for some reason (typically, a timeout). -Consequently, Emacs continues waiting for a response from the server for -the @code{LOGOUT} command that Emacs sent, or hangs in other words. If -you are in such a network, setting this variable to a number of seconds -will be helpful. If it is set, a hung connection will be closed -forcibly, after this number of seconds from the time Emacs sends the -@code{LOGOUT} command. It should not be too small value but too large -value will be inconvenient too. Perhaps the value 1.0 will be a good -candidate but it might be worth trying some other values. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-logout-timeout 1.0)) -@end lisp - -@end table - -@menu -* Splitting in IMAP:: Splitting mail with nnimap. -* Expiring in IMAP:: Expiring mail with nnimap. -* Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox. -* Expunging mailboxes:: Equivalent of a ``compress mailbox'' button. -* A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus. -* Debugging IMAP:: What to do when things don't work. -@end menu - - - -@node Splitting in IMAP -@subsection Splitting in IMAP -@cindex splitting imap mail - -Splitting is something Gnus users have loved and used for years, and now -the rest of the world is catching up. Yeah, dream on, not many -@acronym{IMAP} servers have server side splitting and those that have -splitting seem to use some non-standard protocol. This means that -@acronym{IMAP} support for Gnus has to do its own splitting. - -And it does. - -(Incidentally, people seem to have been dreaming on, and Sieve has -gaining a market share and is supported by several IMAP servers. -Fortunately, Gnus support it too, @xref{Sieve Commands}.) - -Here are the variables of interest: - -@table @code - -@item nnimap-split-crosspost -@cindex splitting, crosspost -@cindex crosspost -@vindex nnimap-split-crosspost - -If non-@code{nil}, do crossposting if several split methods match the -mail. If @code{nil}, the first match in @code{nnimap-split-rule} -found will be used. - -Nnmail equivalent: @code{nnmail-crosspost}. - -@item nnimap-split-inbox -@cindex splitting, inbox -@cindex inbox -@vindex nnimap-split-inbox - -A string or a list of strings that gives the name(s) of @acronym{IMAP} -mailboxes to split from. Defaults to @code{nil}, which means that -splitting is disabled! - -@lisp -(setq nnimap-split-inbox - '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap")) -@end lisp - -No nnmail equivalent. - -@item nnimap-split-rule -@cindex splitting, rules -@vindex nnimap-split-rule - -New mail found in @code{nnimap-split-inbox} will be split according to -this variable. - -This variable contains a list of lists, where the first element in the -sublist gives the name of the @acronym{IMAP} mailbox to move articles -matching the regexp in the second element in the sublist. Got that? -Neither did I, we need examples. - -@lisp -(setq nnimap-split-rule - '(("INBOX.nnimap" - "^Sender: owner-nnimap@@vic20.globalcom.se") - ("INBOX.junk" "^Subject:.*MAKE MONEY") - ("INBOX.private" ""))) -@end lisp - -This will put all articles from the nnimap mailing list into mailbox -INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line -into INBOX.junk and everything else in INBOX.private. - -The first string may contain @samp{\\1} forms, like the ones used by -replace-match to insert sub-expressions from the matched text. For -instance: - -@lisp -("INBOX.lists.\\1" "^Sender: owner-\\([a-z-]+\\)@@") -@end lisp - -The first element can also be the symbol @code{junk} to indicate that -matching messages should simply be deleted. Use with care. - -The second element can also be a function. In that case, it will be -called with the first element of the rule as the argument, in a buffer -containing the headers of the article. It should return a -non-@code{nil} value if it thinks that the mail belongs in that group. - -Nnmail users might recollect that the last regexp had to be empty to -match all articles (like in the example above). This is not required in -nnimap. Articles not matching any of the regexps will not be moved out -of your inbox. (This might affect performance if you keep lots of -unread articles in your inbox, since the splitting code would go over -them every time you fetch new mail.) - -These rules are processed from the beginning of the alist toward the -end. The first rule to make a match will ``win'', unless you have -crossposting enabled. In that case, all matching rules will ``win''. - -This variable can also have a function as its value, the function will -be called with the headers narrowed and should return a group where it -thinks the article should be split to. See @code{nnimap-split-fancy}. - -The splitting code tries to create mailboxes if it needs to. - -To allow for different split rules on different virtual servers, and -even different split rules in different inboxes on the same server, -the syntax of this variable have been extended along the lines of: - -@lisp -(setq nnimap-split-rule - '(("my1server" (".*" (("ding" "ding@@gnus.org") - ("junk" "From:.*Simon")))) - ("my2server" ("INBOX" nnimap-split-fancy)) - ("my[34]server" (".*" (("private" "To:.*Simon") - ("junk" my-junk-func)))))) -@end lisp - -The virtual server name is in fact a regexp, so that the same rules -may apply to several servers. In the example, the servers -@code{my3server} and @code{my4server} both use the same rules. -Similarly, the inbox string is also a regexp. The actual splitting -rules are as before, either a function, or a list with group/regexp or -group/function elements. - -Nnmail equivalent: @code{nnmail-split-methods}. - -@item nnimap-split-predicate -@cindex splitting -@vindex nnimap-split-predicate - -Mail matching this predicate in @code{nnimap-split-inbox} will be -split, it is a string and the default is @samp{UNSEEN UNDELETED}. - -This might be useful if you use another @acronym{IMAP} client to read mail in -your inbox but would like Gnus to split all articles in the inbox -regardless of readedness. Then you might change this to -@samp{UNDELETED}. - -@item nnimap-split-fancy -@cindex splitting, fancy -@findex nnimap-split-fancy -@vindex nnimap-split-fancy - -It's possible to set @code{nnimap-split-rule} to -@code{nnmail-split-fancy} if you want to use fancy -splitting. @xref{Fancy Mail Splitting}. - -However, to be able to have different fancy split rules for nnmail and -nnimap back ends you can set @code{nnimap-split-rule} to -@code{nnimap-split-fancy} and define the nnimap specific fancy split -rule in @code{nnimap-split-fancy}. - -Example: - -@lisp -(setq nnimap-split-rule 'nnimap-split-fancy - nnimap-split-fancy ...) -@end lisp - -Nnmail equivalent: @code{nnmail-split-fancy}. - -@item nnimap-split-download-body -@findex nnimap-split-download-body -@vindex nnimap-split-download-body - -Set to non-@code{nil} to download entire articles during splitting. -This is generally not required, and will slow things down -considerably. You may need it if you want to use an advanced -splitting function that analyzes the body to split the article. - -@end table - -@node Expiring in IMAP -@subsection Expiring in IMAP -@cindex expiring @acronym{IMAP} mail - -Even though @code{nnimap} is not a proper @code{nnmail} derived back -end, it supports most features in regular expiring (@pxref{Expiring -Mail}). Unlike splitting in @acronym{IMAP} (@pxref{Splitting in -IMAP}) it does not clone the @code{nnmail} variables (i.e., creating -@var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables. What -follows below are the variables used by the @code{nnimap} expiry -process. - -A note on how the expire mark is stored on the @acronym{IMAP} server is -appropriate here as well. The expire mark is translated into a -@code{imap} client specific mark, @code{gnus-expire}, and stored on the -message. This means that likely only Gnus will understand and treat -the @code{gnus-expire} mark properly, although other clients may allow -you to view client specific flags on the message. It also means that -your server must support permanent storage of client specific flags on -messages. Most do, fortunately. - -If expiring @acronym{IMAP} mail seems very slow, try setting the server -variable @code{nnimap-search-uids-not-since-is-evil}. - -@table @code - -@item nnmail-expiry-wait -@item nnmail-expiry-wait-function - -These variables are fully supported. The expire value can be a -number, the symbol @code{immediate} or @code{never}. - -@item nnmail-expiry-target - -This variable is supported, and internally implemented by calling the -@code{nnmail} functions that handle this. It contains an optimization -that if the destination is a @acronym{IMAP} group on the same server, the -article is copied instead of appended (that is, uploaded again). - -@end table - -@node Editing IMAP ACLs -@subsection Editing IMAP ACLs -@cindex editing imap acls -@cindex Access Control Lists -@cindex Editing @acronym{IMAP} ACLs -@kindex G l (Group) -@findex gnus-group-nnimap-edit-acl - -ACL stands for Access Control List. ACLs are used in @acronym{IMAP} for -limiting (or enabling) other users access to your mail boxes. Not all -@acronym{IMAP} servers support this, this function will give an error if it -doesn't. - -To edit an ACL for a mailbox, type @kbd{G l} -(@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL -editing window with detailed instructions. - -Some possible uses: - -@itemize @bullet -@item -Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags) -on your mailing list mailboxes enables other users on the same server to -follow the list without subscribing to it. -@item -At least with the Cyrus server, you are required to give the user -``anyone'' posting ("p") capabilities to have ``plussing'' work (that is, -mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox -INBOX.mailbox). -@end itemize - -@node Expunging mailboxes -@subsection Expunging mailboxes -@cindex expunging - -@cindex expunge -@cindex manual expunging -@kindex G x (Group) -@findex gnus-group-expunge-group - -If you're using the @code{never} setting of @code{nnimap-expunge-on-close}, -you may want the option of expunging all deleted articles in a mailbox -manually. This is exactly what @kbd{G x} does. - -Currently there is no way of showing deleted articles, you can just -delete them. - -@node A note on namespaces -@subsection A note on namespaces -@cindex IMAP namespace -@cindex namespaces - -The @acronym{IMAP} protocol has a concept called namespaces, described -by the following text in the RFC2060: - -@display -5.1.2. Mailbox Namespace Naming Convention - - By convention, the first hierarchical element of any mailbox name - which begins with "#" identifies the "namespace" of the remainder of - the name. This makes it possible to disambiguate between different - types of mailbox stores, each of which have their own namespaces. - - For example, implementations which offer access to USENET - newsgroups MAY use the "#news" namespace to partition the USENET - newsgroup namespace from that of other mailboxes. Thus, the - comp.mail.misc newsgroup would have an mailbox name of - "#news.comp.mail.misc", and the name "comp.mail.misc" could refer - to a different object (e.g. a user's private mailbox). -@end display - -While there is nothing in this text that warrants concern for the -@acronym{IMAP} implementation in Gnus, some servers use namespace -prefixes in a way that does not work with how Gnus uses mailbox names. - -Specifically, University of Washington's @acronym{IMAP} server uses -mailbox names like @code{#driver.mbx/read-mail} which are valid only -in the @sc{create} and @sc{append} commands. After the mailbox is -created (or a messages is appended to a mailbox), it must be accessed -without the namespace prefix, i.e. @code{read-mail}. Since Gnus do -not make it possible for the user to guarantee that user entered -mailbox names will only be used with the CREATE and APPEND commands, -you should simply not use the namespace prefixed mailbox names in -Gnus. - -See the UoW IMAPD documentation for the @code{#driver.*/} prefix -for more information on how to use the prefixes. They are a power -tool and should be used only if you are sure what the effects are. - -@node Debugging IMAP -@subsection Debugging IMAP -@cindex IMAP debugging -@cindex protocol dump (IMAP) - -@acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or -@acronym{POP3}. Implementation bugs are not unlikely, and we do our -best to fix them right away. If you encounter odd behavior, chances -are that either the server or Gnus is buggy. - -If you are familiar with network protocols in general, you will -probably be able to extract some clues from the protocol dump of the -exchanges between Gnus and the server. Even if you are not familiar -with network protocols, when you include the protocol dump in -@acronym{IMAP}-related bug reports you are helping us with data -critical to solving the problem. Therefore, we strongly encourage you -to include the protocol dump when reporting IMAP bugs in Gnus. - - -@vindex imap-log -Because the protocol dump, when enabled, generates lots of data, it is -disabled by default. You can enable it by setting @code{imap-log} as -follows: - -@lisp -(setq imap-log t) -@end lisp - -This instructs the @code{imap.el} package to log any exchanges with -the server. The log is stored in the buffer @samp{*imap-log*}. Look -for error messages, which sometimes are tagged with the keyword -@code{BAD}---but when submitting a bug, make sure to include all the -data. - @node Other Sources @section Other Sources @@ -22369,7 +21731,6 @@ * Highlighting and Menus:: Making buffers look all nice and cozy. * Buttons:: Get tendinitis in ten easy steps! * Daemons:: Gnus can do things behind your back. -* NoCeM:: How to avoid spam and other fatty foods. * Undo:: Some actions can be undone. * Predicate Specifiers:: Specifying predicates. * Moderation:: What to do if you're a moderator. @@ -23388,13 +22749,12 @@ (gnus-demon-add-handler 'gnus-demon-close-connections 30 t) @end lisp -@findex gnus-demon-add-nocem @findex gnus-demon-add-scanmail @findex gnus-demon-add-rescan @findex gnus-demon-add-scan-timestamps @findex gnus-demon-add-disconnection Some ready-made functions to do this have been created: -@code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, +@code{gnus-demon-add-disconnection}, @code{gnus-demon-add-nntp-close-connection}, @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and @code{gnus-demon-add-scanmail}. Just put those functions in your @@ -23413,152 +22773,6 @@ behave. -@node NoCeM -@section NoCeM -@cindex nocem -@cindex spam - -@dfn{Spamming} is posting the same article lots and lots of times. -Spamming is bad. Spamming is evil. - -Spamming is usually canceled within a day or so by various anti-spamming -agencies. These agencies usually also send out @dfn{NoCeM} messages. -NoCeM is pronounced ``no see-'em'', and means what the name -implies---these are messages that make the offending articles, like, go -away. - -What use are these NoCeM messages if the articles are canceled anyway? -Some sites do not honor cancel messages and some sites just honor cancels -from a select few people. Then you may wish to make use of the NoCeM -messages, which are distributed in the newsgroups -@samp{news.lists.filters}, @samp{alt.nocem.misc}, etc. - -Gnus can read and parse the messages in this group automatically, and -this will make spam disappear. - -There are some variables to customize, of course: - -@table @code -@item gnus-use-nocem -@vindex gnus-use-nocem -Set this variable to @code{t} to set the ball rolling. It is @code{nil} -by default. - -You can also set this variable to a positive number as a group level. -In that case, Gnus scans NoCeM messages when checking new news if this -value is not exceeding a group level that you specify as the prefix -argument to some commands, e.g. @code{gnus}, -@code{gnus-group-get-new-news}, etc. Otherwise, Gnus does not scan -NoCeM messages if you specify a group level that is smaller than this -value to those commands. For example, if you use 1 or 2 on the mail -groups and the levels on the news groups remain the default, 3 is the -best choice. - -@item gnus-nocem-groups -@vindex gnus-nocem-groups -Gnus will look for NoCeM messages in the groups in this list. The -default is -@lisp -("news.lists.filters" "alt.nocem.misc") -@end lisp - -@item gnus-nocem-issuers -@vindex gnus-nocem-issuers -There are many people issuing NoCeM messages. This list says what -people you want to listen to. The default is: - -@lisp -("Adri Verhoef" - "alba-nocem@@albasani.net" - "bleachbot@@httrack.com" - "news@@arcor-online.net" - "news@@uni-berlin.de" - "nocem@@arcor.de" - "pgpmoose@@killfile.org" - "xjsppl@@gmx.de") -@end lisp - -Known despammers that you can put in this list are listed at@* -@uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}. - -You do not have to heed NoCeM messages from all these people---just the -ones you want to listen to. You also don't have to accept all NoCeM -messages from the people you like. Each NoCeM message has a @dfn{type} -header that gives the message a (more or less, usually less) rigorous -definition. Common types are @samp{spam}, @samp{spew}, @samp{mmf}, -@samp{binary}, and @samp{troll}. To specify this, you have to use -@code{(@var{issuer} @var{conditions} @dots{})} elements in the list. -Each condition is either a string (which is a regexp that matches types -you want to use) or a list on the form @code{(not @var{string})}, where -@var{string} is a regexp that matches types you don't want to use. - -For instance, if you want all NoCeM messages from Chris Lewis except his -@samp{troll} messages, you'd say: - -@lisp -("clewis@@ferret.ocunix.on.ca" ".*" (not "troll")) -@end lisp - -On the other hand, if you just want nothing but his @samp{spam} and -@samp{spew} messages, you'd say: - -@lisp -("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam") -@end lisp - -The specs are applied left-to-right. - - -@item gnus-nocem-verifyer -@vindex gnus-nocem-verifyer -@findex gnus-nocem-epg-verify -@findex pgg-verify -This should be a function for verifying that the NoCeM issuer is who she -says she is. This variable defaults to @code{gnus-nocem-epg-verify} if -EasyPG is available, otherwise defaults to @code{pgg-verify}. The -function should return non-@code{nil} if the verification is successful, -otherwise (including the case the NoCeM message was not signed) should -return @code{nil}. If this is too slow and you don't care for -verification (which may be dangerous), you can set this variable to -@code{nil}. - -Formerly the default was @code{mc-verify}, which is a Mailcrypt -function. While you can still use it, you can change it into -@code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if -you are willing to add the @acronym{PGP} public keys to GnuPG's keyring. - -@item gnus-nocem-directory -@vindex gnus-nocem-directory -This is where Gnus will store its NoCeM cache files. The default is@* -@file{~/News/NoCeM/}. - -@item gnus-nocem-expiry-wait -@vindex gnus-nocem-expiry-wait -The number of days before removing old NoCeM entries from the cache. -The default is 15. If you make it shorter Gnus will be faster, but you -might then see old spam. - -@item gnus-nocem-check-from -@vindex gnus-nocem-check-from -Non-@code{nil} means check for valid issuers in message bodies. -Otherwise don't bother fetching articles unless their author matches a -valid issuer; that is much faster if you are selective about the -issuers. - -@item gnus-nocem-check-article-limit -@vindex gnus-nocem-check-article-limit -If non-@code{nil}, the maximum number of articles to check in any NoCeM -group. @code{nil} means no restriction. NoCeM groups can be huge and -very slow to process. - -@end table - -Using NoCeM could potentially be a memory hog. If you have many living -(i. e., subscribed or unsubscribed groups), your Emacs process will grow -big. If this is a problem, you should kill off all (or most) of your -unsubscribed groups (@pxref{Subscription Commands}). - - @node Undo @section Undo @cindex undo @@ -24398,7 +23612,7 @@ Note that with the nnimap back end, message bodies will not be downloaded by default. You need to set @code{nnimap-split-download-body} to @code{t} to do that -(@pxref{Splitting in IMAP}). +(@pxref{Client-Side @acronym{IMAP} Splitting}). That is about it. As some spam is likely to get through anyway, you might want to have a nifty function to call when you happen to read @@ -24680,14 +23894,14 @@ @vindex nnimap-split-download-body Note for IMAP users: if you use the @code{spam-check-bogofilter}, @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends, -you should also set the variable @code{nnimap-split-download-body} -to @code{t}. These spam back ends are most useful when they can -``scan'' the full message body. By default, the nnimap back end only -retrieves the message headers; @code{nnimap-split-download-body} tells -it to retrieve the message bodies as well. We don't set this by -default because it will slow @acronym{IMAP} down, and that is not an -appropriate decision to make on behalf of the user. @xref{Splitting -in IMAP}. +you should also set the variable @code{nnimap-split-download-body} to +@code{t}. These spam back ends are most useful when they can ``scan'' +the full message body. By default, the nnimap back end only retrieves +the message headers; @code{nnimap-split-download-body} tells it to +retrieve the message bodies as well. We don't set this by default +because it will slow @acronym{IMAP} down, and that is not an +appropriate decision to make on behalf of the user. @xref{Client-Side +@acronym{IMAP} Splitting}. You have to specify one or more spam back ends for @code{spam-split} to use, by setting the @code{spam-use-*} variables. @xref{Spam Back @@ -27604,13 +26818,6 @@ @end iftex @item -Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}). - -@lisp -(setq gnus-use-nocem t) -@end lisp - -@item Groups can be made permanently visible (@pxref{Listing Groups}). @lisp === removed file 'lisp/gnus/earcon.el' --- lisp/gnus/earcon.el 2010-09-18 10:02:19 +0000 +++ lisp/gnus/earcon.el 1970-01-01 00:00:00 +0000 @@ -1,230 +0,0 @@ -;;; earcon.el --- Sound effects for messages - -;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -;; Author: Steven L. Baur - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: -;; This file provides access to sound effects in Gnus. - -;;; Code: - -(eval-when-compile (require 'cl)) -(require 'gnus) -(require 'gnus-audio) -(require 'gnus-art) - -(defgroup earcon nil - "Turn ** sounds ** into noise." - :group 'gnus-visual) - -(defcustom earcon-prefix "**" - "*String denoting the start of an earcon." - :type 'string - :group 'earcon) - -(defcustom earcon-suffix "**" - "String denoting the end of an earcon." - :type 'string - :group 'earcon) - -(defcustom earcon-regexp-alist - '(("boring" 1 "Boring.au") - ("evil[ \t]+laugh" 1 "Evil_Laugh.au") - ("gag\\|puke" 1 "Puke.au") - ("snicker" 1 "Snicker.au") - ("meow" 1 "catmeow.wav") - ("sob\\|boohoo" 1 "cry.wav") - ("drum[ \t]*roll" 1 "drumroll.au") - ("blast" 1 "explosion.au") - ("flush\\|plonk!*" 1 "flush.au") - ("kiss" 1 "kiss.wav") - ("tee[ \t]*hee" 1 "laugh.au") - ("shoot" 1 "shotgun.wav") - ("yawn" 1 "snore.wav") - ("cackle" 1 "witch.au") - ("yell\\|roar" 1 "yell2.au") - ("whoop-de-doo" 1 "whistle.au")) - "*A list of regexps to map earcons to real sounds." - :type '(repeat (list regexp - (integer :tag "Match") - (string :tag "Sound"))) - :group 'earcon) -(defvar earcon-button-marker-list nil) -(make-variable-buffer-local 'earcon-button-marker-list) - -;;; FIXME!! clone of code from gnus-vis.el FIXME!! -(defun earcon-article-push-button (event) - "Check text under the mouse pointer for a callback function. -If the text under the mouse pointer has a `earcon-callback' property, -call it with the value of the `earcon-data' text property." - (interactive "e") - (set-buffer (window-buffer (posn-window (event-start event)))) - (let* ((pos (posn-point (event-start event))) - (data (get-text-property pos 'earcon-data)) - (fun (get-text-property pos 'earcon-callback))) - (if fun (funcall fun data)))) - -(defun earcon-article-press-button () - "Check text at point for a callback function. -If the text at point has a `earcon-callback' property, -call it with the value of the `earcon-data' text property." - (interactive) - (let* ((data (get-text-property (point) 'earcon-data)) - (fun (get-text-property (point) 'earcon-callback))) - (if fun (funcall fun data)))) - -(defun earcon-article-prev-button (n) - "Move point to N buttons backward. -If N is negative, move forward instead." - (interactive "p") - (earcon-article-next-button (- n))) - -(defun earcon-article-next-button (n) - "Move point to N buttons forward. -If N is negative, move backward instead." - (interactive "p") - (let ((function (if (< n 0) 'previous-single-property-change - 'next-single-property-change)) - (inhibit-point-motion-hooks t) - (backward (< n 0)) - (limit (if (< n 0) (point-min) (point-max)))) - (setq n (abs n)) - (while (and (not (= limit (point))) - (> n 0)) - ;; Skip past the current button. - (when (get-text-property (point) 'earcon-callback) - (goto-char (funcall function (point) 'earcon-callback nil limit))) - ;; Go to the next (or previous) button. - (gnus-goto-char (funcall function (point) 'earcon-callback nil limit)) - ;; Put point at the start of the button. - (when (and backward (not (get-text-property (point) 'earcon-callback))) - (goto-char (funcall function (point) 'earcon-callback nil limit))) - ;; Skip past intangible buttons. - (when (get-text-property (point) 'intangible) - (incf n)) - (decf n)) - (unless (zerop n) - (gnus-message 5 "No more buttons")) - n)) - -(defun earcon-article-add-button (from to fun &optional data) - "Create a button between FROM and TO with callback FUN and data DATA." - (and (boundp gnus-article-button-face) - gnus-article-button-face - (gnus-overlay-put (gnus-make-overlay from to) - 'face gnus-article-button-face)) - (gnus-add-text-properties - from to - (nconc (and gnus-article-mouse-face - (list gnus-mouse-face-prop gnus-article-mouse-face)) - (list 'gnus-callback fun) - (and data (list 'gnus-data data))))) - -(defun earcon-button-entry () - ;; Return the first entry in `gnus-button-alist' matching this place. - (let ((alist earcon-regexp-alist) - (case-fold-search t) - (entry nil)) - (while alist - (setq entry (pop alist)) - (if (looking-at (car entry)) - (setq alist nil) - (setq entry nil))) - entry)) - -(defun earcon-button-push (marker) - ;; Push button starting at MARKER. - (with-current-buffer gnus-article-buffer - (goto-char marker) - (let* ((entry (earcon-button-entry)) - (inhibit-point-motion-hooks t) - (fun 'gnus-audio-play) - (args (list (nth 2 entry)))) - (cond - ((fboundp fun) - (apply fun args)) - ((and (boundp fun) - (fboundp (symbol-value fun))) - (apply (symbol-value fun) args)) - (t - (gnus-message 1 "You must define `%S' to use this button" - (cons fun args))))))) - -;;; FIXME!! clone of code from gnus-vis.el FIXME!! - -;;;###interactive -(defun earcon-region (beg end) - "Play Sounds in the region between point and mark." - (interactive "r") - (earcon-buffer (current-buffer) beg end)) - -;;;###interactive -(defun earcon-buffer (&optional buffer st nd) - (interactive) - (save-excursion - ;; clear old markers. - (if (boundp 'earcon-button-marker-list) - (while earcon-button-marker-list - (set-marker (pop earcon-button-marker-list) nil)) - (setq earcon-button-marker-list nil)) - (and buffer (set-buffer buffer)) - (let ((buffer-read-only nil) - (inhibit-point-motion-hooks t) - (case-fold-search t) - (alist earcon-regexp-alist) - beg entry regexp) - (goto-char (point-min)) - (setq beg (point)) - (while (setq entry (pop alist)) - (setq regexp (concat (regexp-quote earcon-prefix) - ".*\\(" - (car entry) - "\\).*" - (regexp-quote earcon-suffix))) - (goto-char beg) - (while (re-search-forward regexp nil t) - (let* ((start (and entry (match-beginning 1))) - (end (and entry (match-end 1))) - (from (match-beginning 1))) - (earcon-article-add-button - start end 'earcon-button-push - (car (push (set-marker (make-marker) from) - earcon-button-marker-list))) - (gnus-audio-play (caddr entry)))))))) - -;;;###autoload -(defun gnus-earcon-display () - "Play sounds in message buffers." - (interactive) - (with-current-buffer gnus-article-buffer - (goto-char (point-min)) - ;; Skip headers - (unless (search-forward "\n\n" nil t) - (goto-char (point-max))) - (sit-for 0) - (earcon-buffer (current-buffer) (point)))) - -;;;*** - -(provide 'earcon) - -(run-hooks 'earcon-load-hook) - -;;; earcon.el ends here === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-09-25 14:05:46 +0000 +++ lisp/gnus/gnus-art.el 2010-09-26 04:03:19 +0000 @@ -257,6 +257,22 @@ (regexp :value ".*")) :group 'gnus-article-signature) +(defcustom gnus-fetch-partial-articles nil + "If non-nil, Gnus will fetch partial articles. +If t, nnimap will fetch only the first part. If a string, it +will fetch all parts that have types that match that string. A +likely value would be \"text/\" to automatically fetch all +textual parts. + +Currently only the nnimap backend actually supports partial +article fetching. If the backend doesn't support it, it has no +effect." + :version "24.1" + :type '(choice (const nil) + (const t) + (regexp)) + :group 'gnus-article) + (defcustom gnus-hidden-properties '(invisible t intangible t) "Property list to use for hiding text." :type 'sexp @@ -1598,15 +1614,6 @@ :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) -(defcustom gnus-treat-play-sounds nil - "Play sounds. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :version "21.1" - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-custom) - (defcustom gnus-treat-x-pgp-sig nil "Verify X-PGP-Sig. To automatically treat X-PGP-Sig, set it to head. @@ -1711,8 +1718,7 @@ (gnus-treat-hide-citation gnus-article-hide-citation) (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe) (gnus-treat-highlight-citation gnus-article-highlight-citation) - (gnus-treat-body-boundary gnus-article-treat-body-boundary) - (gnus-treat-play-sounds gnus-earcon-display))) + (gnus-treat-body-boundary gnus-article-treat-body-boundary))) (defvar gnus-article-mime-handle-alist nil) (defvar article-lapsed-timer nil) @@ -5075,7 +5081,10 @@ "|\n" "| Type: " type "\n" "| Filename: " filename "\n" - "| Size (encoded): " bsize " Byte\n" + "| Size (encoded): " bsize (format " byte%s\n" + (if (= bsize 1) + "" + "s")) (when description (concat "| Description: " description "\n")) "`----\n")) @@ -7030,9 +7039,7 @@ (gnus-backlog-remove-article (car gnus-article-current) (cdr gnus-article-current))) ;; Flush original article as well. - (when (get-buffer gnus-original-article-buffer) - (with-current-buffer gnus-original-article-buffer - (setq gnus-original-article nil))) + (gnus-flush-original-article-buffer) (when gnus-use-cache (gnus-cache-update-article (car gnus-article-current) (cdr gnus-article-current))) @@ -7046,6 +7053,11 @@ (set-window-point (get-buffer-window buf) (point))) (gnus-summary-show-article)) +(defun gnus-flush-original-article-buffer () + (when (get-buffer gnus-original-article-buffer) + (with-current-buffer gnus-original-article-buffer + (setq gnus-original-article nil)))) + (defun gnus-article-edit-exit () "Exit the article editing without updating." (interactive) @@ -7134,46 +7146,6 @@ (function :tag "Other")) :group 'gnus-article-buttons) -(defcustom gnus-ctan-url "http://tug.ctan.org/tex-archive/" - "Top directory of a CTAN \(Comprehensive TeX Archive Network\) archive. -If the default site is too slow, try to find a CTAN mirror, see -. See also -the variable `gnus-button-handle-ctan'." - :version "22.1" - :group 'gnus-article-buttons - :link '(custom-manual "(gnus)Group Parameters") - :type '(choice (const "http://www.tex.ac.uk/tex-archive/") - (const "http://tug.ctan.org/tex-archive/") - (const "http://www.dante.de/CTAN/") - (string :tag "Other"))) - -(defcustom gnus-button-ctan-handler 'browse-url - "Function to use for displaying CTAN links. -The function must take one argument, the string naming the URL." - :version "22.1" - :type '(choice (function-item :tag "Browse Url" browse-url) - (function :tag "Other")) - :group 'gnus-article-buttons) - -(defcustom gnus-button-handle-ctan-bogus-regexp "^/?tex-archive/\\|^/" - "Bogus strings removed from CTAN URLs." - :version "22.1" - :group 'gnus-article-buttons - :type '(choice (const "^/?tex-archive/\\|/") - (regexp :tag "Other"))) - -(defcustom gnus-button-ctan-directory-regexp - (regexp-opt - (list "archive-tools" "biblio" "bibliography" "digests" "documentation" - "dviware" "fonts" "graphics" "help" "indexing" "info" "language" - "languages" "macros" "nonfree" "obsolete" "support" "systems" - "tds" "tools" "usergrps" "web") t) - "Regular expression for ctan directories. -It should match all directories in the top level of `gnus-ctan-url'." - :version "22.1" - :group 'gnus-article-buttons - :type 'regexp) - (defcustom gnus-button-mid-or-mail-regexp (concat "\\b\\(= gnus-button-message-level 0) gnus-url-mailto 1) ("\\bmailto:\\([^ \n\t]+\\)" 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) - ;; CTAN - ((concat "\\bCTAN:[ \t\n]?[^>)!;:,'\n\t ]*\\(" - gnus-button-ctan-directory-regexp - "[^][>)!;:,'\n\t ]+\\)") - 0 (>= gnus-button-tex-level 1) gnus-button-handle-ctan 1) - ((concat "\\btex-archive/\\(" - gnus-button-ctan-directory-regexp - "/[-_.a-z0-9/]+[-_./a-z0-9]+[/a-z0-9]\\)") - 1 (>= gnus-button-tex-level 6) gnus-button-handle-ctan 1) - ((concat - "\\b\\(" - gnus-button-ctan-directory-regexp - "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") - 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) ;; Info Konqueror style . ;; Must come before " Gnus home-grown style". ("\\binfo://?\\([^'\">\n\t]+\\)" @@ -8512,9 +8450,7 @@ (when gnus-keep-backlog (gnus-backlog-remove-article (car gnus-article-current) (cdr gnus-article-current))) - (when (get-buffer gnus-original-article-buffer) - (with-current-buffer gnus-original-article-buffer - (setq gnus-original-article nil))) + (gnus-flush-original-article-buffer) (when gnus-use-cache (gnus-cache-update-article (car gnus-article-current) (cdr gnus-article-current)))))))) === removed file 'lisp/gnus/gnus-audio.el' --- lisp/gnus/gnus-audio.el 2010-09-24 07:25:37 +0000 +++ lisp/gnus/gnus-audio.el 1970-01-01 00:00:00 +0000 @@ -1,149 +0,0 @@ -;;; gnus-audio.el --- Sound effects for Gnus - -;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -;; Author: Steven L. Baur -;; Keywords: news, mail, multimedia - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; This file provides access to sound effects in Gnus. -;; This file is partially stripped to support earcons.el. - -;;; Code: - -(require 'nnheader) - -(defgroup gnus-audio nil - "Playing sound in Gnus." - :version "21.1" - :group 'gnus-visual - :group 'multimedia) - -(defvar gnus-audio-inline-sound - (or (if (fboundp 'device-sound-enabled-p) - (device-sound-enabled-p)) ; XEmacs - (fboundp 'play-sound)) ; Emacs - "Non-nil means try to play sounds without using an external program.") - -(defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds") - "The directory containing the Sound Files." - :type '(choice directory (const nil)) - :group 'gnus-audio) - -(defcustom gnus-audio-au-player (executable-find "play") - "Executable program for playing sun AU format sound files." - :group 'gnus-audio - :type '(choice file (const nil))) - -(defcustom gnus-audio-wav-player (executable-find "play") - "Executable program for playing WAV files." - :group 'gnus-audio - :type '(choice file (const nil))) - -;;; The following isn't implemented yet. Wait for Millennium Gnus. -;;(defvar gnus-audio-effects-enabled t -;; "When t, Gnus will use sound effects.") -;;(defvar gnus-audio-enable-hooks nil -;; "Functions run when enabling sound effects.") -;;(defvar gnus-audio-disable-hooks nil -;; "Functions run when disabling sound effects.") -;;(defvar gnus-audio-theme-song nil -;; "Theme song for Gnus.") -;;(defvar gnus-audio-enter-group nil -;; "Sound effect played when selecting a group.") -;;(defvar gnus-audio-exit-group nil -;; "Sound effect played when exiting a group.") -;;(defvar gnus-audio-score-group nil -;; "Sound effect played when scoring a group.") -;;(defvar gnus-audio-busy-sound nil -;; "Sound effect played when going into a ... sequence.") - - -;;;###autoload -;;(defun gnus-audio-enable-sound () -;; "Enable Sound Effects for Gnus." -;; (interactive) -;; (setq gnus-audio-effects-enabled t) -;; (gnus-run-hooks gnus-audio-enable-hooks)) - -;;;###autoload - ;(defun gnus-audio-disable-sound () -;; "Disable Sound Effects for Gnus." -;; (interactive) -;; (setq gnus-audio-effects-enabled nil) -;; (gnus-run-hooks gnus-audio-disable-hooks)) - -;;;###autoload -(defun gnus-audio-play (file) - "Play a sound FILE through the speaker." - (interactive "fSound file name: ") - (let ((sound-file (if (file-exists-p file) - file - (expand-file-name file gnus-audio-directory)))) - (when (file-exists-p sound-file) - (cond ((and gnus-audio-inline-sound - (condition-case nil - ;; Even if we have audio, we may fail with the - ;; wrong sort of sound file. - (progn (play-sound-file sound-file) - t) - (error nil)))) - ;; If we don't have built-in sound, or playing it failed, - ;; try with external program. - ((equal "wav" (file-name-extension sound-file)) - (call-process gnus-audio-wav-player - sound-file - 0 - nil - sound-file)) - ((equal "au" (file-name-extension sound-file)) - (call-process gnus-audio-au-player - sound-file - 0 - nil - sound-file)))))) - - -;;; The following isn't implemented yet, wait for Red Gnus -;;(defun gnus-audio-startrek-sounds () -;; "Enable sounds from Star Trek the original series." -;; (interactive) -;; (setq gnus-audio-busy-sound "working.au") -;; (setq gnus-audio-enter-group "bulkhead_door.au") -;; (setq gnus-audio-exit-group "bulkhead_door.au") -;; (setq gnus-audio-score-group "ST_laser.au") -;; (setq gnus-audio-theme-song "startrek.au") -;; (add-hook 'gnus-select-group-hook 'gnus-audio-startrek-select-group) -;; (add-hook 'gnus-exit-group-hook 'gnus-audio-startrek-exit-group)) -;;;*** - -(defvar gnus-startup-jingle "Tuxedomoon.Jingle4.au" - "Name of the Gnus startup jingle file.") - -(defun gnus-play-jingle () - "Play the Gnus startup jingle, unless that's inhibited." - (interactive) - (gnus-audio-play gnus-startup-jingle)) - -(provide 'gnus-audio) - -(run-hooks 'gnus-audio-load-hook) - -;;; gnus-audio.el ends here === modified file 'lisp/gnus/gnus-cus.el' --- lisp/gnus/gnus-cus.el 2010-09-24 07:25:37 +0000 +++ lisp/gnus/gnus-cus.el 2010-09-26 04:03:19 +0000 @@ -865,11 +865,6 @@ Check the [ ] for the entries you want to apply to this score file, then edit the value to suit your taste. Don't forget to mark the checkbox, if you do all your changes will be lost. ") - (widget-create 'push-button - :action (lambda (&rest ignore) - (require 'gnus-audio) - (gnus-audio-play "Evil_Laugh.au")) - "Bhahahah!") (widget-insert "\n\n") (make-local-variable 'gnus-custom-scores) (setq gnus-custom-scores === modified file 'lisp/gnus/gnus-demon.el' --- lisp/gnus/gnus-demon.el 2010-09-18 10:02:19 +0000 +++ lisp/gnus/gnus-demon.el 2010-09-26 04:03:19 +0000 @@ -240,15 +240,6 @@ ;; this idle-cycle. (push (car handler) gnus-demon-idle-has-been-called))))))))) -(defun gnus-demon-add-nocem () - "Add daemonic NoCeM handling to Gnus." - (gnus-demon-add-handler 'gnus-demon-scan-nocem 60 30)) - -(defun gnus-demon-scan-nocem () - "Scan NoCeM groups for NoCeM messages." - (save-window-excursion - (gnus-nocem-scan-groups))) - (defun gnus-demon-add-disconnection () "Add daemonic server disconnection to Gnus." (gnus-demon-add-handler 'gnus-demon-close-connections nil 30)) === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/gnus-group.el 2010-09-26 04:03:19 +0000 @@ -2418,6 +2418,14 @@ (let ((tmpfile (mm-make-temp-file "gnus-temp-group-"))) (with-temp-file tmpfile (url-insert-file-contents (format mbox-url number)) + (goto-char (point-min)) + ;; Add the debbugs address so that we can respond to reports easily. + (while (re-search-forward "^To: " nil t) + (end-of-line) + (insert (format ", %s@%s" number + (replace-regexp-in-string + "/.*$" "" + (replace-regexp-in-string "^http://" "" mbox-url))))) (write-region (point-min) (point-max) tmpfile) (gnus-group-read-ephemeral-group "gnus-read-ephemeral-bug" @@ -3946,14 +3954,6 @@ (unless gnus-slave (gnus-master-read-slave-newsrc)) - ;; We might read in new NoCeM messages here. - (when (and gnus-use-nocem - (or (and (numberp gnus-use-nocem) - (numberp arg) - (>= arg gnus-use-nocem)) - (not arg))) - (gnus-nocem-scan-groups)) - (gnus-get-unread-articles arg) ;; If the user wants it, we scan for new groups. === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-09-24 00:38:10 +0000 +++ lisp/gnus/gnus-html.el 2010-09-26 04:03:19 +0000 @@ -104,7 +104,12 @@ (match-string 0 encoded-text))) t t encoded-text) s (1+ s))) - encoded-text))))) + encoded-text)))) + ;; XEmacs does not have window-inside-pixel-edges + (defalias 'gnus-window-inside-pixel-edges + (if (fboundp 'window-inside-pixel-edges) + 'window-inside-pixel-edges + 'window-pixel-edges))) (defun gnus-html-encode-url (url) "Encode URL." @@ -450,7 +455,7 @@ image (let* ((width (car size)) (height (cdr size)) - (edges (window-pixel-edges (get-buffer-window (current-buffer)))) + (edges (gnus-window-inside-pixel-edges (get-buffer-window (current-buffer)))) (window-width (truncate (* gnus-max-image-proportion (- (nth 2 edges) (nth 0 edges))))) (window-height (truncate (* gnus-max-image-proportion === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2010-09-23 23:14:02 +0000 +++ lisp/gnus/gnus-int.el 2010-09-26 04:03:19 +0000 @@ -181,10 +181,15 @@ (prog1 (setq result (gnus-open-server method)) (unless silent - (gnus-message 5 "Opening %s server%s...%s" (car method) - (if (equal (nth 1 method) "") "" - (format " on %s" (nth 1 method))) - (if result "done" "failed"))))))) + (gnus-message + (if result 5 3) + "Opening %s server%s...%s" (car method) + (if (equal (nth 1 method) "") "" + (format " on %s" (nth 1 method))) + (if result + "done" + (format "failed: %s" + (nnheader-get-report-string (car method)))))))))) (defun gnus-get-function (method function &optional noerror) "Return a function symbol based on METHOD and FUNCTION." @@ -265,36 +270,31 @@ (setq elem (list gnus-command-method nil) gnus-opened-servers (cons elem gnus-opened-servers))) ;; Set the status of this server. - (setcar (cdr elem) - (cond (result - (if (eq open-server-function #'nnagent-open-server) - ;; The agent's backend has a "special" status - 'offline - 'ok)) - ((and gnus-agent - (gnus-agent-method-p gnus-command-method)) - (cond (gnus-server-unopen-status - ;; Set the server's status to the unopen - ;; status. If that status is offline, - ;; recurse to open the agent's backend. - (setq open-offline (eq gnus-server-unopen-status 'offline)) - gnus-server-unopen-status) - ((and - (not gnus-batch-mode) - (gnus-y-or-n-p - (format - "Unable to open server %s (%s), go offline? " - server - (nnheader-get-report - (car gnus-command-method))))) - (setq open-offline t) - 'offline) - (t - ;; This agentized server was still denied - 'denied))) - (t - ;; This unagentized server must be denied - 'denied))) + (setcar + (cdr elem) + (cond (result + (if (eq open-server-function #'nnagent-open-server) + ;; The agent's backend has a "special" status + 'offline + 'ok)) + ((and gnus-agent + (gnus-agent-method-p gnus-command-method)) + (cond + (gnus-server-unopen-status + ;; Set the server's status to the unopen + ;; status. If that status is offline, + ;; recurse to open the agent's backend. + (setq open-offline (eq gnus-server-unopen-status 'offline)) + gnus-server-unopen-status) + ((not gnus-batch-mode) + (setq open-offline t) + 'offline) + (t + ;; This agentized server was still denied + 'denied))) + (t + ;; This unagentized server must be denied + 'denied))) ;; NOTE: I MUST set the server's status to offline before this ;; recursive call as this status will drive the === removed file 'lisp/gnus/gnus-nocem.el' --- lisp/gnus/gnus-nocem.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-nocem.el 1970-01-01 00:00:00 +0000 @@ -1,452 +0,0 @@ -;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment - -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -;; Author: Lars Magne Ingebrigtsen -;; Keywords: news - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;;; Code: - -(eval-when-compile (require 'cl)) - -(require 'gnus) -(require 'nnmail) -(require 'gnus-art) -(require 'gnus-sum) -(require 'gnus-range) - -(defgroup gnus-nocem nil - "NoCeM pseudo-cancellation treatment." - :group 'gnus-score) - -(defcustom gnus-nocem-groups - '("news.lists.filters" "alt.nocem.misc") - "*List of groups that will be searched for NoCeM messages." - :group 'gnus-nocem - :version "23.1" - :type '(repeat (string :tag "Group"))) - -(defcustom gnus-nocem-issuers - '("Adri Verhoef" - "alba-nocem@albasani.net" - "bleachbot@httrack.com" - "news@arcor-online.net" - "news@uni-berlin.de" - "nocem@arcor.de" - "pgpmoose@killfile.org" - "xjsppl@gmx.de") - "*List of NoCeM issuers to pay attention to. - -This can also be a list of `(ISSUER CONDITION ...)' elements. - -See for an -issuer registry." - :group 'gnus-nocem - :link '(url-link "http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html") - :version "23.1" - :type '(repeat (cons :format "%v" (string :tag "Issuer") - (repeat :tag "Condition" - (group (checklist :inline t (const not)) - (regexp :tag "Type" :value ".*"))))) - :get (lambda (symbol) - (mapcar (lambda (elem) - (if (consp elem) - (cons (car elem) - (mapcar (lambda (elt) - (if (consp elt) elt (list elt))) - (cdr elem))) - (list elem))) - (default-value symbol))) - :set (lambda (symbol value) - (custom-set-default - symbol - (mapcar (lambda (elem) - (if (consp elem) - (if (cdr elem) - (mapcar (lambda (elt) - (if (consp elt) - (if (cdr elt) elt (car elt)) - elt)) - elem) - (car elem)) - elem)) - value)))) - -(defcustom gnus-nocem-directory - (nnheader-concat gnus-article-save-directory "NoCeM/") - "*Directory where NoCeM files will be stored." - :group 'gnus-nocem - :type 'directory) - -(defcustom gnus-nocem-expiry-wait 15 - "*Number of days to keep NoCeM headers in the cache." - :group 'gnus-nocem - :type 'integer) - -(defcustom gnus-nocem-verifyer (if (locate-library "epg") - 'gnus-nocem-epg-verify - 'pgg-verify) - "*Function called to verify that the NoCeM message is valid. -If the function in this variable isn't bound, the message will be used -unconditionally." - :group 'gnus-nocem - :version "23.1" - :type '(radio (function-item gnus-nocem-epg-verify) - (function-item pgg-verify) - (function-item mc-verify) - (function :tag "other")) - :set (lambda (symbol value) - (custom-set-default symbol - (if (and (eq value 'gnus-nocem-epg-verify) - (not (locate-library "epg"))) - 'pgg-verify - value)))) - -(defcustom gnus-nocem-liberal-fetch nil - "*If t try to fetch all messages which have @@NCM in the subject. -Otherwise don't fetch messages which have references or whose message-id -matches a previously scanned and verified nocem message." - :group 'gnus-nocem - :type 'boolean) - -(defcustom gnus-nocem-check-article-limit 500 - "*If non-nil, the maximum number of articles to check in any NoCeM group." - :group 'gnus-nocem - :version "21.1" - :type '(choice (const :tag "unlimited" nil) - (integer 1000))) - -(defcustom gnus-nocem-check-from t - "Non-nil means check for valid issuers in message bodies. -Otherwise don't bother fetching articles unless their author matches a -valid issuer, which is much faster if you are selective about the issuers." - :group 'gnus-nocem - :version "21.1" - :type 'boolean) - -;;; Internal variables - -(defvar gnus-nocem-active nil) -(defvar gnus-nocem-alist nil) -(defvar gnus-nocem-touched-alist nil) -(defvar gnus-nocem-hashtb nil) -(defvar gnus-nocem-seen-message-ids nil) - -;;; Functions - -(defun gnus-nocem-active-file () - (concat (file-name-as-directory gnus-nocem-directory) "active")) - -(defun gnus-nocem-cache-file () - (concat (file-name-as-directory gnus-nocem-directory) "cache")) - -;; -;; faster lookups for group names: -;; - -(defvar gnus-nocem-real-group-hashtb nil - "Real-name mappings of subscribed groups.") - -(defun gnus-fill-real-hashtb () - "Fill up a hash table with the real-name mappings from the user's active file." - (if (hash-table-p gnus-nocem-real-group-hashtb) - (clrhash gnus-nocem-real-group-hashtb) - (setq gnus-nocem-real-group-hashtb (make-hash-table :test 'equal))) - (mapcar (lambda (group) - (setq group (gnus-group-real-name (car group))) - (puthash group t gnus-nocem-real-group-hashtb)) - gnus-newsrc-alist)) - -;;;###autoload -(defun gnus-nocem-scan-groups () - "Scan all NoCeM groups for new NoCeM messages." - (interactive) - (let ((groups gnus-nocem-groups) - (gnus-inhibit-demon t) - group active gactive articles check-headers) - (gnus-make-directory gnus-nocem-directory) - ;; Load any previous NoCeM headers. - (gnus-nocem-load-cache) - ;; Get the group name mappings: - (gnus-fill-real-hashtb) - ;; Read the active file if it hasn't been read yet. - (and (file-exists-p (gnus-nocem-active-file)) - (not gnus-nocem-active) - (ignore-errors - (load (gnus-nocem-active-file) t t t))) - ;; Go through all groups and see whether new articles have - ;; arrived. - (while (setq group (pop groups)) - (if (not (setq gactive (gnus-activate-group group))) - () ; This group doesn't exist. - (setq active (nth 1 (assoc group gnus-nocem-active))) - (when (and (not (< (cdr gactive) (car gactive))) ; Empty group. - (or (not active) - (< (cdr active) (cdr gactive)))) - ;; Ok, there are new articles in this group, se we fetch the - ;; headers. - (save-excursion - (let ((dependencies (make-vector 10 nil)) - headers header) - (with-temp-buffer - (setq headers - (if (eq 'nov - (gnus-retrieve-headers - (setq articles - (gnus-uncompress-range - (cons - (if active (1+ (cdr active)) - (car gactive)) - (cdr gactive)))) - group)) - (gnus-get-newsgroup-headers-xover - articles nil dependencies) - (gnus-get-newsgroup-headers dependencies))) - (while (setq header (pop headers)) - ;; We take a closer look on all articles that have - ;; "@@NCM" in the subject. Unless we already read - ;; this cross posted message. Nocem messages - ;; are not allowed to have references, so we can - ;; ignore scanning followups. - (and (string-match "@@NCM" (mail-header-subject header)) - (and gnus-nocem-check-from - (let ((case-fold-search t)) - (catch 'ok - (mapc - (lambda (author) - (if (consp author) - (setq author (car author))) - (if (string-match - author (mail-header-from header)) - (throw 'ok t))) - gnus-nocem-issuers) - nil))) - (or gnus-nocem-liberal-fetch - (and (or (string= "" (mail-header-references - header)) - (null (mail-header-references header))) - (not (member (mail-header-message-id header) - gnus-nocem-seen-message-ids)))) - (push header check-headers))) - (setq check-headers (last (nreverse check-headers) - gnus-nocem-check-article-limit)) - (let ((i 0) - (len (length check-headers))) - (dolist (h check-headers) - (gnus-message - 7 "Checking article %d in %s for NoCeM (%d of %d)..." - (mail-header-number h) group (incf i) len) - (gnus-nocem-check-article group h))))))) - (setq gnus-nocem-active - (cons (list group gactive) - (delq (assoc group gnus-nocem-active) - gnus-nocem-active))))) - ;; Save the results, if any. - (gnus-nocem-save-cache) - (gnus-nocem-save-active))) - -(defun gnus-nocem-check-article (group header) - "Check whether the current article is an NCM article and that we want it." - ;; Get the article. - (let ((date (mail-header-date header)) - (gnus-newsgroup-name group) - issuer b e type) - (when (or (not date) - (time-less-p - (time-since (date-to-time date)) - (days-to-time gnus-nocem-expiry-wait))) - (gnus-request-article-this-buffer (mail-header-number header) group) - (goto-char (point-min)) - (when (re-search-forward - "-----BEGIN PGP\\(?: SIGNED\\)? MESSAGE-----" - nil t) - (delete-region (point-min) (match-beginning 0))) - (when (re-search-forward - "-----END PGP \\(?:MESSAGE\\|SIGNATURE\\)-----\n?" - nil t) - (delete-region (match-end 0) (point-max))) - (goto-char (point-min)) - ;; The article has to have proper NoCeM headers. - (when (and (setq b (search-forward "\n@@BEGIN NCM HEADERS\n" nil t)) - (setq e (search-forward "\n@@BEGIN NCM BODY\n" nil t))) - ;; We get the name of the issuer. - (narrow-to-region b e) - (setq issuer (mail-fetch-field "issuer") - type (mail-fetch-field "type")) - (widen) - (if (not (gnus-nocem-message-wanted-p issuer type)) - (message "invalid NoCeM issuer: %s" issuer) - (and (gnus-nocem-verify-issuer issuer) ; She is who she says she is. - (gnus-nocem-enter-article) ; We gobble the message. - (push (mail-header-message-id header) ; But don't come back for - gnus-nocem-seen-message-ids))))))) ; second helpings. - -(defun gnus-nocem-message-wanted-p (issuer type) - (let ((issuers gnus-nocem-issuers) - wanted conditions condition) - (cond - ;; Do the quick check first. - ((member issuer issuers) - t) - ((setq conditions (cdr (assoc issuer issuers))) - ;; Check whether we want this type. - (while (setq condition (pop conditions)) - (cond - ((stringp condition) - (when (string-match condition type) - (setq wanted t))) - ((and (consp condition) - (eq (car condition) 'not) - (stringp (cadr condition))) - (when (string-match (cadr condition) type) - (setq wanted nil))) - (t - (error "Invalid NoCeM condition: %S" condition)))) - wanted)))) - -(defun gnus-nocem-verify-issuer (person) - "Verify using PGP that the canceler is who she says she is." - (if (functionp gnus-nocem-verifyer) - (ignore-errors - (funcall gnus-nocem-verifyer)) - ;; If we don't have Mailcrypt, then we use the message anyway. - t)) - -(defun gnus-nocem-enter-article () - "Enter the current article into the NoCeM cache." - (goto-char (point-min)) - (let ((b (search-forward "\n@@BEGIN NCM BODY\n" nil t)) - (e (search-forward "\n@@END NCM BODY\n" nil t)) - (buf (current-buffer)) - ncm id group) - (when (and b e) - (narrow-to-region b (1+ (match-beginning 0))) - (goto-char (point-min)) - (while (search-forward "\t" nil t) - (cond - ((not (ignore-errors - (setq group (gnus-group-real-name (symbol-name (read buf)))) - (gethash group gnus-nocem-real-group-hashtb))) - ;; An error. - ) - (t - ;; Valid group. - (beginning-of-line) - (while (eq (char-after) ?\t) - (forward-line -1)) - (setq id (buffer-substring (point) (1- (search-forward "\t")))) - (unless (if (hash-table-p gnus-nocem-hashtb) - (gethash id gnus-nocem-hashtb) - (setq gnus-nocem-hashtb (make-hash-table :test 'equal)) - nil) - ;; only store if not already present - (puthash id t gnus-nocem-hashtb) - (push id ncm)) - (forward-line 1) - (while (eq (char-after) ?\t) - (forward-line 1))))) - (when ncm - (setq gnus-nocem-touched-alist t) - (push (cons (let ((time (current-time))) (setcdr (cdr time) nil) time) - ncm) - gnus-nocem-alist)) - t))) - -;;;###autoload -(defun gnus-nocem-load-cache () - "Load the NoCeM cache." - (interactive) - (unless gnus-nocem-alist - ;; The buffer doesn't exist, so we create it and load the NoCeM - ;; cache. - (when (file-exists-p (gnus-nocem-cache-file)) - (load (gnus-nocem-cache-file) t t t) - (gnus-nocem-alist-to-hashtb)))) - -(defun gnus-nocem-save-cache () - "Save the NoCeM cache." - (when (and gnus-nocem-alist - gnus-nocem-touched-alist) - (with-temp-file (gnus-nocem-cache-file) - (gnus-prin1 `(setq gnus-nocem-alist ',gnus-nocem-alist))) - (setq gnus-nocem-touched-alist nil))) - -(defun gnus-nocem-save-active () - "Save the NoCeM active file." - (with-temp-file (gnus-nocem-active-file) - (gnus-prin1 `(setq gnus-nocem-active ',gnus-nocem-active)))) - -(defun gnus-nocem-alist-to-hashtb () - "Create a hashtable from the Message-IDs we have." - (let* ((alist gnus-nocem-alist) - (pprev (cons nil alist)) - (prev pprev) - (expiry (days-to-time gnus-nocem-expiry-wait)) - entry) - (if (hash-table-p gnus-nocem-hashtb) - (clrhash gnus-nocem-hashtb) - (setq gnus-nocem-hashtb (make-hash-table :test 'equal))) - (while (setq entry (car alist)) - (if (not (time-less-p (time-since (car entry)) expiry)) - ;; This entry has expired, so we remove it. - (setcdr prev (cdr alist)) - (setq prev alist) - ;; This is ok, so we enter it into the hashtable. - (setq entry (cdr entry)) - (while entry - (puthash (car entry) t gnus-nocem-hashtb) - (setq entry (cdr entry)))) - (setq alist (cdr alist))))) - -(gnus-add-shutdown 'gnus-nocem-close 'gnus) - -(defun gnus-nocem-close () - "Clear internal NoCeM variables." - (setq gnus-nocem-alist nil - gnus-nocem-hashtb nil - gnus-nocem-active nil - gnus-nocem-touched-alist nil - gnus-nocem-seen-message-ids nil - gnus-nocem-real-group-hashtb nil)) - -(defun gnus-nocem-unwanted-article-p (id) - "Say whether article ID in the current group is wanted." - (and gnus-nocem-hashtb - (gethash id gnus-nocem-hashtb))) - -(autoload 'epg-make-context "epg") -(eval-when-compile - (autoload 'epg-verify-string "epg") - (autoload 'epg-context-result-for "epg") - (autoload 'epg-signature-status "epg")) - -(defun gnus-nocem-epg-verify () - "Return t if EasyPG verifies a signed message in the current buffer." - (let ((context (epg-make-context 'OpenPGP)) - result) - (epg-verify-string context (buffer-string)) - (and (setq result (epg-context-result-for context 'verify)) - (not (cdr result)) - (eq (epg-signature-status (car result)) 'good)))) - -(provide 'gnus-nocem) - -;;; gnus-nocem.el ends here === modified file 'lisp/gnus/gnus-srvr.el' --- lisp/gnus/gnus-srvr.el 2010-09-20 00:36:54 +0000 +++ lisp/gnus/gnus-srvr.el 2010-09-26 04:03:19 +0000 @@ -28,6 +28,7 @@ (eval-when-compile (require 'cl)) (require 'gnus) +(require 'gnus-start) (require 'gnus-spec) (require 'gnus-group) (require 'gnus-int) @@ -547,6 +548,7 @@ (gnus-server-list-servers)) (defun gnus-server-copy-server (from to) + "Copy a server definiton to a new name." (interactive (list (or (gnus-server-server-name) @@ -643,6 +645,30 @@ (defvar gnus-browse-menu-hook nil "*Hook run after the creation of the browse mode menu.") +(defcustom gnus-browse-subscribe-newsgroup-method + 'gnus-subscribe-alphabetically + "Function(s) called when subscribing groups in the Browse Server Buffer +A few pre-made functions are supplied: `gnus-subscribe-randomly' +inserts new groups at the beginning of the list of groups; +`gnus-subscribe-alphabetically' inserts new groups in strict +alphabetic order; `gnus-subscribe-hierarchically' inserts new groups +in hierarchical newsgroup order; `gnus-subscribe-interactively' asks +for your decision; `gnus-subscribe-killed' kills all new groups; +`gnus-subscribe-zombies' will make all new groups into zombies; +`gnus-subscribe-topics' will enter groups into the topics that +claim them." + :version "24.1" + :group 'gnus-server + :type '(radio (function-item gnus-subscribe-randomly) + (function-item gnus-subscribe-alphabetically) + (function-item gnus-subscribe-hierarchically) + (function-item gnus-subscribe-interactively) + (function-item gnus-subscribe-killed) + (function-item gnus-subscribe-zombies) + (function-item gnus-subscribe-topics) + function + (repeat function))) + (defvar gnus-browse-mode-hook nil) (defvar gnus-browse-mode-map nil) (put 'gnus-browse-mode 'mode-class 'special) @@ -890,7 +916,9 @@ (gnus-browse-next-group (- n))) (defun gnus-browse-unsubscribe-current-group (arg) - "(Un)subscribe to the next ARG groups." + "(Un)subscribe to the next ARG groups. +The variable `gnus-browse-subscribe-newsgroup-method' determines +how new groups will be entered into the group buffer." (interactive "p") (when (eobp) (error "No group at current line")) @@ -939,22 +967,24 @@ ;; subscribe to it. (if (gnus-ephemeral-group-p group) (gnus-kill-ephemeral-group group)) - ;; We need to discern between killed/zombie groups and - ;; just unsubscribed ones. - (gnus-group-change-level - (or (gnus-group-entry group) - (list t group gnus-level-default-subscribed - nil nil (if (gnus-server-equal - gnus-browse-current-method "native") - nil - (gnus-method-simplify - gnus-browse-current-method)))) - gnus-level-default-subscribed (gnus-group-level group) - (and (car (nth 1 gnus-newsrc-alist)) - (gnus-group-entry (car (nth 1 gnus-newsrc-alist)))) - (null (gnus-group-entry group))) + (let ((entry (gnus-group-entry group))) + (if entry + ;; Just change the subscription level if it is an + ;; unsubscribed group. + (gnus-group-change-level entry + gnus-level-default-subscribed) + ;; If it is a killed group or a zombie, feed it to the + ;; mechanism for new group subscription. + (gnus-call-subscribe-functions + gnus-browse-subscribe-newsgroup-method + group))) (delete-char 1) - (insert ? )) + (insert (let ((lvl (gnus-group-level group))) + (cond + ((< lvl gnus-level-unsubscribed) ? ) + ((< lvl gnus-level-zombie) ?U) + ((< lvl gnus-level-killed) ?Z) + (t ?K))))) (gnus-group-change-level group gnus-level-unsubscribed gnus-level-default-subscribed) (delete-char 1) === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2010-09-24 07:19:38 +0000 +++ lisp/gnus/gnus-start.el 2010-09-26 04:03:19 +0000 @@ -1063,15 +1063,6 @@ (gnus-server-opened gnus-select-method)) (gnus-check-bogus-newsgroups)) - ;; We might read in new NoCeM messages here. - (when (and (not dont-connect) - gnus-use-nocem - (or (and (numberp gnus-use-nocem) - (numberp level) - (>= level gnus-use-nocem)) - (not level))) - (gnus-nocem-scan-groups)) - ;; Read any slave files. (gnus-master-read-slave-newsrc) @@ -1767,8 +1758,10 @@ (not (gnus-method-denied-p method))) (unless (gnus-server-opened method) (gnus-open-server method)) - (when (gnus-check-backend-function - 'retrieve-group-data-early (car method)) + (when (and + (gnus-server-opened method) + (gnus-check-backend-function + 'retrieve-group-data-early (car method))) (when (gnus-check-backend-function 'request-scan (car method)) (gnus-request-scan nil method)) (setcar (nthcdr 3 elem) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/gnus-sum.el 2010-09-26 04:03:19 +0000 @@ -2047,6 +2047,7 @@ "e" gnus-summary-end-of-article "^" gnus-summary-refer-parent-article "r" gnus-summary-refer-parent-article + "C" gnus-summary-show-complete-article "D" gnus-summary-enter-digest-group "R" gnus-summary-refer-references "T" gnus-summary-refer-thread @@ -8645,8 +8646,7 @@ (null gnus-summary-expunge-below) (not (eq gnus-build-sparse-threads 'some)) (not (eq gnus-build-sparse-threads 'more)) - (null gnus-thread-expunge-below) - (not gnus-use-nocem))) + (null gnus-thread-expunge-below))) (push gnus-newsgroup-limit gnus-newsgroup-limits) (setq gnus-newsgroup-limit nil) (mapatoms @@ -8729,14 +8729,7 @@ t) ;; Do the `display' group parameter. (and gnus-newsgroup-display - (not (funcall gnus-newsgroup-display))) - ;; Check NoCeM things. - (when (and gnus-use-nocem - (gnus-nocem-unwanted-article-p - (mail-header-id (car thread)))) - (setq gnus-newsgroup-unreads - (delq number gnus-newsgroup-unreads)) - t))) + (not (funcall gnus-newsgroup-display))))) ;; Nope, invisible article. 0 ;; Ok, this article is to be visible, so we add it to the limit @@ -9357,6 +9350,18 @@ (ps-spool-buffer))))) (kill-buffer buffer)))) +(defun gnus-summary-show-complete-article () + "Show a complete version of the current article. +This is only useful if you're looking at a partial version of the +article currently." + (interactive) + (let ((gnus-keep-backlog nil) + (gnus-use-cache nil) + (gnus-agent nil) + (gnus-fetch-partial-articles nil)) + (gnus-flush-original-article-buffer) + (gnus-summary-show-article))) + (defun gnus-summary-show-article (&optional arg) "Force redisplaying of the current article. If ARG (the prefix) is a number, show the article with the charset === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-09-25 14:19:38 +0000 +++ lisp/gnus/gnus.el 2010-09-26 04:03:19 +0000 @@ -308,11 +308,6 @@ :group 'gnus-start :type 'boolean) -(defcustom gnus-play-startup-jingle nil - "If non-nil, play the Gnus jingle at startup." - :group 'gnus-start - :type 'boolean) - (unless (fboundp 'gnus-group-remove-excess-properties) (defalias 'gnus-group-remove-excess-properties 'ignore)) @@ -960,8 +955,6 @@ (defvar gnus-group-buffer "*Group*") -(autoload 'gnus-play-jingle "gnus-audio") - (defface gnus-splash '((((class color) (background dark)) @@ -984,9 +977,7 @@ (erase-buffer) (unless gnus-inhibit-startup-message (gnus-group-startup-message) - (sit-for 0) - (when gnus-play-startup-jingle - (gnus-play-jingle)))))) + (sit-for 0))))) (defun gnus-indent-rigidly (start end arg) "Indent rigidly using only spaces and no tabs." @@ -1580,25 +1571,6 @@ (sexp :format "all" :value t))) -(defcustom gnus-use-nocem nil - "*If non-nil, Gnus will read NoCeM cancel messages. -You can also set this variable to a positive number as a group level. -In that case, Gnus scans NoCeM messages when checking new news if this -value is not exceeding a group level that you specify as the prefix -argument to some commands, e.g. `gnus', `gnus-group-get-new-news', etc. -Otherwise, Gnus does not scan NoCeM messages if you specify a group -level to those commands." - :group 'gnus-meta - :type '(choice - (const :tag "off" nil) - (const :tag "on" t) - (list :convert-widget - (lambda (widget) - (list 'integer :tag "group level" - :value (if (boundp 'gnus-level-default-subscribed) - gnus-level-default-subscribed - 3)))))) - (defcustom gnus-suppress-duplicates nil "*If non-nil, Gnus will mark duplicate copies of the same article as read." :group 'gnus-meta @@ -2813,13 +2785,12 @@ rmail-summary-exists rmail-select-summary) ;; Only used in gnus-util, which has an autoload. ("rmailsum" rmail-update-summary) - ("gnus-audio" :interactive t gnus-audio-play) ("gnus-xmas" gnus-xmas-splash) ("score-mode" :interactive t gnus-score-mode) ("gnus-mh" gnus-summary-save-article-folder gnus-Folder-save-name gnus-folder-save-name) ("gnus-mh" :interactive t gnus-summary-save-in-folder) - ("gnus-demon" gnus-demon-add-nocem gnus-demon-add-scanmail + ("gnus-demon" gnus-demon-add-scanmail gnus-demon-add-rescan gnus-demon-add-scan-timestamps gnus-demon-add-disconnection gnus-demon-add-handler gnus-demon-remove-handler) @@ -2830,8 +2801,6 @@ gnus-face-from-file) ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer) - ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close - gnus-nocem-unwanted-article-p) ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info gnus-server-server-name) ("gnus-srvr" gnus-browse-foreign-server) @@ -4395,7 +4364,7 @@ ;; When using the development version of Gnus, load the gnus-load ;; file. (unless (string-match "^Gnus" gnus-version) - (load "gnus-load")) + (load "gnus-load" nil t)) (unless (byte-code-function-p (symbol-function 'gnus)) (message "You should byte-compile Gnus") (sit-for 2)) === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-09-18 10:02:19 +0000 +++ lisp/gnus/mm-decode.el 2010-09-26 04:03:19 +0000 @@ -1147,13 +1147,15 @@ ;; time to adjust it, since we know at this point that it should ;; be unibyte. `(let* ((handle ,handle)) - (with-temp-buffer - (mm-disable-multibyte) - (insert-buffer-substring (mm-handle-buffer handle)) - (mm-decode-content-transfer-encoding - (mm-handle-encoding handle) - (mm-handle-media-type handle)) - ,@forms))) + (when (and (mm-handle-buffer handle) + (buffer-name (mm-handle-buffer handle))) + (with-temp-buffer + (mm-disable-multibyte) + (insert-buffer-substring (mm-handle-buffer handle)) + (mm-decode-content-transfer-encoding + (mm-handle-encoding handle) + (mm-handle-media-type handle)) + ,@forms)))) (put 'mm-with-part 'lisp-indent-function 1) (put 'mm-with-part 'edebug-form-spec '(body)) @@ -1246,9 +1248,13 @@ (setq filename (gnus-map-function mm-file-name-rewrite-functions (file-name-nondirectory filename)))) (setq file - (read-file-name (or prompt "Save MIME part to: ") + (read-file-name (or prompt + (format "Save MIME part to (default %s): " + (or filename ""))) (or mm-default-directory default-directory) - nil nil (or filename ""))) + (or filename ""))) + (when (file-directory-p file) + (setq file (expand-file-name filename file))) (setq mm-default-directory (file-name-directory file)) (and (or (not (file-exists-p file)) (yes-or-no-p (format "File %s already exists; overwrite? " === modified file 'lisp/gnus/mml1991.el' --- lisp/gnus/mml1991.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/mml1991.el 2010-09-26 04:03:19 +0000 @@ -57,8 +57,6 @@ (defvar mml1991-function-alist '((mailcrypt mml1991-mailcrypt-sign mml1991-mailcrypt-encrypt) - (gpg mml1991-gpg-sign - mml1991-gpg-encrypt) (pgg mml1991-pgg-sign mml1991-pgg-encrypt) (epg mml1991-epg-sign @@ -168,99 +166,6 @@ (insert-buffer-substring cipher) (goto-char (point-max)))))) -;;; gpg wrapper - -(autoload 'gpg-sign-cleartext "gpg") - -(declare-function gpg-sign-encrypt "ext:gpg" - (plaintext ciphertext result recipients &optional - passphrase sign-with-key armor textmode)) -(declare-function gpg-encrypt "ext:gpg" - (plaintext ciphertext result recipients &optional - passphrase armor textmode)) - -(defun mml1991-gpg-sign (cont) - (let ((text (current-buffer)) - headers signature - (result-buffer (get-buffer-create "*GPG Result*"))) - ;; Save MIME Content[^ ]+: headers from signing - (goto-char (point-min)) - (while (looking-at "^Content[^ ]+:") (forward-line)) - (unless (bobp) - (setq headers (buffer-string)) - (delete-region (point-min) (point))) - (goto-char (point-max)) - (unless (bolp) - (insert "\n")) - (quoted-printable-decode-region (point-min) (point-max)) - (with-temp-buffer - (unless (gpg-sign-cleartext text (setq signature (current-buffer)) - result-buffer - nil - (message-options-get 'message-sender)) - (unless (> (point-max) (point-min)) - (pop-to-buffer result-buffer) - (error "Sign error"))) - (goto-char (point-min)) - (while (re-search-forward "\r+$" nil t) - (replace-match "" t t)) - (quoted-printable-encode-region (point-min) (point-max)) - (set-buffer text) - (delete-region (point-min) (point-max)) - (if headers (insert headers)) - (insert "\n") - (insert-buffer-substring signature) - (goto-char (point-max))))) - -(defun mml1991-gpg-encrypt (cont &optional sign) - (let ((text (current-buffer)) - cipher - (result-buffer (get-buffer-create "*GPG Result*"))) - ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMORED - (goto-char (point-min)) - (while (looking-at "^Content[^ ]+:") (forward-line)) - (unless (bobp) - (delete-region (point-min) (point))) - (mm-with-unibyte-current-buffer - (with-temp-buffer - (inline (mm-disable-multibyte)) - (flet ((gpg-encrypt-func - (sign plaintext ciphertext result recipients &optional - passphrase sign-with-key armor textmode) - (if sign - (gpg-sign-encrypt - plaintext ciphertext result recipients passphrase - sign-with-key armor textmode) - (gpg-encrypt - plaintext ciphertext result recipients passphrase - armor textmode)))) - (unless (gpg-encrypt-func - sign - text (setq cipher (current-buffer)) - result-buffer - (split-string - (or - (message-options-get 'message-recipients) - (message-options-set 'message-recipients - (read-string "Recipients: "))) - "[ \f\t\n\r\v,]+") - nil - (message-options-get 'message-sender) - t t) ; armor & textmode - (unless (> (point-max) (point-min)) - (pop-to-buffer result-buffer) - (error "Encrypt error")))) - (goto-char (point-min)) - (while (re-search-forward "\r+$" nil t) - (replace-match "" t t)) - (set-buffer text) - (delete-region (point-min) (point-max)) - ;;(insert "Content-Type: application/pgp-encrypted\n\n") - ;;(insert "Version: 1\n\n") - (insert "\n") - (insert-buffer-substring cipher) - (goto-char (point-max)))))) - ;; pgg wrapper (defvar pgg-default-user-id) === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/mml2015.el 2010-09-26 04:03:19 +0000 @@ -63,11 +63,6 @@ (require 'pgg))) (and (fboundp 'pgg-sign-region) 'pgg)) - (progn - (ignore-errors - (require 'gpg)) - (and (fboundp 'gpg-sign-detached) - 'gpg)) (progn (ignore-errors (load "mc-toplev")) (and (fboundp 'mc-encrypt-generic) @@ -75,7 +70,7 @@ (fboundp 'mc-cleanup-recipient-headers) 'mailcrypt))) "The package used for PGP/MIME. -Valid packages include `epg', `pgg', `gpg' and `mailcrypt'.") +Valid packages include `epg', `pgg' and `mailcrypt'.") ;; Something is not RFC2015. (defvar mml2015-function-alist @@ -85,24 +80,18 @@ mml2015-mailcrypt-decrypt mml2015-mailcrypt-clear-verify mml2015-mailcrypt-clear-decrypt) - (gpg mml2015-gpg-sign - mml2015-gpg-encrypt - mml2015-gpg-verify - mml2015-gpg-decrypt - mml2015-gpg-clear-verify - mml2015-gpg-clear-decrypt) - (pgg mml2015-pgg-sign - mml2015-pgg-encrypt - mml2015-pgg-verify - mml2015-pgg-decrypt - mml2015-pgg-clear-verify - mml2015-pgg-clear-decrypt) - (epg mml2015-epg-sign - mml2015-epg-encrypt - mml2015-epg-verify - mml2015-epg-decrypt - mml2015-epg-clear-verify - mml2015-epg-clear-decrypt)) + (pgg mml2015-pgg-sign + mml2015-pgg-encrypt + mml2015-pgg-verify + mml2015-pgg-decrypt + mml2015-pgg-clear-verify + mml2015-pgg-clear-decrypt) + (epg mml2015-epg-sign + mml2015-epg-encrypt + mml2015-epg-verify + mml2015-epg-decrypt + mml2015-epg-clear-verify + mml2015-epg-clear-decrypt)) "Alist of PGP/MIME functions.") (defvar mml2015-result-buffer nil) @@ -148,7 +137,7 @@ ;; Extract plaintext from cleartext signature. IMO, this kind of task ;; should be done by GnuPG rather than Elisp, but older PGP backends -;; (such as Mailcrypt, PGG, and gpg.el) discard the output from GnuPG. +;; (such as Mailcrypt, and PGG) discard the output from GnuPG. (defun mml2015-extract-cleartext-signature () ;; Daiki Ueno in ;; <54a15d860801080142l70b95d7dkac4bf51a86196011@mail.gmail.com>: ``I still @@ -234,6 +223,58 @@ handles (list handles))))) +(defun mml2015-gpg-pretty-print-fpr (fingerprint) + (let* ((result "") + (fpr-length (string-width fingerprint)) + (n-slice 0) + slice) + (setq fingerprint (string-to-list fingerprint)) + (while fingerprint + (setq fpr-length (- fpr-length 4)) + (setq slice (butlast fingerprint fpr-length)) + (setq fingerprint (nthcdr 4 fingerprint)) + (setq n-slice (1+ n-slice)) + (setq result + (concat + result + (case n-slice + (1 slice) + (otherwise (concat " " slice)))))) + result)) + +(defun mml2015-gpg-extract-signature-details () + (goto-char (point-min)) + (let* ((expired (re-search-forward + "^\\[GNUPG:\\] SIGEXPIRED$" + nil t)) + (signer (and (re-search-forward + "^\\[GNUPG:\\] GOODSIG \\([0-9A-Za-z]*\\) \\(.*\\)$" + nil t) + (cons (match-string 1) (match-string 2)))) + (fprint (and (re-search-forward + "^\\[GNUPG:\\] VALIDSIG \\([0-9a-zA-Z]*\\) " + nil t) + (match-string 1))) + (trust (and (re-search-forward + "^\\[GNUPG:\\] \\(TRUST_.*\\)$" + nil t) + (match-string 1))) + (trust-good-enough-p + (cdr (assoc trust mml2015-unabbrev-trust-alist)))) + (cond ((and signer fprint) + (concat (cdr signer) + (unless trust-good-enough-p + (concat "\nUntrusted, Fingerprint: " + (mml2015-gpg-pretty-print-fpr fprint))) + (when expired + (format "\nWARNING: Signature from expired key (%s)" + (car signer))))) + ((re-search-forward + "^\\(gpg: \\)?Good signature from \"\\(.*\\)\"$" nil t) + (match-string 2)) + (t + "From unknown user")))) + (defun mml2015-mailcrypt-clear-decrypt () (let (result) (setq result @@ -446,280 +487,6 @@ (insert (format "--%s--\n" boundary)) (goto-char (point-max)))) -;;; gpg wrapper - -(autoload 'gpg-decrypt "gpg") -(autoload 'gpg-verify "gpg") -(autoload 'gpg-verify-cleartext "gpg") -(autoload 'gpg-sign-detached "gpg") -(autoload 'gpg-sign-encrypt "gpg") -(autoload 'gpg-encrypt "gpg") -(autoload 'gpg-passphrase-read "gpg") - -(defun mml2015-gpg-passphrase () - (or (message-options-get 'gpg-passphrase) - (message-options-set 'gpg-passphrase (gpg-passphrase-read)))) - -(defun mml2015-gpg-decrypt-1 () - (let ((cipher (current-buffer)) plain result) - (if (with-temp-buffer - (prog1 - (gpg-decrypt cipher (setq plain (current-buffer)) - mml2015-result-buffer nil) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details - (with-current-buffer mml2015-result-buffer - (buffer-string))) - (set-buffer cipher) - (erase-buffer) - (insert-buffer-substring plain) - (goto-char (point-min)) - (while (search-forward "\r\n" nil t) - (replace-match "\n" t t)))) - '(t) - ;; Some wrong with the return value, check plain text buffer. - (if (> (point-max) (point-min)) - '(t) - nil)))) - -(defun mml2015-gpg-decrypt (handle ctl) - (let ((mml2015-decrypt-function 'mml2015-gpg-decrypt-1)) - (mml2015-mailcrypt-decrypt handle ctl))) - -(defun mml2015-gpg-clear-decrypt () - (let (result) - (setq result (mml2015-gpg-decrypt-1)) - (if (car result) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "OK") - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Failed")))) - -(defun mml2015-gpg-pretty-print-fpr (fingerprint) - (let* ((result "") - (fpr-length (string-width fingerprint)) - (n-slice 0) - slice) - (setq fingerprint (string-to-list fingerprint)) - (while fingerprint - (setq fpr-length (- fpr-length 4)) - (setq slice (butlast fingerprint fpr-length)) - (setq fingerprint (nthcdr 4 fingerprint)) - (setq n-slice (1+ n-slice)) - (setq result - (concat - result - (case n-slice - (1 slice) - (otherwise (concat " " slice)))))) - result)) - -(defun mml2015-gpg-extract-signature-details () - (goto-char (point-min)) - (let* ((expired (re-search-forward - "^\\[GNUPG:\\] SIGEXPIRED$" - nil t)) - (signer (and (re-search-forward - "^\\[GNUPG:\\] GOODSIG \\([0-9A-Za-z]*\\) \\(.*\\)$" - nil t) - (cons (match-string 1) (match-string 2)))) - (fprint (and (re-search-forward - "^\\[GNUPG:\\] VALIDSIG \\([0-9a-zA-Z]*\\) " - nil t) - (match-string 1))) - (trust (and (re-search-forward - "^\\[GNUPG:\\] \\(TRUST_.*\\)$" - nil t) - (match-string 1))) - (trust-good-enough-p - (cdr (assoc trust mml2015-unabbrev-trust-alist)))) - (cond ((and signer fprint) - (concat (cdr signer) - (unless trust-good-enough-p - (concat "\nUntrusted, Fingerprint: " - (mml2015-gpg-pretty-print-fpr fprint))) - (when expired - (format "\nWARNING: Signature from expired key (%s)" - (car signer))))) - ((re-search-forward - "^\\(gpg: \\)?Good signature from \"\\(.*\\)\"$" nil t) - (match-string 2)) - (t - "From unknown user")))) - -(defun mml2015-gpg-verify (handle ctl) - (catch 'error - (let (part message signature info-is-set-p) - (unless (setq part (mm-find-raw-part-by-type - ctl (or (mm-handle-multipart-ctl-parameter - ctl 'protocol) - "application/pgp-signature") - t)) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Corrupted") - (throw 'error handle)) - (with-temp-buffer - (setq message (current-buffer)) - (insert part) - ;; Convert to in signed text. If --textmode is - ;; specified when signing, the conversion is not necessary. - (goto-char (point-min)) - (end-of-line) - (while (not (eobp)) - (unless (eq (char-before) ?\r) - (insert "\r")) - (forward-line) - (end-of-line)) - (with-temp-buffer - (setq signature (current-buffer)) - (unless (setq part (mm-find-part-by-type - (cdr handle) "application/pgp-signature" nil t)) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Corrupted") - (throw 'error handle)) - (mm-insert-part part) - (unless (condition-case err - (prog1 - (gpg-verify message signature mml2015-result-buffer) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details - (with-current-buffer mml2015-result-buffer - (buffer-string)))) - (error - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details (mml2015-format-error err)) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Error.") - (setq info-is-set-p t) - nil) - (quit - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details "Quit.") - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Quit.") - (setq info-is-set-p t) - nil)) - (unless info-is-set-p - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Failed")) - (throw 'error handle))) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info - (with-current-buffer mml2015-result-buffer - (mml2015-gpg-extract-signature-details)))) - handle))) - -(defun mml2015-gpg-clear-verify () - (if (condition-case err - (prog1 - (gpg-verify-cleartext (current-buffer) mml2015-result-buffer) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details - (with-current-buffer mml2015-result-buffer - (buffer-string)))) - (error - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details (mml2015-format-error err)) - nil) - (quit - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details "Quit.") - nil)) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info - (with-current-buffer mml2015-result-buffer - (mml2015-gpg-extract-signature-details))) - (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "Failed")) - (mml2015-extract-cleartext-signature)) - -(defun mml2015-gpg-sign (cont) - (let ((boundary (mml-compute-boundary cont)) - (text (current-buffer)) signature) - (goto-char (point-max)) - (unless (bolp) - (insert "\n")) - (with-temp-buffer - (unless (gpg-sign-detached text (setq signature (current-buffer)) - mml2015-result-buffer - nil - (message-options-get 'message-sender) - t t) ; armor & textmode - (unless (> (point-max) (point-min)) - (pop-to-buffer mml2015-result-buffer) - (error "Sign error"))) - (goto-char (point-min)) - (while (re-search-forward "\r+$" nil t) - (replace-match "" t t)) - (set-buffer text) - (goto-char (point-min)) - (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n" - boundary)) - ;;; FIXME: what is the micalg? - (insert "\tmicalg=pgp-sha1; protocol=\"application/pgp-signature\"\n") - (insert (format "\n--%s\n" boundary)) - (goto-char (point-max)) - (insert (format "\n--%s\n" boundary)) - (insert "Content-Type: application/pgp-signature\n\n") - (insert-buffer-substring signature) - (goto-char (point-max)) - (insert (format "--%s--\n" boundary)) - (goto-char (point-max))))) - -(defun mml2015-gpg-encrypt (cont &optional sign) - (let ((boundary (mml-compute-boundary cont)) - (text (current-buffer)) - cipher) - (mm-with-unibyte-current-buffer - (with-temp-buffer - (mm-disable-multibyte) - ;; set up a function to call the correct gpg encrypt routine - ;; with the right arguments. (FIXME: this should be done - ;; differently.) - (flet ((gpg-encrypt-func - (sign plaintext ciphertext result recipients &optional - passphrase sign-with-key armor textmode) - (if sign - (gpg-sign-encrypt - plaintext ciphertext result recipients passphrase - sign-with-key armor textmode) - (gpg-encrypt - plaintext ciphertext result recipients passphrase - armor textmode)))) - (unless (gpg-encrypt-func - sign ; passed in when using signencrypt - text (setq cipher (current-buffer)) - mml2015-result-buffer - (split-string - (or - (message-options-get 'message-recipients) - (message-options-set 'message-recipients - (read-string "Recipients: "))) - "[ \f\t\n\r\v,]+") - nil - (message-options-get 'message-sender) - t t) ; armor & textmode - (unless (> (point-max) (point-min)) - (pop-to-buffer mml2015-result-buffer) - (error "Encrypt error")))) - (goto-char (point-min)) - (while (re-search-forward "\r+$" nil t) - (replace-match "" t t)) - (set-buffer text) - (delete-region (point-min) (point-max)) - (insert (format "Content-Type: multipart/encrypted; boundary=\"%s\";\n" - boundary)) - (insert "\tprotocol=\"application/pgp-encrypted\"\n\n") - (insert (format "--%s\n" boundary)) - (insert "Content-Type: application/pgp-encrypted\n\n") - (insert "Version: 1\n\n") - (insert (format "--%s\n" boundary)) - (insert "Content-Type: application/octet-stream\n\n") - (insert-buffer-substring cipher) - (goto-char (point-max)) - (insert (format "--%s--\n" boundary)) - (goto-char (point-max)))))) - ;;; pgg wrapper (defvar pgg-default-user-id) === modified file 'lisp/gnus/nndoc.el' --- lisp/gnus/nndoc.el 2010-09-18 23:36:29 +0000 +++ lisp/gnus/nndoc.el 2010-09-26 04:03:19 +0000 @@ -64,9 +64,6 @@ (body-end . "") (file-end . "") (subtype digest guess)) - (mime-parts - (generate-head-function . nndoc-generate-mime-parts-head) - (article-transform-function . nndoc-transform-mime-parts)) (nsmail (article-begin . "^From - ")) (news @@ -77,6 +74,9 @@ (mbox (article-begin-function . nndoc-mbox-article-begin) (body-end-function . nndoc-mbox-body-end)) + (mime-parts + (generate-head-function . nndoc-generate-mime-parts-head) + (article-transform-function . nndoc-transform-mime-parts)) (babyl (article-begin . "\^_\^L *\n") (body-end . "\^_") === modified file 'lisp/gnus/nnheader.el' --- lisp/gnus/nnheader.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/nnheader.el 2010-09-26 04:03:19 +0000 @@ -822,12 +822,16 @@ (apply 'format args))) nil) +(defun nnheader-get-report-string (backend) + "Get the most recent report from BACKEND." + (condition-case () + (format "%s" (symbol-value (intern (format "%s-status-string" + backend)))) + (error ""))) + (defun nnheader-get-report (backend) "Get the most recent report from BACKEND." - (condition-case () - (nnheader-message 5 "%s" (symbol-value (intern (format "%s-status-string" - backend)))) - (error (nnheader-message 5 "")))) + (nnheader-message 5 (nnheader-get-report-string backend))) (defun nnheader-insert (format &rest args) "Clear the communication buffer and insert FORMAT and ARGS into the buffer. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-25 14:19:38 +0000 +++ lisp/gnus/nnimap.el 2010-09-26 04:03:19 +0000 @@ -62,22 +62,23 @@ (defvoo nnimap-inbox nil "The mail box where incoming mail arrives and should be split out of.") +(defvoo nnimap-split-methods nil + "How mail is split. +Uses the same syntax as nnmail-split-methods") + (defvoo nnimap-authenticator nil "How nnimap authenticate itself to the server. Possible choices are nil (use default methods) or `anonymous'.") -(defvoo nnimap-fetch-partial-articles nil - "If non-nil, nnimap will fetch partial articles. -If t, nnimap will fetch only the first part. If a string, it -will fetch all parts that have types that match that string. A -likely value would be \"text/\" to automatically fetch all -textual parts.") - (defvoo nnimap-expunge t "If non-nil, expunge articles after deleting them. This is always done if the server supports UID EXPUNGE, but it's not done by default on servers that doesn't support that command.") +(defvoo nnimap-streaming t + "If non-nil, try to use streaming commands with IMAP servers. +Switching this off will make nnimap slower, but it helps with +some servers.") (defvoo nnimap-connection-alist nil) @@ -110,8 +111,6 @@ (download "gnus-download") (forward "gnus-forward"))) -(defvar nnimap-split-methods nil) - (defun nnimap-buffer () (nnimap-find-process-buffer nntp-server-buffer)) @@ -128,8 +127,7 @@ (nnimap-article-ranges (gnus-compress-sequence articles)) (format "(UID RFC822.SIZE BODYSTRUCTURE %s)" (format - (if (member "IMAP4REV1" - (nnimap-capabilities nnimap-object)) + (if (nnimap-ver4-p) "BODY.PEEK[HEADER.FIELDS %s]" "RFC822.HEADER.LINES %s") (append '(Subject From Date Message-Id @@ -273,42 +271,50 @@ (with-current-buffer (nnimap-make-process-buffer buffer) (let* ((coding-system-for-read 'binary) (coding-system-for-write 'binary) + (port nil) (ports (cond ((eq nnimap-stream 'network) (open-network-stream "*nnimap*" (current-buffer) nnimap-address - (or nnimap-server-port - (if (netrc-find-service-number "imap") - "imap" - "143"))) + (setq port + (or nnimap-server-port + (if (netrc-find-service-number "imap") + "imap" + "143")))) '("143" "imap")) ((eq nnimap-stream 'shell) (nnimap-open-shell-stream "*nnimap*" (current-buffer) nnimap-address - (or nnimap-server-port "imap")) + (setq port (or nnimap-server-port "imap"))) '("imap")) ((eq nnimap-stream 'starttls) (starttls-open-stream "*nnimap*" (current-buffer) nnimap-address - (or nnimap-server-port "imap")) + (setq port (or nnimap-server-port "imap"))) '("imap")) ((eq nnimap-stream 'ssl) (open-tls-stream "*nnimap*" (current-buffer) nnimap-address - (or nnimap-server-port - (if (netrc-find-service-number "imaps") - "imaps" - "993"))) + (setq port + (or nnimap-server-port + (if (netrc-find-service-number "imaps") + "imaps" + "993")))) '("143" "993" "imap" "imaps")))) connection-result login-result credentials) (setf (nnimap-process nnimap-object) (get-buffer-process (current-buffer))) - (when (and (nnimap-process nnimap-object) - (memq (process-status (nnimap-process nnimap-object)) - '(open run))) + (if (not (and (nnimap-process nnimap-object) + (memq (process-status (nnimap-process nnimap-object)) + '(open run)))) + (nnheader-report 'nnimap "Unable to contact %s:%s via %s" + nnimap-address port nnimap-stream) (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) - (when (setq connection-result (nnimap-wait-for-connection)) + (if (not (setq connection-result (nnimap-wait-for-connection))) + (nnheader-report 'nnimap + "%s" (buffer-substring + (point) (line-end-position))) (when (eq nnimap-stream 'starttls) (nnimap-command "STARTTLS") (starttls-negotiate (nnimap-process nnimap-object))) @@ -370,7 +376,7 @@ (deffoo nnimap-request-article (article &optional group server to-buffer) (with-current-buffer nntp-server-buffer (let ((result (nnimap-possibly-change-group group server)) - parts) + parts structure) (when (stringp article) (setq article (nnimap-find-article-by-message-id group article))) (when (and result @@ -378,36 +384,113 @@ (erase-buffer) (with-current-buffer (nnimap-buffer) (erase-buffer) - (when nnimap-fetch-partial-articles - (if (eq nnimap-fetch-partial-articles t) + (when gnus-fetch-partial-articles + (if (eq gnus-fetch-partial-articles t) (setq parts '(1)) (nnimap-command "UID FETCH %d (BODYSTRUCTURE)" article) (goto-char (point-min)) (when (re-search-forward "FETCH.*BODYSTRUCTURE" nil t) - (let ((structure (ignore-errors (read (current-buffer))))) - (setq parts (nnimap-find-wanted-parts structure)))))) - (setq result - (nnimap-command - (if (member "IMAP4REV1" (nnimap-capabilities nnimap-object)) - "UID FETCH %d BODY.PEEK[]" - "UID FETCH %d RFC822.PEEK") - article)) - ;; Check that we really got an article. - (goto-char (point-min)) - (unless (looking-at "\\* [0-9]+ FETCH") - (setq result nil))) - (let ((buffer (nnimap-find-process-buffer (current-buffer)))) - (when (car result) - (with-current-buffer (or to-buffer nntp-server-buffer) - (insert-buffer-substring buffer) - (goto-char (point-min)) - (let ((bytes (nnimap-get-length))) - (delete-region (line-beginning-position) - (progn (forward-line 1) (point))) - (goto-char (+ (point) bytes)) - (delete-region (point) (point-max)) - (nnheader-ms-strip-cr)) - (cons group article)))))))) + (setq structure (ignore-errors (read (current-buffer))) + parts (nnimap-find-wanted-parts structure))))) + (when (if parts + (nnimap-get-partial-article article parts structure) + (nnimap-get-whole-article article)) + (let ((buffer (current-buffer))) + (with-current-buffer (or to-buffer nntp-server-buffer) + (erase-buffer) + (insert-buffer-substring buffer) + (nnheader-ms-strip-cr) + (cons group article))))))))) + +(defun nnimap-get-whole-article (article) + (let ((result + (nnimap-command + (if (nnimap-ver4-p) + "UID FETCH %d BODY.PEEK[]" + "UID FETCH %d RFC822.PEEK") + article))) + ;; Check that we really got an article. + (goto-char (point-min)) + (unless (looking-at "\\* [0-9]+ FETCH") + (setq result nil)) + (when result + (goto-char (point-min)) + (let ((bytes (nnimap-get-length))) + (delete-region (line-beginning-position) + (progn (forward-line 1) (point))) + (goto-char (+ (point) bytes)) + (delete-region (point) (point-max))) + t))) + +(defun nnimap-ver4-p () + (member "IMAP4REV1" (nnimap-capabilities nnimap-object))) + +(defun nnimap-get-partial-article (article parts structure) + (let ((result + (nnimap-command + "UID FETCH %d (%s %s)" + article + (if (nnimap-ver4-p) + "BODY.PEEK[HEADER]" + "RFC822.HEADER") + (if (nnimap-ver4-p) + (mapconcat (lambda (part) + (format "BODY.PEEK[%s]" part)) + parts " ") + (mapconcat (lambda (part) + (format "RFC822.PEEK[%s]" part)) + parts " "))))) + (when result + (nnimap-convert-partial-article structure)))) + +(defun nnimap-convert-partial-article (structure) + ;; First just skip past the headers. + (goto-char (point-min)) + (let ((bytes (nnimap-get-length)) + id parts) + ;; Delete "FETCH" line. + (delete-region (line-beginning-position) + (progn (forward-line 1) (point))) + (goto-char (+ (point) bytes)) + ;; Collect all the body parts. + (while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]") + (setq id (match-string 1) + bytes (nnimap-get-length)) + (beginning-of-line) + (delete-region (point) (progn (forward-line 1) (point))) + (push (list id (buffer-substring (point) (+ (point) bytes))) + parts) + (delete-region (point) (+ (point) bytes))) + ;; Delete trailing junk. + (delete-region (point) (point-max)) + ;; Now insert all the parts again where they fit in the structure. + (nnimap-insert-partial-structure structure parts) + t)) + +(defun nnimap-insert-partial-structure (structure parts &optional subp) + (let ((type (car (last structure 4))) + (boundary (cadr (member "BOUNDARY" (car (last structure 3)))))) + (when subp + (insert (format "Content-type: multipart/%s; boundary=%S\n\n" + (downcase type) boundary))) + (while (not (stringp (car structure))) + (insert "\n--" boundary "\n") + (if (consp (caar structure)) + (nnimap-insert-partial-structure (pop structure) parts t) + (let ((bit (pop structure))) + (insert (format "Content-type: %s/%s" + (downcase (nth 0 bit)) + (downcase (nth 1 bit)))) + (if (member "CHARSET" (nth 2 bit)) + (insert (format + "; charset=%S\n" (cadr (member "CHARSET" (nth 2 bit))))) + (insert "\n")) + (insert (format "Content-transfer-encoding: %s\n" + (nth 5 bit))) + (insert "\n") + (when (assoc (nth 9 bit) parts) + (insert (cadr (assoc (nth 9 bit) parts))))))) + (insert "\n--" boundary "--\n"))) (defun nnimap-find-wanted-parts (structure) (message-flatten-list (nnimap-find-wanted-parts-1 structure ""))) @@ -423,13 +506,14 @@ (number-to-string num) (format "%s.%s" prefix num))) parts) - (let ((type (format "%s/%s" (nth 0 sub) (nth 1 sub)))) - (when (string-match nnimap-fetch-partial-articles type) - (push (if (string= prefix "") + (let ((type (format "%s/%s" (nth 0 sub) (nth 1 sub))) + (id (if (string= prefix "") (number-to-string num) - (format "%s.%s" prefix num)) - parts))) - (incf num)))) + (format "%s.%s" prefix num)))) + (setcar (nthcdr 9 sub) id) + (when (string-match gnus-fetch-partial-articles type) + (push id parts)))) + (incf num))) (nreverse parts))) (deffoo nnimap-request-group (group &optional server dont-check info) @@ -777,7 +861,12 @@ (nnimap-send-command "UID FETCH %d:* FLAGS" start) start (car elem)) - sequences)))) + sequences))) + ;; Some servers apparently can't have many outstanding + ;; commands, so throttle them. + (when (and (not nnimap-streaming) + (car sequences)) + (nnimap-wait-for-response (caar sequences)))) sequences)))) (deffoo nnimap-finish-retrieve-group-infos (server infos sequences) @@ -785,26 +874,26 @@ (nnimap-possibly-change-group nil server)) (with-current-buffer (nnimap-buffer) ;; Wait for the final data to trickle in. - (nnimap-wait-for-response (cadar sequences)) - ;; Now we should have all the data we need, no matter whether - ;; we're QRESYNCING, fetching all the flags from scratch, or - ;; just fetching the last 100 flags per group. - (nnimap-update-infos (nnimap-flags-to-marks - (nnimap-parse-flags - (nreverse sequences))) - infos) - ;; Finally, just return something resembling an active file in - ;; the nntp buffer, so that the agent can save the info, too. - (with-current-buffer nntp-server-buffer - (erase-buffer) - (dolist (info infos) - (let* ((group (gnus-info-group info)) - (active (gnus-active group))) - (when active - (insert (format "%S %d %d y\n" - (gnus-group-real-name group) - (cdr active) - (car active)))))))))) + (when (nnimap-wait-for-response (cadar sequences)) + ;; Now we should have all the data we need, no matter whether + ;; we're QRESYNCING, fetching all the flags from scratch, or + ;; just fetching the last 100 flags per group. + (nnimap-update-infos (nnimap-flags-to-marks + (nnimap-parse-flags + (nreverse sequences))) + infos) + ;; Finally, just return something resembling an active file in + ;; the nntp buffer, so that the agent can save the info, too. + (with-current-buffer nntp-server-buffer + (erase-buffer) + (dolist (info infos) + (let* ((group (gnus-info-group info)) + (active (gnus-active group))) + (when active + (insert (format "%S %d %d y\n" + (gnus-group-real-name group) + (cdr active) + (car active))))))))))) (defun nnimap-update-infos (flags infos) (dolist (info infos) @@ -1045,17 +1134,22 @@ (match-string 1)))) (defun nnimap-wait-for-response (sequence &optional messagep) - (let ((process (get-buffer-process (current-buffer)))) + (let ((process (get-buffer-process (current-buffer))) + openp) (goto-char (point-max)) - (while (and (memq (process-status process) - '(open run)) - (not (re-search-backward (format "^%d .*\n" sequence) - (max (point-min) (- (point) 500)) - t))) + (while (and (setq openp (memq (process-status process) + '(open run))) + (not (re-search-backward + (format "^%d .*\n" sequence) + (if nnimap-streaming + (max (point-min) (- (point) 500)) + (point-min)) + t))) (when messagep (message "Read %dKB" (/ (buffer-size) 1000))) (nnheader-accept-process-output process) - (goto-char (point-max))))) + (goto-char (point-max))) + openp)) (defun nnimap-parse-response () (let ((lines (split-string (nnimap-last-response-string) "\r\n" t)) @@ -1129,8 +1223,7 @@ (nnimap-article-ranges articles) (format "(UID %s%s)" (format - (if (member "IMAP4REV1" - (nnimap-capabilities nnimap-object)) + (if (nnimap-ver4-p) "BODY.PEEK[HEADER] BODY.PEEK" "RFC822.PEEK")) (if nnimap-split-download-body-default ------------------------------------------------------------ revno: 101623 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-09-26 03:39:24 +0200 message: src/w32.c (get_emacs_configuration_options): Fix previous change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 19:50:13 +0000 +++ src/ChangeLog 2010-09-26 01:39:24 +0000 @@ -1,3 +1,7 @@ +2010-09-26 Juanma Barranquero + + * w32.c (get_emacs_configuration_options): Fix previous change. + 2010-09-25 Chong Yidong * insdel.c (prepare_to_modify_buffer): Ensure the mark marker is === modified file 'src/w32.c' --- src/w32.c 2010-09-22 18:39:51 +0000 +++ src/w32.c 2010-09-26 01:39:24 +0000 @@ -1956,8 +1956,9 @@ #endif #endif - if (_snprintf (cv, sizeof (cv), COMPILER_VERSION) < 0) + if (_snprintf (cv, sizeof (cv) - 1, COMPILER_VERSION) < 0) return "Error: not enough space for compiler version"; + cv[sizeof (cv) - 1] = '\0'; for (i = 0; options[i]; i++) size += strlen (options[i]); ------------------------------------------------------------ revno: 101622 author: Julien Danjou committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-09-25 14:57:02 -0700 message: * lisp/notifications.el: Call dbus-register-signal only if it is bound. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 21:51:55 +0000 +++ lisp/ChangeLog 2010-09-25 21:57:02 +0000 @@ -1,3 +1,7 @@ +2010-09-25 Julien Danjou + + * notifications.el: Call dbus-register-signal only if it is bound. + 2010-09-25 Glenn Morris * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: === modified file 'lisp/notifications.el' --- lisp/notifications.el 2010-09-13 04:39:36 +0000 +++ lisp/notifications.el 2010-09-25 21:57:02 +0000 @@ -95,13 +95,14 @@ (funcall (cadr entry) id action) (remove entry 'notifications-on-action-map)))) -(dbus-register-signal - :session - notifications-service - notifications-path - notifications-interface - notifications-action-signal - 'notifications-on-action-signal) +(when (fboundp 'dbus-register-signal) + (dbus-register-signal + :session + notifications-service + notifications-path + notifications-interface + notifications-action-signal + 'notifications-on-action-signal)) (defun notifications-on-closed-signal (id reason) "Dispatch signals to callback functions from `notifications-on-closed-map'." @@ -111,13 +112,14 @@ id (cadr (assoc reason notifications-closed-reason))) (remove entry 'notifications-on-close-map)))) -(dbus-register-signal - :session - notifications-service - notifications-path - notifications-interface - notifications-closed-signal - 'notifications-on-closed-signal) +(when (fboundp 'dbus-register-signal) + (dbus-register-signal + :session + notifications-service + notifications-path + notifications-interface + notifications-closed-signal + 'notifications-on-closed-signal)) (defun notifications-notify (&rest params) "Send notification via D-Bus using the Freedesktop notification protocol. ------------------------------------------------------------ revno: 101621 committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-09-25 14:51:55 -0700 message: Cosmetic doc fixes for eshell. * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el: * eshell/em-hist.el, eshell/em-ls.el, eshell/em-pred.el: * eshell/em-prompt.el, eshell/em-rebind.el, eshell/em-script.el: * eshell/em-smart.el, eshell/em-term.el, eshell/em-unix.el: * eshell/esh-cmd.el, eshell/esh-ext.el, eshell/esh-io.el: * eshell/esh-mode.el, eshell/esh-proc.el, eshell/esh-test.el: * eshell/esh-util.el, eshell/esh-var.el: Remove leading `*' from docs of faces and defcustoms. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 21:42:48 +0000 +++ lisp/ChangeLog 2010-09-25 21:51:55 +0000 @@ -1,3 +1,15 @@ +2010-09-25 Glenn Morris + + * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: + * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el: + * eshell/em-hist.el, eshell/em-ls.el, eshell/em-pred.el: + * eshell/em-prompt.el, eshell/em-rebind.el, eshell/em-script.el: + * eshell/em-smart.el, eshell/em-term.el, eshell/em-unix.el: + * eshell/esh-cmd.el, eshell/esh-ext.el, eshell/esh-io.el: + * eshell/esh-mode.el, eshell/esh-proc.el, eshell/esh-test.el: + * eshell/esh-util.el, eshell/esh-var.el: + Remove leading `*' from docs of faces and defcustoms. + 2010-09-25 Ulrich Mueller * eshell/em-ls.el (eshell-ls-archive-regexp): === modified file 'lisp/eshell/em-alias.el' --- lisp/eshell/em-alias.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-alias.el 2010-09-25 21:51:55 +0000 @@ -103,7 +103,7 @@ :group 'eshell-module) (defcustom eshell-aliases-file (expand-file-name "alias" eshell-directory-name) - "*The file in which aliases are kept. + "The file in which aliases are kept. Whenever an alias is defined by the user, using the `alias' command, it will be written to this file. Thus, alias definitions (and deletions) are always permanent. This approach was chosen for the @@ -113,13 +113,13 @@ :group 'eshell-alias) (defcustom eshell-bad-command-tolerance 3 - "*The number of failed commands to ignore before creating an alias." + "The number of failed commands to ignore before creating an alias." :type 'integer ;; :link '(custom-manual "(eshell)Auto-correction of bad commands") :group 'eshell-alias) (defcustom eshell-alias-load-hook '(eshell-alias-initialize) - "*A hook that gets run when `eshell-alias' is loaded." + "A hook that gets run when `eshell-alias' is loaded." :type 'hook :group 'eshell-alias) === modified file 'lisp/eshell/em-banner.el' --- lisp/eshell/em-banner.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-banner.el 2010-09-25 21:51:55 +0000 @@ -58,7 +58,7 @@ ;;; User Variables: (defcustom eshell-banner-message "Welcome to the Emacs shell\n\n" - "*The banner message to be displayed when Eshell is loaded. + "The banner message to be displayed when Eshell is loaded. This can be any sexp, and should end with at least two newlines." :type 'sexp :group 'eshell-banner) @@ -66,7 +66,7 @@ (put 'eshell-banner-message 'risky-local-variable t) (defcustom eshell-banner-load-hook '(eshell-banner-initialize) - "*A list of functions to run when `eshell-banner' is loaded." + "A list of functions to run when `eshell-banner' is loaded." :type 'hook :group 'eshell-banner) === modified file 'lisp/eshell/em-basic.el' --- lisp/eshell/em-basic.el 2010-03-22 16:50:29 +0000 +++ lisp/eshell/em-basic.el 2010-09-25 21:51:55 +0000 @@ -77,7 +77,7 @@ :group 'eshell-module) (defcustom eshell-plain-echo-behavior nil - "*If non-nil, `echo' tries to behave like an ordinary shell echo. + "If non-nil, `echo' tries to behave like an ordinary shell echo. This comes at some detriment to Lisp functionality. However, the Lisp equivalent of `echo' can always be achieved by using `identity'." :type 'boolean === modified file 'lisp/eshell/em-cmpl.el' --- lisp/eshell/em-cmpl.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-cmpl.el 2010-09-25 21:51:55 +0000 @@ -86,26 +86,26 @@ ;;; User Variables: (defcustom eshell-cmpl-load-hook '(eshell-cmpl-initialize) - "*A list of functions to run when `eshell-cmpl' is loaded." + "A list of functions to run when `eshell-cmpl' is loaded." :type 'hook :group 'eshell-cmpl) (defcustom eshell-show-lisp-completions nil - "*If non-nil, include Lisp functions in the command completion list. + "If non-nil, include Lisp functions in the command completion list. If this variable is nil, Lisp completion can still be done in command position by using M-TAB instead of TAB." :type 'boolean :group 'eshell-cmpl) (defcustom eshell-show-lisp-alternatives t - "*If non-nil, and no other completions found, show Lisp functions. + "If non-nil, and no other completions found, show Lisp functions. Setting this variable means nothing if `eshell-show-lisp-completions' is non-nil." :type 'boolean :group 'eshell-cmpl) (defcustom eshell-no-completion-during-jobs t - "*If non-nil, don't allow completion while a process is running." + "If non-nil, don't allow completion while a process is running." :type 'boolean :group 'eshell-cmpl) @@ -126,7 +126,7 @@ ("dbx" . "\\`\\([^.]*\\|a\\.out\\)\\'") ("sdb" . "\\`\\([^.]*\\|a\\.out\\)\\'") ("adb" . "\\`\\([^.]*\\|a\\.out\\)\\'")) - "*An alist that defines simple argument type correlations. + "An alist that defines simple argument type correlations. This is provided for common commands, as a simplistic alternative to writing a completion function." :type '(repeat (cons string regexp)) === modified file 'lisp/eshell/em-dirs.el' --- lisp/eshell/em-dirs.el 2010-03-22 16:50:29 +0000 +++ lisp/eshell/em-dirs.el 2010-09-25 21:51:55 +0000 @@ -60,14 +60,14 @@ ;;; User Variables: (defcustom eshell-dirs-load-hook '(eshell-dirs-initialize) - "*A hook that gets run when `eshell-dirs' is loaded." + "A hook that gets run when `eshell-dirs' is loaded." :type 'hook :group 'eshell-dirs) (defcustom eshell-pwd-convert-function (if (eshell-under-windows-p) 'expand-file-name 'identity) - "*The function used to normalize the value of Eshell's `pwd'. + "The function used to normalize the value of Eshell's `pwd'. The value returned by `pwd' is also used when recording the last-visited directory in the last-dir-ring, so it will affect the form of the list used by 'cd ='." @@ -78,7 +78,7 @@ :group 'eshell-dirs) (defcustom eshell-ask-to-save-last-dir 'always - "*Determine if the last-dir-ring should be automatically saved. + "Determine if the last-dir-ring should be automatically saved. The last-dir-ring is always preserved when exiting an Eshell buffer. However, when Emacs is being shut down, this variable determines whether to prompt the user, or just save the ring. @@ -91,22 +91,22 @@ :group 'eshell-dirs) (defcustom eshell-cd-shows-directory nil - "*If non-nil, using `cd' will report the directory it changes to." + "If non-nil, using `cd' will report the directory it changes to." :type 'boolean :group 'eshell-dirs) (defcustom eshell-cd-on-directory t - "*If non-nil, do a cd if a directory is in command position." + "If non-nil, do a cd if a directory is in command position." :type 'boolean :group 'eshell-dirs) (defcustom eshell-directory-change-hook nil - "*A hook to run when the current directory changes." + "A hook to run when the current directory changes." :type 'hook :group 'eshell-dirs) (defcustom eshell-list-files-after-cd nil - "*If non-nil, call \"ls\" with any remaining args after doing a cd. + "If non-nil, call \"ls\" with any remaining args after doing a cd. This is provided for convenience, since the same effect is easily achieved by adding a function to `eshell-directory-change-hook' that calls \"ls\" and references `eshell-last-arguments'." @@ -114,39 +114,39 @@ :group 'eshell-dirs) (defcustom eshell-pushd-tohome nil - "*If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd'). + "If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd'). This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-pushd-dextract nil - "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top. + "If non-nil, make \"pushd +n\" pop the nth dir to the stack top. This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-pushd-dunique nil - "*If non-nil, make pushd only add unique directories to the stack. + "If non-nil, make pushd only add unique directories to the stack. This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-dirtrack-verbose t - "*If non-nil, show the directory stack following directory change. + "If non-nil, show the directory stack following directory change. This is effective only if directory tracking is enabled." :type 'boolean :group 'eshell-dirs) (defcustom eshell-last-dir-ring-file-name (expand-file-name "lastdir" eshell-directory-name) - "*If non-nil, name of the file to read/write the last-dir-ring. + "If non-nil, name of the file to read/write the last-dir-ring. See also `eshell-read-last-dir-ring' and `eshell-write-last-dir-ring'. If it is nil, the last-dir-ring will not be written to disk." :type 'file :group 'eshell-dirs) (defcustom eshell-last-dir-ring-size 32 - "*If non-nil, the size of the directory history ring. + "If non-nil, the size of the directory history ring. This ring is added to every time `cd' or `pushd' is used. It simply stores the most recent directory locations Eshell has been in. To return to the most recent entry, use 'cd -' (equivalent to 'cd -0'). @@ -167,7 +167,7 @@ :group 'eshell-dirs) (defcustom eshell-last-dir-unique t - "*If non-nil, `eshell-last-dir-ring' contains only unique entries." + "If non-nil, `eshell-last-dir-ring' contains only unique entries." :type 'boolean :group 'eshell-dirs) === modified file 'lisp/eshell/em-glob.el' --- lisp/eshell/em-glob.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-glob.el 2010-09-25 21:51:55 +0000 @@ -63,39 +63,39 @@ ;;; User Variables: (defcustom eshell-glob-load-hook '(eshell-glob-initialize) - "*A list of functions to run when `eshell-glob' is loaded." + "A list of functions to run when `eshell-glob' is loaded." :type 'hook :group 'eshell-glob) (defcustom eshell-glob-include-dot-files nil - "*If non-nil, glob patterns will match files beginning with a dot." + "If non-nil, glob patterns will match files beginning with a dot." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-include-dot-dot t - "*If non-nil, glob patterns that match dots will match . and .." + "If non-nil, glob patterns that match dots will match . and .." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-case-insensitive (eshell-under-windows-p) - "*If non-nil, glob pattern matching will ignore case." + "If non-nil, glob pattern matching will ignore case." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-show-progress nil - "*If non-nil, display progress messages during a recursive glob. + "If non-nil, display progress messages during a recursive glob. This option slows down recursive glob processing by quite a bit." :type 'boolean :group 'eshell-glob) (defcustom eshell-error-if-no-glob nil - "*If non-nil, it is an error for a glob pattern not to match. + "If non-nil, it is an error for a glob pattern not to match. This mimcs the behavior of zsh if non-nil, but bash if nil." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-chars-list '(?\] ?\[ ?* ?? ?~ ?\( ?\) ?| ?# ?^) - "*List of additional characters used in extended globbing." + "List of additional characters used in extended globbing." :type '(repeat character) :group 'eshell-glob) @@ -117,7 +117,7 @@ (if (eq (aref str (1+ pos)) ?*) "*" "+")) (+ pos 2)) (cons "*" (1+ pos)))))) - "*An alist for translation of extended globbing characters." + "An alist for translation of extended globbing characters." :type '(repeat (cons character (choice regexp function))) :group 'eshell-glob) === modified file 'lisp/eshell/em-hist.el' --- lisp/eshell/em-hist.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-hist.el 2010-09-25 21:51:55 +0000 @@ -72,7 +72,7 @@ ;;; User Variables: (defcustom eshell-hist-load-hook '(eshell-hist-initialize) - "*A list of functions to call when loading `eshell-hist'." + "A list of functions to call when loading `eshell-hist'." :type 'hook :group 'eshell-hist) @@ -81,31 +81,31 @@ (function (lambda () (remove-hook 'kill-emacs-hook 'eshell-save-some-history)))) - "*A hook that gets run when `eshell-hist' is unloaded." + "A hook that gets run when `eshell-hist' is unloaded." :type 'hook :group 'eshell-hist) (defcustom eshell-history-file-name (expand-file-name "history" eshell-directory-name) - "*If non-nil, name of the file to read/write input history. + "If non-nil, name of the file to read/write input history. See also `eshell-read-history' and `eshell-write-history'. If it is nil, Eshell will use the value of HISTFILE." :type 'file :group 'eshell-hist) (defcustom eshell-history-size 128 - "*Size of the input history ring. If nil, use envvar HISTSIZE." + "Size of the input history ring. If nil, use envvar HISTSIZE." :type 'integer :group 'eshell-hist) (defcustom eshell-hist-ignoredups nil - "*If non-nil, don't add input matching the last on the input ring. + "If non-nil, don't add input matching the last on the input ring. This mirrors the optional behavior of bash." :type 'boolean :group 'eshell-hist) (defcustom eshell-save-history-on-exit t - "*Determine if history should be automatically saved. + "Determine if history should be automatically saved. History is always preserved after sanely exiting an Eshell buffer. However, when Emacs is being shut down, this variable determines whether to prompt the user. @@ -121,7 +121,7 @@ (function (lambda (str) (not (string-match "\\`\\s-*\\'" str)))) - "*Predicate for filtering additions to input history. + "Predicate for filtering additions to input history. Takes one argument, the input. If non-nil, the input may be saved on the input history list. Default is to save anything that isn't all whitespace." @@ -131,7 +131,7 @@ (put 'eshell-input-filter 'risky-local-variable t) (defcustom eshell-hist-match-partial t - "*If non-nil, movement through history is constrained by current input. + "If non-nil, movement through history is constrained by current input. Otherwise, typing and will always go to the next history element, regardless of any text on the command line. In that case, and still offer that functionality." @@ -139,25 +139,25 @@ :group 'eshell-hist) (defcustom eshell-hist-move-to-end t - "*If non-nil, move to the end of the buffer before cycling history." + "If non-nil, move to the end of the buffer before cycling history." :type 'boolean :group 'eshell-hist) (defcustom eshell-hist-event-designator "^!\\(!\\|-?[0-9]+\\|\\??[^:^$%*?]+\\??\\|#\\)" - "*The regexp used to identifier history event designators." + "The regexp used to identifier history event designators." :type 'regexp :group 'eshell-hist) (defcustom eshell-hist-word-designator "^:?\\([0-9]+\\|[$^%*]\\)?\\(\\*\\|-[0-9]*\\|[$^%*]\\)?" - "*The regexp used to identify history word designators." + "The regexp used to identify history word designators." :type 'regexp :group 'eshell-hist) (defcustom eshell-hist-modifier "^\\(:\\([hretpqx&g]\\|s/\\([^/]*\\)/\\([^/]*\\)/\\)\\)*" - "*The regexp used to identity history modifiers." + "The regexp used to identity history modifiers." :type 'regexp :group 'eshell-hist) @@ -174,7 +174,7 @@ ([(meta ?n)] . eshell-next-matching-input-from-input) ([up] . eshell-previous-matching-input-from-input) ([down] . eshell-next-matching-input-from-input)) - "*History keys to bind differently if point is in input text." + "History keys to bind differently if point is in input text." :type '(repeat (cons (vector :tag "Keys to bind" (repeat :inline t sexp)) (function :tag "Command"))) === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2010-09-25 21:42:48 +0000 +++ lisp/eshell/em-ls.el 2010-09-25 21:51:55 +0000 @@ -54,24 +54,24 @@ (function (lambda () (fset 'insert-directory eshell-ls-orig-insert-directory)))) - "*When unloading `eshell-ls', restore the definition of `insert-directory'." + "When unloading `eshell-ls', restore the definition of `insert-directory'." :type 'hook :group 'eshell-ls) (defcustom eshell-ls-initial-args nil - "*If non-nil, this list of args is included before any call to `ls'. + "If non-nil, this list of args is included before any call to `ls'. This is useful for enabling human-readable format (-h), for example." :type '(repeat :tag "Arguments" string) :group 'eshell-ls) (defcustom eshell-ls-dired-initial-args nil - "*If non-nil, args is included before any call to `ls' in Dired. + "If non-nil, args is included before any call to `ls' in Dired. This is useful for enabling human-readable format (-h), for example." :type '(repeat :tag "Arguments" string) :group 'eshell-ls) (defcustom eshell-ls-use-in-dired nil - "*If non-nil, use `eshell-ls' to read directories in Dired." + "If non-nil, use `eshell-ls' to read directories in Dired." :set (lambda (symbol value) (if value (unless (and (boundp 'eshell-ls-use-in-dired) @@ -86,24 +86,24 @@ :group 'eshell-ls) (defcustom eshell-ls-default-blocksize 1024 - "*The default blocksize to use when display file sizes with -s." + "The default blocksize to use when display file sizes with -s." :type 'integer :group 'eshell-ls) (defcustom eshell-ls-exclude-regexp nil - "*Unless -a is specified, files matching this regexp will not be shown." + "Unless -a is specified, files matching this regexp will not be shown." :type '(choice regexp (const nil)) :group 'eshell-ls) (defcustom eshell-ls-exclude-hidden t - "*Unless -a is specified, files beginning with . will not be shown. + "Unless -a is specified, files beginning with . will not be shown. Using this boolean, instead of `eshell-ls-exclude-regexp', is both faster and conserves more memory." :type 'boolean :group 'eshell-ls) (defcustom eshell-ls-use-colors t - "*If non-nil, use colors in file listings." + "If non-nil, use colors in file listings." :type 'boolean :group 'eshell-ls) @@ -111,7 +111,7 @@ '((((class color) (background light)) (:foreground "Blue" :weight bold)) (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) (t (:weight bold))) - "*The face used for highlight directories." + "The face used for highlight directories." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-directory-face 'eshell-ls-directory "22.1") @@ -119,14 +119,14 @@ (defface eshell-ls-symlink '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) (((class color) (background dark)) (:foreground "Cyan" :weight bold))) - "*The face used for highlight symbolic links." + "The face used for highlight symbolic links." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-symlink-face 'eshell-ls-symlink "22.1") (defface eshell-ls-executable '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) (((class color) (background dark)) (:foreground "Green" :weight bold))) - "*The face used for highlighting executables (not directories, though)." + "The face used for highlighting executables (not directories, though)." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-executable-face 'eshell-ls-executable "22.1") @@ -134,14 +134,14 @@ (defface eshell-ls-readonly '((((class color) (background light)) (:foreground "Brown")) (((class color) (background dark)) (:foreground "Pink"))) - "*The face used for highlighting read-only files." + "The face used for highlighting read-only files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-readonly-face 'eshell-ls-readonly "22.1") (defface eshell-ls-unreadable '((((class color) (background light)) (:foreground "Grey30")) (((class color) (background dark)) (:foreground "DarkGrey"))) - "*The face used for highlighting unreadable files." + "The face used for highlighting unreadable files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-unreadable-face 'eshell-ls-unreadable "22.1") @@ -149,21 +149,21 @@ (defface eshell-ls-special '((((class color) (background light)) (:foreground "Magenta" :weight bold)) (((class color) (background dark)) (:foreground "Magenta" :weight bold))) - "*The face used for highlighting non-regular files." + "The face used for highlighting non-regular files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-special-face 'eshell-ls-special "22.1") (defface eshell-ls-missing '((((class color) (background light)) (:foreground "Red" :weight bold)) (((class color) (background dark)) (:foreground "Red" :weight bold))) - "*The face used for highlighting non-existent file names." + "The face used for highlighting non-existent file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-missing-face 'eshell-ls-missing "22.1") (defcustom eshell-ls-archive-regexp (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" "zip\\|[zZ]\\|gz\\|bz2\\|xz\\|deb\\|rpm\\)\\'") - "*A regular expression that matches names of file archives. + "A regular expression that matches names of file archives. This typically includes both traditional archives and compressed files." :version "24.1" ; added xz @@ -173,26 +173,26 @@ (defface eshell-ls-archive '((((class color) (background light)) (:foreground "Orchid" :weight bold)) (((class color) (background dark)) (:foreground "Orchid" :weight bold))) - "*The face used for highlighting archived and compressed file names." + "The face used for highlighting archived and compressed file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-archive-face 'eshell-ls-archive "22.1") (defcustom eshell-ls-backup-regexp "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" - "*A regular expression that matches names of backup files." + "A regular expression that matches names of backup files." :type 'regexp :group 'eshell-ls) (defface eshell-ls-backup '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) - "*The face used for highlighting backup file names." + "The face used for highlighting backup file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-backup-face 'eshell-ls-backup "22.1") (defcustom eshell-ls-product-regexp "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" - "*A regular expression that matches names of product files. + "A regular expression that matches names of product files. Products are files that get generated from a source file, and hence ought to be recreatable if they are deleted." :type 'regexp @@ -201,13 +201,13 @@ (defface eshell-ls-product '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) - "*The face used for highlighting files that are build products." + "The face used for highlighting files that are build products." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-product-face 'eshell-ls-product "22.1") (defcustom eshell-ls-clutter-regexp "\\(^texput\\.log\\|^core\\)\\'" - "*A regular expression that matches names of junk files. + "A regular expression that matches names of junk files. These are mainly files that get created for various reasons, but don't really need to stick around for very long." :type 'regexp @@ -216,7 +216,7 @@ (defface eshell-ls-clutter '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) - "*The face used for highlighting junk file names." + "The face used for highlighting junk file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-clutter-face 'eshell-ls-clutter "22.1") @@ -250,7 +250,7 @@ (,(eval func) ,file))))) (defcustom eshell-ls-highlight-alist nil - "*This alist correlates test functions to color. + "This alist correlates test functions to color. The format of the members of this alist is (TEST-SEXP . FACE) === modified file 'lisp/eshell/em-pred.el' --- lisp/eshell/em-pred.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-pred.el 2010-09-25 21:51:55 +0000 @@ -61,7 +61,7 @@ ;;; User Variables: (defcustom eshell-pred-load-hook '(eshell-pred-initialize) - "*A list of functions to run when `eshell-pred' is loaded." + "A list of functions to run when `eshell-pred' is loaded." :type 'hook :group 'eshell-pred) @@ -101,7 +101,7 @@ (?m . (eshell-pred-file-time ?m "modification" 5)) (?c . (eshell-pred-file-time ?c "change" 6)) (?L . (eshell-pred-file-size))) - "*A list of predicates than can be applied to a globbing pattern. + "A list of predicates than can be applied to a globbing pattern. The format of each entry is (CHAR . PREDICATE-FUNC-SEXP)" @@ -150,7 +150,7 @@ (eshell-pred-substitute t) (error "`g' modifier cannot be used alone")))) (?s . (eshell-pred-substitute))) - "*A list of modifiers than can be applied to an argument expansion. + "A list of modifiers than can be applied to an argument expansion. The format of each entry is (CHAR ENTRYWISE-P MODIFIER-FUNC-SEXP)" === modified file 'lisp/eshell/em-prompt.el' --- lisp/eshell/em-prompt.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-prompt.el 2010-09-25 21:51:55 +0000 @@ -39,7 +39,7 @@ ;;; User Variables: (defcustom eshell-prompt-load-hook '(eshell-prompt-initialize) - "*A list of functions to call when loading `eshell-prompt'." + "A list of functions to call when loading `eshell-prompt'." :type 'hook :group 'eshell-prompt) @@ -55,7 +55,7 @@ :group 'eshell-prompt) (defcustom eshell-prompt-regexp "^[^#$\n]* [#$] " - "*A regexp which fully matches your eshell prompt. + "A regexp which fully matches your eshell prompt. This setting is important, since it affects how eshell will interpret the lines that are passed to it. If this variable is changed, all Eshell buffers must be exited and @@ -64,7 +64,7 @@ :group 'eshell-prompt) (defcustom eshell-highlight-prompt t - "*If non-nil, Eshell should highlight the prompt." + "If non-nil, Eshell should highlight the prompt." :type 'boolean :group 'eshell-prompt) @@ -72,20 +72,20 @@ '((((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) (t (:bold t))) - "*The face used to highlight prompt strings. + "The face used to highlight prompt strings. For highlighting other kinds of strings -- similar to shell mode's behavior -- simply use an output filer which changes text properties." :group 'eshell-prompt) (define-obsolete-face-alias 'eshell-prompt-face 'eshell-prompt "22.1") (defcustom eshell-before-prompt-hook nil - "*A list of functions to call before outputting the prompt." + "A list of functions to call before outputting the prompt." :type 'hook :options '(eshell-begin-on-new-line) :group 'eshell-prompt) (defcustom eshell-after-prompt-hook nil - "*A list of functions to call after outputting the prompt. + "A list of functions to call after outputting the prompt. Note that if `eshell-scroll-show-maximum-output' is non-nil, then setting `eshell-show-maximum-output' here won't do much. It depends on whether the user wants the resizing to happen while output is === modified file 'lisp/eshell/em-rebind.el' --- lisp/eshell/em-rebind.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-rebind.el 2010-09-25 21:51:55 +0000 @@ -43,7 +43,7 @@ ;;; User Variables: (defcustom eshell-rebind-load-hook '(eshell-rebind-initialize) - "*A list of functions to call when loading `eshell-rebind'." + "A list of functions to call when loading `eshell-rebind'." :type 'hook :group 'eshell-rebind) @@ -55,14 +55,14 @@ ([delete] . eshell-delete-backward-char) ([(control ?w)] . backward-kill-word) ([(control ?u)] . eshell-kill-input)) - "*Bind some keys differently if point is in input text." + "Bind some keys differently if point is in input text." :type '(repeat (cons (vector :tag "Keys to bind" (repeat :inline t sexp)) (function :tag "Command"))) :group 'eshell-rebind) (defcustom eshell-confine-point-to-input t - "*If non-nil, do not allow the point to leave the current input. + "If non-nil, do not allow the point to leave the current input. This is more difficult to do nicely in Emacs than one might think. Basically, the `point-left' attribute is added to the input text, and a function is placed on that hook to take the point back to @@ -77,13 +77,13 @@ :group 'eshell-rebind) (defcustom eshell-error-if-move-away t - "*If non-nil, consider it an error to try to move outside current input. + "If non-nil, consider it an error to try to move outside current input. This is default behavior of shells like bash." :type 'boolean :group 'eshell-rebind) (defcustom eshell-remap-previous-input t - "*If non-nil, remap input keybindings on previous prompts as well." + "If non-nil, remap input keybindings on previous prompts as well." :type 'boolean :group 'eshell-rebind) @@ -132,7 +132,7 @@ forward-visible-line forward-comment forward-thing) - "*A list of commands that cannot leave the input area." + "A list of commands that cannot leave the input area." :type '(repeat function) :group 'eshell-rebind) === modified file 'lisp/eshell/em-script.el' --- lisp/eshell/em-script.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-script.el 2010-09-25 21:51:55 +0000 @@ -36,19 +36,19 @@ ;;; User Variables: (defcustom eshell-script-load-hook '(eshell-script-initialize) - "*A list of functions to call when loading `eshell-script'." + "A list of functions to call when loading `eshell-script'." :type 'hook :group 'eshell-script) (defcustom eshell-login-script (expand-file-name "login" eshell-directory-name) - "*If non-nil, a file to invoke when starting up Eshell interactively. + "If non-nil, a file to invoke when starting up Eshell interactively. This file should be a file containing Eshell commands, where comment lines begin with '#'." :type 'file :group 'eshell-script) (defcustom eshell-rc-script (expand-file-name "profile" eshell-directory-name) - "*If non-nil, a file to invoke whenever Eshell is started. + "If non-nil, a file to invoke whenever Eshell is started. This includes when running `eshell-command'." :type 'file :group 'eshell-script) === modified file 'lisp/eshell/em-smart.el' --- lisp/eshell/em-smart.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-smart.el 2010-09-25 21:51:55 +0000 @@ -86,7 +86,7 @@ ;;; User Variables: (defcustom eshell-smart-load-hook '(eshell-smart-initialize) - "*A list of functions to call when loading `eshell-smart'." + "A list of functions to call when loading `eshell-smart'." :type 'hook :group 'eshell-smart) @@ -96,12 +96,12 @@ (lambda () (remove-hook 'window-configuration-change-hook 'eshell-refresh-windows)))) - "*A hook that gets run when `eshell-smart' is unloaded." + "A hook that gets run when `eshell-smart' is unloaded." :type 'hook :group 'eshell-smart) (defcustom eshell-review-quick-commands nil - "*If t, always review commands. + "If t, always review commands. Reviewing means keeping point on the text of the command that was just invoked, to allow corrections to be made easily. @@ -124,12 +124,12 @@ yank-pop yank-rectangle yank) - "*A list of commands which cause Eshell to jump to the end of buffer." + "A list of commands which cause Eshell to jump to the end of buffer." :type '(repeat function) :group 'eshell-smart) (defcustom eshell-smart-space-goes-to-end t - "*If non-nil, space will go to end of buffer when point-max is visible. + "If non-nil, space will go to end of buffer when point-max is visible. That is, if a command is running and the user presses SPACE at a time when the end of the buffer is visible, point will go to the end of the buffer and smart-display will be turned off (that is, subsequently @@ -148,7 +148,7 @@ :group 'eshell-smart) (defcustom eshell-where-to-jump 'begin - "*This variable indicates where point should jump to after a command. + "This variable indicates where point should jump to after a command. The options are `begin', `after' or `end'." :type '(radio (const :tag "Beginning of command" begin) (const :tag "After command word" after) === modified file 'lisp/eshell/em-term.el' --- lisp/eshell/em-term.el 2010-09-02 10:17:02 +0000 +++ lisp/eshell/em-term.el 2010-09-25 21:51:55 +0000 @@ -48,7 +48,7 @@ ;;; User Variables: (defcustom eshell-term-load-hook '(eshell-term-initialize) - "*A list of functions to call when loading `eshell-term'." + "A list of functions to call when loading `eshell-term'." :type 'hook :group 'eshell-term) @@ -58,19 +58,19 @@ "less" "more" ; M-x view-file "lynx" "ncftp" ; w3.el, ange-ftp "pine" "tin" "trn" "elm") ; GNUS!! - "*A list of commands that present their output in a visual fashion." + "A list of commands that present their output in a visual fashion." :type '(repeat string) :group 'eshell-term) (defcustom eshell-term-name "eterm" - "*Name to use for the TERM variable when running visual commands. + "Name to use for the TERM variable when running visual commands. See `term-term-name' in term.el for more information on how this is used." :type 'string :group 'eshell-term) (defcustom eshell-escape-control-x t - "*If non-nil, allow to be handled by Emacs key in visual buffers. + "If non-nil, allow to be handled by Emacs key in visual buffers. See the variable `eshell-visual-commands'. If this variable is set to nil, will send that control character to the invoked process." :type 'boolean === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/em-unix.el 2010-09-25 21:51:55 +0000 @@ -55,84 +55,84 @@ :group 'eshell-module) (defcustom eshell-unix-load-hook '(eshell-unix-initialize) - "*A list of functions to run when `eshell-unix' is loaded." + "A list of functions to run when `eshell-unix' is loaded." :type 'hook :group 'eshell-unix) (defcustom eshell-plain-grep-behavior nil - "*If non-nil, standalone \"grep\" commands will behave normally. + "If non-nil, standalone \"grep\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-no-grep-available (not (eshell-search-path "grep")) - "*If non-nil, no grep is available on the current machine." + "If non-nil, no grep is available on the current machine." :type 'boolean :group 'eshell-unix) (defcustom eshell-plain-diff-behavior nil - "*If non-nil, standalone \"diff\" commands will behave normally. + "If non-nil, standalone \"diff\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-plain-locate-behavior (featurep 'xemacs) - "*If non-nil, standalone \"locate\" commands will behave normally. + "If non-nil, standalone \"locate\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-rm-removes-directories nil - "*If non-nil, `rm' will remove directory entries. + "If non-nil, `rm' will remove directory entries. Otherwise, `rmdir' is required." :type 'boolean :group 'eshell-unix) (defcustom eshell-rm-interactive-query (= (user-uid) 0) - "*If non-nil, `rm' will query before removing anything." + "If non-nil, `rm' will query before removing anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-mv-interactive-query (= (user-uid) 0) - "*If non-nil, `mv' will query before overwriting anything." + "If non-nil, `mv' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-mv-overwrite-files t - "*If non-nil, `mv' will overwrite files without warning." + "If non-nil, `mv' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-cp-interactive-query (= (user-uid) 0) - "*If non-nil, `cp' will query before overwriting anything." + "If non-nil, `cp' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-cp-overwrite-files t - "*If non-nil, `cp' will overwrite files without warning." + "If non-nil, `cp' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-ln-interactive-query (= (user-uid) 0) - "*If non-nil, `ln' will query before overwriting anything." + "If non-nil, `ln' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-ln-overwrite-files nil - "*If non-nil, `ln' will overwrite files without warning." + "If non-nil, `ln' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-default-target-is-dot nil - "*If non-nil, the default destination for cp, mv or ln is `.'." + "If non-nil, the default destination for cp, mv or ln is `.'." :type 'boolean :group 'eshell-unix) (defcustom eshell-du-prefer-over-ange nil - "*Use Eshell's du in ange-ftp remote directories. + "Use Eshell's du in ange-ftp remote directories. Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." :type 'boolean :group 'eshell-unix) === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-cmd.el 2010-09-25 21:51:55 +0000 @@ -122,28 +122,28 @@ :group 'eshell) (defcustom eshell-prefer-lisp-functions nil - "*If non-nil, prefer Lisp functions to external commands." + "If non-nil, prefer Lisp functions to external commands." :type 'boolean :group 'eshell-cmd) (defcustom eshell-lisp-regexp "\\([(`]\\|#'\\)" - "*A regexp which, if matched at beginning of an argument, means Lisp. + "A regexp which, if matched at beginning of an argument, means Lisp. Such arguments will be passed to `read', and then evaluated." :type 'regexp :group 'eshell-cmd) (defcustom eshell-pre-command-hook nil - "*A hook run before each interactive command is invoked." + "A hook run before each interactive command is invoked." :type 'hook :group 'eshell-cmd) (defcustom eshell-post-command-hook nil - "*A hook run after each interactive command is invoked." + "A hook run after each interactive command is invoked." :type 'hook :group 'eshell-cmd) (defcustom eshell-prepare-command-hook nil - "*A set of functions called to prepare a named command. + "A set of functions called to prepare a named command. The command name and its argument are in `eshell-last-command-name' and `eshell-last-arguments'. The functions on this hook can change the value of these symbols if necessary. @@ -154,7 +154,7 @@ :group 'eshell-cmd) (defcustom eshell-named-command-hook nil - "*A set of functions called before a named command is invoked. + "A set of functions called before a named command is invoked. Each function will be passed the command name and arguments that were passed to `eshell-named-command'. @@ -180,7 +180,7 @@ (defcustom eshell-pre-rewrite-command-hook '(eshell-no-command-conversion eshell-subcommand-arg-values) - "*A hook run before command rewriting begins. + "A hook run before command rewriting begins. The terms of the command to be rewritten is passed as arguments, and may be modified in place. Any return value is ignored." :type 'hook @@ -193,7 +193,7 @@ eshell-rewrite-sexp-command eshell-rewrite-initial-subcommand eshell-rewrite-named-command) - "*A set of functions used to rewrite the command argument. + "A set of functions used to rewrite the command argument. Once parsing of a command line is completed, the next step is to rewrite the initial argument into something runnable. @@ -207,14 +207,14 @@ :group 'eshell-cmd) (defcustom eshell-post-rewrite-command-hook nil - "*A hook run after command rewriting is finished. + "A hook run after command rewriting is finished. Each function is passed the symbol containing the rewritten command, which may be modified directly. Any return value is ignored." :type 'hook :group 'eshell-cmd) (defcustom eshell-complex-commands '("ls") - "*A list of commands names or functions, that determine complexity. + "A list of commands names or functions, that determine complexity. That is, if a command is defined by a function named eshell/NAME, and NAME is part of this list, it is invoked as a complex command. Complex commands are always correct, but run much slower. If a @@ -231,12 +231,12 @@ ;;; User Variables: (defcustom eshell-cmd-load-hook '(eshell-cmd-initialize) - "*A hook that gets run when `eshell-cmd' is loaded." + "A hook that gets run when `eshell-cmd' is loaded." :type 'hook :group 'eshell-cmd) (defcustom eshell-debug-command nil - "*If non-nil, enable debugging code. SSLLOOWW. + "If non-nil, enable debugging code. SSLLOOWW. This option is only useful for reporting bugs. If you enable it, you will have to visit the file 'eshell-cmd.el' and run the command \\[eval-buffer]." @@ -247,7 +247,7 @@ '(eshell-named-command eshell-lisp-command eshell-process-identity) - "*A list of functions which might return an ansychronous process. + "A list of functions which might return an ansychronous process. If they return a process object, execution of the calling Eshell command will wait for completion (in the background) before finishing the command." @@ -258,7 +258,7 @@ '((eshell-in-subcommand-p t) (default-directory default-directory) (process-environment (eshell-copy-environment))) - "*A list of `let' bindings for subcommand environments." + "A list of `let' bindings for subcommand environments." :type 'sexp :group 'eshell-cmd) === modified file 'lisp/eshell/esh-ext.el' --- lisp/eshell/esh-ext.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-ext.el 2010-09-25 21:51:55 +0000 @@ -1,7 +1,7 @@ ;;; esh-ext.el --- commands external to Eshell -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -48,17 +48,17 @@ ;;; User Variables: (defcustom eshell-ext-load-hook '(eshell-ext-initialize) - "*A hook that gets run when `eshell-ext' is loaded." + "A hook that gets run when `eshell-ext' is loaded." :type 'hook :group 'eshell-ext) (defcustom eshell-binary-suffixes exec-suffixes - "*A list of suffixes used when searching for executable files." + "A list of suffixes used when searching for executable files." :type '(repeat string) :group 'eshell-ext) (defcustom eshell-force-execution nil - "*If non-nil, try to execute binary files regardless of permissions. + "If non-nil, try to execute binary files regardless of permissions. This can be useful on systems like Windows, where the operating system doesn't happen to honor the permission bits in certain cases; or in cases where you want to associate an interpreter with a particular @@ -96,7 +96,7 @@ (or (eshell-search-path "cmd.exe") (eshell-search-path "command.com")) shell-file-name)) - "*The name of the shell command to use for DOS/Windows batch files. + "The name of the shell command to use for DOS/Windows batch files. This defaults to nil on non-Windows systems, where this variable is wholly ignored." :type '(choice file (const nil)) @@ -113,7 +113,7 @@ (defcustom eshell-interpreter-alist (if (eshell-under-windows-p) '(("\\.\\(bat\\|cmd\\)\\'" . eshell-invoke-batch-file))) - "*An alist defining interpreter substitutions. + "An alist defining interpreter substitutions. Each member is a cons cell of the form: (MATCH . INTERPRETER) @@ -134,7 +134,7 @@ :group 'eshell-ext) (defcustom eshell-alternate-command-hook nil - "*A hook run whenever external command lookup fails. + "A hook run whenever external command lookup fails. If a functions wishes to provide an alternate command, they must throw it using the tag `eshell-replace-command'. This is done because the substituted command need not be external at all, and therefore must be @@ -147,12 +147,12 @@ :group 'eshell-ext) (defcustom eshell-command-interpreter-max-length 256 - "*The maximum length of any command interpreter string, plus args." + "The maximum length of any command interpreter string, plus args." :type 'integer :group 'eshell-ext) (defcustom eshell-explicit-command-char ?* - "*If this char occurs before a command name, call it externally. + "If this char occurs before a command name, call it externally. That is, although `vi' may be an alias, `\vi' will always call the external version." :type 'character === modified file 'lisp/eshell/esh-io.el' --- lisp/eshell/esh-io.el 2010-07-30 23:25:06 +0000 +++ lisp/eshell/esh-io.el 2010-09-25 21:51:55 +0000 @@ -73,12 +73,12 @@ ;;; User Variables: (defcustom eshell-io-load-hook '(eshell-io-initialize) - "*A hook that gets run when `eshell-io' is loaded." + "A hook that gets run when `eshell-io' is loaded." :type 'hook :group 'eshell-io) (defcustom eshell-number-of-handles 3 - "*The number of file handles that eshell supports. + "The number of file handles that eshell supports. Currently this is standard input, output and error. But even all of these Emacs does not currently support with asynchronous processes \(which is what eshell uses so that you can continue doing work in @@ -87,17 +87,17 @@ :group 'eshell-io) (defcustom eshell-output-handle 1 - "*The index of the standard output handle." + "The index of the standard output handle." :type 'integer :group 'eshell-io) (defcustom eshell-error-handle 2 - "*The index of the standard error handle." + "The index of the standard error handle." :type 'integer :group 'eshell-io) (defcustom eshell-buffer-shorthand nil - "*If non-nil, a symbol name can be used for a buffer in redirection. + "If non-nil, a symbol name can be used for a buffer in redirection. If nil, redirecting to a buffer requires buffer name syntax. If this variable is set, redirection directly to Lisp symbols will be impossible. @@ -110,7 +110,7 @@ :group 'eshell-io) (defcustom eshell-print-queue-size 5 - "*The size of the print queue, for doing buffered printing. + "The size of the print queue, for doing buffered printing. This is basically a speed enhancement, to avoid blocking the Lisp code from executing while Emacs is redisplaying." :type 'integer @@ -127,7 +127,7 @@ (let ((x-select-enable-clipboard t)) (kill-new ""))) 'eshell-clipboard-append) t)) - "*Map virtual devices name to Emacs Lisp functions. + "Map virtual devices name to Emacs Lisp functions. If the user specifies any of the filenames above as a redirection target, the function in the second element will be called. === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-mode.el 2010-09-25 21:51:55 +0000 @@ -75,54 +75,54 @@ ;;; User Variables: (defcustom eshell-mode-unload-hook nil - "*A hook that gets run when `eshell-mode' is unloaded." + "A hook that gets run when `eshell-mode' is unloaded." :type 'hook :group 'eshell-mode) (defcustom eshell-mode-hook nil - "*A hook that gets run when `eshell-mode' is entered." + "A hook that gets run when `eshell-mode' is entered." :type 'hook :group 'eshell-mode) (defcustom eshell-first-time-mode-hook nil - "*A hook that gets run the first time `eshell-mode' is entered. + "A hook that gets run the first time `eshell-mode' is entered. That is to say, the first time during an Emacs session." :type 'hook :group 'eshell-mode) (defcustom eshell-exit-hook '(eshell-query-kill-processes) - "*A hook that is run whenever `eshell' is exited. + "A hook that is run whenever `eshell' is exited. This hook is only run if exiting actually kills the buffer." :type 'hook :group 'eshell-mode) (defcustom eshell-kill-on-exit t - "*If non-nil, kill the Eshell buffer on the `exit' command. + "If non-nil, kill the Eshell buffer on the `exit' command. Otherwise, the buffer will simply be buried." :type 'boolean :group 'eshell-mode) (defcustom eshell-input-filter-functions nil - "*Functions to call before input is processed. + "Functions to call before input is processed. The input is contained in the region from `eshell-last-input-start' to `eshell-last-input-end'." :type 'hook :group 'eshell-mode) (defcustom eshell-send-direct-to-subprocesses nil - "*If t, send any input immediately to a subprocess." + "If t, send any input immediately to a subprocess." :type 'boolean :group 'eshell-mode) (defcustom eshell-expand-input-functions nil - "*Functions to call before input is parsed. + "Functions to call before input is parsed. Each function is passed two arguments, which bounds the region of the current input text." :type 'hook :group 'eshell-mode) (defcustom eshell-scroll-to-bottom-on-input nil - "*Controls whether input to interpreter causes window to scroll. + "Controls whether input to interpreter causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. If `this', scroll only the selected window. @@ -133,7 +133,7 @@ :group 'eshell-mode) (defcustom eshell-scroll-to-bottom-on-output nil - "*Controls whether interpreter output causes window to scroll. + "Controls whether interpreter output causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. If `this', scroll only the selected window. If `others', scroll only those that are not the selected window. @@ -147,7 +147,7 @@ :group 'eshell-mode) (defcustom eshell-scroll-show-maximum-output t - "*Controls how interpreter output causes window to scroll. + "Controls how interpreter output causes window to scroll. If non-nil, then show the maximum output when the window is scrolled. See variable `eshell-scroll-to-bottom-on-output' and function @@ -156,7 +156,7 @@ :group 'eshell-mode) (defcustom eshell-buffer-maximum-lines 1024 - "*The maximum size in lines for eshell buffers. + "The maximum size in lines for eshell buffers. Eshell buffers are truncated from the top to be no greater than this number, if the function `eshell-truncate-buffer' is on `eshell-output-filter-functions'." @@ -168,14 +168,14 @@ eshell-handle-control-codes eshell-handle-ansi-color eshell-watch-for-password-prompt) - "*Functions to call before output is displayed. + "Functions to call before output is displayed. These functions are only called for output that is displayed interactively, and not for output which is redirected." :type 'hook :group 'eshell-mode) (defcustom eshell-preoutput-filter-functions nil - "*Functions to call before output is inserted into the buffer. + "Functions to call before output is inserted into the buffer. These functions get one argument, a string containing the text to be inserted. They return the string as it should be inserted." :type 'hook @@ -183,18 +183,18 @@ (defcustom eshell-password-prompt-regexp "[Pp]ass\\(word\\|phrase\\).*:\\s *\\'" - "*Regexp matching prompts for passwords in the inferior process. + "Regexp matching prompts for passwords in the inferior process. This is used by `eshell-watch-for-password-prompt'." :type 'regexp :group 'eshell-mode) (defcustom eshell-skip-prompt-function nil - "*A function called from beginning of line to skip the prompt." + "A function called from beginning of line to skip the prompt." :type '(choice (const nil) function) :group 'eshell-mode) (defcustom eshell-status-in-modeline t - "*If non-nil, let the user know a command is running in the modeline." + "If non-nil, let the user know a command is running in the modeline." :type 'boolean :group 'eshell-mode) === modified file 'lisp/eshell/esh-proc.el' --- lisp/eshell/esh-proc.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-proc.el 2010-09-25 21:51:55 +0000 @@ -1,7 +1,7 @@ ;;; esh-proc.el --- process management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -40,27 +40,27 @@ ;;; User Variables: (defcustom eshell-proc-load-hook '(eshell-proc-initialize) - "*A hook that gets run when `eshell-proc' is loaded." + "A hook that gets run when `eshell-proc' is loaded." :type 'hook :group 'eshell-proc) (defcustom eshell-process-wait-seconds 0 - "*The number of seconds to delay waiting for a synchronous process." + "The number of seconds to delay waiting for a synchronous process." :type 'integer :group 'eshell-proc) (defcustom eshell-process-wait-milliseconds 50 - "*The number of milliseconds to delay waiting for a synchronous process." + "The number of milliseconds to delay waiting for a synchronous process." :type 'integer :group 'eshell-proc) (defcustom eshell-done-messages-in-minibuffer t - "*If non-nil, subjob \"Done\" messages will display in minibuffer." + "If non-nil, subjob \"Done\" messages will display in minibuffer." :type 'boolean :group 'eshell-proc) (defcustom eshell-delete-exited-processes t - "*If nil, process entries will stick around until `jobs' is run. + "If nil, process entries will stick around until `jobs' is run. This variable sets the buffer-local value of `delete-exited-processes' in Eshell buffers. @@ -81,12 +81,12 @@ (defcustom eshell-reset-signals "^\\(interrupt\\|killed\\|quit\\|stopped\\)" - "*If a termination signal matches this regexp, the terminal will be reset." + "If a termination signal matches this regexp, the terminal will be reset." :type 'regexp :group 'eshell-proc) (defcustom eshell-exec-hook nil - "*Called each time a process is exec'd by `eshell-gather-process-output'. + "Called each time a process is exec'd by `eshell-gather-process-output'. It is passed one argument, which is the process that was just started. It is useful for things that must be done each time a process is executed in a eshell mode buffer (e.g., `process-kill-without-query'). @@ -96,7 +96,7 @@ :group 'eshell-proc) (defcustom eshell-kill-hook '(eshell-reset-after-proc) - "*Called when a process run by `eshell-gather-process-output' has ended. + "Called when a process run by `eshell-gather-process-output' has ended. It is passed two arguments: the process that was just ended, and the termination status (as a string). Note that the first argument may be nil, in which case the user attempted to send a signal, but there was @@ -418,12 +418,12 @@ result)) (defcustom eshell-kill-process-wait-time 5 - "*Seconds to wait between sending termination signals to a subprocess." + "Seconds to wait between sending termination signals to a subprocess." :type 'integer :group 'eshell-proc) (defcustom eshell-kill-process-signals '(SIGINT SIGQUIT SIGKILL) - "*Signals used to kill processes when an Eshell buffer exits. + "Signals used to kill processes when an Eshell buffer exits. Eshell calls each of these signals in order when an Eshell buffer is killed; if the process is still alive afterwards, Eshell waits a number of seconds defined by `eshell-kill-process-wait-time', and @@ -432,7 +432,7 @@ :group 'eshell-proc) (defcustom eshell-kill-processes-on-exit nil - "*If non-nil, kill active processes when exiting an Eshell buffer. + "If non-nil, kill active processes when exiting an Eshell buffer. Emacs will only kill processes owned by that Eshell buffer. If nil, ownership of background and foreground processes reverts to === modified file 'lisp/eshell/esh-test.el' --- lisp/eshell/esh-test.el 2010-05-25 02:11:08 +0000 +++ lisp/eshell/esh-test.el 2010-09-25 21:51:55 +0000 @@ -43,7 +43,7 @@ (defface eshell-test-ok '((((class color) (background light)) (:foreground "Green" :bold t)) (((class color) (background dark)) (:foreground "Green" :bold t))) - "*The face used to highlight OK result strings." + "The face used to highlight OK result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-ok-face 'eshell-test-ok "22.1") @@ -51,12 +51,12 @@ '((((class color) (background light)) (:foreground "OrangeRed" :bold t)) (((class color) (background dark)) (:foreground "OrangeRed" :bold t)) (t (:bold t))) - "*The face used to highlight FAILED result strings." + "The face used to highlight FAILED result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-failed-face 'eshell-test-failed "22.1") (defcustom eshell-show-usage-metrics nil - "*If non-nil, display different usage metrics for each Eshell command." + "If non-nil, display different usage metrics for each Eshell command." :set (lambda (symbol value) (if value (add-hook 'eshell-mode-hook 'eshell-show-usage-metrics) === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2010-09-25 21:42:48 +0000 +++ lisp/eshell/esh-util.el 2010-09-25 21:51:55 +0000 @@ -32,7 +32,7 @@ ;;; User Variables: (defcustom eshell-stringify-t t - "*If non-nil, the string representation of t is 't'. + "If non-nil, the string representation of t is 't'. If nil, t will be represented only in the exit code of the function, and not printed as a string. This causes Lisp functions to behave similarly to external commands, as far as successful result output." @@ -40,45 +40,45 @@ :group 'eshell-util) (defcustom eshell-group-file "/etc/group" - "*If non-nil, the name of the group file on your system." + "If non-nil, the name of the group file on your system." :type '(choice (const :tag "No group file" nil) file) :group 'eshell-util) (defcustom eshell-passwd-file "/etc/passwd" - "*If non-nil, the name of the passwd file on your system." + "If non-nil, the name of the passwd file on your system." :type '(choice (const :tag "No passwd file" nil) file) :group 'eshell-util) (defcustom eshell-hosts-file "/etc/hosts" - "*The name of the /etc/hosts file." + "The name of the /etc/hosts file." :type '(choice (const :tag "No hosts file" nil) file) :group 'eshell-util) (defcustom eshell-handle-errors t - "*If non-nil, Eshell will handle errors itself. + "If non-nil, Eshell will handle errors itself. Setting this to nil is offered as an aid to debugging only." :type 'boolean :group 'eshell-util) (defcustom eshell-private-file-modes 384 ; umask 177 - "*The file-modes value to use for creating \"private\" files." + "The file-modes value to use for creating \"private\" files." :type 'integer :group 'eshell-util) (defcustom eshell-private-directory-modes 448 ; umask 077 - "*The file-modes value to use for creating \"private\" directories." + "The file-modes value to use for creating \"private\" directories." :type 'integer :group 'eshell-util) (defcustom eshell-tar-regexp "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|xz\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" - "*Regular expression used to match tar file names." + "Regular expression used to match tar file names." :version "24.1" ; added xz :type 'regexp :group 'eshell-util) (defcustom eshell-convert-numeric-arguments t - "*If non-nil, converting arguments of numeric form to Lisp numbers. + "If non-nil, converting arguments of numeric form to Lisp numbers. Numeric form is tested using the regular expression `eshell-number-regexp'. @@ -96,7 +96,7 @@ :group 'eshell-util) (defcustom eshell-number-regexp "-?\\([0-9]*\\.\\)?[0-9]+\\(e[-0-9.]+\\)?" - "*Regular expression used to match numeric arguments. + "Regular expression used to match numeric arguments. If `eshell-convert-numeric-arguments' is non-nil, and an argument matches this regexp, it will be converted to a Lisp number, using the function `string-to-number'." @@ -104,7 +104,7 @@ :group 'eshell-util) (defcustom eshell-ange-ls-uids nil - "*List of user/host/id strings, used to determine remote ownership." + "List of user/host/id strings, used to determine remote ownership." :type '(repeat (cons :tag "Host for User/UID map" (string :tag "Hostname") (repeat (cons :tag "User/UID List" === modified file 'lisp/eshell/esh-var.el' --- lisp/eshell/esh-var.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-var.el 2010-09-25 21:51:55 +0000 @@ -1,7 +1,7 @@ ;;; esh-var.el --- handling of variables -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -128,27 +128,27 @@ ;;; User Variables: (defcustom eshell-var-load-hook '(eshell-var-initialize) - "*A list of functions to call when loading `eshell-var'." + "A list of functions to call when loading `eshell-var'." :type 'hook :group 'eshell-var) (defcustom eshell-prefer-lisp-variables nil - "*If non-nil, prefer Lisp variables to environment variables." + "If non-nil, prefer Lisp variables to environment variables." :type 'boolean :group 'eshell-var) (defcustom eshell-complete-export-definition t - "*If non-nil, completing names for `export' shows current definition." + "If non-nil, completing names for `export' shows current definition." :type 'boolean :group 'eshell-var) (defcustom eshell-modify-global-environment nil - "*If non-nil, using `export' changes Emacs's global environment." + "If non-nil, using `export' changes Emacs's global environment." :type 'boolean :group 'eshell-var) (defcustom eshell-variable-name-regexp "[A-Za-z0-9_-]+" - "*A regexp identifying what constitutes a variable name reference. + "A regexp identifying what constitutes a variable name reference. Note that this only applies for '$NAME'. If the syntax '$' is used, then NAME can contain any character, including angle brackets, if they are quoted with a backslash." @@ -183,7 +183,7 @@ eshell-command-arguments (eshell-apply-indices eshell-command-arguments indices))))) - "*This list provides aliasing for variable references. + "This list provides aliasing for variable references. It is very similar in concept to what `eshell-user-aliases-list' does for commands. Each member of this defines defines the name of a command, and the Lisp value to return for that variable if it is ------------------------------------------------------------ revno: 101620 author: Ulrich Mueller committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-09-25 14:42:48 -0700 message: Add more xz compression support. * doc/man/etags.1: xz compression is now supported. * doc/misc/woman.texi (Interface Options): xz compression is now supported. * lib-src/etags.c (compressors, print_language_names): Support xz compression. * lisp/eshell/em-ls.el (eshell-ls-archive-regexp): * lisp/eshell/esh-util.el (eshell-tar-regexp): * lisp/ibuffer.el (ibuffer-compressed-file-name-regexp): * lisp/info.el (Info-suffix-list): * lisp/international/mule.el (auto-coding-alist): * lisp/woman.el (woman-file-regexp, woman-file-compression-regexp): * lisp/progmodes/etags.el (tags-compression-info-list): Support xz compression. diff: === modified file 'doc/man/ChangeLog' --- doc/man/ChangeLog 2010-09-01 07:13:21 +0000 +++ doc/man/ChangeLog 2010-09-25 21:42:48 +0000 @@ -1,3 +1,7 @@ +2010-09-25 Ulrich Mueller + + * etags.1: xz compression is now supported. + 2010-08-26 Sven Joachim * emacs.1: Mention "maximized" value for the "fullscreen" X resource. === modified file 'doc/man/etags.1' --- doc/man/etags.1 2010-01-13 08:35:10 +0000 +++ doc/man/etags.1 2010-09-25 21:42:48 +0000 @@ -62,7 +62,7 @@ with absolute file names. Files generated from a source file\-\-like a C file generated from a source Cweb file\-\-will be recorded with the name of the source file. -Compressed files are supported using gzip and bzip2. +Compressed files are supported using gzip, bzip2, and xz. The programs recognize the language used in an input file based on its file name and contents. The \fB\-\-language\fP switch can be used to force parsing of the file names following the switch according to the given === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-09-24 02:38:11 +0000 +++ doc/misc/ChangeLog 2010-09-25 21:42:48 +0000 @@ -1,3 +1,7 @@ +2010-09-25 Ulrich Mueller + + * woman.texi (Interface Options): xz compression is now supported. + 2010-09-24 Glenn Morris * url.texi (Disk Caching): Tweak previous change. === modified file 'doc/misc/woman.texi' --- doc/misc/woman.texi 2010-06-24 07:10:51 +0000 +++ doc/misc/woman.texi 2010-09-25 21:42:48 +0000 @@ -1121,8 +1121,8 @@ for which decompressors are available and handled by auto-compression mode. It should begin with @code{\\.} and end with @code{\\'} and @emph{must not} be optional. The default value is -@code{"\\.\\(g?z\\|bz2\\)\\'"}, which matches the @code{gzip} and -@code{bzip2} compression extensions. +@code{"\\.\\(g?z\\|bz2\\|xz\\)\\'"}, which matches the @code{gzip}, +@code{bzip2}, and @code{xz} compression extensions. @emph{Do not change this unless you are sure you know what you are doing!} === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-08-11 09:16:35 +0000 +++ lib-src/ChangeLog 2010-09-25 21:42:48 +0000 @@ -1,3 +1,7 @@ +2010-09-25 Ulrich Mueller + + * etags.c (compressors, print_language_names): Support xz compression. + 2010-08-11 Jan Djärv * fakemail.c: Include stdlib.h for getenv. Remove declaration of === modified file 'lib-src/etags.c' --- lib-src/etags.c 2010-08-11 08:20:34 +0000 +++ lib-src/etags.c 2010-09-25 21:42:48 +0000 @@ -561,6 +561,7 @@ { "gz", "gzip -d -c"}, { "GZ", "gzip -d -c"}, { "bz2", "bzip2 -d -c" }, + { "xz", "xz -d -c" }, { NULL } }; @@ -874,7 +875,7 @@ Fortran is tried first; if no tags are found, C is tried next.\n\ When parsing any C file, a \"class\" or \"template\" keyword\n\ switches to C++."); - puts ("Compressed files are supported using gzip and bzip2.\n\ + puts ("Compressed files are supported using gzip, bzip2, and xz.\n\ \n\ For detailed help on a given language use, for example,\n\ etags --help --lang=ada."); === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 20:16:35 +0000 +++ lisp/ChangeLog 2010-09-25 21:42:48 +0000 @@ -1,3 +1,14 @@ +2010-09-25 Ulrich Mueller + + * eshell/em-ls.el (eshell-ls-archive-regexp): + * eshell/esh-util.el (eshell-tar-regexp): + * ibuffer.el (ibuffer-compressed-file-name-regexp): + * info.el (Info-suffix-list): + * international/mule.el (auto-coding-alist): + * woman.el (woman-file-regexp, woman-file-compression-regexp): + * progmodes/etags.el (tags-compression-info-list): + Support xz compression. + 2010-09-25 Chong Yidong * files.el (get-free-disk-space): Don't assume the "df" output === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2010-02-09 01:58:57 +0000 +++ lisp/eshell/em-ls.el 2010-09-25 21:42:48 +0000 @@ -162,10 +162,11 @@ (defcustom eshell-ls-archive-regexp (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" - "zip\\|[zZ]\\|gz\\|bz2\\|deb\\|rpm\\)\\'") + "zip\\|[zZ]\\|gz\\|bz2\\|xz\\|deb\\|rpm\\)\\'") "*A regular expression that matches names of file archives. This typically includes both traditional archives and compressed files." + :version "24.1" ; added xz :type 'regexp :group 'eshell-ls) === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2010-02-07 06:23:10 +0000 +++ lisp/eshell/esh-util.el 2010-09-25 21:42:48 +0000 @@ -71,8 +71,9 @@ :group 'eshell-util) (defcustom eshell-tar-regexp - "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" + "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|xz\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" "*Regular expression used to match tar file names." + :version "24.1" ; added xz :type 'regexp :group 'eshell-util) === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2010-08-29 22:15:09 +0000 +++ lisp/ibuffer.el 2010-09-25 21:42:48 +0000 @@ -332,8 +332,9 @@ :group 'ibuffer) (defcustom ibuffer-compressed-file-name-regexp - "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$" + "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|xz\\|zip\\|z\\)$" "Regexp to match compressed file names." + :version "24.1" ; added xz :type 'regexp :group 'ibuffer) === modified file 'lisp/info.el' --- lisp/info.el 2010-08-29 22:15:09 +0000 +++ lisp/info.el 2010-09-25 21:42:48 +0000 @@ -402,24 +402,28 @@ (".info.gz". "gunzip") (".info.z". "gunzip") (".info.bz2" . ("bzip2" "-dc")) + (".info.xz". "unxz") (".info". nil) ("-info.Z". "uncompress") ("-info.Y". "unyabba") ("-info.gz". "gunzip") ("-info.bz2" . ("bzip2" "-dc")) ("-info.z". "gunzip") + ("-info.xz". "unxz") ("-info". nil) ("/index.Z". "uncompress") ("/index.Y". "unyabba") ("/index.gz". "gunzip") ("/index.z". "gunzip") ("/index.bz2". ("bzip2" "-dc")) + ("/index.xz". "unxz") ("/index". nil) (".Z". "uncompress") (".Y". "unyabba") (".gz". "gunzip") (".z". "gunzip") (".bz2" . ("bzip2" "-dc")) + (".xz". "unxz") ("". nil))) "List of file name suffixes and associated decoding commands. Each entry should be (SUFFIX . STRING); the file is given to === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-08-30 13:03:05 +0000 +++ lisp/international/mule.el 2010-09-25 21:42:48 +0000 @@ -1679,7 +1679,7 @@ . no-conversion-multibyte) ("\\.\\(exe\\|EXE\\)\\'" . no-conversion) ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) - ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) + ("\\.\\(gz\\|Z\\|bz\\|bz2\\|xz\\|gpg\\)\\'" . no-conversion) ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) ("\\.pdf\\'" . no-conversion) ("/#[^/]+#\\'" . emacs-mule))) @@ -1690,6 +1690,7 @@ The settings in this alist take priority over `coding:' tags in the file (see the function `set-auto-coding') and the contents of `file-coding-system-alist'." + :version "24.1" ; added xz :group 'files :group 'mule :type '(repeat (cons (regexp :tag "File name regexp") === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2010-09-25 12:04:35 +0000 +++ lisp/progmodes/etags.el 2010-09-25 21:42:48 +0000 @@ -68,12 +68,14 @@ :type '(repeat file)) ;;;###autoload -(defcustom tags-compression-info-list (purecopy '("" ".Z" ".bz2" ".gz" ".tgz")) +(defcustom tags-compression-info-list + (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) "*List of extensions tried by etags when jka-compr is used. An empty string means search the non-compressed file. These extensions will be tried only if jka-compr was activated \(i.e. via customize of `auto-compression-mode' or by calling the function `auto-compression-mode')." + :version "24.1" ; added xz :type '(repeat string) :group 'etags) === modified file 'lisp/woman.el' --- lisp/woman.el 2010-08-29 16:17:13 +0000 +++ lisp/woman.el 2010-09-25 21:42:48 +0000 @@ -810,7 +810,7 @@ (defvar woman-file-regexp nil "Regexp used to select (possibly compressed) man source files, e.g. -\"\\.\\([0-9lmnt]\\w*\\)\\(\\.\\(g?z\\|bz2\\)\\)?\\'\". +\"\\.\\([0-9lmnt]\\w*\\)\\(\\.\\(g?z\\|bz2\\|xz\\)\\)?\\'\". Built automatically from the customizable user options `woman-uncompressed-file-regexp' and `woman-file-compression-regexp'.") @@ -846,16 +846,17 @@ :group 'woman-interface) (defcustom woman-file-compression-regexp - "\\.\\(g?z\\|bz2\\)\\'" + "\\.\\(g?z\\|bz2\\|xz\\)\\'" "Do not change this unless you are sure you know what you are doing! Regexp used to match compressed man file extensions for which decompressors are available and handled by auto-compression mode, -e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\)\\\\'\" for `gzip' or `bzip2'. +e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\|xz\\\\)\\\\'\" for `gzip', `bzip2', or `xz'. Should begin with \\. and end with \\' and MUST NOT be optional." ;; Should be compatible with car of ;; `jka-compr-file-name-handler-entry', but that is unduly ;; complicated, includes an inappropriate extension (.tgz) and is ;; not loaded by default! + :version "24.1" ; added xz :type 'regexp :set 'set-woman-file-regexp :group 'woman-interface) ------------------------------------------------------------ revno: 101619 author: Julien Danjou committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-09-25 13:59:05 -0700 message: Small url-cache fix. * lisp/url/url-cache.el (url-cache-create-filename): Ensure no-port and default-port end up with the same cache file. (url-cache-create-filename-human-readable) (url-cache-create-filename-using-md5): Argument is always in the form of a string now. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-09-23 19:00:31 +0000 +++ lisp/url/ChangeLog 2010-09-25 20:59:05 +0000 @@ -1,3 +1,11 @@ +2010-09-25 Julien Danjou + + * url-cache.el (url-cache-create-filename): Ensure no-port and + default-port end up with the same cache file. + (url-cache-create-filename-human-readable) + (url-cache-create-filename-using-md5): Argument is always in the form of + a string now. + 2010-09-23 Glenn Morris * url-cache.el (url-is-cached): Doc fix. === modified file 'lisp/url/url-cache.el' --- lisp/url/url-cache.el 2010-09-23 19:00:31 +0000 +++ lisp/url/url-cache.el 2010-09-25 20:59:05 +0000 @@ -95,8 +95,7 @@ (defun url-cache-create-filename-human-readable (url) "Return a filename in the local cache for URL." (if url - (let* ((url (if (vectorp url) (url-recreate-url url) url)) - (urlobj (url-generic-parse-url url)) + (let* ((urlobj (url-generic-parse-url url)) (protocol (url-type urlobj)) (hostname (url-host urlobj)) (host-components @@ -154,8 +153,7 @@ Very fast if you have an `md5' primitive function, suitably fast otherwise." (require 'md5) (if url - (let* ((url (if (vectorp url) (url-recreate-url url) url)) - (checksum (md5 url)) + (let* ((checksum (md5 url)) (urlobj (url-generic-parse-url url)) (protocol (url-type urlobj)) (hostname (url-host urlobj)) @@ -185,7 +183,13 @@ :group 'url-cache) (defun url-cache-create-filename (url) - (funcall url-cache-creation-function url)) + (funcall url-cache-creation-function + ;; We need to parse+recreate in order to remove the default port + ;; if it has been specified: e.g. http://www.example.com:80 will + ;; be transcoded as http://www.example.com + (url-recreate-url + (if (vectorp url) url + (url-generic-parse-url url))))) ;;;###autoload (defun url-cache-extract (fnam) ------------------------------------------------------------ revno: 101618 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-09-25 16:16:35 -0400 message: * files.el (get-free-disk-space): Don't assume "df" output columns line up (Bug#6995). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 12:04:35 +0000 +++ lisp/ChangeLog 2010-09-25 20:16:35 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Chong Yidong + + * files.el (get-free-disk-space): Don't assume the "df" output + columns line up (Bug#6995). + 2010-09-25 Juanma Barranquero * finder.el (finder-unknown-keywords): === modified file 'lisp/files.el' --- lisp/files.el 2010-09-24 03:06:33 +0000 +++ lisp/files.el 2010-09-25 20:16:35 +0000 @@ -5622,22 +5622,17 @@ directory-free-space-args dir) 0))) - ;; Usual format is as follows: - ;; Filesystem ... Used Available Capacity ... - ;; /dev/sda6 ...48106535 35481255 10669850 ... + ;; Assume that the "available" column is before the + ;; "capacity" column. Find the "%" and scan backward. (goto-char (point-min)) - (when (re-search-forward " +Avail[^ \n]*" - (line-end-position) t) - (let ((beg (match-beginning 0)) - (end (match-end 0)) - str) - (forward-line 1) - (setq str - (buffer-substring-no-properties - (+ beg (point) (- (point-min))) - (+ end (point) (- (point-min))))) - (when (string-match "\\` *\\([^ ]+\\)" str) - (match-string 1 str)))))))))) + (forward-line 1) + (when (re-search-forward + "[[:space:]]+[^[:space:]]+%[^%]*$" + (line-end-position) t) + (goto-char (match-beginning 0)) + (let ((endpt (point))) + (skip-chars-backward "^[:space:]") + (buffer-substring-no-properties (point) endpt))))))))) ;; The following expression replaces `dired-move-to-filename-regexp'. (defvar directory-listing-before-filename-regexp ------------------------------------------------------------ revno: 101617 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-09-25 15:50:13 -0400 message: * src/insdel.c (prepare_to_modify_buffer): Ensure the mark marker is alive before using it (Bug#6977). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 16:39:13 +0000 +++ src/ChangeLog 2010-09-25 19:50:13 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Chong Yidong + + * insdel.c (prepare_to_modify_buffer): Ensure the mark marker is + alive before using it (Bug#6977). + 2010-09-25 Lars Magne Ingebrigtsen * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup. === modified file 'src/insdel.c' --- src/insdel.c 2010-09-22 16:03:34 +0000 +++ src/insdel.c 2010-09-25 19:50:13 +0000 @@ -2051,13 +2051,14 @@ /* If `select-active-regions' is non-nil, save the region text. */ if (!NILP (current_buffer->mark_active) + && XMARKER (current_buffer->mark)->buffer && NILP (Vsaved_region_selection) && (EQ (Vselect_active_regions, Qonly) ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) { - EMACS_INT b = XINT (Fmarker_position (current_buffer->mark)); + EMACS_INT b = XMARKER (current_buffer->mark)->charpos; EMACS_INT e = PT; if (b < e) Vsaved_region_selection = make_buffer_string (b, e, 0); ------------------------------------------------------------ revno: 101616 [merge] committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-09-25 15:19:41 -0400 message: Merge changes from emacs-23 branch. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2010-09-25 12:04:35 +0000 +++ lisp/cedet/ChangeLog 2010-09-25 18:55:16 +0000 @@ -1,3 +1,11 @@ +2010-09-25 Chong Yidong + + * ede/linux.el (ede-project-class-files): + * ede/generic.el (ede-generic-new-autoloader): + * ede/emacs.el (ede-project-class-files): + * ede/simple.el (ede-project-class-files): + * ede/cpp-root.el (ede-project-class-files): Fix require name. + 2010-09-25 Juanma Barranquero * semantic/lex.el (semantic-ignore-comments): Doc fix. === modified file 'lisp/cedet/ede/cpp-root.el' --- lisp/cedet/ede/cpp-root.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/cpp-root.el 2010-09-25 18:49:43 +0000 @@ -131,7 +131,7 @@ ;; (add-to-list 'ede-project-class-files ;; (ede-project-autoload "cpp-root" ;; :name "CPP ROOT" -;; :file 'ede-cpp-root +;; :file 'ede/cpp-root ;; :proj-file 'MY-FILE-FOR-DIR ;; :proj-root 'MY-ROOT-FCN ;; :load-type 'MY-LOAD @@ -241,7 +241,7 @@ (add-to-list 'ede-project-class-files (ede-project-autoload "cpp-root" :name "CPP ROOT" - :file 'ede-cpp-root + :file 'ede/cpp-root :proj-file 'ede-cpp-root-project-file-for-dir :proj-root 'ede-cpp-root-project-root :load-type 'ede-cpp-root-load === modified file 'lisp/cedet/ede/emacs.el' --- lisp/cedet/ede/emacs.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/emacs.el 2010-09-25 18:49:43 +0000 @@ -137,7 +137,7 @@ (add-to-list 'ede-project-class-files (ede-project-autoload "emacs" :name "EMACS ROOT" - :file 'ede-emacs + :file 'ede/emacs :proj-file "src/emacs.c" :proj-root 'ede-emacs-project-root :load-type 'ede-emacs-load === modified file 'lisp/cedet/ede/generic.el' --- lisp/cedet/ede/generic.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/generic.el 2010-09-25 18:49:43 +0000 @@ -368,7 +368,7 @@ (add-to-list 'ede-project-class-files (ede-project-autoload internal-name :name external-name - :file 'ede-generic + :file 'ede/generic :proj-file projectfile :load-type 'ede-generic-load :class-sym class === modified file 'lisp/cedet/ede/linux.el' --- lisp/cedet/ede/linux.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/linux.el 2010-09-25 18:49:43 +0000 @@ -116,7 +116,7 @@ (add-to-list 'ede-project-class-files (ede-project-autoload "linux" :name "LINUX ROOT" - :file 'ede-linux + :file 'ede/linux :proj-file "scripts/ver_linux" :proj-root 'ede-linux-project-root :load-type 'ede-linux-load === modified file 'lisp/cedet/ede/simple.el' --- lisp/cedet/ede/simple.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/simple.el 2010-09-25 18:49:43 +0000 @@ -47,7 +47,7 @@ (add-to-list 'ede-project-class-files (ede-project-autoload "simple-overlay" - :name "Simple" :file 'ede-simple + :name "Simple" :file 'ede/simple :proj-file 'ede-simple-projectfile-for-dir :load-type 'ede-simple-load :class-sym 'ede-simple-project) ------------------------------------------------------------ revno: 101615 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sat 2010-09-25 18:39:13 +0200 message: Fix up some EMACS_INT/int conversion errors related to xdisp.c. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 16:25:04 +0000 +++ src/ChangeLog 2010-09-25 16:39:13 +0000 @@ -1,5 +1,12 @@ 2010-09-25 Lars Magne Ingebrigtsen + * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup. + + * dispextern.h: EMACS_INT/int fixup. + + * xdisp.c (string_pos_nchars_ahead, init_iterator): EMACS_INT/int + fixup. + * xrdb.c (magic_file_p): EMACS_INT/int fixup. 2010-09-25 Eli Zaretskii === modified file 'src/dispextern.h' --- src/dispextern.h 2010-09-25 09:36:36 +0000 +++ src/dispextern.h 2010-09-25 16:39:13 +0000 @@ -2938,7 +2938,7 @@ int get_next_display_element (struct it *); void set_iterator_to_next (struct it *, int); void start_display (struct it *, struct window *, struct text_pos); -void move_it_to (struct it *, int, int, int, int, int); +void move_it_to (struct it *, EMACS_INT, int, int, int, int); void move_it_vertically (struct it *, int); void move_it_vertically_backward (struct it *, int); void move_it_by_lines (struct it *, int, int); === modified file 'src/xdisp.c' --- src/xdisp.c 2010-09-25 09:36:36 +0000 +++ src/xdisp.c 2010-09-25 16:39:13 +0000 @@ -1052,8 +1052,8 @@ static void back_to_previous_line_start (struct it *); static int forward_to_next_line_start (struct it *, int *); static struct text_pos string_pos_nchars_ahead (struct text_pos, - Lisp_Object, int); -static struct text_pos string_pos (int, Lisp_Object); + Lisp_Object, EMACS_INT); +static struct text_pos string_pos (EMACS_INT, Lisp_Object); static struct text_pos c_string_pos (int, const unsigned char *, int); static int number_of_chars (const unsigned char *, int); static void compute_stop_pos (struct it *); @@ -1522,13 +1522,13 @@ in STRING, return the position NCHARS ahead (NCHARS >= 0). */ static struct text_pos -string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, int nchars) +string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, EMACS_INT nchars) { xassert (STRINGP (string) && nchars >= 0); if (STRING_MULTIBYTE (string)) { - int rest = SBYTES (string) - BYTEPOS (pos); + EMACS_INT rest = SBYTES (string) - BYTEPOS (pos); const unsigned char *p = SDATA (string) + BYTEPOS (pos); int len; @@ -1552,7 +1552,7 @@ for character position CHARPOS in STRING. */ static INLINE struct text_pos -string_pos (int charpos, Lisp_Object string) +string_pos (EMACS_INT charpos, Lisp_Object string) { struct text_pos pos; xassert (STRINGP (string)); @@ -2653,7 +2653,7 @@ && WINDOWP (minibuf_selected_window) && w == XWINDOW (minibuf_selected_window)))) { - int charpos = marker_position (current_buffer->mark); + EMACS_INT charpos = marker_position (current_buffer->mark); it->region_beg_charpos = min (PT, charpos); it->region_end_charpos = max (PT, charpos); } @@ -2899,7 +2899,7 @@ { Lisp_Object prop, window; int ellipses_p = 0; - int charpos = CHARPOS (pos->pos); + EMACS_INT charpos = CHARPOS (pos->pos); /* If POS specifies a position in a display vector, this might be for an ellipsis displayed for invisible text. We won't @@ -3455,7 +3455,8 @@ } else { - int base_face_id, bufpos; + int base_face_id; + EMACS_INT bufpos; int i; Lisp_Object from_overlay = (it->current.overlay_string_index >= 0 @@ -3579,7 +3580,8 @@ if (STRINGP (it->string)) { - int bufpos, base_face_id; + EMACS_INT bufpos; + int base_face_id; /* No face change past the end of the string (for the case we are padding with spaces). No face change before the @@ -3622,7 +3624,7 @@ if (STRING_MULTIBYTE (it->string)) { const unsigned char *p = SDATA (it->string) + BYTEPOS (pos); - int rest = SBYTES (it->string) - BYTEPOS (pos); + EMACS_INT rest = SBYTES (it->string) - BYTEPOS (pos); int c, len; struct face *face = FACE_FROM_ID (it->f, face_id); @@ -7411,7 +7413,7 @@ TO_CHARPOS. */ void -move_it_to (struct it *it, int to_charpos, int to_x, int to_y, int to_vpos, int op) +move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos, int op) { enum move_it_result skip, skip2 = MOVE_X_REACHED; int line_height, line_start_x = 0, reached = 0; ------------------------------------------------------------ revno: 101614 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sat 2010-09-25 18:25:04 +0200 message: xrdb.c EMACS_INT/int audit. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 13:21:20 +0000 +++ src/ChangeLog 2010-09-25 16:25:04 +0000 @@ -1,3 +1,7 @@ +2010-09-25 Lars Magne Ingebrigtsen + + * xrdb.c (magic_file_p): EMACS_INT/int fixup. + 2010-09-25 Eli Zaretskii * window.c (Fpos_visible_in_window_p, Fdelete_other_windows) === modified file 'src/xrdb.c' --- src/xrdb.c 2010-08-11 12:34:46 +0000 +++ src/xrdb.c 2010-09-25 16:25:04 +0000 @@ -127,7 +127,7 @@ Return NULL otherwise. */ static char * -magic_file_p (const char *string, int string_len, const char *class, const char *escaped_suffix, const char *suffix) +magic_file_p (const char *string, EMACS_INT string_len, const char *class, const char *escaped_suffix, const char *suffix) { char *lang = getenv ("LANG"); ------------------------------------------------------------ revno: 101613 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 15:07:55 +0000 message: nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers for prettier summary display. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 14:24:54 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 15:07:55 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Lars Magne Ingebrigtsen + + * nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers + for prettier summary display. + 2010-09-25 Andrew Cohen (tiny change) * nnir.el (nnir-run-imap): Allow sending IMAP search patterns === modified file 'lisp/gnus/nndraft.el' --- lisp/gnus/nndraft.el 2010-09-18 23:36:29 +0000 +++ lisp/gnus/nndraft.el 2010-09-25 15:07:55 +0000 @@ -79,7 +79,7 @@ (nndraft-possibly-change-group group) (with-current-buffer nntp-server-buffer (erase-buffer) - (let* (article) + (let (article lines chars) ;; We don't support fetching by Message-ID. (if (stringp (car articles)) 'headers @@ -91,9 +91,12 @@ (if (search-forward "\n\n" nil t) (forward-line -1) (goto-char (point-max))) + (setq lines (count-lines (point) (point-max)) + chars (- (point-max) (point))) (delete-region (point) (point-max)) (goto-char (point-min)) (insert (format "221 %d Article retrieved.\n" article)) + (insert (format "Lines: %d\nChars: %d\n" lines chars)) (widen) (goto-char (point-max)) (insert ".\n"))) ------------------------------------------------------------ revno: 101612 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 14:24:54 +0000 message: nnir.el (nnir-run-imap): Allow sending IMAP search patterns directly. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 14:19:38 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 14:24:54 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Andrew Cohen (tiny change) + + * nnir.el (nnir-run-imap): Allow sending IMAP search patterns + directly. + 2010-09-25 Lars Magne Ingebrigtsen * gnus.el (gnus-local-domain): Put gnus-local-domain back again, since === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2010-09-24 00:38:10 +0000 +++ lisp/gnus/nnir.el 2010-09-25 14:24:54 +0000 @@ -345,14 +345,16 @@ (gnus-declare-backend "nnir" 'mail) (defvar nnir-imap-search-field "TEXT" - "The IMAP search item when doing an nnir search") + "The IMAP search item when doing an nnir search. To use raw + imap queries by default set this to \"\"") (defvar nnir-imap-search-arguments '(("Whole message" . "TEXT") ("Subject" . "SUBJECT") ("To" . "TO") ("From" . "FROM") - (nil . "HEADER \"%s\"")) + ("Head" . "HEADER \"%s\"") + (nil . "")) "Mapping from user readable strings to IMAP search items for use in nnir") (defvar nnir-imap-search-argument-history () @@ -981,8 +983,11 @@ (message "Searching %s..." group) (let ((arts 0) (result - (nnimap-command "UID SEARCH %s" - (nnir-imap-make-query criteria qstring)))) + (nnimap-command "UID SEARCH %s" + (if (string= criteria "") + qstring + (nnir-imap-make-query criteria qstring) + )))) (mapc (lambda (artnum) (push (vector group artnum 1) artlist) ------------------------------------------------------------ revno: 101611 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 14:19:38 +0000 message: nnimap.el (nnimap-open-connection): Wait for the response to STARTTLS before starting negotiation. gnus.el (gnus-local-domain): Put gnus-local-domain back again, since apparently third-party libraries depend on it. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 14:05:46 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 14:19:38 +0000 @@ -1,5 +1,11 @@ 2010-09-25 Lars Magne Ingebrigtsen + * gnus.el (gnus-local-domain): Put gnus-local-domain back again, since + apparently third-party libraries depend on it. + + * nnimap.el (nnimap-open-connection): Wait for the response to STARTTLS + before starting negotiation. + * gnus-art.el (gnus-treat-from-gravatar): Change default to nil for privacy reasons. (gnus-treat-mail-gravatar): Ditto. === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/gnus.el 2010-09-25 14:19:38 +0000 @@ -1428,6 +1428,15 @@ "Default default new newsgroups the first time Gnus is run. Should be set in paths.el, and shouldn't be touched by the user.") +(defcustom gnus-local-domain nil + "Local domain name without a host name. +The DOMAINNAME environment variable is used instead if it is defined. +If the function `system-name' returns the full Internet name, there is +no need to set this variable." + :group 'gnus-message + :type '(choice (const :tag "default" nil) + string)) + (defvar gnus-local-organization nil "String with a description of what organization (if any) the user belongs to. Obsolete variable; use `message-user-organization' instead.") === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/nnimap.el 2010-09-25 14:19:38 +0000 @@ -310,7 +310,7 @@ (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) (when (setq connection-result (nnimap-wait-for-connection)) (when (eq nnimap-stream 'starttls) - (nnimap-send-command "STARTTLS") + (nnimap-command "STARTTLS") (starttls-negotiate (nnimap-process nnimap-object))) (unless (equal connection-result "PREAUTH") (if (not (setq credentials ------------------------------------------------------------ revno: 101610 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 14:05:46 +0000 message: gnus-art.el (gnus-treat-from-gravatar, gnus-treat-mail-gravatar): Change default to nil for privacy reasons. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 13:43:27 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 14:05:46 +0000 @@ -1,5 +1,9 @@ 2010-09-25 Lars Magne Ingebrigtsen + * gnus-art.el (gnus-treat-from-gravatar): Change default to nil for + privacy reasons. + (gnus-treat-mail-gravatar): Ditto. + * gnus-ems.el (gnus-put-image): Don't put any non-blank text into the buffer when inserting images. Inserting text into the headers, for instance, can make them invalid. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-09-25 12:49:02 +0000 +++ lisp/gnus/gnus-art.el 2010-09-25 14:05:46 +0000 @@ -1529,8 +1529,7 @@ :type gnus-article-treat-head-custom) (put 'gnus-treat-newsgroups-picon 'highlight t) -(defcustom gnus-treat-from-gravatar - (when (display-images-p) 'head) +(defcustom gnus-treat-from-gravatar nil "Display gravatars in the From header. Valid values are nil, t, `head', `first', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info @@ -1543,8 +1542,7 @@ :type gnus-article-treat-head-custom) (put 'gnus-treat-from-gravatar 'highlight t) -(defcustom gnus-treat-mail-gravatar - (when (display-images-p) 'head) +(defcustom gnus-treat-mail-gravatar nil "Display gravatars in To and Cc headers. Valid values are nil, t, `head', `first', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info ------------------------------------------------------------ revno: 101609 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 13:43:27 +0000 message: gnus-ems.el (gnus-put-image):Don't put any non-blank text into the buffer when inserting images. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 13:28:07 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 13:43:27 +0000 @@ -1,3 +1,9 @@ +2010-09-25 Lars Magne Ingebrigtsen + + * gnus-ems.el (gnus-put-image): Don't put any non-blank text into the + buffer when inserting images. Inserting text into the headers, for + instance, can make them invalid. + 2010-09-25 Julien Danjou * rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function === modified file 'lisp/gnus/gnus-ems.el' --- lisp/gnus/gnus-ems.el 2010-09-03 01:00:10 +0000 +++ lisp/gnus/gnus-ems.el 2010-09-25 13:43:27 +0000 @@ -276,7 +276,7 @@ (defun gnus-put-image (glyph &optional string category) (let ((point (point))) - (insert-image glyph (or string "*")) + (insert-image glyph (or string " ")) (put-text-property point (point) 'gnus-image-category category) (unless string (put-text-property (1- (point)) (point) ------------------------------------------------------------ revno: 101608 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 13:28:07 +0000 message: Merge changes made in Gnus trunk. gnus-bookmark.el: Remove useless gnus-bookmark-after-jump-hook. gnus-group.el: Remove useless gnus-group-icon-cache. gnus-group.el: Remove useless gnus-ephemeral-group-server. gnus-picon.el: Remove useless gnus-picon-setup-p. gnus-sum.el: Remove useless gnus-newsgroup-none-id. gnus-uu.el: Remove gnus-uu-shar-file-name. gnus.el: Remove useless gnus-use-generic-from. gnus.el: Remove obsolete variable gnus-topic-indentation. mml1991.el: Remove useless mml1991-verbose. mml2015.el: Remove mc-default-scheme and mc-schemes useless variables. nnheader.el: Remove useless variables news-reply-yank-message-id and news-reply-yank-from. rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function variable. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-25 12:49:02 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 13:28:07 +0000 @@ -1,5 +1,30 @@ 2010-09-25 Julien Danjou + * rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function + variables. + + * nnheader.el: Remove useless variables news-reply-yank-from and + news-reply-yank-message-id. + + * mml2015.el: Remove useless mc-default-scheme and mc-schemes + variables. + + * mml1991.el: Remove useless mml1991-verbose. + + * gnus.el: Remove useless variable gnus-use-generic-from. + Remove obsolete variable gnus-topic-indentation. + + * gnus-uu.el: Remove useless gnus-uu-shar-file-name. + + * gnus-sum.el: Remove useless gnus-newsgroup-none-id. + + * gnus-picon.el: Remove useless gnus-picon-setup-p variable. + + * gnus-group.el: Remove useless gnus-group-icon-cache. + Remove useless gnus-ephemeral-group-server. + + * gnus-bookmark.el: Remove useless gnus-bookmark-after-jump-hook. + * mml2015.el: Remove useless mml2015-verbose. * mml-smime.el: Remove useless mml-smime-verbose. === modified file 'lisp/gnus/gnus-bookmark.el' --- lisp/gnus/gnus-bookmark.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-bookmark.el 2010-09-25 13:28:07 +0000 @@ -156,9 +156,6 @@ "The current version of the format used by bookmark files. You should never need to change this.") -(defvar gnus-bookmark-after-jump-hook nil - "Hook run after `gnus-bookmark-jump' jumps to a Gnus bookmark.") - (defvar gnus-bookmark-alist () "Association list of Gnus bookmarks and their records. The format of the alist is === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus-group.el 2010-09-25 13:28:07 +0000 @@ -548,8 +548,6 @@ (defvar gnus-group-list-mode nil) -(defvar gnus-group-icon-cache nil) - (defvar gnus-group-listed-groups nil) (defvar gnus-group-list-option nil) @@ -2222,8 +2220,6 @@ (other-frame 1)))) (gnus-fetch-group group)) -(defvar gnus-ephemeral-group-server 0) - (defcustom gnus-large-ephemeral-newsgroup 200 "The number of articles which indicates a large ephemeral newsgroup. Same as `gnus-large-newsgroup', but only used for ephemeral newsgroups. === modified file 'lisp/gnus/gnus-picon.el' --- lisp/gnus/gnus-picon.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-picon.el 2010-09-25 13:28:07 +0000 @@ -101,7 +101,6 @@ ;;; Internal variables: -(defvar gnus-picon-setup-p nil) (defvar gnus-picon-glyph-alist nil "Picon glyphs cache. List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.") === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus-sum.el 2010-09-25 13:28:07 +0000 @@ -6216,8 +6216,6 @@ (unless (gnus-ephemeral-group-p group) (gnus-group-update-group group t)))))) -(defvar gnus-newsgroup-none-id 0) - (defun gnus-get-newsgroup-headers (&optional dependencies force-new) (let ((cur nntp-server-buffer) (dependencies === modified file 'lisp/gnus/gnus-uu.el' --- lisp/gnus/gnus-uu.el 2010-09-18 10:02:19 +0000 +++ lisp/gnus/gnus-uu.el 2010-09-25 13:28:07 +0000 @@ -335,7 +335,6 @@ (defvar gnus-uu-shar-begin-string "^#! */bin/sh") -(defvar gnus-uu-shar-file-name nil) (defvar gnus-uu-shar-name-marker "begin 0?[0-7][0-7][0-7][ \t]+\\(\\(\\w\\|[.\\:]\\)*\\b\\)") === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-09-25 12:49:02 +0000 +++ lisp/gnus/gnus.el 2010-09-25 13:28:07 +0000 @@ -2621,9 +2621,6 @@ (defvar gnus-tree-buffer "*Tree*" "Buffer where Gnus thread trees are displayed.") -;; Dummy variable. -(defvar gnus-use-generic-from nil) - ;; Variable holding the user answers to all method prompts. (defvar gnus-method-history nil) @@ -2651,8 +2648,6 @@ ,(nnheader-concat gnus-cache-directory "active")))) "List of predefined (convenience) servers.") -(defvar gnus-topic-indentation "") ;; Obsolete variable. - (defconst gnus-article-mark-lists '((marked . tick) (replied . reply) (expirable . expire) (killed . killed) === modified file 'lisp/gnus/mml1991.el' --- lisp/gnus/mml1991.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mml1991.el 2010-09-25 13:28:07 +0000 @@ -65,9 +65,6 @@ mml1991-epg-encrypt)) "Alist of PGP functions.") -(defvar mml1991-verbose mml-secure-verbose - "If non-nil, ask the user about the current operation more verbosely.") - (defvar mml1991-cache-passphrase mml-secure-cache-passphrase "If t, cache passphrase.") === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2010-09-25 12:49:02 +0000 +++ lisp/gnus/mml2015.el 2010-09-25 13:28:07 +0000 @@ -188,9 +188,6 @@ (autoload 'mc-cleanup-recipient-headers "mc-toplev") (autoload 'mc-sign-generic "mc-toplev") -(defvar mc-default-scheme) -(defvar mc-schemes) - (defvar mml2015-decrypt-function 'mailcrypt-decrypt) (defvar mml2015-verify-function 'mailcrypt-verify) === modified file 'lisp/gnus/nnheader.el' --- lisp/gnus/nnheader.el 2010-09-20 00:36:54 +0000 +++ lisp/gnus/nnheader.el 2010-09-25 13:28:07 +0000 @@ -570,8 +570,6 @@ (defvar nntp-server-buffer nil) (defvar nntp-process-response nil) -(defvar news-reply-yank-from nil) -(defvar news-reply-yank-message-id nil) (defvar nnheader-callback-function nil) === modified file 'lisp/gnus/rfc1843.el' --- lisp/gnus/rfc1843.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/rfc1843.el 2010-09-25 13:28:07 +0000 @@ -166,7 +166,6 @@ (equal (car ctl) "text/plain")) (rfc1843-decode-region (point) (point-max)))))))) -(defvar rfc1843-old-gnus-decode-header-function nil) (defvar gnus-decode-header-methods) (defvar gnus-decode-encoded-word-methods) ------------------------------------------------------------ revno: 101607 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 09:21:20 -0400 message: Fix int/EMACS_INT use in textprop.c and window.c. window.c (Fpos_visible_in_window_p, Fdelete_other_windows) (Fselect_window, window_scroll_pixel_based) (window_scroll_line_based, Frecenter, Fset_window_configuration): Use EMACS_INT for buffer positions. textprop.c (validate_interval_range, interval_of) (property_change_between_p, Fadd_text_properties) (set_text_properties_1, Fremove_text_properties) (Fremove_list_of_text_properties, Ftext_property_any) (Ftext_property_not_all, copy_text_properties) (text_property_list, extend_property_ranges) (verify_interval_modification): Use EMACS_INT for buffer positions. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 12:31:15 +0000 +++ src/ChangeLog 2010-09-25 13:21:20 +0000 @@ -1,5 +1,19 @@ 2010-09-25 Eli Zaretskii + * window.c (Fpos_visible_in_window_p, Fdelete_other_windows) + (Fselect_window, window_scroll_pixel_based) + (window_scroll_line_based, Frecenter, Fset_window_configuration): + Use EMACS_INT for buffer positions. + + * textprop.c (validate_interval_range, interval_of) + (property_change_between_p, Fadd_text_properties) + (set_text_properties_1, Fremove_text_properties) + (Fremove_list_of_text_properties, Ftext_property_any) + (Ftext_property_not_all, copy_text_properties) + (text_property_list, extend_property_ranges) + (verify_interval_modification): Use EMACS_INT for buffer + positions. + * term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT for buffer positions. === modified file 'src/textprop.c' --- src/textprop.c 2010-07-08 21:25:08 +0000 +++ src/textprop.c 2010-09-25 13:21:20 +0000 @@ -125,7 +125,7 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin, Lisp_Object *end, int force) { register INTERVAL i; - int searchpos; + EMACS_INT searchpos; CHECK_STRING_OR_BUFFER (object); CHECK_NUMBER_COERCE_MARKER (*begin); @@ -161,7 +161,7 @@ } else { - int len = SCHARS (object); + EMACS_INT len = SCHARS (object); if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end) && XINT (*end) <= len)) @@ -519,7 +519,7 @@ interval_of (int position, Lisp_Object object) { register INTERVAL i; - int beg, end; + EMACS_INT beg, end; if (NILP (object)) XSETBUFFER (object, current_buffer); @@ -984,7 +984,7 @@ /* Return 1 if there's a change in some property between BEG and END. */ int -property_change_between_p (int beg, int end) +property_change_between_p (EMACS_INT beg, EMACS_INT end) { register INTERVAL i, next; Lisp_Object object, pos; @@ -1173,7 +1173,8 @@ (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object) { register INTERVAL i, unchanged; - register int s, len, modified = 0; + register EMACS_INT s, len; + register int modified = 0; struct gcpro gcpro1; properties = validate_plist (properties); @@ -1202,7 +1203,7 @@ skip it. */ if (interval_has_all_properties (properties, i)) { - int got = (LENGTH (i) - (s - i->position)); + EMACS_INT got = (LENGTH (i) - (s - i->position)); if (got >= len) RETURN_UNGCPRO (Qnil); len -= got; @@ -1377,7 +1378,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object buffer, INTERVAL i) { register INTERVAL prev_changed = NULL_INTERVAL; - register int s, len; + register EMACS_INT s, len; INTERVAL unchanged; s = XINT (start); @@ -1466,7 +1467,8 @@ (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object) { register INTERVAL i, unchanged; - register int s, len, modified = 0; + register EMACS_INT s, len; + register int modified = 0; if (NILP (object)) XSETBUFFER (object, current_buffer); @@ -1484,7 +1486,7 @@ it covers the entire region. */ if (! interval_has_some_properties (properties, i)) { - int got = (LENGTH (i) - (s - i->position)); + EMACS_INT got = (LENGTH (i) - (s - i->position)); if (got >= len) return Qnil; len -= got; @@ -1551,7 +1553,8 @@ (Lisp_Object start, Lisp_Object end, Lisp_Object list_of_properties, Lisp_Object object) { register INTERVAL i, unchanged; - register int s, len, modified = 0; + register EMACS_INT s, len; + register int modified = 0; Lisp_Object properties; properties = list_of_properties; @@ -1571,7 +1574,7 @@ it covers the entire region. */ if (! interval_has_some_properties_list (properties, i)) { - int got = (LENGTH (i) - (s - i->position)); + EMACS_INT got = (LENGTH (i) - (s - i->position)); if (got >= len) return Qnil; len -= got; @@ -1658,7 +1661,7 @@ (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object) { register INTERVAL i; - register int e, pos; + register EMACS_INT e, pos; if (NILP (object)) XSETBUFFER (object, current_buffer); @@ -1694,7 +1697,7 @@ (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object) { register INTERVAL i; - register int s, e; + register EMACS_INT s, e; if (NILP (object)) XSETBUFFER (object, current_buffer); @@ -1806,7 +1809,8 @@ Lisp_Object res; Lisp_Object stuff; Lisp_Object plist; - int s, e, e2, p, len, modified = 0; + EMACS_INT s, e, e2, p, len; + int modified = 0; struct gcpro gcpro1, gcpro2; i = validate_interval_range (src, &start, &end, soft); @@ -1902,12 +1906,12 @@ i = validate_interval_range (object, &start, &end, soft); if (!NULL_INTERVAL_P (i)) { - int s = XINT (start); - int e = XINT (end); + EMACS_INT s = XINT (start); + EMACS_INT e = XINT (end); while (s < e) { - int interval_end, len; + EMACS_INT interval_end, len; Lisp_Object plist; interval_end = i->position + LENGTH (i); @@ -1985,7 +1989,7 @@ extend_property_ranges (Lisp_Object list, Lisp_Object new_end) { Lisp_Object prev = Qnil, head = list; - int max = XINT (new_end); + EMACS_INT max = XINT (new_end); for (; CONSP (list); prev = list, list = XCDR (list)) { @@ -2059,7 +2063,7 @@ if (start > end) { - int temp = start; + EMACS_INT temp = start; start = end; end = temp; } === modified file 'src/window.c' --- src/window.c 2010-08-06 11:04:29 +0000 +++ src/window.c 2010-09-25 13:21:20 +0000 @@ -311,7 +311,7 @@ (Lisp_Object pos, Lisp_Object window, Lisp_Object partially) { register struct window *w; - register int posint; + register EMACS_INT posint; register struct buffer *buf; struct text_pos top; Lisp_Object in_window = Qnil; @@ -2500,7 +2500,7 @@ (Lisp_Object window) { struct window *w; - int startpos; + EMACS_INT startpos; int top, new_top; if (NILP (window)) @@ -3629,7 +3629,7 @@ redisplay_window has altered point after scrolling, because it makes the change only in the window. */ { - register int new_point = marker_position (w->pointm); + register EMACS_INT new_point = marker_position (w->pointm); if (new_point < BEGV) SET_PT (BEGV); else if (new_point > ZV) @@ -4848,7 +4848,7 @@ /* Maybe modify window start instead of scrolling. */ if (rbot > 0 || w->vscroll < 0) { - int spos; + EMACS_INT spos; Fset_window_vscroll (window, make_number (0), Qt); /* If there are other text lines above the current row, @@ -4902,7 +4902,7 @@ start_display (&it, w, start); if (whole) { - int start_pos = IT_CHARPOS (it); + EMACS_INT start_pos = IT_CHARPOS (it); int dy = WINDOW_FRAME_LINE_HEIGHT (w); dy = max ((window_box_height (w) - next_screen_context_lines * dy), @@ -4981,8 +4981,8 @@ if (! vscrolled) { - int pos = IT_CHARPOS (it); - int bytepos; + EMACS_INT pos = IT_CHARPOS (it); + EMACS_INT bytepos; /* If in the middle of a multi-glyph character move forward to the next character. */ @@ -5052,7 +5052,7 @@ } else if (n < 0) { - int charpos, bytepos; + EMACS_INT charpos, bytepos; int partial_p; /* Save our position, for the @@ -5122,13 +5122,13 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) { register struct window *w = XWINDOW (window); - register int opoint = PT, opoint_byte = PT_BYTE; - register int pos, pos_byte; + register EMACS_INT opoint = PT, opoint_byte = PT_BYTE; + register EMACS_INT pos, pos_byte; register int ht = window_internal_height (w); register Lisp_Object tem; int lose; Lisp_Object bolp; - int startpos; + EMACS_INT startpos; Lisp_Object original_pos = Qnil; /* If scrolling screen-fulls, compute the number of lines to @@ -5573,7 +5573,7 @@ struct buffer *buf = XBUFFER (w->buffer); struct buffer *obuf = current_buffer; int center_p = 0; - int charpos, bytepos; + EMACS_INT charpos, bytepos; int iarg; int this_scroll_margin; @@ -5914,7 +5914,7 @@ Lisp_Object new_current_buffer; Lisp_Object frame; FRAME_PTR f; - int old_point = -1; + EMACS_INT old_point = -1; CHECK_WINDOW_CONFIGURATION (configuration); ------------------------------------------------------------ revno: 101606 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2010-09-25 12:49:02 +0000 message: Merge changes made in Gnus.tranck gnus-art.el: Remove useless gnus-treat-translate. gnus-gravatar.el (gnus-gravatar-transform-address): Use gnus-gravatar-size. gnus.el: Remove useless gnus-local-domain. mml-smime.el: Remove useless mml-smime-verbose. mml2015.el: Remove useless mml2015-verbose. diff: === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-09-24 22:33:34 +0000 +++ doc/misc/gnus.texi 2010-09-25 12:49:02 +0000 @@ -12630,7 +12630,6 @@ @vindex gnus-treat-highlight-headers @vindex gnus-treat-highlight-signature @vindex gnus-treat-play-sounds -@vindex gnus-treat-translate @vindex gnus-treat-x-pgp-sig @vindex gnus-treat-unfold-headers @vindex gnus-treat-fold-headers @@ -12737,8 +12736,6 @@ @vindex gnus-treat-play-sounds @item gnus-treat-play-sounds -@vindex gnus-treat-translate -@item gnus-treat-translate @item gnus-treat-ansi-sequences (t) @vindex gnus-treat-x-pgp-sig @item gnus-treat-x-pgp-sig (head) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-24 22:33:34 +0000 +++ lisp/gnus/ChangeLog 2010-09-25 12:49:02 +0000 @@ -1,3 +1,16 @@ +2010-09-25 Julien Danjou + + * mml2015.el: Remove useless mml2015-verbose. + + * mml-smime.el: Remove useless mml-smime-verbose. + + * gnus.el: Remove useless gnus-local-domain. + + * gnus-gravatar.el (gnus-gravatar-transform-address): Use + gnus-gravatar-size. + + * gnus-art.el: Remove useless gnus-treat-translate. + 2010-09-24 Julien Danjou * gnus-sum.el: Add support for Gravatars. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus-art.el 2010-09-25 12:49:02 +0000 @@ -1609,15 +1609,6 @@ :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) -(defcustom gnus-treat-translate nil - "Translate articles from one language to another. -Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." - :version "21.1" - :group 'gnus-article-treat - :link '(custom-manual "(gnus)Customizing Articles") - :type gnus-article-treat-custom) - (defcustom gnus-treat-x-pgp-sig nil "Verify X-PGP-Sig. To automatically treat X-PGP-Sig, set it to head. === modified file 'lisp/gnus/gnus-gravatar.el' --- lisp/gnus/gnus-gravatar.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus-gravatar.el 2010-09-25 12:49:02 +0000 @@ -54,11 +54,12 @@ (mail-encode-encoded-word-string (or (mail-fetch-field header) ""))) (mail-fetch-field header))))) - (dolist (address addresses) - (gravatar-retrieve - (car address) - 'gnus-gravatar-insert - (list header (car address) category)))))) + (let ((gravatar-size gnus-gravatar-size)) + (dolist (address addresses) + (gravatar-retrieve + (car address) + 'gnus-gravatar-insert + (list header (car address) category))))))) (defun gnus-gravatar-insert (gravatar header address category) "Insert GRAVATAR for ADDRESS in HEADER in current article buffer. === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus.el 2010-09-25 12:49:02 +0000 @@ -1428,15 +1428,6 @@ "Default default new newsgroups the first time Gnus is run. Should be set in paths.el, and shouldn't be touched by the user.") -(defcustom gnus-local-domain nil - "Local domain name without a host name. -The DOMAINNAME environment variable is used instead if it is defined. -If the function `system-name' returns the full Internet name, there is -no need to set this variable." - :group 'gnus-message - :type '(choice (const :tag "default" nil) - string)) - (defvar gnus-local-organization nil "String with a description of what organization (if any) the user belongs to. Obsolete variable; use `message-user-organization' instead.") === modified file 'lisp/gnus/mml-smime.el' --- lisp/gnus/mml-smime.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mml-smime.el 2010-09-25 12:49:02 +0000 @@ -53,11 +53,6 @@ mml-smime-epg-verify mml-smime-epg-verify-test))) -(defcustom mml-smime-verbose mml-secure-verbose - "If non-nil, ask the user about the current operation more verbosely." - :group 'mime-security - :type 'boolean) - (defcustom mml-smime-cache-passphrase mml-secure-cache-passphrase "If t, cache passphrase." :group 'mime-security === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mml2015.el 2010-09-25 12:49:02 +0000 @@ -119,11 +119,6 @@ :type '(repeat (cons (regexp :tag "GnuPG output regexp") (boolean :tag "Trust key")))) -(defcustom mml2015-verbose mml-secure-verbose - "If non-nil, ask the user about the current operation more verbosely." - :group 'mime-security - :type 'boolean) - (defcustom mml2015-cache-passphrase mml-secure-cache-passphrase "If t, cache passphrase." :group 'mime-security ------------------------------------------------------------ revno: 101605 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 08:31:15 -0400 message: Fix int/EMACS_INT use in process.c and term.c. term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT for buffer positions. process.c (read_process_output, send_process) (Fprocess_send_region, status_notify): Use EMACS_INT for buffer and string positions and size. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 12:04:35 +0000 +++ src/ChangeLog 2010-09-25 12:31:15 +0000 @@ -1,5 +1,12 @@ 2010-09-25 Eli Zaretskii + * term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT + for buffer positions. + + * process.c (read_process_output, send_process) + (Fprocess_send_region, status_notify): Use EMACS_INT for buffer + and string positions and size. + * print.c (print_object, print_string, strout): Use EMACS_INT for string indices. === modified file 'src/process.c' --- src/process.c 2010-09-25 00:32:09 +0000 +++ src/process.c 2010-09-25 12:31:15 +0000 @@ -5075,7 +5075,7 @@ char *chars; register Lisp_Object outstream; register struct Lisp_Process *p = XPROCESS (proc); - register int opoint; + register EMACS_INT opoint; struct coding_system *coding = proc_decode_coding_system[channel]; int carryover = p->decoding_carryover; int readmax = 4096; @@ -5265,10 +5265,10 @@ else if (!NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name)) { Lisp_Object old_read_only; - int old_begv, old_zv; - int old_begv_byte, old_zv_byte; - int before, before_byte; - int opoint_byte; + EMACS_INT old_begv, old_zv; + EMACS_INT old_begv_byte, old_zv_byte; + EMACS_INT before, before_byte; + EMACS_INT opoint_byte; Lisp_Object text; struct buffer *b; @@ -5405,11 +5405,11 @@ static void send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, - volatile int len, volatile Lisp_Object object) + volatile EMACS_INT len, volatile Lisp_Object object) { /* Use volatile to protect variables from being clobbered by longjmp. */ struct Lisp_Process *p = XPROCESS (proc); - int rv; + EMACS_INT rv; struct coding_system *coding; struct gcpro gcpro1; SIGTYPE (*volatile old_sigpipe) (int); @@ -5466,8 +5466,8 @@ coding->dst_object = Qt; if (BUFFERP (object)) { - int from_byte, from, to; - int save_pt, save_pt_byte; + EMACS_INT from_byte, from, to; + EMACS_INT save_pt, save_pt_byte; struct buffer *cur = current_buffer; set_buffer_internal (XBUFFER (object)); @@ -5519,7 +5519,7 @@ process_sent_to = proc; while (len > 0) { - int this = len; + EMACS_INT this = len; /* Send this batch, using one or more write calls. */ while (this > 0) @@ -5653,7 +5653,7 @@ (Lisp_Object process, Lisp_Object start, Lisp_Object end) { Lisp_Object proc; - int start1, end1; + EMACS_INT start1, end1; proc = get_process (process); validate_region (&start, &end); @@ -6594,8 +6594,8 @@ { Lisp_Object tem; struct buffer *old = current_buffer; - int opoint, opoint_byte; - int before, before_byte; + EMACS_INT opoint, opoint_byte; + EMACS_INT before, before_byte; /* Avoid error if buffer is deleted (probably that's why the process is dead, too) */ === modified file 'src/term.c' --- src/term.c 2010-09-14 14:41:53 +0000 +++ src/term.c 2010-09-25 12:31:15 +0000 @@ -2618,9 +2618,10 @@ If POS is after end of W, return end of last line in W. - taken from msdos.c */ static int -fast_find_position (struct window *w, int pos, int *hpos, int *vpos) +fast_find_position (struct window *w, EMACS_INT pos, int *hpos, int *vpos) { - int i, lastcol, line_start_position, maybe_next_line_p = 0; + int i, lastcol, maybe_next_line_p = 0; + EMACS_INT line_start_position; int yb = window_text_bottom_y (w); struct glyph_row *row = MATRIX_ROW (w->current_matrix, 0), *best_row = row; @@ -2658,7 +2659,7 @@ for (i = 0; i < row->used[TEXT_AREA]; i++) { struct glyph *glyph = row->glyphs[TEXT_AREA] + i; - int charpos; + EMACS_INT charpos; charpos = glyph->charpos; if (charpos == pos) @@ -2719,7 +2720,8 @@ && XFASTINT (w->last_modified) == BUF_MODIFF (b) && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b)) { - int pos, i, nrows = w->current_matrix->nrows; + int i, nrows = w->current_matrix->nrows; + EMACS_INT pos; struct glyph_row *row; struct glyph *glyph; @@ -2763,7 +2765,8 @@ /* Check for mouse-face. */ { Lisp_Object mouse_face, overlay, position, *overlay_vec; - int noverlays, obegv, ozv; + int noverlays; + EMACS_INT obegv, ozv; struct buffer *obuf; /* If we get an out-of-range value, return now; avoid an error. */ ------------------------------------------------------------ revno: 101604 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-09-25 14:04:35 +0200 message: Fix typos. * lisp/finder.el (finder-unknown-keywords): * lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer, gdb-running-threads-count): * lisp/progmodes/etags.el (tags-table-including): Fix typos in docstrings. * lisp/cedet/semantic/lex.el (semantic-ignore-comments): Doc fix. * lisp/cedet/semantic/symref/list.el (semantic-symref-list-rename-open-hits): Fix typo in error message. (semantic-symref-list-map-open-hits): Fix typo in docstring. * lisp/org/org-agenda.el (org-agenda-hide-tags-regexp): * lisp/org/org.el (org-refile-targets): Fix typos in docstrings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-25 00:32:09 +0000 +++ lisp/ChangeLog 2010-09-25 12:04:35 +0000 @@ -1,5 +1,11 @@ 2010-09-25 Juanma Barranquero + * finder.el (finder-unknown-keywords): + * progmodes/gdb-mi.el (gdb-jsonify-buffer, gdb-running-threads-count): + * progmodes/etags.el (tags-table-including): Fix typos in docstrings. + +2010-09-25 Juanma Barranquero + * server.el (server-start): Revert part of 2010-08-08 change. Using address 127.0.0.1 for local host is now done in Fmake_network_process. === modified file 'lisp/ChangeLog.12' --- lisp/ChangeLog.12 2010-07-24 11:53:19 +0000 +++ lisp/ChangeLog.12 2010-09-25 12:04:35 +0000 @@ -1140,7 +1140,7 @@ (rcirc-keepalive-seconds): Remove variable. (rcirc-server-name, rcirc-timeout-timer, rcirc-connecting) (rcirc-process, rcirc-user-disconnect): New variables. - (rcirc-connect): Initalize new variables. + (rcirc-connect): Initialize new variables. (rcirc-keepalive): Don't send keepalive pings before connection is completed. (rcirc-sentinel): Do mark all channels with activity when === modified file 'lisp/ChangeLog.9' --- lisp/ChangeLog.9 2010-07-29 02:42:53 +0000 +++ lisp/ChangeLog.9 2010-09-25 12:04:35 +0000 @@ -8121,7 +8121,7 @@ * dired.el (dired-get-filename): Return filename verbatim if LOCALP is `verbatim'. * dired-aux.el (dired-add-entry): Call `dired-get-filename' with - `verbatim' so that we don't inadvertently delete a non-existant + `verbatim' so that we don't inadvertently delete a non-existent directory name. 2000-11-27 Kenichi Handa === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2010-09-23 19:00:31 +0000 +++ lisp/cedet/ChangeLog 2010-09-25 12:04:35 +0000 @@ -1,3 +1,11 @@ +2010-09-25 Juanma Barranquero + + * semantic/lex.el (semantic-ignore-comments): Doc fix. + + * semantic/symref/list.el (semantic-symref-list-rename-open-hits): + Fix typo in error message. + (semantic-symref-list-map-open-hits): Fix typo in docstring. + 2010-09-21 Eric Ludlam Synch SRecode to CEDET 1.0. === modified file 'lisp/cedet/ede/base.el' --- lisp/cedet/ede/base.el 2010-09-21 02:42:53 +0000 +++ lisp/cedet/ede/base.el 2010-09-25 12:04:35 +0000 @@ -452,7 +452,7 @@ ;; Targets and projects are often associated with other files, such as ;; header files, documentation files and the like. Have strong ;; associations can make useful user commands to quickly navigate -;; between the files base on their assocaitions. +;; between the files base on their associations. ;; (defun ede-header-file () "Return the header file for the current buffer. === modified file 'lisp/cedet/semantic/lex.el' --- lisp/cedet/semantic/lex.el 2010-01-14 18:37:23 +0000 +++ lisp/cedet/semantic/lex.el 2010-09-25 12:04:35 +0000 @@ -1810,8 +1810,8 @@ (defvar semantic-ignore-comments t "Default comment handling. -t means to strip comments when flexing. Nil means to keep comments -as part of the token stream.") +The value t means to strip comments when flexing; nil means +to keep comments as part of the token stream.") (make-variable-buffer-local 'semantic-ignore-comments) (defvar semantic-flex-enable-newlines nil === modified file 'lisp/cedet/semantic/symref/list.el' --- lisp/cedet/semantic/symref/list.el 2010-09-19 02:49:54 +0000 +++ lisp/cedet/semantic/symref/list.el 2010-09-25 12:04:35 +0000 @@ -492,7 +492,7 @@ (let ((count (semantic-symref-list-map-open-hits (lambda () (replace-match newname nil t))))) (semantic-symref-list-update-open-hits) - (message "Renamed %d occurances." count))) + (message "Renamed %d occurrences." count))) ;;; REFACTORING UTILITIES ;; @@ -501,7 +501,7 @@ (defun semantic-symref-list-map-open-hits (function) "For every open hit in the symref buffer, perform FUNCTION. The `match-data' will be set to a successful hit of the searched for symbol. -Return the number of occurances FUNCTION was operated upon." +Return the number of occurrences FUNCTION was operated upon." ;; First Pass in this function - a straight rename. ;; Second Pass - Allow context specification based on === modified file 'lisp/cedet/srecode/fields.el' --- lisp/cedet/srecode/fields.el 2010-09-21 22:11:23 +0000 +++ lisp/cedet/srecode/fields.el 2010-09-25 12:04:35 +0000 @@ -198,7 +198,7 @@ (oset ir fields srecode-field-archive) (setq srecode-field-archive nil) - ;; Initailize myself first. + ;; Initialize myself first. (call-next-method) ) === modified file 'lisp/finder.el' --- lisp/finder.el 2010-08-31 01:53:46 +0000 +++ lisp/finder.el 2010-09-25 12:04:35 +0000 @@ -278,7 +278,7 @@ help-echo finder-help-echo)))) (defun finder-unknown-keywords () - "Return an alist of unknown keywords and number of their occurences. + "Return an alist of unknown keywords and number of their occurrences. Unknown keywords are those present in `finder-keywords-hash' but not `finder-known-keywords'." (let (alist) === modified file 'lisp/man.el' --- lisp/man.el 2010-07-14 15:57:54 +0000 +++ lisp/man.el 2010-09-25 12:04:35 +0000 @@ -314,7 +314,7 @@ "Regular expression describing references to normal files.") ;; This includes the section as an optional part to catch hyphenated -;; refernces to manpages. +;; references to manpages. (defvar Man-hyphenated-reference-regexp (concat "\\(" Man-name-regexp "\\)\\((\\(" Man-section-regexp "\\))\\)?") "Regular expression describing a reference in the SEE ALSO section.") === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2010-09-20 01:20:32 +0000 +++ lisp/org/ChangeLog 2010-09-25 12:04:35 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Juanma Barranquero + + * org.el (org-refile-targets): + * org-agenda.el (org-agenda-hide-tags-regexp): Fix typos in docstrings. + 2010-08-19 Glenn Morris * org.el (org-outline-overlay-data, org-set-outline-overlay-data) === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2010-07-19 09:47:27 +0000 +++ lisp/org/org-agenda.el 2010-09-25 12:04:35 +0000 @@ -1359,7 +1359,7 @@ "Regular expression used to filter away specific tags in agenda views. This means that these tags will be present, but not be shown in the agenda line. Secondary filtering will still work on the hidden tags. -Nil means don't hide any tags." +The value nil means don't hide any tags." :group 'org-agenda-line-format :type '(choice (const :tag "Hide none" nil) === modified file 'lisp/org/org.el' --- lisp/org/org.el 2010-08-19 03:45:46 +0000 +++ lisp/org/org.el 2010-09-25 12:04:35 +0000 @@ -1797,8 +1797,8 @@ - a specification of the files to be considered, either a list of files, or a symbol whose function or variable value will be used to retrieve a file name or a list of file names. If you use `org-agenda-files' for - that, all agenda files will be scanned for targets. Nil means consider - headings in the current buffer. + that, all agenda files will be scanned for targets. The value nil means + consider headings in the current buffer. - A specification of how to find candidate refile targets. This may be any of: - a cons cell (:tag . \"TAG\") to identify refile targets by a tag. === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2010-08-14 23:01:42 +0000 +++ lisp/progmodes/etags.el 2010-09-25 12:04:35 +0000 @@ -472,7 +472,7 @@ Looks for a tags table that has such tags or that includes a table that has them. Returns the name of the first such table. Non-nil CORE-ONLY means check only tags tables that are already in -buffers. Nil CORE-ONLY is ignored." +buffers. If CORE-ONLY is nil, it is ignored." (let ((tables tags-table-computed-list) (found nil)) ;; Loop over the list, looking for a table containing tags for THIS-FILE. === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2010-07-29 13:13:11 +0000 +++ lisp/progmodes/gdb-mi.el 2010-09-25 12:04:35 +0000 @@ -163,7 +163,7 @@ (defvar gdb-running-threads-count nil "Number of currently running threads. -Nil means that no information is available. +If nil, no information is available. Updated in `gdb-thread-list-handler-custom'.") @@ -2051,7 +2051,7 @@ Field names are wrapped in double quotes and equal signs are replaced with semicolons. -If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurences from +If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurrences from partial output. This is used to get rid of useless keys in lists in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and -break-info are examples of MI commands which issue such === modified file 'lisp/simple.el' --- lisp/simple.el 2010-09-20 21:45:09 +0000 +++ lisp/simple.el 2010-09-25 12:04:35 +0000 @@ -4410,7 +4410,7 @@ (goto-char (next-char-property-change (point)))) ;; Move a line. ;; We don't use `end-of-line', since we want to escape - ;; from field boundaries ocurring exactly at point. + ;; from field boundaries occurring exactly at point. (goto-char (constrain-to-field (let ((inhibit-field-text-motion t)) (line-end-position)) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 11:55:30 +0000 +++ src/ChangeLog 2010-09-25 12:04:35 +0000 @@ -19181,7 +19181,7 @@ (Ffont_shape_text): New function. (Fopen_font): If the font size is not given, use 12-pixel. (Ffont_at): New arg STRING. - (syms_of_font): Initalize font_charset_alist. + (syms_of_font): Initialize font_charset_alist. Declare Ffont_shape_text as a Lisp function. Call syms_of_XXfont conditionally. @@ -20178,7 +20178,7 @@ * font.c (font_unparse_fcname): Fix typo (swidth->width). (font_list_entities): Check driver_list->on. - (register_font_driver): Initalize `on' member to 0. + (register_font_driver): Initialize `on' member to 0. (font_update_drivers): New function. (Fclear_font_cache): Check driver_list->on. === modified file 'src/ChangeLog.5' --- src/ChangeLog.5 2010-07-29 02:42:53 +0000 +++ src/ChangeLog.5 2010-09-25 12:04:35 +0000 @@ -4093,7 +4093,7 @@ * xterm.h: Delete X10 code. - * xfns.c (Fx_create_frame): Don't increment refernce_count + * xfns.c (Fx_create_frame): Don't increment reference_count until the frame is put on the frame list. * xterm.c (x_initialize): Init x_noop_count, x_focus_frame === modified file 'src/ChangeLog.7' --- src/ChangeLog.7 2010-03-24 00:18:03 +0000 +++ src/ChangeLog.7 2010-09-25 12:04:35 +0000 @@ -1040,7 +1040,7 @@ * lread.c: Remember the last TWO strings skipped with #@. (prev_saved_doc_string*): New variables. - (Fload): Initalize prev_saved_doc_string. + (Fload): Initialize prev_saved_doc_string. (read1): Copy saved_doc_string to prev_saved_doc_string before storing a new string in saved_doc_string. (read_list): Look in prev_saved_doc_string as well as === modified file 'src/frame.h' --- src/frame.h 2010-08-13 13:26:13 +0000 +++ src/frame.h 2010-09-25 12:04:35 +0000 @@ -310,7 +310,7 @@ /* Canonical X unit. Width of default font, in pixels. */ int column_width; - /* Widht of space glyph of default font, in pixels. */ + /* Width of space glyph of default font, in pixels. */ int space_width; /* Canonical Y unit. Height of a line, in pixels. */ === modified file 'src/image.c' --- src/image.c 2010-09-04 19:39:34 +0000 +++ src/image.c 2010-09-25 12:04:35 +0000 @@ -8626,7 +8626,7 @@ #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) { - /* MagickWandGenesis() initalizes the imagemagick library. */ + /* MagickWandGenesis() initializes the imagemagick library. */ MagickWandGenesis (); return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_functions, libraries); === modified file 'src/keyboard.c' --- src/keyboard.c 2010-09-25 09:36:36 +0000 +++ src/keyboard.c 2010-09-25 12:04:35 +0000 @@ -3802,7 +3802,7 @@ HELP is the help form. - FRAME and WINDOW are the frame and windoiw where the help is + FRAME and WINDOW are the frame and window where the help is generated. OBJECT is the Lisp object where the help was found (a buffer, a string, an overlay, or nil if neither from a string nor from a buffer). POS is the position within OBJECT where the help ------------------------------------------------------------ revno: 101603 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 07:55:30 -0400 message: Fix int/EMACS_INT use in lread.c, marker.c, minibuf.c, print.c print.c (print_object, print_string, strout): Use EMACS_INT for string indices. minibuf.c (string_to_object): Use EMACS_INT for string position and size. marker.c (verify_bytepos): Use EMACS_INT for buffer positions. lread.c : Define EMACS_INT. (readchar, unreadchar, read_internal_start): Use EMACS_INT for buffer positions and string length. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 09:36:36 +0000 +++ src/ChangeLog 2010-09-25 11:55:30 +0000 @@ -1,5 +1,18 @@ 2010-09-25 Eli Zaretskii + * print.c (print_object, print_string, strout): Use EMACS_INT for + string indices. + + * minibuf.c (string_to_object): Use EMACS_INT for string position + and size. + + * marker.c (verify_bytepos): Use EMACS_INT for buffer positions. + + * lread.c + : Define EMACS_INT. + (readchar, unreadchar, read_internal_start): Use EMACS_INT for + buffer positions and string length. + * keyboard.c : Declare EMACS_INT. (echo_truncate, adjust_point_for_property, read_char) === modified file 'src/lread.c' --- src/lread.c 2010-09-23 20:16:55 +0000 +++ src/lread.c 2010-09-25 11:55:30 +0000 @@ -163,13 +163,13 @@ static int read_pure; /* For use within read-from-string (this reader is non-reentrant!!) */ -static int read_from_string_index; -static int read_from_string_index_byte; -static int read_from_string_limit; +static EMACS_INT read_from_string_index; +static EMACS_INT read_from_string_index_byte; +static EMACS_INT read_from_string_limit; /* Number of characters read in the current call to Fread or Fread_from_string. */ -static int readchar_count; +static EMACS_INT readchar_count; /* This contains the last string skipped with #@. */ static char *saved_doc_string; @@ -276,7 +276,7 @@ { register struct buffer *inbuffer = XBUFFER (readcharfun); - int pt_byte = BUF_PT_BYTE (inbuffer); + EMACS_INT pt_byte = BUF_PT_BYTE (inbuffer); if (pt_byte >= BUF_ZV_BYTE (inbuffer)) return -1; @@ -305,7 +305,7 @@ { register struct buffer *inbuffer = XMARKER (readcharfun)->buffer; - int bytepos = marker_byte_position (readcharfun); + EMACS_INT bytepos = marker_byte_position (readcharfun); if (bytepos >= BUF_ZV_BYTE (inbuffer)) return -1; @@ -439,7 +439,7 @@ else if (BUFFERP (readcharfun)) { struct buffer *b = XBUFFER (readcharfun); - int bytepos = BUF_PT_BYTE (b); + EMACS_INT bytepos = BUF_PT_BYTE (b); BUF_PT (b)--; if (! NILP (b->enable_multibyte_characters)) @@ -452,7 +452,7 @@ else if (MARKERP (readcharfun)) { struct buffer *b = XMARKER (readcharfun)->buffer; - int bytepos = XMARKER (readcharfun)->bytepos; + EMACS_INT bytepos = XMARKER (readcharfun)->bytepos; XMARKER (readcharfun)->charpos--; if (! NILP (b->enable_multibyte_characters)) @@ -1893,7 +1893,7 @@ if (STRINGP (stream) || ((CONSP (stream) && STRINGP (XCAR (stream))))) { - int startval, endval; + EMACS_INT startval, endval; Lisp_Object string; if (STRINGP (stream)) === modified file 'src/marker.c' --- src/marker.c 2010-09-23 19:12:18 +0000 +++ src/marker.c 2010-09-25 11:55:30 +0000 @@ -247,11 +247,11 @@ /* Used for debugging: recompute the bytepos corresponding to CHARPOS in the simplest, most reliable way. */ -int -verify_bytepos (int charpos) +EMACS_INT +verify_bytepos (EMACS_INT charpos) { - int below = 1; - int below_byte = 1; + EMACS_INT below = 1; + EMACS_INT below_byte = 1; while (below != charpos) { === modified file 'src/minibuf.c' --- src/minibuf.c 2010-09-22 16:03:34 +0000 +++ src/minibuf.c 2010-09-25 11:55:30 +0000 @@ -236,7 +236,7 @@ { struct gcpro gcpro1, gcpro2; Lisp_Object expr_and_pos; - int pos; + EMACS_INT pos; GCPRO2 (val, defalt); @@ -254,7 +254,7 @@ { /* Ignore trailing whitespace; any other trailing junk is an error. */ - int i; + EMACS_INT i; pos = string_char_to_byte (val, pos); for (i = pos; i < SBYTES (val); i++) { === modified file 'src/print.c' --- src/print.c 2010-09-24 15:01:03 +0000 +++ src/print.c 2010-09-25 11:55:30 +0000 @@ -395,7 +395,7 @@ else { /* PRINTCHARFUN is a Lisp function. */ - int i = 0; + EMACS_INT i = 0; if (size == size_byte) { @@ -489,7 +489,7 @@ { /* Otherwise, string may be relocated by printing one char. So re-fetch the string address for each character. */ - int i; + EMACS_INT i; EMACS_INT size = SCHARS (string); EMACS_INT size_byte = SBYTES (string); struct gcpro gcpro1; @@ -1563,7 +1563,7 @@ print_string (obj, printcharfun); else { - register int i, i_byte; + register EMACS_INT i, i_byte; struct gcpro gcpro1; unsigned char *str; EMACS_INT size_byte; ------------------------------------------------------------ revno: 101602 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 05:36:36 -0400 message: Fix int/EMACS_INT use in keyboard.c. keyboard.c : Declare EMACS_INT. (echo_truncate, adjust_point_for_property, read_char) (gen_help_event, make_lispy_event, modify_event_symbol) (Fexecute_extended_command, stuff_buffered_input): Use EMACS_INT for buffer positions and string length. keyboard.h (gen_help_event): Adjust prototype. termhooks.h : Make `code' member EMACS_INT. commands.h : Declare EMACS_INT. xdisp.c : Define as EMACS_INT. (truncate_echo_area): Accept EMACS_INT argument. dispextern.h : Declare EMACS_INT. lisp.h (truncate_echo_area): Adjust prototype. composite.c (composition_adjust_point): Return EMACS_INT. composite.h (composition_adjust_point): Adjust prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 07:44:43 +0000 +++ src/ChangeLog 2010-09-25 09:36:36 +0000 @@ -1,3 +1,29 @@ +2010-09-25 Eli Zaretskii + + * keyboard.c : Declare + EMACS_INT. + (echo_truncate, adjust_point_for_property, read_char) + (gen_help_event, make_lispy_event, modify_event_symbol) + (Fexecute_extended_command, stuff_buffered_input): Use EMACS_INT + for buffer positions and string length. + + * keyboard.h (gen_help_event): Adjust prototype. + + * termhooks.h : Make `code' member EMACS_INT. + + * commands.h : Declare EMACS_INT. + + * xdisp.c : Define as EMACS_INT. + (truncate_echo_area): Accept EMACS_INT argument. + + * dispextern.h : Declare EMACS_INT. + + * lisp.h (truncate_echo_area): Adjust prototype. + + * composite.c (composition_adjust_point): Return EMACS_INT. + + * composite.h (composition_adjust_point): Adjust prototype. + 2010-09-25 Juanma Barranquero * process.c (Fmake_network_process): When arg :host is 'local, === modified file 'src/commands.h' --- src/commands.h 2010-01-13 08:35:10 +0000 +++ src/commands.h 2010-09-25 09:36:36 +0000 @@ -74,7 +74,7 @@ extern Lisp_Object unread_switch_frame; /* The value of point when the last command was started. */ -extern int last_point_position; +extern EMACS_INT last_point_position; /* The buffer that was current when the last command was started. */ extern Lisp_Object last_point_position_buffer; === modified file 'src/composite.c' --- src/composite.c 2010-09-23 14:32:38 +0000 +++ src/composite.c 2010-09-25 09:36:36 +0000 @@ -1662,7 +1662,7 @@ /* Return the adjusted point provided that point is moved from LAST_PT to NEW_PT. */ -int +EMACS_INT composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) { EMACS_INT charpos, bytepos, startpos, beg, end, pos; === modified file 'src/composite.h' --- src/composite.h 2010-09-23 14:32:38 +0000 +++ src/composite.h 2010-09-25 09:36:36 +0000 @@ -320,7 +320,7 @@ extern int composition_update_it (struct composition_it *, EMACS_INT, EMACS_INT, Lisp_Object); -extern int composition_adjust_point (EMACS_INT, EMACS_INT); +extern EMACS_INT composition_adjust_point (EMACS_INT, EMACS_INT); EXFUN (Fcompose_region_internal, 4); EXFUN (Fcompose_string_internal, 5); === modified file 'src/dispextern.h' --- src/dispextern.h 2010-09-24 17:48:10 +0000 +++ src/dispextern.h 2010-09-25 09:36:36 +0000 @@ -2957,7 +2957,7 @@ extern int current_mode_line_height, current_header_line_height; extern Lisp_Object help_echo_string, help_echo_window; extern Lisp_Object help_echo_object, previous_help_echo_string; -extern int help_echo_pos; +extern EMACS_INT help_echo_pos; extern struct frame *last_mouse_frame; extern int last_tool_bar_item; extern Lisp_Object Vmouse_autoselect_window; === modified file 'src/keyboard.c' --- src/keyboard.c 2010-09-24 17:48:10 +0000 +++ src/keyboard.c 2010-09-25 09:36:36 +0000 @@ -304,7 +304,7 @@ Lisp_Object meta_prefix_char; /* Last size recorded for a current buffer which is not a minibuffer. */ -static int last_non_minibuf_size; +static EMACS_INT last_non_minibuf_size; /* Number of idle seconds before an auto-save and garbage collection. */ static Lisp_Object Vauto_save_timeout; @@ -337,7 +337,7 @@ Lisp_Object Vthis_original_command; /* The value of point when the last command was started. */ -int last_point_position; +EMACS_INT last_point_position; /* The buffer that was current when the last command was started. */ Lisp_Object last_point_position_buffer; @@ -621,7 +621,7 @@ Lisp_Object, Lisp_Object, unsigned long); #endif -static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object, +static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object, Lisp_Object, const char **, Lisp_Object *, unsigned); static Lisp_Object make_lispy_switch_frame (Lisp_Object); @@ -867,7 +867,7 @@ switches frames while entering a key sequence. */ static void -echo_truncate (int nchars) +echo_truncate (EMACS_INT nchars) { if (STRINGP (current_kboard->echo_string)) current_kboard->echo_string @@ -1480,7 +1480,7 @@ static int read_key_sequence (Lisp_Object *, int, Lisp_Object, int, int, int); void safe_run_hooks (Lisp_Object); -static void adjust_point_for_property (int, int); +static void adjust_point_for_property (EMACS_INT, int); /* Cancel hourglass from protect_unwind. ARG is not used. */ @@ -1870,7 +1870,7 @@ LAST_PT is the last position of point. */ static void -adjust_point_for_property (int last_pt, int modified) +adjust_point_for_property (EMACS_INT last_pt, int modified) { EMACS_INT beg, end; Lisp_Object val, overlay, tmp; @@ -1879,7 +1879,7 @@ user can keep inserting another character at point or keep deleting characters around point. */ int check_composition = ! modified, check_display = 1, check_invisible = 1; - int orig_pt = PT; + EMACS_INT orig_pt = PT; /* FIXME: cycling is probably not necessary because these properties can't be usefully combined anyway. */ @@ -2782,7 +2782,8 @@ if (INTERACTIVE && NILP (c)) { - int delay_level, buffer_size; + int delay_level; + EMACS_INT buffer_size; /* Slow down auto saves logarithmically in size of current buffer, and garbage collect while we're at it. */ @@ -3796,22 +3797,20 @@ } -/* Generate HELP_EVENT input_events in BUFP which has room for - SIZE events. If there's not enough room in BUFP, ignore this - event. +/* Generate a HELP_EVENT input_event and store it in the keyboard + buffer. HELP is the help form. - FRAME is the frame on which the help is generated. OBJECT is the - Lisp object where the help was found (a buffer, a string, an - overlay, or nil if neither from a string nor from a buffer. POS is - the position within OBJECT where the help was found. - - Value is the number of input_events generated. */ + FRAME and WINDOW are the frame and windoiw where the help is + generated. OBJECT is the Lisp object where the help was found (a + buffer, a string, an overlay, or nil if neither from a string nor + from a buffer). POS is the position within OBJECT where the help + was found. */ void gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window, - Lisp_Object object, int pos) + Lisp_Object object, EMACS_INT pos) { struct input_event event; @@ -5460,7 +5459,7 @@ case MULTIBYTE_CHAR_KEYSTROKE_EVENT: { Lisp_Object lispy_c; - int c = event->code; + EMACS_INT c = event->code; if (event->kind == ASCII_KEYSTROKE_EVENT) { c &= 0377; @@ -6584,7 +6583,7 @@ in the symbol's name. */ static Lisp_Object -modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, +modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, Lisp_Object name_alist_or_stem, const char **name_table, Lisp_Object *symbol_table, unsigned int table_size) { @@ -6648,7 +6647,7 @@ if (NILP (value)) { char buf[20]; - sprintf (buf, "key-%d", symbol_num); + sprintf (buf, "key-%ld", (long)symbol_num); value = intern (buf); } @@ -10354,7 +10353,7 @@ (Lisp_Object prefixarg) { Lisp_Object function; - int saved_last_point_position; + EMACS_INT saved_last_point_position; Lisp_Object saved_keys, saved_last_point_position_buffer; Lisp_Object bindings, value; struct gcpro gcpro1, gcpro2, gcpro3; @@ -10822,7 +10821,7 @@ if (STRINGP (stuffstring)) { - register int count; + register EMACS_INT count; p = SDATA (stuffstring); count = SBYTES (stuffstring); === modified file 'src/keyboard.h' --- src/keyboard.h 2010-08-16 07:52:32 +0000 +++ src/keyboard.h 2010-09-25 09:36:36 +0000 @@ -524,7 +524,7 @@ extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int); extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object, - Lisp_Object, int); + Lisp_Object, EMACS_INT); extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object); extern Lisp_Object menu_item_eval_property (Lisp_Object); extern int kbd_buffer_events_waiting (int); === modified file 'src/lisp.h' --- src/lisp.h 2010-09-24 19:30:13 +0000 +++ src/lisp.h 2010-09-25 09:36:36 +0000 @@ -2671,7 +2671,7 @@ extern void message_with_string (const char *, Lisp_Object, int); extern void message_log_maybe_newline (void); extern void update_echo_area (void); -extern void truncate_echo_area (int); +extern void truncate_echo_area (EMACS_INT); extern void redisplay (void); extern int check_point_in_composition (struct buffer *, EMACS_INT, struct buffer *, EMACS_INT); === modified file 'src/termhooks.h' --- src/termhooks.h 2010-07-07 22:18:28 +0000 +++ src/termhooks.h 2010-09-25 09:36:36 +0000 @@ -228,9 +228,11 @@ /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT, this is the character. For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code. - For a mouse event, this is the button number. */ + For a mouse event, this is the button number. + For a HELP_EVENT, this is the position within the object + (stored in ARG below) where the help was found. */ /* In WindowsNT, for a mouse wheel event, this is the delta. */ - int code; + EMACS_INT code; enum scroll_bar_part part; int modifiers; /* See enum below for interpretation. */ === modified file 'src/xdisp.c' --- src/xdisp.c 2010-09-24 17:48:10 +0000 +++ src/xdisp.c 2010-09-25 09:36:36 +0000 @@ -907,7 +907,7 @@ Lisp_Object help_echo_string; Lisp_Object help_echo_window; Lisp_Object help_echo_object; -int help_echo_pos; +EMACS_INT help_echo_pos; /* Temporary variable for XTread_socket. */ @@ -9189,7 +9189,7 @@ time we display it---but don't redisplay it now. */ void -truncate_echo_area (int nchars) +truncate_echo_area (EMACS_INT nchars) { if (nchars == 0) echo_area_buffer[0] = Qnil; ------------------------------------------------------------ revno: 101601 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 03:44:43 -0400 message: src/ChangeLog: Another duplication removed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 07:19:03 +0000 +++ src/ChangeLog 2010-09-25 07:44:43 +0000 @@ -27,8 +27,7 @@ (set_cursor_from_row, find_first_unchanged_at_end_row): Use EMACS_INT for buffer positions. - * dispextern.h (set_cursor_from_row, mode_line_string): Adjust - prototype. + * dispextern.h (set_cursor_from_row): Adjust prototype. * dispnew.c (increment_matrix_positions) (increment_row_positions, copy_glyph_row_contents) ------------------------------------------------------------ revno: 101600 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-09-25 09:19:03 +0200 message: src/ChangeLog: Fix duplicate entries. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-25 00:32:09 +0000 +++ src/ChangeLog 2010-09-25 07:19:03 +0000 @@ -27,8 +27,8 @@ (set_cursor_from_row, find_first_unchanged_at_end_row): Use EMACS_INT for buffer positions. - * dispextern.h (set_cursor_from_row, mode_line_string) - (marginal_area_string): Adjust prototypes. + * dispextern.h (set_cursor_from_row, mode_line_string): Adjust + prototype. * dispnew.c (increment_matrix_positions) (increment_row_positions, copy_glyph_row_contents) ------------------------------------------------------------ revno: 101599 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2010-09-25 02:32:09 +0200 message: Fix bug#6781: Use 127.0.0.1 for local hosts, not "localhost". * lisp/server.el (server-start): Revert part of 2010-08-08 change. Using address 127.0.0.1 for local host is now done in Fmake_network_process. * src/process.c (Fmake_network_process): When arg :host is 'local, use address 127.0.0.1, not name "localhost". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-24 03:23:07 +0000 +++ lisp/ChangeLog 2010-09-25 00:32:09 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Juanma Barranquero + + * server.el (server-start): Revert part of 2010-08-08 change. Using + address 127.0.0.1 for local host is now done in Fmake_network_process. + 2010-09-24 Glenn Morris * image-mode.el, progmodes/compile.el, progmodes/gud.el: === modified file 'lisp/server.el' --- lisp/server.el 2010-08-26 13:46:19 +0000 +++ lisp/server.el 2010-09-25 00:32:09 +0000 @@ -565,7 +565,7 @@ (if server-use-tcp (list :family 'ipv4 ;; We're not ready for IPv6 yet :service t - :host (or server-host "127.0.0.1") ;; See bug#6781 + :host (or server-host 'local) :plist '(:authenticated nil)) (list :family 'local :service server-file === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-24 19:30:13 +0000 +++ src/ChangeLog 2010-09-25 00:32:09 +0000 @@ -1,3 +1,8 @@ +2010-09-25 Juanma Barranquero + + * process.c (Fmake_network_process): When arg :host is 'local, + use address 127.0.0.1, not name "localhost". (Bug#6781) + 2010-09-24 Eli Zaretskii * indent.c (Fcurrent_indentation, indented_beyond_p) === modified file 'src/process.c' --- src/process.c 2010-09-17 15:47:49 +0000 +++ src/process.c 2010-09-25 00:32:09 +0000 @@ -3170,7 +3170,9 @@ if (!NILP (host)) { if (EQ (host, Qlocal)) - host = build_string ("localhost"); + /* Depending on setup, "localhost" may map to different IPv4 and/or + IPv6 addresses, so it's better to be explicit. (Bug#6781) */ + host = build_string ("127.0.0.1"); CHECK_STRING (host); } ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.