From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GIVvAkLsrV8DeQAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 02:15:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aEzGOUHsrV8hQAAAbx9fmQ (envelope-from ) for ; Fri, 13 Nov 2020 02:15:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6B6DE94085A for ; Fri, 13 Nov 2020 02:15:29 +0000 (UTC) Received: from localhost ([::1]:45942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdOcY-00037G-Ou for larch@yhetil.org; Thu, 12 Nov 2020 21:15:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdObp-000373-IX for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 21:14:41 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:45171) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdObn-0001iM-Kz for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 21:14:41 -0500 Received: by mail-pl1-x62b.google.com with SMTP id z1so3788712plo.12 for ; Thu, 12 Nov 2020 18:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=WsnEqzUQsMuQZi1ZlN1NYLLqQDtXI2C6YkTJmgywiy4=; b=Hdj3LwPm09li7Oijl7ZoXDDuaL3YqI4TR2GUhBTaIetKojFoPIH4Vfep0E6jVRDzmI 3/dHhMDoSS4N+SJIZ8zm3GDbzNet98P5tKvQeuSWvNcvvirooCqOlw85btAAgkB03Mk7 qG5zBqf57ZWdzvF76mf61kii2dnTAtAhgzGCUU+zNGviOTJNN0z4BFzj8Aqh1RC3OQX3 1rJbe7PXEXjq5uKF7fe8zfZVm46ohzsT3jiXzDNC1UxbLlJEwhflmirqgobd5JtswJp2 Nsw6bBcxtjlveRzAhrcGKrgdUdaE860Fev4df7dSwneFadc95oLs0oFepBdR5CfR3PGX QjoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=WsnEqzUQsMuQZi1ZlN1NYLLqQDtXI2C6YkTJmgywiy4=; b=t+eMs+8zIBzcKxktFjOsHXYcRcweYW2gLIHbbljwB5c5nKZbJvCB2wXOKblBTLwvwp Nr4Ywhiwr0MEr7k3FZxmYOcC/14Qk3XzUTy9qqaw3GtgIJvcNysyGR17xjlGOZ7mGQTK fV9JvjXc7lO7hJtKRB6Nwyva0l+bgph2HSU8cl3vbEIiuSLFBML236lYvUhmTbAt5FKm nbLDGRlY+UkUUEOHGy7zP/Qkpf4NosCjejBp6xnt8/eOPpKjwuaZ8OHAtYrssPrP2PI6 9o2irpLmbkXsblAVzoTu/Czk3k+hGf84izPvzzFlqYowjAkhgx1CVNPPJlZLf9YyIiDk KNjQ== X-Gm-Message-State: AOAM532ZqAQApeVATK/rbxnOEyt/lT9NtxF+V+L3Irgp5sDUWGxE8WFJ Lxm/EIEkk/tYfHTI76Cnh50mFGTXKIoyhA== X-Google-Smtp-Source: ABdhPJwRPcJ0cyHkx+h4erryGCwWD+jHoiuN3r5qE6tc83ncpwrdDBAC/oo45cKgfrTiJjpV6TK6IQ== X-Received: by 2002:a17:902:7482:b029:d6:682d:5c6c with SMTP id h2-20020a1709027482b02900d6682d5c6cmr183731pll.84.1605233677582; Thu, 12 Nov 2020 18:14:37 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id r73sm8111978pfc.20.2020.11.12.18.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 18:14:36 -0800 (PST) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [Meta] Mailing list helper functions Date: Fri, 13 Nov 2020 10:13:36 +0800 Message-ID: <87wnyqknqn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Hdj3LwPm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: syghuq5+cbR4 Recent changes in https://orgmode.org/worg/org-mailing-list.html encouraged several unusual practices when posting to org-mode mailing list: 1. Using Woof headers to label Bugs/Help requests/Patches [1] 2. Avoiding full quoting of earlier thread when it gets too long (which is default in Emacs and many other mail clients) [2] I wrote two small helpers for message-send-hook reminding to follow the suggestions. Hope they can be useful for other users following the maillist from inside Emacs. (defun yant/notmuch-mua-woof-check-maybe () "Remind to use Woof headers when sending email to org-mode maillist." (let ((case-fold-search t)) (save-excursion (goto-char (point-min)) (when (re-search-forward "^\\(To:\\|CC:\\).+emacs-orgmode@gnu\\.org" nil t) (goto-char (point-min)) (unless (re-search-forward "^X-Woof-\\(Bug\\|Help\\|Change\\|Release\\|Patch\\):" nil t) (unless (yes-or-no-p "No Woof-(Bug|Help|Patch): t/nil headers found in message being sent to emacs-orgmode@gnu.org. Send anyway? ") (error "Forgot Woof headers"))))))) (add-hook 'message-send-hook #'yant/notmuch-mua-woof-check-maybe) (defun yant/notmuch-mua-too-long-cite-reminder () "Remind to cut unnecessary thread citation when replying to orgmode." (let ((case-fold-search t)) (save-excursion (goto-char (point-min)) (when (re-search-forward "^\\(To:\\|CC:\\).+emacs-orgmode@gnu\\.org" nil t) (message-goto-body) (when (> (- (point-max) (point)) 5000) ; Message too long. (unless (yes-or-no-p "Message is too long. May need to cutoff excess citation lines. Send anyway? ") (error "Forgot to cutoff excess citation"))))))) (add-hook 'message-send-hook #'yant/notmuch-mua-too-long-cite-reminder) [1] https://orgmode.org/worg/org-mailing-list.html#orga4190ea [2] https://orgmode.org/worg/org-mailing-list.html#orgf343a0f Best, Ihor