mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-03-18 21:45:17 +01:00
notmuch show: Move subject from one-line summary down to its own line.
And change the display code in emacs to display the one-line summary in inverse video.
This commit is contained in:
parent
afcd85ee71
commit
306e19f5dd
2 changed files with 11 additions and 6 deletions
|
@ -913,7 +913,6 @@ _get_one_line_summary (void *ctx, notmuch_message_t *message)
|
||||||
const char *from;
|
const char *from;
|
||||||
time_t date;
|
time_t date;
|
||||||
const char *relative_date;
|
const char *relative_date;
|
||||||
const char *subject;
|
|
||||||
const char *tags;
|
const char *tags;
|
||||||
|
|
||||||
from = notmuch_message_get_header (message, "from");
|
from = notmuch_message_get_header (message, "from");
|
||||||
|
@ -921,12 +920,10 @@ _get_one_line_summary (void *ctx, notmuch_message_t *message)
|
||||||
date = notmuch_message_get_date (message);
|
date = notmuch_message_get_date (message);
|
||||||
relative_date = _format_relative_date (ctx, date);
|
relative_date = _format_relative_date (ctx, date);
|
||||||
|
|
||||||
subject = notmuch_message_get_header (message, "subject");
|
|
||||||
|
|
||||||
tags = _get_tags_as_string (ctx, message);
|
tags = _get_tags_as_string (ctx, message);
|
||||||
|
|
||||||
return talloc_asprintf (ctx, "%s (%s) %s (%s)",
|
return talloc_asprintf (ctx, "%s (%s) (%s)",
|
||||||
from, relative_date, subject, tags);
|
from, relative_date, tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1118,6 +1115,8 @@ show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
||||||
|
|
||||||
printf ("%s\n", _get_one_line_summary (local, message));
|
printf ("%s\n", _get_one_line_summary (local, message));
|
||||||
|
|
||||||
|
printf ("%s\n", notmuch_message_get_header (message, "subject"));
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE (headers); i++) {
|
for (i = 0; i < ARRAY_SIZE (headers); i++) {
|
||||||
name = headers[i];
|
name = headers[i];
|
||||||
value = notmuch_message_get_header (message, name);
|
value = notmuch_message_get_header (message, name);
|
||||||
|
|
|
@ -436,9 +436,15 @@ which this thread was originally shown."
|
||||||
|
|
||||||
(defun notmuch-show-markup-header ()
|
(defun notmuch-show-markup-header ()
|
||||||
(re-search-forward notmuch-show-header-begin-regexp)
|
(re-search-forward notmuch-show-header-begin-regexp)
|
||||||
(next-line 2)
|
(forward-line 1)
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(let ((beg (point)))
|
(let ((beg (point)))
|
||||||
|
(end-of-line)
|
||||||
|
; Inverse video for subject
|
||||||
|
(overlay-put (make-overlay beg (point)) 'face '((cons :inverse-video t)))
|
||||||
|
(beginning-of-line)
|
||||||
|
(forward-line 2)
|
||||||
|
(set 'beg (point))
|
||||||
(re-search-forward notmuch-show-header-end-regexp)
|
(re-search-forward notmuch-show-header-end-regexp)
|
||||||
(overlay-put (make-overlay beg (match-beginning 0))
|
(overlay-put (make-overlay beg (match-beginning 0))
|
||||||
'invisible 'notmuch-show-header)))
|
'invisible 'notmuch-show-header)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue