azynheira / mu0

Automatically exported from code.google.com/p/mu0
0 stars 0 forks source link

man page of mu-find is inconsistent with program behaviour #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. man mu-find

Debian bug report 537234,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537234

From the bug report:
The manpage says on --format:

| The fields corresponding to certain letters are the same as the ones
| in search expressions (scroll down for the list).

Then later:

| s: subject
| f: from (sender)
| t: to (recipient)
| c: cc: (carbon-copy recipient)
| m: message id
| p: message priority
| P: path to the message
| d: date
| z: size
| F: flags

Now when I try --format=p I get path names instead of priorities and
using --format=P there is just "P"s.

and from another post:
On the same line, the manpage refers 3 different ways of using the
format specification command:

1) --format
2) -t
3) --text-format

Of the 3, only (1) is correct, (2) does not exist (it is rather "-f"),
(3) does not exist either.

Thanks

Norbert

Original issue reported on code.google.com by prein...@logic.at on 29 Oct 2009 at 2:14

GoogleCodeExporter commented 8 years ago
Here is a patch that fixes that:
mu-find --format=p should output the priority, but it does the path,
while --format=P should output the path, but it does only do P
fix that
Norbert Preining
---
 find/mu-msg-sqlite.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: maildir-utils/find/mu-msg-sqlite.c
===================================================================
--- maildir-utils.orig/find/mu-msg-sqlite.c     2009-10-30 03:35:25.000000000 
+0900
+++ maildir-utils/find/mu-msg-sqlite.c  2009-10-30 03:35:59.000000000 +0900
@@ -188,7 +188,8 @@
                mu_msg_sqlite_get_flags (row)); break;
        case 'd': str = mu_msg_str_date_s(mu_msg_sqlite_get_date(row)); break;
        case 'z': str = mu_msg_str_size_s(mu_msg_sqlite_get_size(row)); break;
-       case 'p': str = mu_msg_sqlite_get_path(row); break;
+       case 'p': str = mu_msg_str_prio(mu_msg_sqlite_get_path(row)); break;
+       case 'P': str = mu_msg_sqlite_get_path(row); break;
        default:
                buf[0] = fieldchar;
                return buf;

Original comment by prein...@logic.at on 29 Oct 2009 at 6:38

GoogleCodeExporter commented 8 years ago
The first change line should contain
  case 'p': str = mu_msg_str_prio(mu_msg_sqlite_get_priority(row)); break;
sorry.

Original comment by prein...@logic.at on 29 Oct 2009 at 6:47

GoogleCodeExporter commented 8 years ago
The -P/-p things is fixed in the upcoming version; looking at the documentation
issues. New version should be ready in Jan 2010.

Original comment by digg...@gmail.com on 2 Jan 2010 at 9:44

GoogleCodeExporter commented 8 years ago
Ok, this has been fixed in mu v0.6-beta that I just released 

Original comment by digg...@gmail.com on 16 Jan 2010 at 2:02