From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tory S. Anderson Newsgroups: gmane.emacs.help Subject: A completing read to set message-mode or Gnus "from" Date: Tue, 11 Aug 2015 16:58:06 -0600 Message-ID: <877fp1l9fl.fsf@linux.site> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1439358427 18817 80.91.229.3 (12 Aug 2015 05:47:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Aug 2015 05:47:07 +0000 (UTC) To: Emacs Help List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 12 07:47:00 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZPOsN-0003No-C3 for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Aug 2015 07:46:59 +0200 Original-Received: from localhost ([::1]:36990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPOsM-00030N-HX for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Aug 2015 01:46:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPIUx-0000xX-5v for help-gnu-emacs@gnu.org; Tue, 11 Aug 2015 18:58:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPIUs-0006Yk-7W for help-gnu-emacs@gnu.org; Tue, 11 Aug 2015 18:58:23 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:34864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPIUs-0006Ya-3z for help-gnu-emacs@gnu.org; Tue, 11 Aug 2015 18:58:18 -0400 Original-Received: by iodt126 with SMTP id t126so3195355iod.2 for ; Tue, 11 Aug 2015 15:58:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=4YpasHF1JQw6ROqmQhXAUjGAVxu2jxdr1uvQ0zCoVJk=; b=GxrxZ5WfSfPSbF9mYbK+unsWcN2oRDT9EBoN4bd6Kae73R3+E5RqbW2pknWw1xVqc6 k7KzG7T0v3pMeLxDrMCN2coCQGKvyuyRyPoC2ZYMOTgPqLlB7dkVi+F9L9Pa/qHGriTR h8f2yQi+vcKzzuFkaPx/BOrhisSk4y3dD2eMZsPNfibpPEWKvQ7y4bfUYi2SFHWxWZ0r aF25H+bIba2WDS/T4X7eEsQO3F2x1x5gn8pv+a75MZ07GRTfFn/3A8UIYIZoDKJRieWM 8qL4uuIchlDU/wdtEiwtx+lg0j5QsiAcddXHiNKKfVWLLs7RezoBEZiATnvmIeKRtSHk IDqA== X-Received: by 10.107.133.137 with SMTP id p9mr7108443ioi.146.1439333897070; Tue, 11 Aug 2015 15:58:17 -0700 (PDT) Original-Received: from linux.site ([67.128.145.14]) by smtp.gmail.com with ESMTPSA id s5sm2558728igh.6.2015.08.11.15.58.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 15:58:16 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.223.178 X-Mailman-Approved-At: Wed, 12 Aug 2015 01:46:49 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106492 Archived-At: As a Helm user with 7 or so email addresses I might be sending with, I wanted to put together a quick completing-read to fill in my from address with a keystroke; however, it's not working and I'm not sure why. It complains about wanting a list, but when I return a list it complains about wanting a string. --8<---------------cut here---------------start------------->8--- (defun tsa/message-choose-from () (interactive (let ((my-name "Joseph Smith") (my-from-list '("abc@gmail.com" "def@gmail.com" "xyz@gmail.com"))) (message-make-from my-name (completing-read "From:" my-from-list nil t))))) (add-hook 'message-mode-hook (lambda () (local-set-key (kbd "C-c f") 'tsa/message-choose-from))) --8<---------------cut here---------------end--------------->8--- Error: > command-execute: Wrong type argument: listp, "Joseph Smith > " Is this to do with "interactive" vs "message-make-from"? The completing-read seems to work, but the final step is blocked by the error.