From MAILER-DAEMON Sun May 03 13:31:59 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YoxkF-0001Je-0n
	for mharc-commit-mailutils@gnu.org; Sun, 03 May 2015 13:31:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50253)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YoxkC-0001Ed-4Q
	for commit-mailutils@gnu.org; Sun, 03 May 2015 13:31:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yoxk8-0007c1-Ig
	for commit-mailutils@gnu.org; Sun, 03 May 2015 13:31:55 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36914)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yoxk8-0007bx-FQ
	for commit-mailutils@gnu.org; Sun, 03 May 2015 13:31:52 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yoxk4-00056I-Pb
	for commit-mailutils@gnu.org; Sun, 03 May 2015 17:31:50 +0000
Date: Sun, 03 May 2015 17:31:48 +0000
Message-Id: <E1Yoxk4-00056I-Pb@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-698-g131ddb2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 22b58503041ddd74f2919e28bcbdd08a278dccc5
X-Git-Newrev: 131ddb25a51862bb31fe5fd7a1111896fbb20c58
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 May 2015 17:31:57 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=131ddb25a51862bb31fe5fd7a1111896fbb20c58

The branch, master has been updated
       via  131ddb25a51862bb31fe5fd7a1111896fbb20c58 (commit)
      from  22b58503041ddd74f2919e28bcbdd08a278dccc5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 131ddb25a51862bb31fe5fd7a1111896fbb20c58
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Sun May 3 20:14:18 2015 +0300

    Honor MAIL and FOLDER envars if _mu_mailbox_pattern is not set.
    
    The _mu_mailbox_pattern variable is supposed to be set only from
    configuration file.  However, the mu_mailbox_url function would
    also set it as a side effect.  This produced strange results;
    in particular unsetting HOME variable caused mail utilities to ignore
    MAIL variable as well (as reported by Dan Jacobson on 2015-04-30,
    <87vbgemcc7.fsf@jidanni.org>).
    
    * configure.ac (MU_PATH_MAILDIR): Don't end with a slash.
    * libmailutils/mailbox/mbx_default.c
    (mu_normalize_mailbox_url): Use mu_make_file_name.
    (mu_mailbox_url): Don't set _mu_mailbox_pattern.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                       |    2 +-
 libmailutils/mailbox/mbx_default.c |   52 ++++++++++++-----------------------
 2 files changed, 19 insertions(+), 35 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1dabd30..57cebb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -350,7 +350,7 @@ AH_BOTTOM(
 #ifdef MU_CONF_MAILDIR
 # define MU_PATH_MAILDIR MU_CONF_MAILDIR
 #else
-# define MU_PATH_MAILDIR PATH_MAILDIR "/"
+# define MU_PATH_MAILDIR PATH_MAILDIR 
 #endif])
 
 ##################################
diff --git a/libmailutils/mailbox/mbx_default.c b/libmailutils/mailbox/mbx_default.c
index 3f8238e..ab93fff 100644
--- a/libmailutils/mailbox/mbx_default.c
+++ b/libmailutils/mailbox/mbx_default.c
@@ -49,12 +49,12 @@ static char *_mu_mailbox_pattern;
 static char *_default_folder_dir = "Mail";
 static char *_mu_folder_dir;
 
+#define USERSUFFIX "${user}"
+
 static int
 mu_normalize_mailbox_url (char **pout, const char *dir)
 {
   int len;
-  int addslash = 0;
-#define USERSUFFIX "${user}"
   
   if (!pout)
     return MU_ERR_OUT_PTR_NULL;
@@ -67,18 +67,12 @@ mu_normalize_mailbox_url (char **pout, const char *dir)
       else
 	return MU_ERR_BAD_FILENAME;
     }
-  else if (dir[len-1] != '/')
-    addslash = 1;
+  else
+    *pout = mu_make_file_name (dir, USERSUFFIX);
 
-  *pout = malloc (strlen (dir) + (addslash ? 1 : 0) + sizeof USERSUFFIX);
   if (!*pout)
-    return ENOMEM;
+    return errno;
 
-  strcpy (*pout, dir);
-  if (addslash)
-    strcat (*pout, "/");
-  strcat (*pout, USERSUFFIX);
-#undef USERSUFFIX
   return 0;
 }
 
@@ -129,9 +123,9 @@ mu_set_folder_directory (const char *p)
 const char *
 mu_mailbox_url ()
 {
-  if (!_mu_mailbox_pattern)
-    mu_set_mail_directory (MU_PATH_MAILDIR);
-  return _mu_mailbox_pattern;
+  if (_mu_mailbox_pattern)
+    return _mu_mailbox_pattern;
+  return MU_PATH_MAILDIR "/" USERSUFFIX;
 }
 
 const char *
@@ -145,6 +139,7 @@ mu_folder_directory ()
 int
 mu_construct_user_mailbox_url (char **pout, const char *name)
 {
+  int rc;
   const char *pat = mu_mailbox_url ();
   const char *env[3];
   struct mu_wordsplit ws;
@@ -153,13 +148,15 @@ mu_construct_user_mailbox_url (char **pout, const char *name)
   env[1] = (char*) name;
   env[2] = NULL;
   ws.ws_env = env;
-  if (mu_wordsplit (pat, &ws,
-		    MU_WRDSF_NOSPLIT | MU_WRDSF_NOCMD |
-		    MU_WRDSF_ENV | MU_WRDSF_ENV_KV))
+  rc = mu_wordsplit (pat, &ws,
+		     MU_WRDSF_NOSPLIT | MU_WRDSF_NOCMD |
+		     MU_WRDSF_ENV | MU_WRDSF_ENV_KV);
+    
+  if (rc)
     {
       mu_error (_("cannot expand line `%s': %s"), pat,
 		mu_wordsplit_strerror (&ws));
-      return errno;
+      return rc;
     }
 
   if (ws.ws_wordc == 0)
@@ -173,9 +170,6 @@ mu_construct_user_mailbox_url (char **pout, const char *name)
   return 0;
 }
 
-/* Is this a security risk?  */
-#define USE_ENVIRON 1
-
 static int
 split_shortcut (const char *file, const char pfx[], char **user, char **rest)
 {
@@ -239,7 +233,6 @@ get_homedir (const char *user)
     }
   else
     {
-#ifdef USE_ENVIRON
       /* NOTE: Should we honor ${HOME}?  */
       homedir = getenv ("HOME");
       if (homedir == NULL)
@@ -248,11 +241,6 @@ get_homedir (const char *user)
 	  if (auth)
 	    homedir = auth->dir;
         }
-#else
-      auth = mu_get_auth_by_name (user);
-      if (auth)
-	homedir = auth->dir;
-#endif
     }
 
   if (homedir)
@@ -264,10 +252,8 @@ get_homedir (const char *user)
 static int
 user_mailbox_name (const char *user, char **mailbox_name)
 {
-#ifdef USE_ENVIRON
   if (!user)
     user = (getenv ("LOGNAME")) ? getenv ("LOGNAME") : getenv ("USER");
-#endif
 
   if (user)
     {
@@ -416,10 +402,8 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail)
 	     use FOLDER instead, to not confuse others by using MAIL.  */
 	  mail = getenv ("FOLDER");
 	  if (!mail)
-	    {
-	      /* Fallback to well-known environment.  */
-	      mail = getenv ("MAIL");
-	    }
+	    /* Fallback to well-known environment.  */
+	    mail = getenv ("MAIL");
 	}
 
       if (!mail)
