unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Semyonov <cmstr@dsemy.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Two patches for mairix.el
Date: Sat, 01 May 2021 18:19:56 +0300	[thread overview]
Message-ID: <87o8dulbvn.fsf@dsemy.com> (raw)
In-Reply-To: <83wnsi8ql2.fsf@gnu.org> (message from Eli Zaretskii on Sat, 01 May 2021 17:40:41 +0300)

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

> The changes are indeed small enough for us to accept them, but could
> you please reformat the log message(s) according to our conventions?

Of course, I've attached the fixed patches.

> You will find the conventions described in CONTRIBUTE, and I suggest
> to use "git log" to look at the log messages as examples.
> 
> Thanks.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: first patch --]
[-- Type: text/x-patch, Size: 3033 bytes --]

From bc65d635c45241f0e5942b8318ca62ed07662408 Mon Sep 17 00:00:00 2001
From: Daniel Semyonov <cmstr@dsemy.com>
Date: Sat, 1 May 2021 17:01:22 +0300
Subject: [PATCH] Mairix: autoload main interactive functions

* lisp/net/mairix.el (mairix-search, mairix-use-saved-search)
(mairix-edit-saved-searches-customize, mairix-search-from-this-article)
(mairix-search-thread-this-article, mairix-widget-search-based-on-article)
(mairix-edit-saved-searches, mairix-widget-search, mairix-update-database):
Add magic autoload comment.

Copyright-paperwork-exempt: yes
---
 lisp/net/mairix.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el
index 024d118f2d..adc41b6068 100644
--- a/lisp/net/mairix.el
+++ b/lisp/net/mairix.el
@@ -328,6 +328,7 @@ mairix-vm-fetch-field
 
 ;;;; Main interactive functions
 
+;;;###autoload
 (defun mairix-search (search threads)
   "Call Mairix with SEARCH.
 If THREADS is non-nil, also display whole threads of found
@@ -342,6 +343,7 @@ mairix-search
 	 threads)
     (mairix-show-folder mairix-search-file)))
 
+;;;###autoload
 (defun mairix-use-saved-search ()
   "Use a saved search for querying Mairix."
   (interactive)
@@ -374,6 +376,7 @@ mairix-save-search
 	(setcdr (assoc name mairix-saved-searches) mairix-last-search))))
   (mairix-select-save))
 
+;;;###autoload
 (defun mairix-edit-saved-searches-customize ()
   "Edit the list of saved searches in a customization buffer."
   (interactive)
@@ -386,6 +389,8 @@ mairix-edit-saved-searches-customize
 (make-string 65 ?=) "\n")))
 
 (autoload 'mail-strip-quoted-names "mail-utils")
+
+;;;###autoload
 (defun mairix-search-from-this-article (threads)
   "Search messages from sender of the current article.
 This is effectively a shortcut for calling `mairix-search' with
@@ -402,6 +407,7 @@ mairix-search-from-this-article
 	 threads)
       (error "No function for obtaining mail header specified"))))
 
+;;;###autoload
 (defun mairix-search-thread-this-article ()
   "Search thread for the current article.
 This is effectively a shortcut for calling `mairix-search'
@@ -423,12 +429,14 @@ mairix-search-thread-this-article
     (mairix-search
      (format "m:%s" mid) t)))
 
+;;;###autoload
 (defun mairix-widget-search-based-on-article ()
   "Create mairix query based on current article using widgets."
   (interactive)
   (mairix-widget-search
    (mairix-widget-get-values)))
 
+;;;###autoload
 (defun mairix-edit-saved-searches ()
   "Edit current mairix searches."
   (interactive)
@@ -441,6 +449,7 @@ mairix-edit-saved-searches
 
 (defvar mairix-widgets)
 
+;;;###autoload
 (defun mairix-widget-search (&optional mvalues)
   "Create mairix query interactively using graphical widgets.
 MVALUES may contain values from current article."
@@ -470,6 +479,7 @@ mairix-widget-search
   (widget-setup)
   (goto-char (point-min)))
 
+;;;###autoload
 (defun mairix-update-database ()
   "Call mairix for updating the database for SERVERS.
 Mairix will be called asynchronously unless
-- 
2.31.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: second patch --]
[-- Type: text/x-patch, Size: 1169 bytes --]

From 22246945b5a3b144be0ee14c9c07bedaa63df179 Mon Sep 17 00:00:00 2001
From: Daniel Semyonov <cmstr@dsemy.com>
Date: Sat, 1 May 2021 17:03:07 +0300
Subject: [PATCH] Mairix: use 'mairix-search-options' as documented

* lisp/net/mairix.el (mairix-call-mairix): Append
'mairix-search-options' to the arguments passed to mairix.

Copyright-paperwork-exempt: yes
---
 lisp/net/mairix.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el
index adc41b6068..e1d35c2a85 100644
--- a/lisp/net/mairix.el
+++ b/lisp/net/mairix.el
@@ -531,8 +531,11 @@ mairix-call-mairix
 If FILE is nil, use default.  If THREADS is non-nil, also return
 whole threads.  Function returns t if messages were found."
   (let* ((commandsplit (split-string mairix-command))
-	 (args (cons (car commandsplit)
-		     `(nil ,(get-buffer-create mairix-output-buffer) nil)))
+	 (args (cons
+                (car commandsplit)
+		(append
+                 `(nil ,(get-buffer-create mairix-output-buffer) nil)
+                 mairix-search-options)))
 	 rval)
     (with-current-buffer mairix-output-buffer
       (erase-buffer))
-- 
2.31.1


  reply	other threads:[~2021-05-01 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 14:30 [PATCH] Two patches for mairix.el Daniel Semyonov
2021-05-01 14:40 ` Eli Zaretskii
2021-05-01 15:19   ` Daniel Semyonov [this message]
2021-05-01 15:29     ` Eli Zaretskii
2021-05-15  8:13       ` Eli Zaretskii

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=87o8dulbvn.fsf@dsemy.com \
    --to=cmstr@dsemy.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).