From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: irek Newsgroups: gmane.emacs.help Subject: Re: Fixed order of headers in Rmail messages Date: Sat, 12 Feb 2022 13:27:30 +0100 Message-ID: <875ypkl171.fsf@mother.org> References: <87czjvyaul.fsf@mother.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jean Louis , Tassilo Horn To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 12 13:29:15 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIrWd-0004Um-N3 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Feb 2022 13:29:15 +0100 Original-Received: from localhost ([::1]:40934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIrWc-0003yZ-9k for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Feb 2022 07:29:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIrV7-0003yM-On for help-gnu-emacs@gnu.org; Sat, 12 Feb 2022 07:27:41 -0500 Original-Received: from mxcwn02.webd.pl ([194.181.228.14]:58349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIrV5-0000yC-HX; Sat, 12 Feb 2022 07:27:41 -0500 Original-Received: from wn02.int.webd ([192.168.101.102] helo=wn02.webd.pl) by mta01.webd.pl with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1nIrV0-0007yx-Dj; Sat, 12 Feb 2022 13:27:34 +0100 Original-Received: from [192.168.101.231] (port=41471 helo=mta01.int.webd) by wn02.webd.pl with esmtp (Exim 4.93) (envelope-from ) id 1nIrV0-0004h4-7u; Sat, 12 Feb 2022 13:27:34 +0100 X-Quarantine-ID: X-Virus-Scanned: amavisd-new at mxwn02.webd.pl Original-Received: from wn02.webd.pl ([192.168.101.102]) by mta01.int.webd (mxwn02.webd.pl [192.168.101.200]) (amavisd-new, port 10024) with ESMTP id Of8HDfbqzPJ6; Sat, 12 Feb 2022 13:27:31 +0100 (CET) Original-Received: from public-gprs205091.centertel.pl ([46.134.140.100]:23661 helo=mother) by wn02.webd.pl with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1nIrUx-0007T9-AA; Sat, 12 Feb 2022 13:27:31 +0100 In-Reply-To: <87czjvyaul.fsf@mother.org> (message from irek on Wed, 09 Feb 2022 22:43:46 +0100) Received-SPF: pass client-ip=194.181.228.14; envelope-from=mail@gumen.pl; helo=mxcwn02.webd.pl X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135910 Archived-At: To close topic. I managed to do exactly what I wanted to. Now Rmail message headers preserve order that is controlled by new list variable `rmail-ordered-headers'. I wrote custom function that was added around `rmail-copy-headers' as advice. Works well for me on old Emacs 25 and new 29 (build from master branch). Code is available on github. Maybe someone will like that too. I'm never going back to random mess. https://github.com/ir33k/rmail-ordered-headers Thanks for the help and happy coding.