@@ -429,7 +413,7 @@ mu_mailbox_create_default (mu_mailbox_t *pmbox, const char *mail)
 	  mail = tmp_mbox;
 	}
     }
-
+  
   p = mu_tilde_expansion (mail, MU_HIERARCHY_DELIMITER, NULL);
   if (tmp_mbox)
     free (tmp_mbox);


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Sun May 03 14:23:09 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YoyXl-0000u3-14
	for mharc-commit-mailutils@gnu.org; Sun, 03 May 2015 14:23:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55520)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YoyXh-0000tT-Gy
	for commit-mailutils@gnu.org; Sun, 03 May 2015 14:23:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YoyXe-0003NY-4G
	for commit-mailutils@gnu.org; Sun, 03 May 2015 14:23:05 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39175)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YoyXe-0003N8-16
	for commit-mailutils@gnu.org; Sun, 03 May 2015 14:23:02 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YoyXd-0005md-Aj
	for commit-mailutils@gnu.org; Sun, 03 May 2015 18:23:01 +0000
Date: Sun, 03 May 2015 18:23:01 +0000
Message-Id: <E1YoyXd-0005md-Aj@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-699-g17930dd
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 131ddb25a51862bb31fe5fd7a1111896fbb20c58
X-Git-Newrev: 17930dd7cacf60c375408a26154301934a17609e
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 May 2015 18:23:07 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=17930dd7cacf60c375408a26154301934a17609e

The branch, master has been updated
       via  17930dd7cacf60c375408a26154301934a17609e (commit)
      from  131ddb25a51862bb31fe5fd7a1111896fbb20c58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 17930dd7cacf60c375408a26154301934a17609e
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Sun May 3 20:48:53 2015 +0300

    mail: honor columns/screen variables
    
    * mail/util.c (util_command_list): Use util_screen_columns instead of
    util_getcols.
    (util_getcols): Don't use COLUMNS.
    (util_getlines): Don't use LINES.
    * mail/mail.c: Don't force COLUMNS and LINES (they are normally not
    exported, so setting them will cause util_getcols and util_getlines
    to return wrong results).
    Set variable "columns" from envvar COLUMNS, if set to a numeric value.
    Set variable "screen" from envvar LINES, if set to a numeric value.
    * mail/from.c (format_headline): Use util_screen_columns instead of
    util_getcols.
    * mail/mailvar.c (mailvar_print,mail_variable): Likewise.
    * mail/print.c (mail_print_msg): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 mail/from.c     |    2 +-
 mail/mail.c     |   21 +++++++++++++--------
 mail/mailline.c |    4 ++--
 mail/mailvar.c  |    4 ++--
 mail/print.c    |    2 +-
 mail/util.c     |   25 +++++--------------------
 6 files changed, 24 insertions(+), 34 deletions(-)

diff --git a/mail/from.c b/mail/from.c
index 66ae362..3a0fbd4 100644
--- a/mail/from.c
+++ b/mail/from.c
@@ -78,7 +78,7 @@ format_pad (size_t n)
 static void
 format_headline (struct header_segm *seg, msgset_t *mspec, mu_message_t msg)
 {
-  int screen_cols = util_getcols () - 2;
+  int screen_cols = util_screen_columns () - 2;
   int out_cols = 0;
   struct header_call_args args;
 
diff --git a/mail/mail.c b/mail/mail.c
index 7784ec4..2d50917 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -376,10 +376,7 @@ main (int argc, char **argv)
 
   /* set up the default environment */
   if (!getenv ("HOME"))
-    {
-      char *p = util_get_homedir ();
-      setenv ("HOME", p, 0);
-    }
+    setenv ("HOME", util_get_homedir (), 0);
 
   /* Set up the default environment */
   setenv ("DEAD", util_fullpath ("~/dead.letter"), 0);
@@ -390,14 +387,22 @@ main (int argc, char **argv)
   setenv ("PAGER", "more", 0);
   setenv ("SHELL", "sh", 0);
   setenv ("VISUAL", "vi", 0);
-  setenv ("COLUMNS", "80", 0);
-  setenv ("LINES", "24", 0);
 
   /* set defaults for execution */
   for (i = 0; i < sizeof (default_setup)/sizeof (default_setup[0]); i++)
     util_do_command ("%s", default_setup[i]);
-  util_do_command ("set screen=%d", util_getlines ());
-  util_do_command ("set columns=%d", util_getcols ());
+
+  p = getenv ("LINES");
+  if (p && p[strspn (p, "0123456789")] == 0)
+    util_do_command ("set screen=%s", p);
+  else
+    util_do_command ("set screen=%d", util_getlines ());
+  
+  p = getenv ("COLUMNS");
+  if (p && p[strspn (p, "0123456789")] == 0)
+    util_do_command ("set columns=%s", p);
+  else
+    util_do_command ("set columns=%d", util_getcols ());
   
   /* Set the default mailer to sendmail.  */
   mailvar_set ("sendmail",
diff --git a/mail/mailline.c b/mail/mailline.c
index 9b1a194..502453c 100644
--- a/mail/mailline.c
+++ b/mail/mailline.c
@@ -39,8 +39,8 @@ sig_handler (int signo)
       break;
 #if defined (SIGWINCH)
     case SIGWINCH:
-      util_do_command ("set screen=%d", util_getlines());
-      util_do_command ("set columns=%d", util_getcols());
+      util_do_command ("set screen=%d", util_getlines ());
+      util_do_command ("set columns=%d", util_getcols ());
       page_invalidate (1);
       break;
 #endif
diff --git a/mail/mailvar.c b/mail/mailvar.c
index a74e721..3d1b178 100644
--- a/mail/mailvar.c
+++ b/mail/mailvar.c
@@ -749,7 +749,7 @@ mailvar_print (int set)
   clos.out = open_pager (count);
   clos.prettyprint = mailvar_get (NULL, "variable-pretty-print",
 				  mailvar_type_boolean, 0) == 0;
-  clos.width = util_getcols ();
+  clos.width = util_screen_columns ();
 
   mu_list_foreach (varlist, mailvar_printer, &clos);
   mu_list_destroy (&varlist);
@@ -845,7 +845,7 @@ int
 mail_variable (int argc, char **argv)
 {
   int pagelines = util_get_crt ();
-  int width = util_getcols ();
+  int width = util_screen_columns ();
   mu_stream_t out = open_pager (pagelines + 1);
   
   if (argc == 1)
diff --git a/mail/print.c b/mail/print.c
index 5d77515..ad2c7f5 100644
--- a/mail/print.c
+++ b/mail/print.c
@@ -45,7 +45,7 @@ mail_print_msg (msgset_t *mspec, mu_message_t mesg, void *data)
     {
       if (pagelines)
 	{
-	  size_t col = (size_t)util_getcols ();
+	  size_t col = (size_t) util_screen_columns ();
 	  if (col)
 	    {
 	      size_t size = 0;
diff --git a/mail/util.c b/mail/util.c
index 6c028e8..098deb8 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -311,7 +311,7 @@ util_command_list (void *table, size_t nmemb, size_t size)
 {
   int i;
   char *p;
-  int cols = util_getcols ();
+  int cols = util_screen_columns ();
   int pos;
   
   for (p = table, i = 0; i < nmemb; i++, p += size)
@@ -349,16 +349,9 @@ int
 util_getcols (void)
 {
   struct winsize ws;
-
   ws.ws_col = ws.ws_row = 0;
-  if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row == 0)
-    {
-      const char *columns = getenv ("COLUMNS");
-      if (columns)
-	ws.ws_col = strtol (columns, NULL, 10);
-    }
-
-  /* FIXME: Should we exit()/abort() if col <= 0 ?  */
+  if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_col == 0)
+    return 80;  /* FIXME: Should we exit()/abort() if col <= 0 ?  */
   return ws.ws_col;
 }
 
@@ -370,17 +363,9 @@ int
 util_getlines (void)
 {
   struct winsize ws;
-
   ws.ws_col = ws.ws_row = 0;
-  if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row == 0)
-    {
-      const char *lines = getenv ("LINES");
-      if (lines)
-	ws.ws_row = strtol (lines, NULL, 10);
-    }
-
-  /* FIXME: Should we exit()/abort() if row <= 0 ?  */
-
+  if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row <= 2)
+    ws.ws_row = 24;  /* FIXME: Should we exit()/abort() if row <= 2 ?  */
   /* Reserve at least 2 line for the prompt.  */
   return ws.ws_row - 2;
 }


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Sun May 03 16:01:20 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Yp04m-0003Ka-0p
	for mharc-commit-mailutils@gnu.org; Sun, 03 May 2015 16:01:20 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36259)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp04j-0003Jp-6S
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:01:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp04h-0002oy-Kz
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:01:17 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42012)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp04h-0002os-HF
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:01:15 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp04g-0004hs-EK
	for commit-mailutils@gnu.org; Sun, 03 May 2015 20:01:14 +0000
Date: Sun, 03 May 2015 20:01:14 +0000
Message-Id: <E1Yp04g-0004hs-EK@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-700-g87e9c79
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 17930dd7cacf60c375408a26154301934a17609e
X-Git-Newrev: 87e9c7921d151d1b978348f94a1475423bf9dbfe
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 May 2015 20:01:18 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=87e9c7921d151d1b978348f94a1475423bf9dbfe

The branch, master has been updated
       via  87e9c7921d151d1b978348f94a1475423bf9dbfe (commit)
      from  17930dd7cacf60c375408a26154301934a17609e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 87e9c7921d151d1b978348f94a1475423bf9dbfe
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Sun May 3 22:55:49 2015 +0300

    Fix doc generation.
    
    The Config file applies to all output formats, which is wrong.
    Use a dedicated configuration file for html output formats, and
    default settings for the rest.
    
    * doc/texinfo/Makefile.am (GENDOCS): Add html-specific configuration file.
    * doc/texinfo/Config: Rename to doc/texinfo/html.init (with changes).
    * doc/texinfo/programs.texi: Fix sectioning.

-----------------------------------------------------------------------

Summary of changes:
 doc/texinfo/Makefile.am           |    4 ++--
 doc/texinfo/{Config => html.init} |   15 ++++++++-------
 doc/texinfo/mailutils.texi        |   30 +++++++++++++++---------------
 doc/texinfo/programs.texi         |    4 ++--
 4 files changed, 27 insertions(+), 26 deletions(-)
 rename doc/texinfo/{Config => html.init} (90%)

diff --git a/doc/texinfo/Makefile.am b/doc/texinfo/Makefile.am
index 656c3ac..469b646 100644
--- a/doc/texinfo/Makefile.am
+++ b/doc/texinfo/Makefile.am
@@ -52,7 +52,7 @@ final: imprimatur-final
 #EXTRA_DIST = \
 # gendocs_template
 
-GENDOCS=$(srcdir)/gendocs.sh
+GENDOCS=$(srcdir)/gendocs.sh --no-copy-images --html '--init-file=$(abs_srcdir)/html.init'
 TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
 
 .PHONY: manual
@@ -60,7 +60,7 @@ manual:
 	TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
 	 MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS) $(AM_MAKEINFOFLAGS)" \
 	 TEXI2DVI="$(TEXI2DVI)" \
-	$(GENDOCS) --no-copy-images $(PACKAGE) '$(PACKAGE_NAME) manual'
+	$(GENDOCS) $(PACKAGE) '$(PACKAGE_NAME) manual'
 
 manual.tar.bz2: manual
 	tar cfj manual.tar.bz2 manual
