Commit Graph

4777 Commits

Author SHA1 Message Date
Jonas Bernoulli 173deff6a0 editorconfig: Don't misconfigure indentation for Emacs lisp files
1) It is fairly safe to assume that almost all edits to Emacs lisp
   files will be done using the Emacs editor, so there is no need
   to configure this in a way understood by other editors.

2) Trying to configure the intention of lisp code using editorconfig
   causes the indention to be wrong.  Here "wrong" does not mean, "it
   uses tabs when everyone knows that spaces is the true path" (or
   vice-versa), but in the sense of "in lisp indentation is subject to
   the outer expression, and it has been like that for decades, but we
   are just going to ignore that completely and pretend this is
   actually python code".

For example, if we insert a new line character between the 1 and 2
in (progn (progn 1 2) then there are only two ways to intend that
correctly.

(We use "." to represent a leading space and "<-->" to represent
leading tabs.  "<------>" for a tab when it is shown eight characters
wide or "<>" if only two.)

First correct way:

  (setq-local indent-tabs-mode t)

  (progn (progn 1
  <------>......2))

Second correct way:

  (setq-local indent-tabs-mode nil)

  (progn (progn 1
  ..............2))

With the old editorconfig configuration,

  [*.el]
  indent_style                = tab
  indent_size                 = 2
  max_line_length             = 100

we get:

  (progn (progn 1
  <><><><>.2))

This is not how `progn' is indented.  No special indentation rules are
defined for it so all arguments are supposed to be aligned.  For
`prog1' however special indentation are defined and if we replaced the
second `progn' in this example with a `prog1', then this would
actually be correct.  This just demonstrate that it is wrong to indent
everything the same for lisp; the reason that `progn' and `prog1' are
indented differently communicates different meanings to the reader.

I had faint hope that without setting `indent_size' things would work
correctly, but no,

  [*.el]
  indent_style                = tab
  max_line_length             = 100

gives us:

  (progn (progn 1
  <------>.......2))

That doesn't even make sense if we pretend to be looking at python
code.  Turns out that `indent_size' defaults to 2 even for lisp code
as can be demonstrated by additionally doing,

  (setq-local tab-width 2)

which gives us:

  (progn (progn 1
  <>.......2))

which at least makes some sense.
2020-02-17 14:27:54 +01:00
Jonas Bernoulli 5ff051e64d gitignore: update 2020-02-17 11:29:49 +01:00
Dirk-Jan C. Binnema 0dced59cb9 mu4e: set better default for mu4e-compose-reply-ignore-address
... and some small cleanup
2020-02-15 22:36:00 +02:00
Dirk-Jan C. Binnema 62cc675a51 server: explicitly flush after indexing 2020-02-15 18:26:45 +02:00
Dirk-Jan C. Binnema 10fa0727ef server: clear up move_docid
Ensure all paths free resources
2020-02-15 14:12:21 +02:00
Dirk-Jan C. Binnema beb1b3199f mu-msg-part: clean up error paths
Ensure things get freed even when an error occurs.
2020-02-15 14:10:59 +02:00
Dirk-Jan C. Binnema a4a682e578 mu: add memcheck script for valgrinding 2020-02-15 14:09:30 +02:00
Dirk-Jan C. Binnema c22eb434b7 mu: improve crypto handling 2020-02-14 00:36:54 +02:00
Dirk-Jan C. Binnema dd057b11aa mu4e: fix compose-func
Use 'extract-encrypted'
2020-02-14 00:35:52 +02:00
Dirk-Jan C. Binnema ef4fa46a1d mu4e-proc: fix a few typos in 'view' handler
Fixes #1572.
2020-02-13 00:17:03 +02:00
Dirk-Jan C. Binnema b77b536d81
Merge pull request #1444 from JulienMasson/threads-sorting
mu: add an option to ignore leader when sorting childs of a thread
2020-02-10 21:58:33 +02:00
Dirk-Jan C. Binnema 8ff7306d90 mu4e: set context before check requirements
So we won't ask about creating default maildirs
2020-02-10 18:08:34 +02:00
Dirk-Jan C. Binnema d90d2ce8ef mu/mu4e: pass muhome to server (and provide some better error info) 2020-02-10 18:07:54 +02:00
Julien Masson c4ccaf0fdb mu: sort childs of thread based on the sortfield only
Today when we query a find cmd with the `--threads` option, all the
childs of each thread are sorted according to their leader based on
the sortfield.

This patch change the way of how the childs of a thread are sorted.
The threads are still sorted according to their leader but all the
childs of each thread are now sorted based on the sortfield only.

Here is an example of what happened with the previous sorting:

Example with random kernel thread sorted by date:

[PATCH 0/4] drm/panel: jh057n0090: Add regulators and drop magic value in init
  ┣━▶[PATCH 1/4] MAINTAINERS: Add Purism mail alias as reviewer for their devkit's panel
  ┣━▶[PATCH 2/4] drm/panel: jh057n0090: Don't use magic constant
  ┣━▶[PATCH 3/4] dt-bindings: display/panel: jh057n0090: Document power supply properties
  ┗━▶[PATCH 4/4] drm/panel: jh057n0090: Add regulator support

If someone reply to one of these emails in the middle, this email
become the leader and the thread is displayed like this:

[PATCH 0/4] drm/panel: jh057n0090: Add regulators and drop magic value in init
  ┣━▶[PATCH 2/4] drm/panel: jh057n0090: Don't use magic constant
  ┃  ┗━▶ Re: [PATCH 2/4] drm/panel: jh057n0090: Don't use magic constant
  ┣━▶[PATCH 1/4] MAINTAINERS: Add Purism mail alias as reviewer for their devkit's panel
  ┣━▶[PATCH 3/4] dt-bindings: display/panel: jh057n0090: Document power supply properties
  ┗━▶[PATCH 4/4] drm/panel: jh057n0090: Add regulator support

With this patch, we will have the following output:

[PATCH 0/4] drm/panel: jh057n0090: Add regulators and drop magic value in init
  ┣━▶[PATCH 1/4] MAINTAINERS: Add Purism mail alias as reviewer for their devkit's panel
  ┣━▶[PATCH 2/4] drm/panel: jh057n0090: Don't use magic constant
  ┃  ┗━▶ Re: [PATCH 2/4] drm/panel: jh057n0090: Don't use magic constant
  ┣━▶[PATCH 3/4] dt-bindings: display/panel: jh057n0090: Document power supply properties
  ┗━▶[PATCH 4/4] drm/panel: jh057n0090: Add regulator support

The tests cases concerning threads have also been updated.

Signed-off-by: Julien Masson <massonju.eseo@gmail.com>
2020-02-10 15:42:39 +01:00
Dirk-Jan C. Binnema f50360f94e mu-store: implement Store::find_message 2020-02-10 01:00:42 +02:00
Dirk-Jan C. Binnema 24932c12b7 remove some dead code 2020-02-10 01:00:01 +02:00
Dirk-Jan C. Binnema 36b31eeb0a mu: check --maildir parameter for init
Fixes #1568.
2020-02-09 22:40:57 +02:00
Dirk-Jan C. Binnema 85df5524f3 server: fix typo 2020-02-09 18:07:30 +02:00
Dirk-Jan C. Binnema 0b1e6b623e mu4e-context: fix some compiler warnings 2020-02-09 18:07:09 +02:00
Dirk-Jan C. Binnema dd140cb98a mu4e-headers: With gnus-view, avoid server calls
We can do it directly, since we only need the path to the message.
2020-02-09 18:06:04 +02:00
Dirk-Jan C. Binnema 876f70d50d mu: update unit tests
They need to use 'mu init' as well.
2020-02-09 18:01:06 +02:00
Dirk-Jan C. Binnema 451309697d server: 'sent' does not use 'maildir' anymore
So don't require it.
2020-02-09 15:07:22 +02:00
Dirk-Jan C. Binnema 00df8ce471 mu4e: headers: Fix some compiler warnings 2020-02-09 03:53:01 +02:00
Dirk-Jan C. Binnema 0c6719eb96 NEWS.org: update documentation 2020-02-09 03:53:01 +02:00
Dirk-Jan C. Binnema 0d9d99df99 Merge pull request #1328 from pitti/fix-whitespace-deletion
mu4e: restrict deleting trailing whitespace to region
2020-02-09 00:24:32 +02:00
Dirk-Jan C. Binnema be706fdfdd Merge pull request #1567 from Chris00/master
Allow icalendar replies to automatically be signed
2020-02-09 00:18:03 +02:00
Dirk-Jan C. Binnema defebdce2f configure.ac: bump version 1.3.8 2020-02-09 00:15:49 +02:00
Dirk-Jan C. Binnema 4e5f6b4b0a mu: make command output more useful 2020-02-09 00:15:49 +02:00
Dirk-Jan C. Binnema e1e26d1da2 mu4e: update to use server maildir/database/addresses
Mkae mu4e-maildir and mu4e-personal-addresses obsolete, we get those
from the server.
2020-02-09 00:15:49 +02:00
Dirk-Jan C. Binnema dea4789e0e server: pass root-maildir, personal-addresses, dbpath to mu4e
Tell mu4e about the parameters, so users do not need to explicitly set
them.
2020-02-09 00:15:49 +02:00
Christophe Troestler 2b1f6ab148 Allow icalendar replies to automatically be signed 2020-02-08 14:12:51 +01:00
Dirk-Jan C. Binnema aa10da0a63 store: rework to allow for 'init'
Rework the error handling / exception for read-only / writable and new
database.
2020-02-08 14:28:55 +02:00
Dirk-Jan C. Binnema f51846eefc mu: implement init, info commands
'init' is for the inital database setup

'info' is for gettting information about the mu database.
2020-02-08 14:28:55 +02:00
Dirk-Jan C. Binnema 2575b2d0e3 mu: better error handling for opening database read-only
Be a bit clearer for the user.
2020-02-04 21:14:30 +02:00
Dirk-Jan C. Binnema 3fc2a5f3f8 server: re-introduce signal handler
This still needed to be ported from the old server code.
2020-02-04 01:05:35 +02:00
Dirk-Jan C. Binnema 029a4c245e mu/mu4e: handle personal addresses as server cmdline params
So we don't need to pass them to index; they can't change anyway.
2020-02-04 01:05:35 +02:00
Dirk-Jan C. Binnema 38779cfade mu: no need to pass 'maildir' when we can deduce it
Only needed when setting up the database.
2020-02-04 01:05:35 +02:00
Dirk-Jan C. Binnema ee4730382d mu-cmd-index: Avoid unneeded compiler warning 2020-02-02 00:23:34 +02:00
Dirk-Jan C. Binnema ac4f5f754a mu4e: remove maildir arg from proc-add/proc-sent calls
The server doesn't want that parameter anymore, so we can simplify
things a bit.
2020-02-02 00:23:34 +02:00
Dirk-Jan C. Binnema c707feb30f mu4e-utils: update main-view when index changed
When the main-view is visible, update it when the index changed (e.g.
for the read/unread numbers).

Clean up the info handler a bit.
2020-01-31 21:16:13 +02:00
Dirk-Jan C. Binnema 1ea6f6a55e lib/utils: Add Message error. 2020-01-31 00:23:00 +02:00
Dirk-Jan C. Binnema e51240f43f mu: lib: update store API. update some dependents
Implement add_message / remove_message.

Rename path_tstamp ->  dirstamp.

Rename maildir -> root_maildir

Update dependents.
2020-01-31 00:20:34 +02:00
Dirk-Jan C. Binnema ad5f7d8dad mu4e: make `mu4e` refresh itself
update using the 'ping' function, so read/unread counts get updated.

add a 'g' binding for the main-view.
2020-01-31 00:17:19 +02:00
Dirk-Jan C. Binnema 9ba28bc4c5 mu4e-draft: Fix over-eager reply-all (typo)
Fixes #1559.
2020-01-28 20:57:45 +02:00
Dirk-Jan C. Binnema a7c4fdd029 mu4e/mu4e~start: remove some debugging leftover 2020-01-28 10:01:39 +02:00
Dirk-Jan C. Binnema dd98203d42 mu4e: fix some compiler warnings 2020-01-28 01:03:40 +02:00
Dirk-Jan C. Binnema e968f46963
Merge pull request #1556 from thierryvolpiatto/align_mu4e_main
mu4e: Rewrite mu4e~main-bookmarks to have bookmarks aligned
2020-01-28 00:39:11 +02:00
Dirk-Jan C. Binnema 2371847240
Merge pull request #1554 from pedrormjunior/mu4e-update-name
mu4e: use `mu4e~update-name` de facto
2020-01-28 00:37:51 +02:00
Dirk-Jan C. Binnema 0b12d0e568
Merge pull request #1555 from thierryvolpiatto/Unquote_lambda
mu4e: Unquote lambda's
2020-01-28 00:36:24 +02:00
Dirk-Jan C. Binnema 3149f88ab5
Merge pull request #1557 from Chris00/master
mu4e: Load gnus-art when compiling
2020-01-28 00:33:44 +02:00