From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6925 invoked from network); 10 Aug 2023 04:33:03 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 10 Aug 2023 04:33:03 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qTxLu-00Fyer-1b for ml@inbox.vuxu.org; Wed, 09 Aug 2023 23:32:54 -0500 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.96) (envelope-from ) id 1qTxLt-003l1k-2n for ml@inbox.vuxu.org; Wed, 09 Aug 2023 23:32:49 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.96) (envelope-from ) id 1qTxLr-003l1b-0X for ding@lists.math.uh.edu; Wed, 09 Aug 2023 23:32:47 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qTxLo-00BZo7-28 for ding@lists.math.uh.edu; Wed, 09 Aug 2023 23:32:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4g9z2etJ1eIYY3a4M7Ez1PUsaZNksx9hNCbj5y/mMMQ=; b=olEn9rXInR89q6OgBODUpTs3+I YxBnEfVcL4ND1Wk/Bw221gOb9gM66PEidL5F8maAlkOrjLDA16CV7To3cchjRZfqNoZ8EqVtRoua3 P/E95QoVHqrY/Np+Mmfu/3DWOEJe3UGMrj/7orVO4Hd6u61d2wxkuR9AxUYG/wzW/MWQ=; Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qTxLg-00089S-AI for ding@gnus.org; Thu, 10 Aug 2023 06:32:38 +0200 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1bb9e6c2a90so5086395ad.1 for ; Wed, 09 Aug 2023 21:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobnewell-net.20221208.gappssmtp.com; s=20221208; t=1691641953; x=1692246753; h=mime-version:user-agent:message-id:date:references:organization :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4g9z2etJ1eIYY3a4M7Ez1PUsaZNksx9hNCbj5y/mMMQ=; b=5YdHpVmHWoTILGKNfHdcqlFfFLdp3V5/8zBQr7FzrBywA7jLKJw6vWKw7Ng1Pa+bsY wfrTOE+Pyo9HMEvqsJ7gdaZQDytsPZWppcetWYYldYPjnv2OqV8Lnx2vMENqI5jL+eDd JskPvV2BwKcSafgcllfnJnroLqXPpug61PfuqlIjiDs46OTjAqxT0Bkwr2JdFY/8Xwuh eryND93xZiHfB72/VUS74jKBGWaua5UgBQqdtPn60AWTWkS//kf6WARB4tNI2KEq9dio 6vblcquJI0gY2/NeHUYCwXpxpExY6HKxQqjqHHUezN+RNWDNQq+694lMCGU7KSIdtXeo ul/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691641953; x=1692246753; h=mime-version:user-agent:message-id:date:references:organization :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=4g9z2etJ1eIYY3a4M7Ez1PUsaZNksx9hNCbj5y/mMMQ=; b=B1ldFBrlPWpX6dKYHLGNb0wtsdwtCVd6yF9bLncLaK3jC/qC0Pcp6tOJ/NI1PeQFiw Kgb/0bDTcwo0DVRjNhhnWQOg6Sa+/Q35PCkpUPy3s8HaE+QwDBs8ms5JAs2nI4Yj0GVZ X1LHsVJaCMDpe9u9iSQi95G59ehGiTuEs1XvdlFtvpGDPSZ/mlDPMj8gpom9WR4kxaZu UUmH3XBclpDXmrJfCcLlp8VBqKsx8YQV4iye/z2WmCbd4tlyQlE63ZH84K+Fr2sk84jr Z8Of7xq8GNvyMTdb3Qo8bIVJsB4Gfmnskf+xnPENpyAH9zk0NVltHIiTrHX7c/WCjhXK tdnQ== X-Gm-Message-State: AOJu0YyDHKMFySO9rl/XvcZ1dvk7IQZOoluoF93Bn9OVt8iTxTkl2XRh JzNg1it7sBnFnxmRsdglJ8++JrIdJBGuZIVVkUI= X-Google-Smtp-Source: AGHT+IEOM7cvZBj//Gbfm/+QaGrgdwTusVC7r25OusbCkLRD4yil+ymCZhtglUG9BzaYZSkWJpIOlA== X-Received: by 2002:a17:902:dace:b0:1bb:ce4a:5893 with SMTP id q14-20020a170902dace00b001bbce4a5893mr1526174plx.30.1691641952627; Wed, 09 Aug 2023 21:32:32 -0700 (PDT) Received: from localhost (dhcp-141-239-241-54.hawaiiantel.net. [141.239.241.54]) by smtp.gmail.com with ESMTPSA id w18-20020a170902e89200b001bb9f104330sm444573plg.240.2023.08.09.21.32.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 21:32:32 -0700 (PDT) From: Bob Newell To: ding Subject: Re: gnus-alias-get-something In-Reply-To: <875y5o0y39.eaeaqgsgh@djtil.aqads.com> (Bob Newell's message of "Wed, 09 Aug 2023 10:17:46 -1000") Organization: Avi Gobbler Publishing References: <875y5o0y39.eaeaqgsgh@djtil.aqads.com> Date: Wed, 09 Aug 2023 18:32:30 -1000 Message-ID: <87msyza55t.jbtx@yqjrpoh.ysrusv.net> User-Agent: Chrome/5.5 MIME-Version: 1.0 Content-Type: text/plain List-ID: Precedence: bulk Bob Newell writes: > Aloha everyone, > > The docs for gnus-alias-identity-alist seem to indicate that > an element of the list can be a function that returns a > string. I have a need for that in the signature field, which > gnus-alias.el accesses like this: > > (defun gnus-alias-get-sig (ID) > "Return the SIGNATURE portion of ID." > (gnus-alias-get-something ID 6)) > > But we also have this: > > (defsubst gnus-alias-get-something (ID N) > "Return the Nth something from ID." > (let ((rv (nth N ID))) > (if (and (stringp rv) (= (length rv) 0)) nil rv))) > > I tried this on the signature field: > > (concat start-lisp-home ".signature") > > where start-lisp-home is previously defined as > > "~/data/elisp" > > and got a symbolp error. > > Any insights appreciated. Probably user error! To "clarify" further, the following works and does what I want. (defun rjn-make-sig-string () "Based on 'identity' from gnus-alias-identity-alist, insert a sig from a file .signatureidentity in the start-lisp-home directory, as defined globally elsewhere. If the appropriate .signatureidentity doesn't exist just use .signature and assume it exists." (let ((try-file (concat start-lisp-home ".signature" identity))) (if (not (file-exists-p try-file)) (setq try-file (concat start-lisp-home ".signature"))) (with-temp-buffer (insert-file-contents try-file) (buffer-string)) )) (setq gnus-alias-identity-alist '( ("aol" nil "Bob Newell " nil (("BCC" . "bobnewell@bobnewell.net")) ;; extra headers nil rjn-make-sig-string ) ... etc. However this seems like REALLY the long way around for something maybe not terribly important. Is there something better? Mahalo -- Bob Newell Honolulu, Hawai`i - Via GNU/Linux/Emacs/Gnus/BBDB