diff --git a/doc/texinfo/Config b/doc/texinfo/html.init
similarity index 90%
rename from doc/texinfo/Config
rename to doc/texinfo/html.init
index 5b5a38b..076879d 100644
--- a/doc/texinfo/Config
+++ b/doc/texinfo/html.init
@@ -1,18 +1,18 @@
 # Texi2any configuration for rush documentation. -*- perl -*-
 # Copyright (C) 2009-2010, 2014, 2015 Sergey Poznyakoff
 #
-# GNU Rush is free software; you can redistribute it and/or modify
+# GNU Mailutils 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, or (at your option)
 # any later version.
 #
-# GNU Rush is distributed in the hope that it will be useful,
+# GNU Mailutils 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 Rush.  If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 use strict;
 
 my $top_html_dir="";
@@ -79,12 +79,10 @@ set_from_init_file('PROGRAM_NAME_IN_FOOTER',1);
 set_from_init_file('DEFAULT_RULE', '');
 set_from_init_file('BIG_RULE', '');
 
-# Turn off footer buttons in section split
-set_from_init_file('SECTION_FOOTER_BUTTONS', undef);
-#set_from_init_file('SECTION_BUTTONS', undef);
 # Turn off navigation bars at the bottom of each section in chapter split mode
+# or subsection in section split mode.
 set_from_init_file('HEADERS', undef)
-    if (get_conf('SPLIT') and (get_conf('SPLIT') eq 'chapter'));
+    if ((get_conf('SPLIT') eq 'chapter') or (get_conf('SPLIT') eq 'section'));
 # Use navigation icons
 
 set_from_init_file('ICONS', 1);
@@ -153,8 +151,11 @@ my @gray_buttons = (\&gray_document_title, ' ',
 		    'FastBack', ' ', 'Up', ' ', 'FastForward', ' ',
 		    'Contents', 'Index' );
 
+set_from_init_file('TOP_BUTTONS', undef);
 set_from_init_file('SECTION_BUTTONS', \@gray_buttons);
 set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons);
