From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: message, can't find basic stuff [Elisp] Date: Sat, 20 Feb 2021 10:23:44 +0100 Message-ID: <87im6n6qjj.fsf@posteo.net> References: <875z2nmtiq.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) 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 20 10:24:22 2021 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 1lDOUw-0005z6-Cr for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 20 Feb 2021 10:24:22 +0100 Original-Received: from localhost ([::1]:39772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDOUv-0002SW-DZ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 20 Feb 2021 04:24:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDOUX-0002SL-75 for help-gnu-emacs@gnu.org; Sat, 20 Feb 2021 04:23:57 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:35234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDOUR-0001xW-Nj for help-gnu-emacs@gnu.org; Sat, 20 Feb 2021 04:23:57 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 46659160060 for ; Sat, 20 Feb 2021 10:23:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1613813026; bh=pwLvElY7vQgzBtMhJ8khLNN067kaC2h7f2GH7lcz324=; h=From:To:Subject:Date:From; b=EG9plZ+BZL9PvjEL8zDXWqcQpgDZVdjFuudI79dzmdELISuThqvuSWJwjkHGOrBFg w43EL99EKQ/5BzLP94ycPXRfqHJpOt/ML2nIAy5w2hccocSSLenLKXFrXMJSWvG6iV 9o/Mp4A7P53vlHoYk2s4E0nPShhdCelpTUgwE3dpkQWXGVNa6Vb9t3dIAq4JiaEpF4 GNzzzXmGyvl5PW0DRvSa8G3XFvbFBklMI8ajIB9NgaSRMQAD0zeXfrylG7b0VaAaUJ emeM2SNfta7ByB1+WzITUi7fV093rfwiOxBNNPBHbMljjwAKsCLvus6tucS/e4aRuZ /l7nk8YK3G8iQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DjNKs6BcSz9rxM for ; Sat, 20 Feb 2021 10:23:45 +0100 (CET) In-Reply-To: <875z2nmtiq.fsf@zoho.eu> (Emanuel Berg via Users list for the's message of "Sat, 20 Feb 2021 02:12:45 +0100") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:128134 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Emanuel Berg via Users list for the GNU Emacs text editor writes: > I just answered a question on gmane.emacs.gnus.general but had > to write a lot more code than I thought. > > Is there really no - argh, just read the code, the questions > are in the comments :) > > (require 'message) > > ;; is there really no function like this already? > (defun message-set-header (hdr val) > (interactive "sheader: \nsvalue: ") > ;; check here if there _is_ such a header - how? > ;; also a must-have, super-simple building-block from the holster > ;; but can't find it either Perhaps message-fetch-field? It returns the value or nil if not found. > (message-position-on-field hdr) > (message-beginning-of-line) > (delete-region (point) (point-at-eol)) > (insert val) ) > ;; test:=20 > ;; (message-set-header "Subject" "Lara loves YOU") All I know of is message-add-header, but pass it an entire line, not a header-value pair. =2D-=20 Philip K. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCAAxFiEEbW+YL3e0aNnYosjIGB9bla4wszYFAmAw1SATHHBoaWxpcGtA cG9zdGVvLm5ldAAKCRAYH1uVrjCzNk87DACNApDPMi95pVTaIvXQQVu4uAmcTQut VmAUkaeUs0Cde389x/0rZ39grlLiE0ZS5YQD7nwMpvUFM5Eklfz/U88Mtlx0TRL8 wPmVuUbnjBYuVhGennf9FH8vTCCKsZhYjp5lReev8pTZCwaVfBRhzhV9QGIiJIvl i3b7j3HSNxchzubBkZqfwzbf++dnzG0hVPOF4ruE6VdfAZe3ow92IUze5Omgoe4j GY+NHD5qJcSjNAxc8VnCfNtAfF7h7US9nwhEaz7mDN/Z7l1JZmp2IHXzUg7GKkej 47CewKojLcTj8innLefj7kRrzR+DAWx4hSsChqrL7iUG9PTAEH6oLhzxJExlZCgp Dhnr51MdOuzSZxYIQseNYSmGwgNbarxByrE8G8PU95AjQPq5myxkSjG76AGkzIQg pHQa3KYRRGE//g47sf2/r51OQNyRnjqE8pf7XZRa1DxWy1GP/QBDgWub80DdMm/F +vylQogt7zCFuWLI7zQizf9QMH9vTo0JjGE= =jjSr -----END PGP SIGNATURE----- --=-=-=--