unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Fernando de Morais <fernandodemorais.jf@gmail.com>
To: Ben Hancock <ben@benghancock.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Rmail tips
Date: Tue, 06 Feb 2024 21:36:47 -0300	[thread overview]
Message-ID: <87ttml9kkg.fsf@gmail.com> (raw)
In-Reply-To: <87jzpk4z8e.fsf@benghancock.com> (Ben Hancock's message of "Mon,  11 Dec 2023 05:58:57 -0800")

Hello Ben,

I believe this answer is long overdue and now, after a few months of
use, you should have already configured RMAIL to suit your needs.

However, here are some recommendations for things that were helpful to
me when using RMAIL:

1. Quick jumps between `rmail-summary' and `rmail' buffers:

The next two functions can help with navigation by allowing a quick
switch between RMAIL buffers.

#+begin_src emacs-lisp
(defun rmail-jump-to-summary ()
  "Jump to summary window that corresponds to `rmail'."
  (interactive)
  (let ((rmail-summary-window (get-buffer-window rmail-summary-buffer)))
    (if rmail-summary-window
        (select-window rmail-summary-window)
      (user-error "No summary window associated with this RMAIL window"))))

(defun rmail-summary-jump-to-rmail ()
  "Jump to RMAIL window that corresponds to `rmail-summary'."
  (interactive)
  (let ((rmail-window (get-buffer-window rmail-buffer)))
    (if rmail-window
        (select-window rmail-window)
      (user-error "No RMAIL window associated with this summary"))))
#+end_src

I commonly bind them to the "J" key in the `rmail-mode-map' and
`rmail-summary-mode-map' maps, respectively.

2. Using Mairix as an email indexer and search engine:

Even if you only ever work with a single mbox file, I highly recommend
using Mairix. It is small, simple and easy to configure.  Additionally,
Emacs has an integrated interface[1] that can be easily associated with
your RMAIL configurations.

As an example:

#+begin_src emacs-lisp
(with-eval-after-load 'rmail
  (when (require 'mairix nil t)
    (define-prefix-command 'rmail-mairix-map)
    (define-key rmail-mode-map "M" #'rmail-mairix-map)
    (let ((map 'rmail-mairix-map))
      (define-key map "E" #'mairix-edit-saved-searches)
      (define-key map "S" #'mairix-save-search)
      (define-key map "U" #'mairix-use-saved-search)
      (define-key map "b" #'mairix-widget-search-based-on-article)
      (define-key map "f" #'mairix-search-from-this-article)
      (define-key map "s" #'mairix-search)
      (define-key map "t" #'mairix-search-thread-this-article)
      (define-key map "u" #'mairix-update-database)
      (define-key map "w" #'mairix-widget-search))
    (with-eval-after-load 'rmailsum
      (define-key rmail-summary-mode-map "M" #'rmail-mairix-map))))
#+end_src

3. Some other settings/comments worth taking a look at:

Göktuğ Kayaalp[2] and Alex Schroeder's[3] settings helped me get the hang of
RMAIL. Maybe it will be an interesting read for you.

Hope it helps!

Footnotes:
[1]  (info "(mairix-el) Top")

[2]  https://cadadr.dreamwidth.org/828.html

[3]  https://alexschroeder.ch/view/2020-12-17_Rmail#main

-- 
Regards,
Fernando de Morais.



  reply	other threads:[~2024-02-07  0:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 13:58 Rmail tips Ben Hancock
2024-02-07  0:36 ` Fernando de Morais [this message]
2024-02-07 11:23   ` Dr Rainer Woitok
2024-02-07 11:50     ` Fernando de Morais
2024-02-07 11:52     ` Stephen Berman
2024-02-09 14:01   ` Ben Hancock
2024-02-09 19:22     ` Colin Baxter
2024-02-10  7:05       ` Ben Hancock
2024-02-10  8:29         ` Colin Baxter
2024-02-12 13:53           ` Ben Hancock
2024-02-12 14:34             ` Colin Baxter
2024-02-15 16:08               ` Ben Hancock
2024-02-21  6:00                 ` Colin Baxter
2024-02-15 13:21     ` Fernando de Morais
2024-02-15 13:23     ` Fernando de Morais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttml9kkg.fsf@gmail.com \
    --to=fernandodemorais.jf@gmail.com \
    --cc=ben@benghancock.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).