Commit Graph

55 Commits

Author SHA1 Message Date
Daniel Fleischer 151a2a323f Extracting attachments #2116
Different MIME configuration needs a fallback logic. Instead of looking
for the attachment "fname" in `("attachment" . (filename "fname"))` structure,
we find the same file name in `("mime-type" . (name . "fname"))` structure
by searching, since we don't know the MIME type beforehand.

Thanks @thierryvolpiatto.
2021-08-30 14:49:07 +03:00
Dirk-Jan C. Binnema 4404a57365 mu4e-view: remove overlays before erasing
erase-buffer is not enough, and [1][2] can stay behind in the buffer.
2021-08-30 10:13:06 +03:00
Dirk-Jan C. Binnema 6d555b3a6c Revert "build: bump version to 1.7.0"
Let's keep this away from the release branch. This reverts commit
ec40b18ae4.
2021-08-30 10:05:56 +03:00
Dirk-Jan C. Binnema e6be09e626 mu4e-view: remove old view
Remove the pre-Gnus view, and remove the infrastructure to handle both the new
and old views.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema 3cd127d8ae mu4e-search: split off search functionality in minor-mode
Split off the search functionality from mu4e-headers.el into a new
mu4e-search.el.

Clean up things a bit and create a minor mode in which to add the keybindings.

Enable this in main/headers/view.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema 035977a89a mu4e-context: make it a minor-mode
Add mu4e-context-minor-mode, for re-use in other parts of mu4e.

Update those parts + documentation.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema faed25f2e5 view-gnus: Add S-SPC to scroll-down binding
The manual promises it's there.