+set_from_init_file('NODE_FOOTER_BUTTONS', \@gray_buttons);
+set_from_init_file('SECTION_FOOTER_BUTTONS', \@gray_buttons);
 set_from_init_file('MISC_BUTTONS',
 		   [\&gray_document_title,
 		    'Contents',
diff --git a/doc/texinfo/mailutils.texi b/doc/texinfo/mailutils.texi
index 84632f9..98e0408 100644
--- a/doc/texinfo/mailutils.texi
+++ b/doc/texinfo/mailutils.texi
@@ -530,6 +530,21 @@ if a new format is added at a later date, your program will support
 that new format automatically as soon as it is compiled against the
 new library. 
 
+@node Programs
+@chapter Mailutils Programs
+@cindex Programs
+@include programs.texi
+
+@node Libraries
+@chapter Mailutils Libraries
+@cindex Libraries
+@WRITEME
+
+@node Sieve Language
+@chapter Sieve Language
+@cindex Sieve Language
+@include sieve.texi
+
 @node Reporting Bugs
 @chapter Reporting Bugs
 
@@ -548,21 +563,6 @@ needed is:
 The archives of bug-mailutils mailing list are available from
 @url{http://mail.gnu.org/@/mailman/@/listinfo/@/bug-mailutils}.
 
-@node Programs
-@chapter Mailutils Programs
-@cindex Programs
-@include programs.texi
-
-@node Libraries
-@chapter Mailutils Libraries
-@cindex Libraries
-@WRITEME
-
-@node Sieve Language
-@chapter Sieve Language
-@cindex Sieve Language
-@include sieve.texi
-
 @node News
 @chapter Getting News About GNU Mailutils
 
diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 1476671..4e82cd5 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -1294,7 +1294,7 @@ tcp-wrappers @{
 @}
 @end example
 
-@subsection Description
+@subheading Description
 The @code{tcp-wrappers} statements provides an alternative way to
 control accesses to the resources served by GNU Mailutils.  This
 statement is enabled if Mailutils is compiled with TCP wrappers
@@ -1937,7 +1937,7 @@ sql @{
   getpwuid @var{query};
 @}
 @end example
-@subsection Description
+@subheading Description
 
 The @code{sql} statement configures access credentials to
 @acronym{SQL} database and the queries for authentication and


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Sun May 03 16:34:11 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Yp0aZ-0005xp-0B
	for mharc-commit-mailutils@gnu.org; Sun, 03 May 2015 16:34:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40100)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0aW-0005x4-HK
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:34:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0aV-0002qk-6v
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:34:08 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42378)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0aV-0002qg-3b
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:34:07 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0aU-0003zK-HK
	for commit-mailutils@gnu.org; Sun, 03 May 2015 20:34:06 +0000
Date: Sun, 03 May 2015 20:34:06 +0000
Message-Id: <E1Yp0aU-0003zK-HK@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-701-g40b616f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 87e9c7921d151d1b978348f94a1475423bf9dbfe
X-Git-Newrev: 40b616f3dc7fe378846235975a09ebee15b37013
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 May 2015 20:34:09 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=40b616f3dc7fe378846235975a09ebee15b37013

The branch, master has been updated
       via  40b616f3dc7fe378846235975a09ebee15b37013 (commit)
      from  87e9c7921d151d1b978348f94a1475423bf9dbfe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 40b616f3dc7fe378846235975a09ebee15b37013
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Sun May 3 23:29:43 2015 +0300

    readmsg: minor fix
    
    * readmsg/readmsg.c: Bail out unless arguments are present.
    * doc/texinfo/programs.texi: Update.

-----------------------------------------------------------------------

Summary of changes:
 doc/texinfo/programs.texi |    5 +++++
 readmsg/readmsg.c         |   12 +++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 4e82cd5..f9d4aba 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -4853,6 +4853,11 @@ Note that it will not match a message containing @samp{Staff Meeting}
 which matches the pattern is printed.
 @end enumerate
 
+Unless one of the informational options is used, at least one command
+line argument must be present.  Informational options are:
+@option{--help} (@option{-?}), @option{--usage}, and
+@option{--version} (@option{-V}).
+
 @menu
 * Opt-readmsg::   Invocation of @command{readmsg}.
 * Conf-readmsg::  Configuration of @command{readmsg}.
diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
index 1b52ca6..767c32f 100644
--- a/readmsg/readmsg.c
+++ b/readmsg/readmsg.c
@@ -297,6 +297,14 @@ main (int argc, char **argv)
 		   argc, argv, 0, &index, NULL))
     exit (1);
 
+  argc -= index;
+
+  if (argc == 0)
+    {
+      mu_error (_("not enough arguments"));
+      exit (1);
+    }
+
   status = mu_mailbox_create_default (&mbox, mailbox_name);
   if (status != 0)
     {
@@ -367,9 +375,7 @@ main (int argc, char **argv)
     }
 
   /* Build an array containing the message number.  */
-  argc -= index;
-  if (argc > 0)
-    msglist (mbox, show_all, argc, &argv[index], &set, &n);
+  msglist (mbox, show_all, argc, &argv[index], &set, &n);
 
   for (i = 0; i < n; ++i)
     {


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Sun May 03 16:44:18 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Yp0kM-00073S-Kr
	for mharc-commit-mailutils@gnu.org; Sun, 03 May 2015 16:44:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40956)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0kK-00073K-9V
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:44:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0kJ-0005K4-31
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:44:16 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:42433)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0kI-0005K0-VV
	for commit-mailutils@gnu.org; Sun, 03 May 2015 16:44:15 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Yp0kI-0004d3-7c
	for commit-mailutils@gnu.org; Sun, 03 May 2015 20:44:14 +0000
Date: Sun, 03 May 2015 20:44:14 +0000
Message-Id: <E1Yp0kI-0004d3-7c@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-702-gbe9580f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 40b616f3dc7fe378846235975a09ebee15b37013
X-Git-Newrev: be9580f6db6b710e0cd67ca326cac794742a112c
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 03 May 2015 20:44:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=be9580f6db6b710e0cd67ca326cac794742a112c

The branch, master has been updated
       via  be9580f6db6b710e0cd67ca326cac794742a112c (commit)
      from  40b616f3dc7fe378846235975a09ebee15b37013 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit be9580f6db6b710e0cd67ca326cac794742a112c
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Sun May 3 23:40:19 2015 +0300

    Minor change.
    
    * doc/texinfo/programs.texi: Fix description of mail --print

-----------------------------------------------------------------------

Summary of changes:
 doc/texinfo/programs.texi |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index f9d4aba..c7d10e5 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -2498,6 +2498,8 @@ print *
 quit
 @end group
 @end example
+@noindent
+except that @command{mail --print} does not change status of the messages.
 @item -r @var{address}
 @itemx --return-address=@var{address}
 Sets the return email address for outgoing mail.  @xref{return-address}.


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Mon May 04 09:20:02 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YpGHy-0007rv-Cw
	for mharc-commit-mailutils@gnu.org; Mon, 04 May 2015 09:20:02 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56177)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpGHr-0007j4-Dq
	for commit-mailutils@gnu.org; Mon, 04 May 2015 09:20:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpGHp-0007hA-6t
	for commit-mailutils@gnu.org; Mon, 04 May 2015 09:19:55 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53212)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpGHp-0007h5-3N
	for commit-mailutils@gnu.org; Mon, 04 May 2015 09:19:53 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpGHo-0006mB-9d
	for commit-mailutils@gnu.org; Mon, 04 May 2015 13:19:52 +0000
Date: Mon, 04 May 2015 13:19:52 +0000
Message-Id: <E1YpGHo-0006mB-9d@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-703-geea2c4a
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: be9580f6db6b710e0cd67ca326cac794742a112c
X-Git-Newrev: eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 May 2015 13:20:00 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac

