| Age | Commit message (Collapse) | Author |
|
`outline-minor-mode' treats comments that begin with three or more
semicolons as headings. That makes it very convenient to navigate
code and to show/hide parts of a file.
Elips libraries typically have four top-level sections, e.g.:
;;; notmuch.el --- run notmuch within emacs...
;;; Commentary:...
;;; Code:...
;;; notmuch.el ends here
In this package many libraries lack a "Commentary:" section, which is
not optimal but okay for most libraries, except major entry points.
Depending on how one chooses to look at it, the "... ends here" line
is not really a heading that begins a section, because it should never
have a "section" body (after all it marks eof).
If the file is rather short, then I left "Code:" as the only section
that contains code. Otherwise I split the file into multiple sibling
sections. The "Code:" section continues to contain `require' and
`declare-function' forms and other such "front matter".
If and only if I have split the code into multiple sections anyway,
then I also added an additional section named just "_" before the
`provide' form and shortly before the "...end here" line. This
section could also be called "Back matter", but I feel it would be
distracting to be that explicit about it. (The IMO unnecessary but
unfortunately still obligatory "... ends here" line is already
distracting enough as far as I am concerned.)
Before this commit some libraries already uses section headings, some
of them consistently. When a library already had some headings, then
this commit often sticks to that style, even at the cost inconsistent
styling across all libraries.
A very limited number of variable and function definitions have to be
moved around because they would otherwise end up in sections they do
not belong into.
Sections, including but not limited to their heading, can and should
be further improved in the future.
|
|
|
|
readelf on (at least) ppc64le sometimes generates some extension to
the Ndx name inside '[]'. Remove this output to allow our simple
column based parsing to work.
|
|
Make sure upcoming changes to config handling do not break command
line specification.
|
|
In a future commit we want to interoperate better with glib KeyFiles,
which need groups for all keys.
|
|
It turns out that using nm -P isn't as portable as hoped. In
particular with some ELF ABIs (e.g. ppc64 ELFv1), the desired symbols
end up in the data section instead of text.
The test is currently only functional on ELF based architectures, so I
think it's legit to depend on readelf instead of nm.
The switch to readelf has the advantage that we can explicitely ask
for all of the symbols with global visibility, rather than grepping
for notmuch. That seems a more robust approach since it will catch any
strangely named global symbols.
|
|
notmuch insert does not currently support passing a filename for the
input, so all of these tests have an extra error in addition to the
one being tested for.
Currently this does not make a difference because the error being
tested for is caught before the error of an extra command line
argument. In the future it might make a difference, and in any case it
is confusing.
|
|
Fix a copy paste error of using the boolean ret as a notmuch_status_t,
and uninitialized.
|
|
These test databases have been unneeded since ee897cab8.
|
|
Previously in message-show mode message's first header line (From
header) was always indented, even if user had turned thread
indentation off with "<" (notmuch-show-toggle-thread-indentation)
command.
This change modifies notmuch-show-insert-headerline function so that
it doesn't indent the first header line if notmuch-show-indent-content
variable is nil.
This change also modifies tests so that they expect this new output
format:
test/emacs-show.expected-output/notmuch-show-indent-thread-content-off
|
|
Use `cl-letf*' instead.
|
|
|
|
Fix it to consistently match the style we have configured in
".dir-locals.el".
|
|
|
|
|
|
Use `makefile-gmake-mode' instead of `makefile-mode' because the
former also highlights ifdef et al. while the latter does not.
"./Makefile.global" and one "Makefile.local" failed to specify any
major mode at all but doing so is necessary because Emacs does not
automatically figure out that these are Makefiles (of any flavor).
|
|
|
|
Also use 'unless' in a few cases where previously 'if' was used with
'not' but without an ELSE part.
|
|
|
|
On some systems (notably, the one shipped with LibreSSL),
default fingerprint digest algorithm is SHA256.
On other systems, users can change default digest algorithm by changing
default_md in /etc/ssl/default_md.
Let's ask openssl to provide us specific algorithm to make the test
more deterministic.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
|
The main criteria is that they don't crash. Working with a closed
database is a bonus.
|
|
Also mention error return in API docs
|
|
Exception is caught.
|
|
The mtime is cached, so closing the db is not a problem. Writing the
mtime throws an exception, which is caught.
|
|
Falling out of the catch meant the error return was lost
|
|
There is a return value bug in notmuch_directory_delete that is hiding
the exception.
|
|
Also clarify API in error case.
|
|
This is a clone of the one for get_child_directories
|
|
Also clarify API in error case.
|
|
Start a new test file (for the notmuch_directory_* API group) to hold
this test.
|
|
Closing the database after the iterator is created is not a problem.
|
|
This allows finer control over when to close the database.
|
|
Also test n_messages_destroy.
|
|
This is a rare and probably serious programming error, so better not
to silently return a default value.
|
|
This will allow the dropping of the test for the default ending from
configure.
|
|
Inspired by the suggestion of
id:20200727154108.16269-3-congdanhqx@gmail.com
to drop the configuration test for the default backend. This version
is hopefully robust against backend changes.
|
|
Check for (non)-crash.
|
|
Code is taken from the API docs, with the twist that the underlying
database is closed. Not crashing is the main point.
|
|
These are strictly to watch for crashes, so don't be too fussy about
the actual timestamps.
|
|
This is returning explicitely cached data, so no database access is needed.
|
|
This is similar to the case of toplevel messages. Currently everything
is cached, so no database access is necessary. This might change in
the future, but it should not crash in either case.
|
|
Include a test for the previously omitted non-trivial code path for
notmuch_thread_get_replies.
|
|
This is returning cached info, so does not need to access the (closed)
database.
|
|
This is just cached data, so as long as we don't prematurely free
anything, it should be fine.
|
|
As with other void API entries, not crashing counts as success.
|
|
At least these exceptions are caught.
|
|
Exception handling matches notmuch_query_search_threads, at least for
this case.
|
|
At least this exception is caught.
|
|
This relies on the change to not tear down the auxilary Xapian
objects, in particular the query parser, when the database is closed.
|
|
We just want to make sure accessing the query owned by a closed db
does not cause a crash.
|