Fixes: #2114.
2021-08-26 22:02:41 +03:00
Jakub Darul 167bb83d22
fix: mu4e-view-save-attachments void variable
This `_` looks like typo (correct me if I'm mistaken).
`_arg` instead of `arg` here caused `Symbol’s value as variable is void: arg`.
2021-08-25 15:00:15 +02:00
Dirk-Jan C. Binnema 372726cb9e
Merge branch 'master' into fix_dups_when_saving_attachments 2021-08-21 16:16:58 +03:00
Thierry Volpiatto 7929b9a852
Use and instead of progn and fix some long lines 2021-08-17 16:11:21 +02:00
Thierry Volpiatto 58cff913fe
Create numbered backup of attached file when already exists #2090 2021-08-16 13:29:07 +02:00
Dirk-Jan C. Binnema e6e2568178 mu4e-view-gnus: Fix some flycheck warnings (doc)
Update docstring to please flycheck.
2021-08-16 09:05:37 +03:00
Dirk-Jan C. Binnema 2c99cb3374 mu4e: toggle-html: use if-let/seq-find
Slightly update the algo.
2021-08-15 20:53:52 +03:00
Étienne Deparis 1f98060ef3 mu4e: Add back the `h' keybinding to toggle HTML view in a gnus article
Fixes: https://github.com/djcb/mu/issues/2013
2021-08-14 17:42:25 +02:00
Dirk-Jan C. Binnema aa75487ae6 mu4e-view: Enable mu4e-action-view-in-browser by default
It's useful enough to enable by default.
2021-08-08 18:18:40 +03:00
Dirk-Jan C. Binnema 907db013c0 mu4e-view-gnus: Manipulate gnus so it blocks remote images
mu4e reuses the default gnus-blocked-images, but sadly in the mu4e
context, the default (a function called gnus-block-private-groups) does
_not_ work (i.e., it never blocks).

Advise this function so it'll block for mu4e as well, and update the
docs.

Fixes: #2072.
2021-08-02 23:39:33 +03:00
Anders Johansson c090e36485 Fix bug with helm completing-read when saving attachments
Previously helm-comp-read-use-marked was bound also when completing on
a directory for saving attachments (when using a prefix argument). This
returned a list with the selected directory, which caused an error.
2021-06-02 18:03:39 +02:00
Salman Mohammadi 539a946aa4
mu4e/*: fix license notice at the start of source files
At the start of mu4e/* files, the license has been wrongly attributed
to GNU Emacs instead of mu4e.

Fixes https://github.com/djcb/mu/issues/2019
2021-05-29 23:45:10 +02:00
Profpatsch d106237c5a mu4e-view: remove <home> and <end> bindings
Users usually have `<home>` and `<end>` bound in their configuration,
for Spacemacs the default is “move-beginning-of-line” and “move-end-of-line”.

The mu4e view mode should not rebind basic navigation keys like these.
2021-05-20 14:16:37 +02:00
Dirk-Jan C. Binnema 2574071ac8 mu4e-view-gnus: use default for gnus-unbuttonized-mime-types
Changing it (e.g., to nil) doesn't work well with clickable URLs.
2021-05-02 23:48:30 +03:00
Thierry Volpiatto b5656a7991
Fix #2006 by using cl-loop in mu4e-action-view-in-browser instead of seq
Using cl-loop is much simpler and readable, than using mapconcat+seq+seq.
Also it avoids requiring seq (which is not done actually).
2021-05-02 18:32:07 +02:00
Thierry Volpiatto 008f9fe443
Insert text without its text properties when replying 2021-05-01 20:28:55 +02:00
Dirk-Jan C. Binnema a11008deab Revert "mu4e-view-gnus: use the gnus mech to identify urls"
This reverts commit 6d9bd548f1.

Changes breaks article treatment.
2021-04-28 15:02:29 +03:00
Dirk-Jan C. Binnema 6d9bd548f1 mu4e-view-gnus: use the gnus mech to identify urls
Add mu4e~view-urlify, which replaces mu4e~view-activate-urls, and let
gnus determine where the URLs are.
2021-04-28 07:14:20 +03:00
Dirk-Jan C. Binnema 453c7f84e8 mu4e-view-gnus: don't render in invisible buffer
It seems that prevents image resizing from working.

Should help for issue #1998.
2021-04-27 00:10:11 +03:00
Dirk-Jan C. Binnema 5103f4614e mu4e-view-gnus: show URL links
Fixes: #1990.
2021-04-26 21:22:54 +03:00
Christophe Troestler 163fa1ee87 mu4e: Decode headers before viewing in browser 2021-04-26 01:50:23 +02:00
Dirk-Jan C. Binnema 3799975714 mu4e-view: only kill existing buffer 2021-04-25 14:05:27 +03:00
Dirk-Jan C. Binnema 15ab2c8d3a mu4e-view-gnus: better cleanup buffer
avoid seeing leftover MIME-parts of older buffers.
2021-04-25 13:44:57 +03:00
Dirk-Jan C. Binnema 6f206f0f7e mu4e-view-gnus: use gnus image variables directly
Let's avoid some wrapper code and use the gnus variables directly.
And some documentation updates.
2021-04-25 11:41:09 +03:00
Dirk-Jan C. Binnema f377483c16 mu4e-view-gnus: activate URLs
So we can follow them using 'g'
2021-04-25 09:08:59 +03:00
Dirk-Jan C. Binnema 71e0223d86 mu4e-view-gnus: implement mu4e-action-view-in-browser
Reimplement the browser view code for the gnus-based viewer; and let
gnus handle it too.

On change is that we currently only support showing html-messages.
2021-04-24 22:37:03 +03:00
Dirk-Jan C. Binnema 11bea28dad mu4e-view-gnus: cleanup message rendering
Refactor the way we view messages (using gnus) to reduce duplicate code.
Overall, cleanup the rendering part a bit.
2021-04-24 22:34:40 +03:00
Thierry Volpiatto bce31241a5
Remove unneeded or clause in mu4e-view-save-attachments 2021-04-22 19:30:23 +02:00
Dirk-Jan C. Binnema c6f2bf5333 Revert "mu4e-view-gnus: refactor message rendering code a bit"
This reverts commit 515af3e3d2, since it
broke the attachments display.
2021-04-20 10:54:41 +03:00
Dirk-Jan C. Binnema 515af3e3d2 mu4e-view-gnus: refactor message rendering code a bit
Split out the shared parts from mu4e~view-gnus and
mu4e~view-message-text.
2021-04-14 00:23:11 +03:00
Dirk-Jan C. Binnema 55d8d20771 mu4e-view-gnus: Don't special-case Ivy
Unlike helm, it's not good for multi-selections.
2021-04-12 22:12:23 +03:00
Christophe Troestler 1dbe818378 mu4e/ical: Set `mu4e~view-rendering' to t as a buffer local variable
When an ics file is attached but not visualized by default, this is
necessary in order trigger the bug workaround in the advice attached
to `gnus-icalendar-event-from-handle'.
2021-04-06 15:29:56 +02:00
Christophe Troestler afaf613a92 Enable the user to control which external images not to display 2021-04-05 11:39:44 +02:00
Dirk-Jan C. Binnema f3e13b5201 mu4e-view-gnus: Implement mu4e-view-massage
Expose some of the Gnus article treatment functions.
2021-03-23 17:39:12 +02:00
Dirk-Jan C. Binnema c44b855d78 mu4e-view-gnus: Update keybindings 2021-03-23 17:39:12 +02:00
cog 3e38c9ec5f Add ivy completion when saving attachments 2021-03-23 10:03:14 +01:00
Dirk-Jan C. Binnema afedfc6708 mu4e-view: Implement actions for gnus-view MIME-parts
In the "old" view, we had `mu4e-view-mime-part-actions`, which describes
various actions on attachments; in the brave new gnus-based view, those
do not work, but we have added something better:
  mu4e-view-mime-part-actions

This needs some more documentation, but is useful already.
2021-03-21 00:14:54 +02:00
Christophe Troestler f311b9455c mu4e/view-gnus: Make Gnus email clickable links work 2021-03-18 19:26:00 +01:00
Dirk-Jan C. Binnema c04d9ceff0 mu4e-view-gnus: Set buffer name earlier
Seems some hooks might depend on the buffer being called *Article* in
hooks.
2021-03-18 00:50:30 +02:00
Christophe Troestler b2877a237c mu4e/view-gnus: Gnus view is no longer experimental 2021-03-17 18:03:18 +01:00
Dirk-Jan C. Binnema 2fac2bb602 mu4e/view-gnus: Don't allow gnus-button-reply
Since it will reply in *gnus* rather than in mu4e. Perhaps we can hook it
up with mu4e... but not now.

Fixes: #1949.
2021-03-16 23:09:21 +02:00
Dirk-Jan C. Binnema 7f244ee454 mu4e/view: Restore URL activation, TAB
Make URL activation work again (with mouse, M-RET), and TAB in
gnus-view.

Fixes: #1946.
2021-03-16 17:13:36 +02:00
Dirk-Jan C. Binnema b7660ed33d mu4e-view: decrypt when replying
Let's decrypt a message before replying.

HT: Thierry Volpiato.
2021-03-16 08:58:43 +02:00
Dirk-Jan C. Binnema 931cfe5d86 mu4e: clear up mu4e~view-message
Remove duplicate definition of mu4e~view-message in mu4e-view-old

Set it earlier in mu4e-view-gnus (so it can be used in mode-hooks).
2021-03-15 22:56:30 +02:00