The branch, master has been updated
       via  eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac (commit)
      from  be9580f6db6b710e0cd67ca326cac794742a112c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Mon May 4 16:11:53 2015 +0300

    mail: the "copy" command operates on files by default.
    
    Last argument is treated as a mailbox only if it begins with
    a mailbox scheme (mbox://, maildir://, etc).
    
    * mail/copy.c (append_to_mailbox)
    (append_to_file): New functions.
    (mail_copy0): Depending on whether mailbox scheme is specified,
    call one of the above functions.
    * doc/texinfo/programs.texi (mail): Fix documentation of the copy
    command.
    * mail/testsuite/mail/write.exp: Update line/character counts for
    [Ss]ave commands.

-----------------------------------------------------------------------

Summary of changes:
 doc/texinfo/programs.texi     |   17 ++-
 mail/copy.c                   |  235 ++++++++++++++++++++++++++++++++--------
 mail/testsuite/mail/write.exp |    4 +-
 3 files changed, 202 insertions(+), 54 deletions(-)

diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index c7d10e5..ee90ef0 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -3236,11 +3236,18 @@ prints the message, immediately following last deleted one.
 @table @samp
 @item save [[@var{msglist}] @var{file}]
 @itemx s [[@var{msglist}] @var{file}]
-Takes a message list and a file name and appends each message in turn to
-the end of the file.  The name of file and number of characters appended
-to it is echoed on the terminal.  Each saved message is marked for
-deletion as if with @code{delete} command, unless the variable
-@code{keepsave} is set.
+Takes a message list and a file name or mailbox URL and appends each
+message in turn to the end of that file or mailbox.  Mailbox URLs
+begin with mailbox type specifier, such as @samp{mbox://},
+@samp{maildir://}, etc.  The name of file or mailbox and number of
+lines and characters appended to it is echoed on the terminal.  When
+writing to file, the numbers represent exact number of lines and
+characters appended to the file.  When @var{file} specifies a mailbox,
+these numbers may differ by the amount of lines/characters needed to
+represent message envelope for that specific mailbox type.
+
+Each saved message is marked for deletion as if with @code{delete}
+command, unless the variable @code{keepsave} is set.
 @item Save [@var{msglist}]
 @itemx S [@var{msglist}]
 Like @code{save}, but the file to append messages to is named after the
diff --git a/mail/copy.c b/mail/copy.c
index ccbef62..5d35af6 100644
--- a/mail/copy.c
+++ b/mail/copy.c
@@ -16,6 +16,7 @@
    along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "mail.h"
+#include <mailutils/locker.h>
 
 /*
  * c[opy] [file]
@@ -23,59 +24,33 @@
  * C[opy] [msglist]
  */
 
-/*
- * mail_copy0() is shared between mail_copy() and mail_save().
- * argc, argv -- argument count & vector
- * mark -- whether we should mark the message as saved.
- */
-int
-mail_copy0 (int argc, char **argv, int mark)
+struct append_stat
 {
-  mu_message_t msg;
-  mu_mailbox_t mbx;
-  char *filename = NULL;
-  msgset_t *msglist = NULL, *mp;
-  int sender = 0;
-  size_t total_size = 0, total_lines = 0, size;
-  int status;
-
-  if (mu_isupper (argv[0][0]))
-    sender = 1;
-  else if (argc >= 2)
-    filename = mail_expand_name (argv[--argc]);
-  else
-    filename = mu_strdup ("mbox");
-
-  if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &msglist))
-    {
-      if (filename)
-	free (filename);
-      return 1;
-    }
-
-  if (sender)
-    filename = util_outfolder_name (util_get_sender (msglist->msg_part[0], 1));
-
-  if (!filename)
-    {
-      msgset_free (msglist);
-      return 1;
-    }
+  size_t size;
+  size_t lines;
+};
 
+static int
+append_to_mailbox (char const *filename, msgset_t *msglist, int mark,
+		   struct append_stat *totals)
+{
+  int status;
+  mu_mailbox_t mbx;
+  msgset_t *mp;
+  size_t size;
+  mu_message_t msg;
+  
   if ((status = mu_mailbox_create_default (&mbx, filename)) != 0)
     {
       mu_error (_("Cannot create mailbox %s: %s"), filename, 
                    mu_strerror (status));
-      free (filename);
-      msgset_free (msglist);
       return 1;
     }
   if ((status = mu_mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT)) != 0)
     {
       mu_error (_("Cannot open mailbox %s: %s"), filename, 
                    mu_strerror (status));
-      free (filename);
-      msgset_free (msglist);
+      mu_mailbox_destroy (&mbx);
       return 1;
     }
 
@@ -93,9 +68,9 @@ mail_copy0 (int argc, char **argv, int mark)
 	}
       
       mu_message_size (msg, &size);
-      total_size += size;
+      totals->size += size;
       mu_message_lines (msg, &size);
-      total_lines += size;
+      totals->lines += size;
 
       if (mark)
  	{
@@ -104,13 +79,179 @@ mail_copy0 (int argc, char **argv, int mark)
 	  mu_attribute_set_userflag (attr, MAIL_ATTRIBUTE_SAVED);
 	}
     }
+  
+  mu_mailbox_close (mbx);
+  mu_mailbox_destroy (&mbx);
+  return 0;
+}
+
+static int
+append_to_file (char const *filename, msgset_t *msglist, int mark,
+		struct append_stat *totals)
+{
+  int status;
+  msgset_t *mp;
+  mu_stream_t ostr, mstr;
+  mu_off_t size;
+  size_t lines;
+  mu_message_t msg;
+  mu_locker_t locker;
+  
+  status = mu_file_stream_create (&ostr, filename,
+				  MU_STREAM_CREAT|MU_STREAM_APPEND);
+  if (status)
+    {
+      mu_error (_("Cannot open output file %s: %s"),
+		filename, mu_strerror (status));
+      return 1;
+    }
+  
+  status = mu_locker_create (&locker, filename,
+			     MU_LOCKER_KERNEL|MU_LOCKER_RETRY);
+  if (status)
+    {
+      mu_error (_("Cannot create locker %s: %s"),
+		filename, mu_strerror (status));
+      mu_stream_unref (ostr);
+      return 1;
+    }
+  mu_locker_lock_mode (locker, mu_lck_exc);
+
+  status = mu_locker_lock (locker);
+  if (status)
+    {
+      mu_error (_("Cannot lock %s: %s"),
+		filename, mu_strerror (status));
+      mu_locker_destroy (&locker);
+      mu_stream_unref (ostr);
+      return 1;
+    }
+  
+  for (mp = msglist; mp; mp = mp->next)
+    {
+      mu_envelope_t env;
+      const char *s, *d;
+      int n;
+      
+      status = util_get_message (mbox, mp->msg_part[0], &msg);
+      if (status)
+        break;
 
+      status = mu_message_get_envelope (msg, &env);
+      if (status)
+	{
+	  mu_error (_("Cannot get envelope: %s"), mu_strerror (status));
+	  break;
+	}
+
+      status = mu_envelope_sget_sender (env, &s);
+      if (status)
+	{
+	  mu_error (_("Cannot get envelope sender: %s"), mu_strerror (status));
+	  break;
+	}
+      
+      status = mu_envelope_sget_date (env, &d);
+      if (status)
+	{
+	  mu_error (_("Cannot get envelope date: %s"), mu_strerror (status));
+	  break;
+	}
+      
+      status = mu_stream_printf (ostr, "From %s %s\n%n", s, d, &n);
+      if (status)
+	{
+	  mu_error (_("Write error: %s"), mu_strerror (status));
+	  break;
+	}
+      
+      totals->lines++;
+      totals->size += n;
+      
+      status = mu_message_get_streamref (msg, &mstr);
+      if (status)
+	{
+	  mu_error (_("Cannot get message: %s"), mu_strerror (status));
+	  break;
+	}
+
+      status = mu_stream_copy (ostr, mstr, 0, &size);
+      if (status)
+	{
+	  mu_error (_("Cannot append message: %s"), mu_strerror (status));
+	  break;
+	}
+      
+      mu_stream_unref (mstr);
+
+      mu_stream_write (ostr, "\n", 1, NULL);
+      
+      totals->size += size + 1;
+      mu_message_lines (msg, &lines);
+      totals->lines += lines + 1;
+
+      if (mark)
+ 	{
+	  mu_attribute_t attr;
+	  mu_message_get_attribute (msg, &attr);
+	  mu_attribute_set_userflag (attr, MAIL_ATTRIBUTE_SAVED);
+	}
+    }
+
+  mu_stream_close (ostr);
+  mu_stream_unref (ostr);
+
+  mu_locker_unlock (locker);
+  mu_locker_destroy (&locker);
+  
+  return 0;
+}
+
+/*
+ * mail_copy0() is shared between mail_copy() and mail_save().
+ * argc, argv -- argument count & vector
+ * mark -- whether we should mark the message as saved.
+ */
+int
+mail_copy0 (int argc, char **argv, int mark)
+{
+  char *filename = NULL;
+  msgset_t *msglist = NULL;
+  int sender = 0;
+  struct append_stat totals = { 0, 0 };
+  int status;
+
+  if (mu_isupper (argv[0][0]))
+    sender = 1;
+  else if (argc >= 2)
+    filename = mail_expand_name (argv[--argc]);
+  else
+    filename = mu_strdup ("mbox");
+
+  if (msgset_parse (argc, argv, MSG_NODELETED|MSG_SILENT, &msglist))
+    {
+      if (filename)
+	free (filename);
+      return 1;
+    }
+
+  if (sender)
+    filename = util_outfolder_name (util_get_sender (msglist->msg_part[0], 1));
+
+  if (!filename)
+    {
+      msgset_free (msglist);
+      return 1;
+    }
+
+  if (mu_is_proto (filename))
+    status = append_to_mailbox (filename, msglist, mark, &totals);
+  else
+    status = append_to_file (filename, msglist, mark, &totals);
+  
   if (status == 0)
     mu_printf ("\"%s\" %3lu/%-5lu\n", filename,
-	     (unsigned long) total_lines, (unsigned long) total_size);
-
-  mu_mailbox_close (mbx);
-  mu_mailbox_destroy (&mbx);
+	     (unsigned long) totals.lines, (unsigned long) totals.size);
 
   free (filename);
   msgset_free (msglist);
