mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
Fix typos
This commit is contained in:
parent
df3fab18fe
commit
6c84dee531
19 changed files with 34 additions and 34 deletions
2
NEWS
2
NEWS
|
@ -116,7 +116,7 @@ information about cryptographic protections for the Subject header.
|
||||||
Emacs
|
Emacs
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Optionally check for missing attachements in outgoing messages (see
|
Optionally check for missing attachments in outgoing messages (see
|
||||||
function `notmuch-mua-attachment-check`).
|
function `notmuch-mua-attachment-check`).
|
||||||
|
|
||||||
Bind `B` to browse URLs in current message.
|
Bind `B` to browse URLs in current message.
|
||||||
|
|
|
@ -10,7 +10,7 @@ should consider their signatures implementation details.
|
||||||
Errors
|
Errors
|
||||||
======
|
======
|
||||||
|
|
||||||
All errors occuring due to errors from the underlying notmuch database
|
All errors occurring due to errors from the underlying notmuch database
|
||||||
are subclasses of the :exc:`NotmuchError`. Due to memory management
|
are subclasses of the :exc:`NotmuchError`. Due to memory management
|
||||||
it is possible to try and use an object after it has been freed. In
|
it is possible to try and use an object after it has been freed. In
|
||||||
this case a :exc:`ObjectDestroyedError` will be raised.
|
this case a :exc:`ObjectDestroyedError` will be raised.
|
||||||
|
|
|
@ -29,7 +29,7 @@ class NotmuchObject(metaclass=abc.ABCMeta):
|
||||||
However during some peculiar situations, e.g. interpreter
|
However during some peculiar situations, e.g. interpreter
|
||||||
shutdown, it is possible for the :meth:`__del__` method to have
|
shutdown, it is possible for the :meth:`__del__` method to have
|
||||||
been called, whele there are still references to an object. This
|
been called, whele there are still references to an object. This
|
||||||
could result in child objects asking their memeory to be freed
|
could result in child objects asking their memory to be freed
|
||||||
after the parent has already freed the memory, making things
|
after the parent has already freed the memory, making things
|
||||||
rather unhappy as double frees are not taken lightly in C. To
|
rather unhappy as double frees are not taken lightly in C. To
|
||||||
handle this case all objects need to follow the same protocol to
|
handle this case all objects need to follow the same protocol to
|
||||||
|
@ -73,7 +73,7 @@ class NotmuchObject(metaclass=abc.ABCMeta):
|
||||||
def _destroy(self):
|
def _destroy(self):
|
||||||
"""Destroy the object, freeing all memory.
|
"""Destroy the object, freeing all memory.
|
||||||
|
|
||||||
This method needs to destory the object on the
|
This method needs to destroy the object on the
|
||||||
libnotmuch-level. It must ensure it's not been destroyed by
|
libnotmuch-level. It must ensure it's not been destroyed by
|
||||||
it's parent object yet before doing so. It also must be
|
it's parent object yet before doing so. It also must be
|
||||||
idempotent.
|
idempotent.
|
||||||
|
@ -134,7 +134,7 @@ class BinString(str):
|
||||||
|
|
||||||
Most data in libnotmuch should be valid ASCII or valid UTF-8.
|
Most data in libnotmuch should be valid ASCII or valid UTF-8.
|
||||||
However since it is a C library these are represented as
|
However since it is a C library these are represented as
|
||||||
bytestrings intead which means on an API level we can not
|
bytestrings instead which means on an API level we can not
|
||||||
guarantee that decoding this to UTF-8 will both succeed and be
|
guarantee that decoding this to UTF-8 will both succeed and be
|
||||||
lossless. This string type converts bytes to unicode in a lossy
|
lossless. This string type converts bytes to unicode in a lossy
|
||||||
way, but also makes the raw bytes available.
|
way, but also makes the raw bytes available.
|
||||||
|
|
|
@ -422,7 +422,7 @@ class Database(base.NotmuchObject):
|
||||||
of it as ``dup = db.remove_message(name); if dup: ...``.
|
of it as ``dup = db.remove_message(name); if dup: ...``.
|
||||||
:rtype: bool
|
:rtype: bool
|
||||||
|
|
||||||
:raises XapianError: A Xapian exception ocurred.
|
:raises XapianError: A Xapian exception occurred.
|
||||||
:raises ReadOnlyDatabaseError: The database is opened in
|
:raises ReadOnlyDatabaseError: The database is opened in
|
||||||
READ_ONLY mode.
|
READ_ONLY mode.
|
||||||
:raises UpgradeRequiredError: The database must be upgraded
|
:raises UpgradeRequiredError: The database must be upgraded
|
||||||
|
@ -458,7 +458,7 @@ class Database(base.NotmuchObject):
|
||||||
:raises LookupError: If no message was found.
|
:raises LookupError: If no message was found.
|
||||||
:raises OutOfMemoryError: When there is no memory to allocate
|
:raises OutOfMemoryError: When there is no memory to allocate
|
||||||
the message instance.
|
the message instance.
|
||||||
:raises XapianError: A Xapian exception ocurred.
|
:raises XapianError: A Xapian exception occurred.
|
||||||
:raises ObjectDestroyedError: if used after destroyed.
|
:raises ObjectDestroyedError: if used after destroyed.
|
||||||
"""
|
"""
|
||||||
msg_pp = capi.ffi.new('notmuch_message_t **')
|
msg_pp = capi.ffi.new('notmuch_message_t **')
|
||||||
|
@ -489,7 +489,7 @@ class Database(base.NotmuchObject):
|
||||||
a subclass of :exc:`KeyError`.
|
a subclass of :exc:`KeyError`.
|
||||||
:raises OutOfMemoryError: When there is no memory to allocate
|
:raises OutOfMemoryError: When there is no memory to allocate
|
||||||
the message instance.
|
the message instance.
|
||||||
:raises XapianError: A Xapian exception ocurred.
|
:raises XapianError: A Xapian exception occurred.
|
||||||
:raises ObjectDestroyedError: if used after destroyed.
|
:raises ObjectDestroyedError: if used after destroyed.
|
||||||
"""
|
"""
|
||||||
if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path):
|
if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path):
|
||||||
|
@ -695,7 +695,7 @@ class AtomicContext:
|
||||||
"""Force ending the atomic section.
|
"""Force ending the atomic section.
|
||||||
|
|
||||||
This can only be called once __exit__ has been called. It
|
This can only be called once __exit__ has been called. It
|
||||||
will attept to close the atomic section (again). This is
|
will attempt to close the atomic section (again). This is
|
||||||
useful if the original exit raised an exception and the atomic
|
useful if the original exit raised an exception and the atomic
|
||||||
section is still open. But things are pretty ugly by now.
|
section is still open. But things are pretty ugly by now.
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ class Message(base.NotmuchObject):
|
||||||
"""Return an iterator of all files for this message.
|
"""Return an iterator of all files for this message.
|
||||||
|
|
||||||
If multiple files contained the same message ID they will all
|
If multiple files contained the same message ID they will all
|
||||||
be returned here. The files are returned as intances of
|
be returned here. The files are returned as instances of
|
||||||
:class:`pathlib.Path`.
|
:class:`pathlib.Path`.
|
||||||
|
|
||||||
:returns: Iterator yielding :class:`pathlib.Path` instances.
|
:returns: Iterator yielding :class:`pathlib.Path` instances.
|
||||||
|
@ -431,7 +431,7 @@ class PropertiesMap(base.NotmuchObject, collections.abc.MutableMapping):
|
||||||
means the former will yield duplicate keys while the latter won't.
|
means the former will yield duplicate keys while the latter won't.
|
||||||
It also means ``len(list(iter(this_map)))`` could be different
|
It also means ``len(list(iter(this_map)))`` could be different
|
||||||
than ``len(this_map.keys())``. ``len(this_map)`` will correspond
|
than ``len(this_map.keys())``. ``len(this_map)`` will correspond
|
||||||
with the lenght of the default iterator.
|
with the length of the default iterator.
|
||||||
|
|
||||||
Be aware that libnotmuch exposes all of this as iterators, so
|
Be aware that libnotmuch exposes all of this as iterators, so
|
||||||
quite a few operations have O(n) performance instead of the usual
|
quite a few operations have O(n) performance instead of the usual
|
||||||
|
|
|
@ -161,7 +161,7 @@ class MutableTagSet(ImmutableTagSet, collections.abc.MutableSet):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Since we subclass ImmutableTagSet we inherit a __hash__. But we
|
# Since we subclass ImmutableTagSet we inherit a __hash__. But we
|
||||||
# are mutable, setting it to None will make the Python machinary
|
# are mutable, setting it to None will make the Python machinery
|
||||||
# recognise us as unhashable.
|
# recognise us as unhashable.
|
||||||
__hash__ = None
|
__hash__ = None
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ class MutableTagSet(ImmutableTagSet, collections.abc.MutableSet):
|
||||||
|
|
||||||
:raises TypeError: If the tag is not a valid type.
|
:raises TypeError: If the tag is not a valid type.
|
||||||
:raises TagTooLongError: If the added tag exceeds the maximum
|
:raises TagTooLongError: If the added tag exceeds the maximum
|
||||||
lenght, see ``notmuch_cffi.NOTMUCH_TAG_MAX``.
|
length, see ``notmuch_cffi.NOTMUCH_TAG_MAX``.
|
||||||
:raises ReadOnlyDatabaseError: If the database is opened in
|
:raises ReadOnlyDatabaseError: If the database is opened in
|
||||||
read-only mode.
|
read-only mode.
|
||||||
"""
|
"""
|
||||||
|
@ -204,7 +204,7 @@ class MutableTagSet(ImmutableTagSet, collections.abc.MutableSet):
|
||||||
|
|
||||||
:raises TypeError: If the tag is not a valid type.
|
:raises TypeError: If the tag is not a valid type.
|
||||||
:raises TagTooLongError: If the tag exceeds the maximum
|
:raises TagTooLongError: If the tag exceeds the maximum
|
||||||
lenght, see ``notmuch_cffi.NOTMUCH_TAG_MAX``.
|
length, see ``notmuch_cffi.NOTMUCH_TAG_MAX``.
|
||||||
:raises ReadOnlyDatabaseError: If the database is opened in
|
:raises ReadOnlyDatabaseError: If the database is opened in
|
||||||
read-only mode.
|
read-only mode.
|
||||||
"""
|
"""
|
||||||
|
@ -286,7 +286,7 @@ class MutableTagSet(ImmutableTagSet, collections.abc.MutableSet):
|
||||||
class TagsIter(base.NotmuchObject, collections.abc.Iterator):
|
class TagsIter(base.NotmuchObject, collections.abc.Iterator):
|
||||||
"""Iterator over tags.
|
"""Iterator over tags.
|
||||||
|
|
||||||
This is only an interator, not a container so calling
|
This is only an iterator, not a container so calling
|
||||||
:meth:`__iter__` does not return a new, replenished iterator but
|
:meth:`__iter__` does not return a new, replenished iterator but
|
||||||
only itself.
|
only itself.
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ def notmuch(maildir):
|
||||||
fixture.
|
fixture.
|
||||||
"""
|
"""
|
||||||
def run(*args):
|
def run(*args):
|
||||||
"""Run a notmuch comand.
|
"""Run a notmuch command.
|
||||||
|
|
||||||
This function runs with a timeout error as many notmuch
|
This function runs with a timeout error as many notmuch
|
||||||
commands may block if multiple processes are trying to open
|
commands may block if multiple processes are trying to open
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Database(object):
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Any function in this class can and will throw an
|
Any function in this class can and will throw an
|
||||||
:exc:`NotInitializedError` if the database was not intitialized
|
:exc:`NotInitializedError` if the database was not initialized
|
||||||
properly.
|
properly.
|
||||||
"""
|
"""
|
||||||
_std_db_path = None
|
_std_db_path = None
|
||||||
|
@ -273,9 +273,9 @@ class Database(object):
|
||||||
return Database._get_version(self._db)
|
return Database._get_version(self._db)
|
||||||
|
|
||||||
def get_revision (self):
|
def get_revision (self):
|
||||||
"""Returns the committed database revison and UUID
|
"""Returns the committed database revision and UUID
|
||||||
|
|
||||||
:returns: (revison, uuid) The database revision as a positive integer
|
:returns: (revision, uuid) The database revision as a positive integer
|
||||||
and the UUID of the database.
|
and the UUID of the database.
|
||||||
"""
|
"""
|
||||||
self._assert_db_is_initialized()
|
self._assert_db_is_initialized()
|
||||||
|
@ -574,7 +574,7 @@ class Database(object):
|
||||||
in the meantime. In this case, you should close and
|
in the meantime. In this case, you should close and
|
||||||
reopen the database and retry.
|
reopen the database and retry.
|
||||||
:exc:`NotInitializedError` if
|
:exc:`NotInitializedError` if
|
||||||
the database was not intitialized.
|
the database was not initialized.
|
||||||
"""
|
"""
|
||||||
self._assert_db_is_initialized()
|
self._assert_db_is_initialized()
|
||||||
msg_p = NotmuchMessageP()
|
msg_p = NotmuchMessageP()
|
||||||
|
@ -600,7 +600,7 @@ class Database(object):
|
||||||
case, you should close and reopen the database and
|
case, you should close and reopen the database and
|
||||||
retry.
|
retry.
|
||||||
:raises: :exc:`NotInitializedError` if the database was not
|
:raises: :exc:`NotInitializedError` if the database was not
|
||||||
intitialized.
|
initialized.
|
||||||
|
|
||||||
*Added in notmuch 0.9*"""
|
*Added in notmuch 0.9*"""
|
||||||
self._assert_db_is_initialized()
|
self._assert_db_is_initialized()
|
||||||
|
@ -616,7 +616,7 @@ class Database(object):
|
||||||
"""Returns :class:`Tags` with a list of all tags found in the database
|
"""Returns :class:`Tags` with a list of all tags found in the database
|
||||||
|
|
||||||
:returns: :class:`Tags`
|
:returns: :class:`Tags`
|
||||||
:execption: :exc:`NotmuchError` with :attr:`STATUS`.NULL_POINTER
|
:exception: :exc:`NotmuchError` with :attr:`STATUS`.NULL_POINTER
|
||||||
on error
|
on error
|
||||||
"""
|
"""
|
||||||
self._assert_db_is_initialized()
|
self._assert_db_is_initialized()
|
||||||
|
|
|
@ -95,7 +95,7 @@ class Query(object):
|
||||||
:exc:`NullPointerError` if the query creation failed
|
:exc:`NullPointerError` if the query creation failed
|
||||||
(e.g. too little memory).
|
(e.g. too little memory).
|
||||||
:exc:`NotInitializedError` if the underlying db was not
|
:exc:`NotInitializedError` if the underlying db was not
|
||||||
intitialized.
|
initialized.
|
||||||
"""
|
"""
|
||||||
db._assert_db_is_initialized()
|
db._assert_db_is_initialized()
|
||||||
# create reference to parent db to keep it alive
|
# create reference to parent db to keep it alive
|
||||||
|
|
|
@ -128,7 +128,7 @@ by user FROM."
|
||||||
(setq label (concat "Unknown key ID " keyid " or unsupported algorithm"))
|
(setq label (concat "Unknown key ID " keyid " or unsupported algorithm"))
|
||||||
(setq button-action 'notmuch-crypto-sigstatus-error-callback)
|
(setq button-action 'notmuch-crypto-sigstatus-error-callback)
|
||||||
(setq help-msg (concat "Click to retrieve key ID " keyid
|
(setq help-msg (concat "Click to retrieve key ID " keyid
|
||||||
" from keyserver.")))
|
" from key server.")))
|
||||||
((string= status "bad")
|
((string= status "bad")
|
||||||
(setq label (concat "Bad signature (claimed key ID " keyid ")"))
|
(setq label (concat "Bad signature (claimed key ID " keyid ")"))
|
||||||
(setq face 'notmuch-crypto-signature-bad))
|
(setq face 'notmuch-crypto-signature-bad))
|
||||||
|
|
|
@ -656,7 +656,7 @@ MSG (if it isn't already)."
|
||||||
;; Workaround: The call to `mm-display-part' below triggers a bug in
|
;; Workaround: The call to `mm-display-part' below triggers a bug in
|
||||||
;; Emacs 24 if it attempts to use the shr renderer to display an HTML
|
;; Emacs 24 if it attempts to use the shr renderer to display an HTML
|
||||||
;; part with images in it (demonstrated in 24.1 and 24.2 on Debian and
|
;; part with images in it (demonstrated in 24.1 and 24.2 on Debian and
|
||||||
;; Fedora 17, though unreproducable in other configurations).
|
;; Fedora 17, though unreproducible in other configurations).
|
||||||
;; `mm-shr' references the variable `gnus-inhibit-images' without
|
;; `mm-shr' references the variable `gnus-inhibit-images' without
|
||||||
;; first loading gnus-art, which defines it, resulting in a
|
;; first loading gnus-art, which defines it, resulting in a
|
||||||
;; void-variable error. Hence, we advise `mm-shr' to ensure gnus-art
|
;; void-variable error. Hence, we advise `mm-shr' to ensure gnus-art
|
||||||
|
|
|
@ -337,7 +337,7 @@ Typically this is added to `notmuch-mua-send-hook'."
|
||||||
|
|
||||||
(defun notmuch-mua-pop-to-buffer (name switch-function)
|
(defun notmuch-mua-pop-to-buffer (name switch-function)
|
||||||
"Pop to buffer NAME, and warn if it already exists and is
|
"Pop to buffer NAME, and warn if it already exists and is
|
||||||
modified. This function is notmuch addaptation of
|
modified. This function is notmuch adaptation of
|
||||||
`message-pop-to-buffer'."
|
`message-pop-to-buffer'."
|
||||||
(let ((buffer (get-buffer name)))
|
(let ((buffer (get-buffer name)))
|
||||||
(if (and buffer
|
(if (and buffer
|
||||||
|
|
|
@ -1642,7 +1642,7 @@ notmuch_message_remove_tag (notmuch_message_t *message, const char *tag);
|
||||||
*
|
*
|
||||||
* @retval #NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in
|
* @retval #NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in
|
||||||
* read-only mode so message cannot be modified.
|
* read-only mode so message cannot be modified.
|
||||||
* @retval #NOTMUCH_STATUS_XAPIAN_EXCEPTION: an execption was thrown
|
* @retval #NOTMUCH_STATUS_XAPIAN_EXCEPTION: an exception was thrown
|
||||||
* accessing the database.
|
* accessing the database.
|
||||||
*/
|
*/
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
|
@ -1874,7 +1874,7 @@ notmuch_message_add_property (notmuch_message_t *message, const char *key, const
|
||||||
/**
|
/**
|
||||||
* Remove a (key,value) pair from a message.
|
* Remove a (key,value) pair from a message.
|
||||||
*
|
*
|
||||||
* It is not an error to remove a non-existant (key,value) pair
|
* It is not an error to remove a non-existent (key,value) pair
|
||||||
*
|
*
|
||||||
* @returns
|
* @returns
|
||||||
* - NOTMUCH_STATUS_ILLEGAL_ARGUMENT: *key* may not contain an '=' character.
|
* - NOTMUCH_STATUS_ILLEGAL_ARGUMENT: *key* may not contain an '=' character.
|
||||||
|
|
|
@ -323,7 +323,7 @@ tag_op_list_apply (notmuch_message_t *message,
|
||||||
if (flags & TAG_FLAG_MAILDIR_SYNC) {
|
if (flags & TAG_FLAG_MAILDIR_SYNC) {
|
||||||
status = notmuch_message_tags_to_maildir_flags (message);
|
status = notmuch_message_tags_to_maildir_flags (message);
|
||||||
if (status) {
|
if (status) {
|
||||||
message_error (message, status, "synching tags to maildir");
|
message_error (message, status, "syncing tags to maildir");
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ tag_op_list_append (tag_op_list_t *list,
|
||||||
/*
|
/*
|
||||||
* Apply a list of tag operations, in order, to a given message.
|
* Apply a list of tag operations, in order, to a given message.
|
||||||
*
|
*
|
||||||
* Flags can be bitwise ORed; see enum above for possibilies.
|
* Flags can be bitwise ORed; see enum above for possibilities.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
|
|
|
@ -65,7 +65,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||||
EXPECT0(notmuch_message_get_property (message, "testkey2", &val));
|
EXPECT0(notmuch_message_get_property (message, "testkey2", &val));
|
||||||
printf("testkey2 = %s\n", val);
|
printf("testkey2 = %s\n", val);
|
||||||
|
|
||||||
/* remove non-existant value for key */
|
/* remove non-existent value for key */
|
||||||
EXPECT0(notmuch_message_remove_property (message, "testkey2", "this value has spaces and = sign"));
|
EXPECT0(notmuch_message_remove_property (message, "testkey2", "this value has spaces and = sign"));
|
||||||
EXPECT0(notmuch_message_get_property (message, "testkey2", &val));
|
EXPECT0(notmuch_message_get_property (message, "testkey2", &val));
|
||||||
printf("testkey2 = %s\n", val);
|
printf("testkey2 = %s\n", val);
|
||||||
|
|
|
@ -29,7 +29,7 @@ GOOD: 1258787708-21121-2-git-send-email-keithp@keithp.com
|
||||||
EOF
|
EOF
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
test_begin_subtest "<> delimeters are required"
|
test_begin_subtest "<> delimiters are required"
|
||||||
${TEST_DIRECTORY}/message-id-parse <<EOF >OUTPUT
|
${TEST_DIRECTORY}/message-id-parse <<EOF >OUTPUT
|
||||||
018b1a8f2d1df62e804ce88b65401304832dfbbf.1346614915.git.jani@nikula.org>
|
018b1a8f2d1df62e804ce88b65401304832dfbbf.1346614915.git.jani@nikula.org>
|
||||||
<1530507300.raoomurnbf.astroid@strange.none
|
<1530507300.raoomurnbf.astroid@strange.none
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Choose about half ascii as test characters, as ascii
|
* Choose about half ascii as test characters, as ascii
|
||||||
* punctation and whitespace is the main cause of problems for
|
* punctuation and whitespace is the main cause of problems for
|
||||||
* the (old) restore parser.
|
* the (old) restore parser.
|
||||||
*
|
*
|
||||||
* We then favour code points with 2 byte encodings. Note that
|
* We then favour code points with 2 byte encodings. Note that
|
||||||
|
|
|
@ -153,7 +153,7 @@ running, quit if it terminated."
|
||||||
"Output:\t" (prin1-to-string output) "\n"))
|
"Output:\t" (prin1-to-string output) "\n"))
|
||||||
|
|
||||||
(defun notmuch-test-expect-equal (output expected)
|
(defun notmuch-test-expect-equal (output expected)
|
||||||
"Compare OUTPUT with EXPECTED. Report any discrepencies."
|
"Compare OUTPUT with EXPECTED. Report any discrepancies."
|
||||||
(cond
|
(cond
|
||||||
((equal output expected)
|
((equal output expected)
|
||||||
t)
|
t)
|
||||||
|
|
Loading…
Reference in a new issue