unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 622c94e45c3f6435651645870668df4030612eb2 2757 bytes (raw)
name: test/emacs-show.expected-output/notmuch-show-buttons-content-description 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (attachment inbox signed unread)
Subject: [notmuch] "notmuch help" outputs to stderr?
 Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (attachment inbox signed)
 Subject: Re: [notmuch] "notmuch help" outputs to stderr?
 To: notmuch <notmuch@notmuchmail.org>
 Date: Tue, 17 Nov 2009 20:01:16 -0500

 [ multipart/mixed ]
 [ multipart/signed ]
 [ multipart/mixed ]
 [ text/plain ]
 > I've attached a patch that lets usage() take a FILE * argument so that
 > you can output to stderr in response to usage errors, and stdout in
 > response to an explicit request.

 Whoops, missed a couple of stderr's in that last patch.  New one
 attached.

 [ 4-line signature. Click/Enter to show. ]
 [ v2 of the selectable usage() stream patch: text/plain ]
 diff --git a/notmuch.c b/notmuch.c
 index c47e640..446c810 100644
 --- a/notmuch.c
 +++ b/notmuch.c
 @@ -157,23 +157,23 @@ command_t commands[] = {
  };

  static void
 -usage (void)
 +usage (FILE *out)
  {
      command_t *command;
      unsigned int i;

 -    fprintf (stderr, "Usage: notmuch <command> [args...]\n");
 -    fprintf (stderr, "\n");
 -    fprintf (stderr, "Where <command> and [args...] are as follows:\n");
 -    fprintf (stderr, "\n");
 +    fprintf (out, "Usage: notmuch <command> [args...]\n");
 +    fprintf (out, "\n");
 +    fprintf (out, "Where <command> and [args...] are as follows:\n");
 +    fprintf (out, "\n");

      for (i = 0; i < ARRAY_SIZE (commands); i++) {
	 command = &commands[i];

 -	fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary);
 +	fprintf (out, "\t%s\t%s\n\n", command->name, command->summary);
      }

 -    fprintf (stderr, "Use \"notmuch help <command>\" for more details on
 each command.\n\n");
 +    fprintf (out, "Use \"notmuch help <command>\" for more details on each
 command.\n\n");
  }

  static int
 @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, char
 *argv[])
      unsigned int i;

      if (argc == 0) {
 -	fprintf (stderr, "The notmuch mail system.\n\n");
 -	usage ();
 +	fprintf (stdout, "The notmuch mail system.\n\n");
 +	usage (stdout);
	 return 0;
      }

 @@ -192,8 +192,8 @@ notmuch_help_command (unused (void *ctx), int argc, char
 *argv[])
	 command = &commands[i];

	 if (strcmp (argv[0], command->name) == 0) {
 -	    fprintf (stderr, "Help for \"notmuch %s\":\n\n", argv[0]);
 -	    fprintf (stderr, "\t%s\t%s\n\n%s\n\n", command->name,
 +	    fprintf (stdout, "Help for \"notmuch %s\":\n\n", argv[0]);
 +	    fprintf (stdout, "\t%s\t%s\n\n%s\n\n", command->name,
		      command->summary, command->documentation);
	     return 0;
	 }
 [ application/pgp-signature ]
 [ text/plain ]
 [ 4-line signature. Click/Enter to show. ]

debug log:

solving 622c94e ...
found 622c94e in https://yhetil.org/notmuch/27be295875a7df782a83c9a2c09d06f9d321fe9e.1391423201.git.wking@tremily.us/

applying [1/1] https://yhetil.org/notmuch/27be295875a7df782a83c9a2c09d06f9d321fe9e.1391423201.git.wking@tremily.us/
diff --git a/test/emacs-show.expected-output/notmuch-show-buttons-content-description b/test/emacs-show.expected-output/notmuch-show-buttons-content-description
new file mode 100644
index 0000000..622c94e

Checking patch test/emacs-show.expected-output/notmuch-show-buttons-content-description...
Applied patch test/emacs-show.expected-output/notmuch-show-buttons-content-description cleanly.

index at:
100644 622c94e45c3f6435651645870668df4030612eb2	test/emacs-show.expected-output/notmuch-show-buttons-content-description

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).