diff --git a/mail/testsuite/mail/write.exp b/mail/testsuite/mail/write.exp
index 68923cf..92447a0 100644
--- a/mail/testsuite/mail/write.exp
+++ b/mail/testsuite/mail/write.exp
@@ -66,7 +66,7 @@ mail_test "headers" \
 # Save messages to the third mailbox
 mail_command "set folder=\"$MU_FOLDER_DIR\""
 mail_test "save 1 2 +three" \
-	"\"$MU_FOLDER_DIR/three\"  28/968"
+	"\"$MU_FOLDER_DIR/three\"  32/1067"
 
 mail_test "headers" \
 	">*   1 Sergey Poznyakoff  Tue Jul 16 12:11  12/390   MBOX"\
@@ -84,7 +84,7 @@ mail_test "headers" \
 # Test uppercase commands (Save and Copy)
 mail_command "set outfolder=\"$MU_FOLDER_DIR\""
 mail_test "Save" \
-	"\"$MU_FOLDER_DIR/gray\"  12/390"
+	"\"$MU_FOLDER_DIR/gray\"  14/438"
 
 mail_test "file \"$MU_FOLDER_DIR/gray\"" \
 	"Held 2 messages in $MU_FOLDER_DIR/three"


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Tue May 05 01:45:33 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YpVfh-00080a-9P
	for mharc-commit-mailutils@gnu.org; Tue, 05 May 2015 01:45:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46745)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVfd-000801-HB
	for commit-mailutils@gnu.org; Tue, 05 May 2015 01:45:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVfa-0007yu-V9
	for commit-mailutils@gnu.org; Tue, 05 May 2015 01:45:29 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36251)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVfa-0007yj-Qw
	for commit-mailutils@gnu.org; Tue, 05 May 2015 01:45:26 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVfZ-0003Vo-6i
	for commit-mailutils@gnu.org; Tue, 05 May 2015 05:45:25 +0000
Date: Tue, 05 May 2015 05:45:25 +0000
Message-Id: <E1YpVfZ-0003Vo-6i@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-704-gb6e0ad6
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac
X-Git-Newrev: b6e0ad60c137cde4f70a897710a9597b68e52f6f
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 May 2015 05:45:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=b6e0ad60c137cde4f70a897710a9597b68e52f6f

The branch, master has been updated
       via  b6e0ad60c137cde4f70a897710a9597b68e52f6f (commit)
      from  eea2c4aa6f4383f3288ddc0c9e5084e36d31d9ac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b6e0ad60c137cde4f70a897710a9597b68e52f6f
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Tue May 5 08:39:24 2015 +0300

    mail: add tests in a non-interactive mode
    
    * configure.ac: Configure mail/tests subdirectory.
    * mail/Makefile.am (SUBDIRS): Add tests.
    * mail/tests/testsuite.at: New file.
    * mail/tests/Makefile.am: New file.
    * mail/tests/.gitignore: New file.
    * mail/tests/atlocal.in: New file.
    * mail/tests/cols00.at: New file.
    * mail/tests/cols01.at: New file.
    * mail/tests/copy00.at: New file.
    * mail/tests/nohome.at: New file.
    * mail/tests/version.at: New file.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                               |    3 ++
 mail/Makefile.am                           |    2 +-
 {imap4d => mail}/tests/.gitignore          |    0
 {messages => mail}/tests/Makefile.am       |    8 ++++-
 {libmailutils => mail}/tests/atlocal.in    |    3 +-
 sieve/tests/ext.at => mail/tests/cols00.at |   34 ++++++++-----------
 sieve/tests/ext.at => mail/tests/cols01.at |   34 ++++++++-----------
 mail/tests/copy00.at                       |   51 ++++++++++++++++++++++++++++
 sieve/tests/ext.at => mail/tests/nohome.at |   32 ++++++-----------
 {libmu_compat => mail}/tests/testsuite.at  |    9 ++++-
 {sieve => mail}/tests/version.at           |    2 +-
 11 files changed, 113 insertions(+), 65 deletions(-)
 copy {imap4d => mail}/tests/.gitignore (100%)
 copy {messages => mail}/tests/Makefile.am (95%)
 copy {libmailutils => mail}/tests/atlocal.in (65%)
 copy sieve/tests/ext.at => mail/tests/cols00.at (57%)
 copy sieve/tests/ext.at => mail/tests/cols01.at (58%)
 create mode 100644 mail/tests/copy00.at
 copy sieve/tests/ext.at => mail/tests/nohome.at (60%)
 copy {libmu_compat => mail}/tests/testsuite.at (84%)
 copy {sieve => mail}/tests/version.at (97%)

diff --git a/configure.ac b/configure.ac
index 57cebb8..6485227 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1316,6 +1316,7 @@ AC_CONFIG_TESTDIR(testsuite)
 AC_CONFIG_TESTDIR(libmu_compat/tests)
 AC_CONFIG_TESTDIR(frm/tests)
 AC_CONFIG_TESTDIR(maidag/tests)
+AC_CONFIG_TESTDIR(mail/tests)
 AC_CONFIG_TESTDIR(messages/tests)
 AC_CONFIG_TESTDIR(readmsg/tests)
 AC_CONFIG_TESTDIR(sieve/tests)
