From MAILER-DAEMON Sat Oct 22 02:22:22 2022 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1om7tl-000235-MQ for mharc-info-gnus-english@gnu.org; Sat, 22 Oct 2022 02:22:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om7ti-000222-PW for info-gnus-english@gnu.org; Sat, 22 Oct 2022 02:22:19 -0400 Received: from pv50p00im-ztdg10011301.me.com ([17.58.6.40]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om7te-0006Xw-G7 for info-gnus-english@gnu.org; Sat, 22 Oct 2022 02:22:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1666419412; bh=tbvyFA66X7BwjaV/7oXy3uQ+glISOv95zN72+0pANh4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sUPpbsrDuOTch/8Wrf2dwWmHatFXCJ1iayMSKSvbqscKkPtgF8ZQjcJPLDwr1fdtv prIpPlkPExeYacG0m8tdpmJYWQJzXLIjuWXPYGGnVcoFBZIgMxmvfqStH66rTZI2Mi n4NCnGUUBqKy7f9UtUZLnFdUs5CcBnC1TUoDtBlN8ctnP1jC1QilwAIDUVswjsi7wy IYvRocm7ysZJS3YY5M7jufeUIp0Toi/Oin4PoP710QhXdQwPYPKVpehx6awdjlKgpU YV+tomgYSw3MKcdRwaE2SPOuMmCl97/kh5COCPnOp0oyslhVUyDLBzIK7tcWoQfvRR FC7srPGdc8tYw== Received: from arch (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011301.me.com (Postfix) with ESMTPSA id 4BFE11806C4 for ; Sat, 22 Oct 2022 06:16:51 +0000 (UTC) From: Satoshi Yoshida To: info-gnus-english@gnu.org Subject: Re: Strip signature on reply without standard separator References: <87y1vykpl2.fsf@icloud.com> <87bksaz837.fsf@icloud.com> <87a67ul62m.fsf@dataswamp.org> <87mtbufg7e.fsf@icloud.com> <875yii2oru.fsf@dataswamp.org> <875yih6n25.fsf_-_@icloud.com> <878rnaw3tw.fsf_-_@icloud.com> <87mtbgarre.fsf@icloud.com> <87czcb6gjp.fsf@dataswamp.org> <87r10onki5.fsf@icloud.com> <8735d47zos.fsf@dataswamp.org> <87fsgsgpsv.fsf@icloud.com> <87illkyybp.fsf@dataswamp.org> <8735cl6qce.fsf@icloud.com> <87zgesx3zt.fsf@dataswamp.org> <87leq9lqmn.fsf@icloud.com> <87edw0pz7x.fsf@dataswamp.org> <87illcp1s2.fsf@icloud.com> <87sfkgnmsf.fsf@dataswamp.org> <87v8pak1ef.fsf@icloud.com> <87k05qmi9m.fsf@dataswamp.org> X-Operating-System: Linux version 6.0.2-arch1-1 Arch Linux x86_64 Date: Sat, 22 Oct 2022 15:16:51 +0900 In-Reply-To: <87k05qmi9m.fsf@dataswamp.org> (Emanuel Berg's message of "Mon, 26 Sep 2022 14:28:53 +0200") Message-ID: <87wn8sqt64.fsf@icloud.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: RpwReI3bGcCQYMKLypBTbrp3-VCVafr4 X-Proofpoint-GUID: RpwReI3bGcCQYMKLypBTbrp3-VCVafr4 X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.517,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-06-21=5F01:2022-06-21=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=330 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210220039 Received-SPF: pass client-ip=17.58.6.40; envelope-from=dynamisxar@icloud.com; helo=pv50p00im-ztdg10011301.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2022 06:22:20 -0000 Emanuel Berg writes: > I'm sure you can polish that code every day for the rest of > 2022 but if it works it looks good enough to me. Fixed some problems. (setq mu-cite-prefix-format '("> ")) (setq mu-cite-cited-prefix-regexp "^[^[:blank:]\n<>]+>+[[:blank:]]*") (setq mu-cite-top-format '(from " writes:\n\n")) (defun strip-signature (regexp &optional replacement) (or replacement (setq replacement "")) (goto-char (point-min)) (while (re-search-forward regexp nil t) (replace-match replacement))) (defun my-mu-cite-hook-function () (save-excursion (goto-char (point-min)) (re-search-forward "^\\(\n-- \n\\(.*\n\\)*\\)" nil t) (let ((my-signature (match-string 1))) (dolist (e '(("^\n-- \n\\(.*\n\\)*") ("^\\([^[:blank:]\n<>]+>.*\\)" "> \\1") ("^\\([^\n>].+\n\n\\)\\(>[>[:blank:]]+\n\\)+" "\\1") ("^> >" ">>") ("^> -- \n\\(>.*\n\\)*") ("^\\(>[[:blank:]]+\n\\)+> \\(best\\( regards\ \\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\\|\\(kind \\|warm\ \\(est\\)? \\)?regards\\|respectfully\\|\\(yours \\)?sincerely\\( yours\ \\)?\\|thank you\\( very much\\)?\\|\\(many \\)?thanks\\( in advance\ \\| very much\\)?\\),[[:blank:]]*\n\\(>.*\n\\)*"))) (strip-signature (car e) (cadr e))) (goto-char (point-min)) (when (re-search-forward "^\"?\\([^[:blank:]\n<>\"]+\\)\ \\([^\n<>\"]+\\)?\"? <\\([^\n<>\"]+\\)> writes:" nil t) (let ((first-name (match-string 1)) (middle-last-name (or (match-string 2) "")) (mail-address (match-string 3))) (strip-signature (apply #'format "^>\ [[:blank:]]*\\(-+[[:blank:]]*\\)?%s\\(%s\\)?\\([[:blank:]]*\\(\n>\ [[:blank:]]+\\)*?\\)?[[:blank:]]*\n\\(>[>[:blank:]]+\n\\)*\\'\ " (mapcar #'regexp-quote (list first-name middle-last-name mail-address)))))) (strip-signature "^\\(>[>[:blank:]]+\n\\)+\\'") (goto-char (point-max)) (ignore-errors (insert my-signature))))) (add-hook 'mu-cite-post-cite-hook #'my-mu-cite-hook-function) I put this code on web additionally the cases of Mew and Wanderlust. Though it's a Japanese site, please use translation site if you need. https://zenn.dev/satoshiy/articles/mu-cite-strip-signature -- Satoshi Yoshida From MAILER-DAEMON Sun Oct 23 19:45:58 2022 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1omkfB-0006h2-RE for mharc-info-gnus-english@gnu.org; Sun, 23 Oct 2022 19:45:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omkeu-0006dO-88 for info-gnus-english@gnu.org; Sun, 23 Oct 2022 19:45:45 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omkes-0000uR-JY for info-gnus-english@gnu.org; Sun, 23 Oct 2022 19:45:36 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1omkem-0004OU-D1 for info-gnus-english@gnu.org; Mon, 24 Oct 2022 01:45:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: info-gnus-english@gnu.org To: info-gnus-english@gnu.org From: Emanuel Berg Subject: Re: Strip signature on reply without standard separator Date: Mon, 24 Oct 2022 01:45:20 +0200 Message-ID: <87k04qkstr.fsf@dataswamp.org> References: <87y1vykpl2.fsf@icloud.com> <87a67ul62m.fsf@dataswamp.org> <87mtbufg7e.fsf@icloud.com> <875yii2oru.fsf@dataswamp.org> <875yih6n25.fsf_-_@icloud.com> <878rnaw3tw.fsf_-_@icloud.com> <87mtbgarre.fsf@icloud.com> <87czcb6gjp.fsf@dataswamp.org> <87r10onki5.fsf@icloud.com> <8735d47zos.fsf@dataswamp.org> <87fsgsgpsv.fsf@icloud.com> <87illkyybp.fsf@dataswamp.org> <8735cl6qce.fsf@icloud.com> <87zgesx3zt.fsf@dataswamp.org> <87leq9lqmn.fsf@icloud.com> <87edw0pz7x.fsf@dataswamp.org> <87illcp1s2.fsf@icloud.com> <87sfkgnmsf.fsf@dataswamp.org> <87v8pak1ef.fsf@icloud.com> <87k05qmi9m.fsf@dataswamp.org> <87wn8sqt64.fsf@icloud.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:azQTh0dQCvc2WmoBZqTjsxWaL1I= Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=gegu-info-gnus-english@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2022 23:45:49 -0000 Satoshi Yoshida wrote: >> I'm sure you can polish that code every day for the rest of >> 2022 but if it works it looks good enough to me. > > Fixed some problems. > > (setq mu-cite-prefix-format '("> ")) > (setq mu-cite-cited-prefix-regexp "^[^[:blank:]\n<>]+>+[[:blank:]]*") > (setq mu-cite-top-format '(from " writes:\n\n")) > > (defun strip-signature (regexp &optional replacement) > (or replacement (setq replacement "")) > (goto-char (point-min)) > (while (re-search-forward regexp nil t) > (replace-match replacement))) > > (defun my-mu-cite-hook-function () > (save-excursion > (goto-char (point-min)) > (re-search-forward "^\\(\n-- \n\\(.*\n\\)*\\)" nil t) > (let ((my-signature (match-string 1))) > (dolist (e '(("^\n-- \n\\(.*\n\\)*") > ("^\\([^[:blank:]\n<>]+>.*\\)" "> \\1") > ("^\\([^\n>].+\n\n\\)\\(>[>[:blank:]]+\n\\)+" "\\1") > ("^> >" ">>") > ("^> -- \n\\(>.*\n\\)*") > ("^\\(>[[:blank:]]+\n\\)+> \\(best\\( regards\ > \\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\\|\\(kind \\|warm\ > \\(est\\)? \\)?regards\\|respectfully\\|\\(yours \\)?sincerely\\( yours\ > \\)?\\|thank you\\( very much\\)?\\|\\(many \\)?thanks\\( in advance\ > \\| very much\\)?\\),[[:blank:]]*\n\\(>.*\n\\)*"))) > (strip-signature (car e) (cadr e))) > (goto-char (point-min)) > (when (re-search-forward "^\"?\\([^[:blank:]\n<>\"]+\\)\ > \\([^\n<>\"]+\\)?\"? <\\([^\n<>\"]+\\)> writes:" nil t) > (let ((first-name (match-string 1)) > (middle-last-name (or (match-string 2) "")) > (mail-address (match-string 3))) > (strip-signature (apply #'format "^>\ > [[:blank:]]*\\(-+[[:blank:]]*\\)?%s\\(%s\\)?\\([[:blank:]]*\\(\n>\ > [[:blank:]]+\\)*?\\)?[[:blank:]]*\n\\(>[>[:blank:]]+\n\\)*\\'\ > " (mapcar #'regexp-quote (list first-name middle-last-name mail-address)))))) > (strip-signature "^\\(>[>[:blank:]]+\n\\)+\\'") > (goto-char (point-max)) > (ignore-errors (insert my-signature))))) > > (add-hook 'mu-cite-post-cite-hook #'my-mu-cite-hook-function) Looks good to me :) -- underground experts united https://dataswamp.org/~incal From MAILER-DAEMON Mon Oct 24 18:20:07 2022 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1on5nj-0000wr-Gb for mharc-info-gnus-english@gnu.org; Mon, 24 Oct 2022 18:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1on5ni-0000wj-1w for info-gnus-english@gnu.org; Mon, 24 Oct 2022 18:20:06 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1on5ng-0006la-7T for info-gnus-english@gnu.org; Mon, 24 Oct 2022 18:20:05 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1on5ne-0001DC-6c for info-gnus-english@gnu.org; Tue, 25 Oct 2022 00:20:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: info-gnus-english@gnu.org From: =?utf-8?Q?Bj=C3=B6rn_Bidar?= Subject: New to GNUS troubles in figuring how to get rings rolling Date: Tue, 25 Oct 2022 01:10:38 +0300 Message-ID: <87y1t498kh.fsf@thaodan.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:CWqTyqhVujjxDUMnv70NzDoEOXI= Received-SPF: pass client-ip=116.202.254.214; envelope-from=gegu-info-gnus-english@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2022 22:20:06 -0000 Hey, I have been working on having Emails working inside Emacs. I've looked into a few solutions which seem to be the most used. These were offline mail solutions such as mu4e, those that can fetch mail themselves like gnus or wanderlust. My current setup is that I have multiple clients that all connect over imap. I want always sync the status of a message back to imap. My imap server is a self hosted dovecot with postfix to send messages. I'm trying gnus right now and faced some issues that I don't know on how to continue on. These are mostly imap related. 1. How can I take the read status from imap into gnus and vice versa? 2. I tried to use ~nnimap-use-namespaces~ however it doesn't work. My mail server supports the extension however the folders aren't split accordingly. 3. Can I make gnus design less archiaric? 4. Can I make imap folders appear as groups by subfolder? E.g. if I have INBOX.Bar.Foo -> Bar will be a group. All in all it wasn't as bad as other said around the internet however the manual isn't as easy to digest: things are hard to find or out of date/not relevant to modern usage, this makes the manual harder to navigate. Have a great day, Björn