mirror of https://github.com/djcb/mu.git
mu-server: add thread-date as emacs timestamp
So we can more easily deal with it from elisp.
This commit is contained in:
parent
b8f8ffa967
commit
bed6058fdc
|
@ -138,6 +138,13 @@ add_thread_info (Sexp::List& items, const QueryMatch& qmatch)
|
|||
info.add_prop(":level", Sexp::make_number(qmatch.thread_level));
|
||||
info.add_prop(":date", Sexp::make_string(qmatch.thread_date));
|
||||
|
||||
Sexp::List dlist;
|
||||
const auto td {::atoi(qmatch.thread_date.c_str())};
|
||||
dlist.add(Sexp::make_number((unsigned)(td >> 16)));
|
||||
dlist.add(Sexp::make_number((unsigned)(td & 0xffff)));
|
||||
dlist.add(Sexp::make_number(0));
|
||||
info.add_prop(":date-tstamp", Sexp::make_list(std::move(dlist)));
|
||||
|
||||
if (qmatch.has_flag(QueryMatch::Flags::Root))
|
||||
info.add_prop( ":root", symbol_t());
|
||||
if (qmatch.has_flag(QueryMatch::Flags::Related))
|
||||
|
|
Loading…
Reference in New Issue