@@ -1337,6 +1338,8 @@ AC_CONFIG_FILES([libmailutils/tests/Makefile
                  imap4d/tests/atlocal
 		 maidag/tests/Makefile
 		 maidag/tests/atlocal
+		 mail/tests/Makefile
+		 mail/tests/atlocal
 		 messages/tests/Makefile
 		 messages/tests/atlocal
 		 readmsg/tests/Makefile
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 564fda8..85d1a20 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -100,5 +100,5 @@ mail_SOURCES = \
  write.c\
  z.c
 
-SUBDIRS = testsuite
+SUBDIRS = testsuite tests
 
diff --git a/imap4d/tests/.gitignore b/mail/tests/.gitignore
similarity index 100%
copy from imap4d/tests/.gitignore
copy to mail/tests/.gitignore
diff --git a/messages/tests/Makefile.am b/mail/tests/Makefile.am
similarity index 95%
copy from messages/tests/Makefile.am
copy to mail/tests/Makefile.am
index a2e867a..166532e 100644
--- a/messages/tests/Makefile.am
+++ b/mail/tests/Makefile.am
@@ -38,7 +38,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 ## Test suite.  ##
 ## ------------ ##
 
-TESTSUITE_AT = testsuite.at
+TESTSUITE_AT =\
+ cols00.at\
+ cols01.at\
+ copy00.at\
+ nohome.at\
+ testsuite.at\
+ version.at
 
 TESTSUITE = $(srcdir)/testsuite
 M4=m4
diff --git a/libmailutils/tests/atlocal.in b/mail/tests/atlocal.in
similarity index 65%
copy from libmailutils/tests/atlocal.in
copy to mail/tests/atlocal.in
index d1b85ee..ee031b5 100644
--- a/libmailutils/tests/atlocal.in
+++ b/mail/tests/atlocal.in
@@ -3,4 +3,5 @@
 # Copyright (C) 2004, 2010-2012, 2014-2015 Free Software Foundation,
 # Inc.
 
-PATH=@abs_builddir@:@abs_top_builddir@/libmailutils/tests:$top_srcdir:$srcdir:$PATH
+PATH=@abs_builddir@:@abs_top_builddir@/mail:$top_srcdir:$srcdir:$PATH
+testsuitedir=@abs_top_srcdir@/testsuite
diff --git a/sieve/tests/ext.at b/mail/tests/cols00.at
similarity index 57%
copy from sieve/tests/ext.at
copy to mail/tests/cols00.at
index 7221803..f7497ec 100644
--- a/sieve/tests/ext.at
+++ b/mail/tests/cols00.at
@@ -1,5 +1,5 @@
 # This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2007-2012, 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2015 Free Software Foundation, Inc.
 #
 # GNU Mailutils is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -14,30 +14,24 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
-AT_SETUP([loadable extensions: numaddr])
-AT_KEYWORDS([ext])
+AT_SETUP([setting columns from environment])
+AT_KEYWORDS([columns cols00])
 
-AT_CHECK([
-MUT_PREREQ_CAPA([HAVE_LIBLTDL])
-
-AT_DATA([prog],[
-require "test-numaddr";
-
-if numaddr [[ "to", "cc" ]] :over 5
-  {
-    discard;
-  }
-])
+# Description: Check if COLUMNS setting is honored.
+# Reported-By: Dan Jacobson <jidanni@jidanni.org>
+# References: <87vbgemcc7.fsf@jidanni.org>,
+#    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
 
-MUT_MBCOPY($abs_top_srcdir/testsuite/spool/bigto.mbox)
-
-sieve MUT_SIEVE_CMDLINE dnl
- --clearpath -L "${abs_top_builddir}/examples" -f ./bigto.mbox prog
+AT_CHECK([
+unset MAILRC
+COLUMNS=26 mail -nH -E 'set columns=26' -f $testsuitedir/spool/mbox
+COLUMNS=31 mail -nH -f $testsuitedir/spool/mbox
 ],
 [0],
-[],
-[DISCARD on msg uid 1: marking as deleted
+[>N   1 Sergey Poznyakoff
+>N   1 Sergey Poznyakoff  Tue
 ])
 
 AT_CLEANUP
 
+
diff --git a/sieve/tests/ext.at b/mail/tests/cols01.at
similarity index 58%
copy from sieve/tests/ext.at
copy to mail/tests/cols01.at
index 7221803..cefda57 100644
--- a/sieve/tests/ext.at
+++ b/mail/tests/cols01.at
@@ -1,5 +1,5 @@
 # This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2007-2012, 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2015 Free Software Foundation, Inc.
 #
 # GNU Mailutils is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -14,30 +14,24 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
-AT_SETUP([loadable extensions: numaddr])
-AT_KEYWORDS([ext])
+AT_SETUP([setting columns])
+AT_KEYWORDS([columns cols01])
 
-AT_CHECK([
-MUT_PREREQ_CAPA([HAVE_LIBLTDL])
-
-AT_DATA([prog],[
-require "test-numaddr";
-
-if numaddr [[ "to", "cc" ]] :over 5
-  {
-    discard;
-  }
-])
+# Description: Mailutils 2.99.98 ignored columns setting
+# Reported-By: Dan Jacobson <jidanni@jidanni.org>
+# References: <87pp6rumzl.fsf@jidanni.org>,
+#   http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00000.html
 
-MUT_MBCOPY($abs_top_srcdir/testsuite/spool/bigto.mbox)
-
-sieve MUT_SIEVE_CMDLINE dnl
- --clearpath -L "${abs_top_builddir}/examples" -f ./bigto.mbox prog
+AT_CHECK([
+unset MAILRC
+mail -nH -E 'set columns=26' -f $testsuitedir/spool/mbox
+mail -nH -E 'set columns=31' -f $testsuitedir/spool/mbox
 ],
 [0],
-[],
-[DISCARD on msg uid 1: marking as deleted
+[>N   1 Sergey Poznyakoff
+>N   1 Sergey Poznyakoff  Tue
 ])
 
 AT_CLEANUP
 
+
diff --git a/mail/tests/copy00.at b/mail/tests/copy00.at
new file mode 100644
index 0000000..c8c9608
--- /dev/null
+++ b/mail/tests/copy00.at
@@ -0,0 +1,51 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2015 Free Software Foundation, Inc.
+#
+# GNU Mailutils 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, or (at
+# your option) any later version.
+#
+# GNU Mailutils 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 Mailutils.  If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([copy to stdout])
+AT_KEYWORDS([copy copy00])
+
+# Description: Check if COLUMNS setting is honored
+# Reported-By: Dan Jacobson <jidanni@jidanni.org>
+# References: <87vbgemcc7.fsf@jidanni.org>,
+#    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
+
+AT_CHECK([
+test -f /dev/stdout || AT_SKIP_TEST
+unset MAILRC
+echo 'copy 1 /dev/stdout' | mail -N -E 'set readonly' -f $testsuitedir/spool/mbox | sed 's/  *$//;/^Held 1 message/d';
+],
+[0],
+[From gray@example.net Tue Jul 16 12:11:35 2002
+Organization: Mailutils-tests
+Received: from example.net (localhost [[127.0.0.1]]) 
+	by example.net with ESMTP id g6G9BZb00791
+	for <gray@example.net>; Tue, 16 Jul 2002 12:11:35 +0300
+Message-Id: <200207160911.g6G9BZb00791@example.net>
+To: Bar <bar@dontmailme.org>
+Subject: MBOX
+Date: Tue, 16 Jul 2002 12:11:35 +0300
+From: Sergey Poznyakoff <gray@example.net>
+
+
+This is a sample user's mbox.
+
+"/dev/stdout"  14/438
+
+])
+
+AT_CLEANUP
+
+
diff --git a/sieve/tests/ext.at b/mail/tests/nohome.at
similarity index 60%
copy from sieve/tests/ext.at
copy to mail/tests/nohome.at
index 7221803..31d9b47 100644
--- a/sieve/tests/ext.at
+++ b/mail/tests/nohome.at
@@ -1,5 +1,5 @@
 # This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2007-2012, 2014-2015 Free Software Foundation, Inc.
+# Copyright (C) 2015 Free Software Foundation, Inc.
 #
 # GNU Mailutils is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -14,29 +14,21 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
-AT_SETUP([loadable extensions: numaddr])
-AT_KEYWORDS([ext])
+AT_SETUP([reading mail with HOME unset])
+AT_KEYWORDS([nohome])
 
-AT_CHECK([
-MUT_PREREQ_CAPA([HAVE_LIBLTDL])
-
-AT_DATA([prog],[
-require "test-numaddr";
-
-if numaddr [[ "to", "cc" ]] :over 5
-  {
-    discard;
-  }
-])
-
-MUT_MBCOPY($abs_top_srcdir/testsuite/spool/bigto.mbox)
+# Description: Unsetting HOME caused undesirable effects in mail
+# Reported-By: Dan Jacobson <jidanni@jidanni.org>
+# References: <87vbgemcc7.fsf@jidanni.org>,
+#    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html 
 
-sieve MUT_SIEVE_CMDLINE dnl
- --clearpath -L "${abs_top_builddir}/examples" -f ./bigto.mbox prog
+AT_CHECK([
+unset MAILRC
+unset HOME
+MAIL=$testsuitedir/spool/mbox mail -nH
 ],
 [0],
-[],
-[DISCARD on msg uid 1: marking as deleted
+[>N   1 Sergey Poznyakoff  Tue Jul 16 12:11  12/390   MBOX
 ])
 
 AT_CLEANUP
diff --git a/libmu_compat/tests/testsuite.at b/mail/tests/testsuite.at
similarity index 84%
copy from libmu_compat/tests/testsuite.at
copy to mail/tests/testsuite.at
index 5710c56..9254a2c 100644
--- a/libmu_compat/tests/testsuite.at
+++ b/mail/tests/testsuite.at
@@ -15,5 +15,12 @@
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
 m4_include([testsuite.inc])
+
 AT_INIT
-m4_include([argcv.at])
+AT_TESTED([mail])
+
+m4_include([version.at])
+m4_include([nohome.at])
+m4_include([cols00.at])
+m4_include([cols01.at])
+m4_include([copy00.at])
\ No newline at end of file
diff --git a/sieve/tests/version.at b/mail/tests/version.at
similarity index 97%
copy from sieve/tests/version.at
copy to mail/tests/version.at
index 9cbff81..5f817d8 100644
--- a/sieve/tests/version.at
+++ b/mail/tests/version.at
@@ -16,4 +16,4 @@
 
 dnl m4_include([testsuite.inc])
 
-MUT_VERSION(sieve)
+MUT_VERSION(mail)


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Tue May 05 02:04:57 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YpVyT-0001Cs-4N
	for mharc-commit-mailutils@gnu.org; Tue, 05 May 2015 02:04:57 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51124)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVyQ-0001Ck-9A
	for commit-mailutils@gnu.org; Tue, 05 May 2015 02:04:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVyO-0005pz-L7
	for commit-mailutils@gnu.org; Tue, 05 May 2015 02:04:54 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36533)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVyO-0005ph-I3
	for commit-mailutils@gnu.org; Tue, 05 May 2015 02:04:52 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1YpVyN-0005lv-Mx
	for commit-mailutils@gnu.org; Tue, 05 May 2015 06:04:52 +0000
Date: Tue, 05 May 2015 06:04:51 +0000
Message-Id: <E1YpVyN-0005lv-Mx@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-705-g007bb14
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b6e0ad60c137cde4f70a897710a9597b68e52f6f
X-Git-Newrev: 007bb14ecef8363d5c36eb05f5acabcf140e652a
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 05 May 2015 06:04:55 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=007bb14ecef8363d5c36eb05f5acabcf140e652a

The branch, master has been updated
       via  007bb14ecef8363d5c36eb05f5acabcf140e652a (commit)
      from  b6e0ad60c137cde4f70a897710a9597b68e52f6f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 007bb14ecef8363d5c36eb05f5acabcf140e652a
Author: Sergey Poznyakoff <gray@gnu.org>
Date:   Tue May 5 09:01:14 2015 +0300

    Minor fix

-----------------------------------------------------------------------

Summary of changes:
 mail/tests/cols00.at |    5 +++--
 mail/tests/cols01.at |    5 +++--
 mail/tests/copy00.at |    3 ++-
 mail/tests/nohome.at |    3 ++-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/mail/tests/cols00.at b/mail/tests/cols00.at
index f7497ec..9f36f3a 100644
--- a/mail/tests/cols00.at
+++ b/mail/tests/cols00.at
@@ -23,9 +23,10 @@ AT_KEYWORDS([columns cols00])
 #    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html
 
 AT_CHECK([
+MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
 unset MAILRC
-COLUMNS=26 mail -nH -E 'set columns=26' -f $testsuitedir/spool/mbox
-COLUMNS=31 mail -nH -f $testsuitedir/spool/mbox
+COLUMNS=26 mail -nH -E 'set columns=26' -f ./mbox
+COLUMNS=31 mail -nH -f ./mbox
 ],
 [0],
 [>N   1 Sergey Poznyakoff
diff --git a/mail/tests/cols01.at b/mail/tests/cols01.at
index cefda57..dbeeadc 100644
--- a/mail/tests/cols01.at
+++ b/mail/tests/cols01.at
@@ -23,9 +23,10 @@ AT_KEYWORDS([columns cols01])
 #   http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00000.html
 
 AT_CHECK([
+MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
 unset MAILRC
-mail -nH -E 'set columns=26' -f $testsuitedir/spool/mbox
-mail -nH -E 'set columns=31' -f $testsuitedir/spool/mbox
+mail -nH -E 'set columns=26' -f ./mbox
+mail -nH -E 'set columns=31' -f ./mbox
 ],
 [0],
 [>N   1 Sergey Poznyakoff
diff --git a/mail/tests/copy00.at b/mail/tests/copy00.at
index c8c9608..bd793a7 100644
--- a/mail/tests/copy00.at
+++ b/mail/tests/copy00.at
@@ -24,8 +24,9 @@ AT_KEYWORDS([copy copy00])
 
 AT_CHECK([
 test -f /dev/stdout || AT_SKIP_TEST
+MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
 unset MAILRC
-echo 'copy 1 /dev/stdout' | mail -N -E 'set readonly' -f $testsuitedir/spool/mbox | sed 's/  *$//;/^Held 1 message/d';
+echo 'copy 1 /dev/stdout' | mail -N -E 'set readonly' -f ./mbox | sed 's/  *$//;/^Held 1 message/d';
 ],
 [0],
 [From gray@example.net Tue Jul 16 12:11:35 2002
diff --git a/mail/tests/nohome.at b/mail/tests/nohome.at
index 31d9b47..692c327 100644
--- a/mail/tests/nohome.at
+++ b/mail/tests/nohome.at
@@ -23,9 +23,10 @@ AT_KEYWORDS([nohome])
 #    http://lists.gnu.org/archive/html/bug-mailutils/2015-04/msg00002.html 
 
 AT_CHECK([
+MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox)
 unset MAILRC
 unset HOME
-MAIL=$testsuitedir/spool/mbox mail -nH
+MAIL=./mbox mail -nH
 ],
 [0],
 [>N   1 Sergey Poznyakoff  Tue Jul 16 12:11  12/390   MBOX


hooks/post-receive
-- 
GNU Mailutils


