Date | Commit message (Collapse) |
|
Table rendering in lynx is crap compared to w3m and links.
However, we still use it for filtering HTML since the renderer
is otherwise nice...
|
|
This should allow us to sync the index to a temporary head
to update the Xapian index before we update the real HEAD
index.
|
|
This hopefully reduces clicking. We may drop folding entirely
since we can use Xapian to make searching easier.
|
|
Add some spacing between topics to improve readability when
scanning or in case a subject gets too long.
The title and Atom feed may not be highly-visible otherwise.
While we're at it, use the proper "Atom feed" terminology since
some folks may not understand just what "atom" means.
|
|
In "index: simplify main landing page if search-enabled",
subject normalization went a little farther to drop trailing
'.' characters, so we will need to re-index.
|
|
We want to minimize the time any large objects or strings
are referenced. We can do threading entirely from the
mini_mime-generated messages and lazilly load full messages
when rendering the display.
|
|
We do not need ghost messages in any of our thread views
|
|
Email::MIME should handle everything for us and make things
work nicely with Xapian (assuming I understand how encoding
works in Perl).
While we're at it, reduce temporary strings and arrays by
using destructive operations and clobbering parts as we
iterate through them.
|
|
We can display /t/$MESSAGE_ID.html easily with a Xapian search
index, so rely on it instead of trying to display messages inline.
|
|
It is wrong HTML to have <a> tags nested due to auto-linkification.
|
|
This is more space efficient since we don't need to place padding
bytes in front of every line. While this unfortunately does not
render well on lynx; w3m, links, elinks can all render tables
sanely.
Tables are also superior for long lines which require wrapping
inside <pre> containers.
|
|
We don't need share duplicate logic across both files.
|
|
We'll be making the index smarter for people with search
support enabled. Otherwise, it'll be chronological and
a bit dumb. At least it'll use less memory.
|
|
Some people (e.g. myself :p) may try to guess URLs and hit a
404. Redirect to the /m/ version.
Note: we prefer to redirect to canonical URLs to improve
caching.
|
|
Sometimes we have filter bugs and let HTML slip through...
|
|
We must not prematurely indent if we have no message header to
display.
|
|
Noticed by tidy
|
|
Yay for monkey patching!
ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795913
ref: https://rt.cpan.org/Ticket/Display.html?id=106498
|
|
The following two commits affect indexing behavior, so
change the schema version to avoid compatibility problems
or missing messages:
search: common Subject: normalization for Re: prefixes
search: avoid creating ghosts for circular References
|
|
This makes it easier to reconfigure for non-English users
|
|
Drop German ("Aw:") support since it's non-standard and
is not supported by Mail::Thread and non-English prefixes
are more likely to conflict with prefixes used in Free Software
development where ("subsection:") prefixes are common and English is the
common language.
Anyways we don't filter "Vs: " (Finnish) or "Sv: "
(Norwegian, Swedish, Danish, Icelandic), either.
ref:
https://en.wikipedia.org/wiki/RE_(e-mail)#Abbreviations_in_other_languages
|
|
Some mail software incorrectly creates circular references
and causes us to create ghosts before the actual mail doc
is created.
|
|
Avoid compiling a weird and potentially fragile regexp every
time and use the same logic as our search module to dedupe
References.
|
|
This is merely for display, so on the off chance somebody does
send a 40-byte MID with nothing but hexadecimal characters,
the worst that could happen is we repeat an anchor name in the
rendered HTML. This has no impact on git archival or Xapian
indexing.
|
|
There's no need to make a transaction for each message when doing
incremental indexing against a git repository. While we're at it,
simplify the interface for callers, too and do not auto-create
the Xapian database if it was not explicitly enabled.
|
|
Valid URLs do not make valid anchor ids.
|
|
commit 0fea7793b22efd2596983283947ee43687e0cfac
("mid: compress Message-IDs with '%' in them")
requires re-indexing of repositories with '%' in Message-IDs :<
|
|
Some HTTP servers (apache2 2.2.22-13+deb7u5) on my system
apparently do not handle "%25" correctly. I'm not yet sure if
it's something weird with my rewrite rules or what....
|
|
Otherwise we'll be wasting space in our index for long
subjects.
|
|
We can rely on reference counting to lower memory usage for
big messages.
|
|
No need to waste bandwidth, here
|
|
This should be less error-prone in case somebody tries to screw with
us and our thread_id mechanism or somehow waste our resources.
Unfortunately Mail::Thread isn't smart enough for this, yet, so we
may need to downgrade to Email::Simple objects as a workaround.
Or simply not worry about the display so much if somebody is
intentionally trying to make it thread badly/incorrectly.
|
|
Replies are only direct replies, but followups could be any message
further down the thread. The latter is more useful.
|
|
No need to create a new hash when we can reuse the existing one
more.
|
|
This parameter hasn't been used since
commit 5adf8d639e9b5abd4cbac975d70ddc0fb76541fc
("feed: dead code elimination around dropped endpoints")
|
|
/t/ always falls back to subject path searching anyways,
so there's little lost besides perhaps more readable URLs.
Unfortunately people still use non-compliant mail clients which fail
to set In-Reply-To or References headers :<
|
|
We no longer do "smart" time displays as of
commit ea0e8649f90d1fd0850a41c0ca16642faadf4f14
("view: simplify timestamp generation").
In retrospect, that commit also made us more cache-friendly, too.
|
|
* origin/search:
view: deduplicate common code for loading search results
SearchMsg: ensure metadata for ghost messages mid
implement /s/$SUBJECT_PATH.html lookups
search: remove unnecessary xpfx export
www: /t/$MESSAGE_ID.html for threads
view: hoist out index_walk function
view: reply threading adjustment
thread: common sorting code
view: display replies in per-message view
search: make search results more OO
extract redundant Message-ID handling code
search: implement index_sync to fixup indexer
initial search backend implementation
|
|
Was too sleepy to be coding last night :x
|
|
No point in wasting bytes even if gets compressed over
the wire, it'll use more memory when rendering on the
client.
|
|
We will reuse it for thread views when powered by Xapian.
|
|
More to come later.
|
|
Ghosts have no document data in them.
Perhaps we should just rely on terms for Message-ID
and avoid storing that in the document data...
|
|
Quick-and-dirty wiring up of to Subject: paths.
This may prove more memorizable and easier-to-share than
/t/$MESSAGE_ID.html links, but less strict.
This changes our schema version to 1, since we now
use lower-case subject paths.
|
|
SearchMsg calls it with the full module path anyways.
|
|
This should bring up nearly the entire thread a given
Message-ID is linked to.
|
|
We will reuse it for thread views when powered by Xapian.
|
|
Give changes in subject their own line to reduce line wrapping,
but avoid showing any redundant subjects by maintaining a hash
of subjects already displayed.
|
|
We'll be sharing the same threading, so it makes sense to sort
replies using the same code and message headers without repeating
ourselves.
This also standardizes on sorting on X-PI-TS (Unix epoch in seconds)
instead over using X-PI-Date differently in two different places
|
|
This can be used to quickly scan for replies in a message without
displaying an entire thread.
|