Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doom Emacs users #8

Open
pkazmier opened this issue Oct 10, 2020 · 10 comments
Open

Doom Emacs users #8

pkazmier opened this issue Oct 10, 2020 · 10 comments

Comments

@pkazmier
Copy link

I just discovered mu4e-views yesterday and I'm loving it! I'm a Doom Emacs user, so I've had to make some tweaks to make it more comfortable in Doom, so I thought I'd share my setup thus far in case any other Doom users find this.

package.el

(package! mu4e-views)

config.el

(use-package! mu4e-views
  :after mu4e
  :config
  (setq mu4e-views-completion-method 'ivy)
  (setq mu4e-views-default-view-method "html")
  (setq mu4e-views-next-previous-message-behaviour 'stick-to-current-window) ;; when pressing n and p stay in the current window
  (setq mu4e-views-mu4e-html-email-header-style
        "<style type=\"text/css\">
.mu4e-mu4e-views-mail-headers { font-family: sans-serif; font-size: 10pt; margin-bottom: 30px; padding-bottom: 10px; border-bottom: 1px solid #ccc; color: #000;}
.mu4e-mu4e-views-header-row { display:block; padding: 1px 0 1px 0; }
.mu4e-mu4e-views-mail-header { display: inline-block; text-transform: capitalize; font-weight: bold; }
.mu4e-mu4e-views-header-content { display: inline-block; padding-right: 8px; }
.mu4e-mu4e-views-email { display: inline-block; padding-right: 8px; }
.mu4e-mu4e-views-attachment { display: inline-block; padding-right: 8px; }
</style>"
        )

  (add-hook! mu4e-headers-mode
    (mu4e-views-mu4e-use-view-msg-method "html")) ;; select the default

  (map! :map mu4e-headers-mode-map
        :n "M-b" #'mu4e-views-cursor-msg-view-window-up
        :n "M-f" #'mu4e-views-cursor-msg-view-window-down
        :localleader
        :desc "Message action"        "a"   #'mu4e-views-mu4e-view-action
        :desc "Scoll message down"    "b"   #'mu4e-views-cursor-msg-view-window-up
        :desc "Scoll message up"      "f"   #'mu4e-views-cursor-msg-view-window-down
        :desc "Open attachment"       "o"   #'mu4e-views-mu4e-view-open-attachment
        :desc "Save attachment"       "s"   #'mu4e-views-mu4e-view-save-attachment
        :desc "Save all attachments"  "S"   #'mu4e-views-mu4e-view-save-all-attachments
        :desc "Set view method"       "v"   #'mu4e-views-mu4e-select-view-msg-method)) ;; select viewing method)


;; Evil bindings for xwidget webkit browsers
(map! :map xwidget-webkit-mode-map
      :n "Z Z" #'quit-window
      :n "gr"  #'xwidget-webkit-reload
      :n "y"   #'xwidget-webkit-copy-selection-as-kill
      :n "s-c" #'xwidget-webkit-copy-selection-as-kill
      :n "t"   #'xwidget-webkit-browse-url
      :n "TAB" #'xwidget-webkit-forward
      :n "C-o" #'xwidget-webkit-back
      :n "G"   #'xwidget-webkit-scroll-bottom
      :n "gg"  #'xwidget-webkit-scroll-top
      :n "C-b" #'xwidget-webkit-scroll-down
      :n "C-f" #'xwidget-webkit-scroll-up
      :n "M-=" #'xwidget-webkit-zoom-in
      :n "M--" #'xwidget-webkit-zoom-out
      :n "k"   #'xwidget-webkit-scroll-down-line
      :n "j"   #'xwidget-webkit-scroll-up-line)

@lordpretzel
Copy link
Owner

thanks, that's great. I hope I'll find time soon to develop the evil-collections bindings and fix the gnus bug.

@awerdx520
Copy link

After I installed mu4e-views, every time I press a key, it flashes. Especially the +childframe with ivy enabled. Is there any special settings for Xwidgets?

@lordpretzel
Copy link
Owner

Hi,

I have to admit that I am no expert on xwidgets. Can you let me know a few things so we can figure out whether this is related to mu4e-views or just an xwidgets bug?

  • can you try to browse webpages in xwidgets with a second window open that does something else? Do you get the flickering then
  • what environment are you running on (emacs version, mu version, OS)?

@awerdx520
Copy link

OK, I searched some information, it seems to be the problem of xwidget. Xwidgets browser has the same glint problem.

os: manjaro
kernel: 5.4.80-2-MANJARO
de: gnome

@ChauhanT
Copy link

Hi, I can't get mu4e-views to work on doom. I suspect that it might be related to the fact that I use gnome on wayland (Debian Buster). Any comments/suggestions?

@lordpretzel
Copy link
Owner

what errors are you getting?

@smalltimer
Copy link

smalltimer commented Jul 30, 2021

Hi, thanks for responding! I am on Debian and I think it's because on Debian emacs is not compiled with xwidgets support. Would you happen to know if there is an easy way to do this without compiling from source?
Cheers.
Note: It's @ChauhanT =.=" I forgot to change usernames.

@fuzunspm
Copy link

it crashes emacs on my end, how do i populate error logs to provide more information?

@lordpretzel
Copy link
Owner

@smalltimer Unfortunatly, there is no lisp way of doing it. This requires integrating emacs with a browser widget, so emacs has to be compiled with support for it. It may be worth to look around whether you can find an apt-source with a recent version that supports this if you do not want to compile from source.

@lordpretzel
Copy link
Owner

@fuzunspm first thing to check would be see whether this is mu4e-views specific (likely it is not). Can you try to use xwidget-webkit-browse-url directly and see whether this crashes emacs. If yes, then this is an upstream issue that should be reported to the emacs developers. Unfortunately, xwidget support in emacs is shakey, but it sounds like the newest version of emacs with the pgkt-branch merged this may change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants