Skip to content

JasonSKK/notmuch-lieer-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Easy Notmuch - lieer sync emacs

This repository provides a setup configuration for effortless syncing between notmuch and lieer using a simple elisp function (old version uses + script)

It nerved me a lot that every time I wanted to fetch new email using lieer I had to leave emacs (I do not use shell within emacs) and then run “gmi sync”. So, I wrote this.

Elisp function

  1. just fix the path so that points at your “mail” dir in your setup. Then, place the notmuch-sync.el file / or just copy the code in your emacs config (i.e. init file, or whatever your setup is).
      "Syncs notmuch using lieer.  ARG empty: Configuration file is /Users/+++/Mail/gmi-sync.sh."
    ...
        (no-output-shell-run "pushd /Users/+++/Mail ; gmi sync ; popd ; notmuch new")
    ...
    ;; and in the add-hook
    ...
    (no-output-shell-run "pushd /Users/+++/Mail && gmi sync && popd && notmuch new")
    ...
    
        
  2. Set the period variable (e.g. in your init)
    (setq notmuch-sync-period 25) ;; fetch every 25 sec
        
  3. You can sync by using “.” (full stop) when you are in search-mode i.e. “inbox”. It does not work with the notmuch-hello buffer. However, in my configuration it is bound to “C-l s” so that I can sync without having to or be in the notmuch buffer. You can easily do that by un-commenting
    ;;   (global-set-key (kbd "C-l s") 'notmuch-sync)
        
  4. I used a hook to automatically fetch email every 25 sec
    1. To change the time period, edit notmuch-sync-period variable
    2. To disable comment out the add-hook region

options

  • Note 1: to change auto fetching email period edit notmuch-sync-period variable
  • Note 2: If you like you can enable output in new window by commenting out
(no-output-shell-run "bash /Users/+++/Mail/gmi-sync.sh /Users/+++/Mail")

and using this instead

;;(shell-command "bash /Users/+++/Mail/gmi-sync.sh") ;; new window output

About

easy notmuch lieer sync

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published