From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Felipe Salvador Newsgroups: gmane.emacs.help Subject: Re: Emacs formatting strings - %s expansion Date: Tue, 19 Sep 2017 18:40:56 +0200 Message-ID: <20170919164056.5s6lrbiuqvnl4f3e@gnurante> References: <20170919093244.vdmec4xdxzp7g2pm@gnurante> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1505839339 6438 195.159.176.226 (19 Sep 2017 16:42:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2017 16:42:19 +0000 (UTC) User-Agent: NeoMutt/20170113 (1.7.2) To: lista-help-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 19 18:42:14 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duLbB-0001Nf-PW for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Sep 2017 18:42:13 +0200 Original-Received: from localhost ([::1]:44074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duLbJ-0004mp-1d for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Sep 2017 12:42:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duLa4-0004Jl-5t for help-gnu-emacs@gnu.org; Tue, 19 Sep 2017 12:41:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duLa1-0000Rw-Cb for help-gnu-emacs@gnu.org; Tue, 19 Sep 2017 12:41:04 -0400 Original-Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:51258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duLa0-0000R3-Vm for help-gnu-emacs@gnu.org; Tue, 19 Sep 2017 12:41:01 -0400 Original-Received: by mail-wr0-x233.google.com with SMTP id z39so143982wrb.8 for ; Tue, 19 Sep 2017 09:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Q1dpSa//smEIUJzdeW3vcwwUWCcmc1er3WqRJMXpZ/Y=; b=GP35Vq1vU8Pmx4R7Ggg5dOsxkpid9Q34aEkfkYpg1/mHm4p4xThDOcoPHxEIhoU+3K B+LmCrHVS6P/RDDvRrn+FIpnAHL9ntBvqRLRDHJUd2Wctv4OsE28wdo/kPD3J8S+tEZw gyQjGS10mW1MVrlJah2Vpv7hbuFdUnuc/6ZpJhm7DEbyMU4qmLy5lTFTrTVrdWXnDz/N 2yJnXzFXcco3ZT/62Lr4fUMhujPesLslTZX9yLPU3H+uckKL7jfb06LSKXMHqyKiuDdr MKQlL6jtQBivD5av4rZ4TpX3o59Tp6DZINGdI0PT/fYny+p+pvTqQgY45iGDBNe3RhG1 bZnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Q1dpSa//smEIUJzdeW3vcwwUWCcmc1er3WqRJMXpZ/Y=; b=Ril7vbR6AzPMfEbrcJ4hMpJJsKZglsWhZ1EiXY9mn+oax83LaIYpL9ra9Fr7I8mo8s Y7rz7o27PuSK2rDda71psIqlABXdprT8Hs5qezjLncndxvUJL1yNjxnynjjRsqStqxJc Xb1zLjdyjG3mnvNZUvCp4Z1Xir7A4oHeMbvgIV9eLP2J9OlynXXn8GbH20uff0f01Zej PCAY15eziORmV/7t8S3ndjDvP9xtf3A/NDrkm483W7fDRq2perhFAyWxryxFxsTYMsvk 8JMeuL93nDhkbK3at2fDgCruH2hL2imAf+elFFnZV7JtGb9byn57ULIDZvy8uo6nPp1A wcpg== X-Gm-Message-State: AHPjjUgD7Yzf0zFDqdB1GvBphpxOV4tiql07nRXEFNnJc9GD0aOs2JL/ AWFQ1OKdZSCitfl1h1TOHHAXw66w X-Google-Smtp-Source: AOwi7QAIp7bD7JCrCGzQa5Bj0AfO6qOuNZaJUG04D74yJRXkyTwwegcl8P9IukiS5kWAiLerN49FZw== X-Received: by 10.223.147.39 with SMTP id 36mr1889290wro.175.1505839259565; Tue, 19 Sep 2017 09:40:59 -0700 (PDT) Original-Received: from localhost ([95.238.226.76]) by smtp.gmail.com with ESMTPSA id m138sm1921988wmd.29.2017.09.19.09.40.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Sep 2017 09:40:59 -0700 (PDT) Mail-Followup-To: lista-help-emacs Content-Disposition: inline In-Reply-To: <20170919093244.vdmec4xdxzp7g2pm@gnurante> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::233 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:114316 Archived-At: On Tue, Sep 19, 2017 at 11:32:44AM +0200, Felipe Salvador wrote: > Hi, > I use Mutt whit Emacs as editor, I'm trying to configure emacs in > order to make use of abook[1] via ExternalAbook[2]. > I've folowed theese instructions[2], so I have: > > (custom-set-variables '(external-abook-command "abook --mutt-query %s")) > > When I run abook query from terminal I get this: > > ~$ abook --mutt-query emacs > > help-gnu-emacs@gnu.org lista-help-emacs > > If I write "emacs" in emacs an then call > M-x external-abook-try-expand, I get this: > > > > Without email address. I suppose it could still work if I would keep aliases > file up to date, this is not the point. Solved, in the ExternalAbook page there is the solution: > Dan’s solution works well, but smtp from mu4e-compose sometimes fails > if the name part is not quoted and contains commas (Lastname,Firstname). > Also, goobok outputs an extra blank line. > Replacing cut with (g)awk solves both problems: > goobook “$@” | gawk -F’\t’ ‘/.+/ {print $1 “\t” “\””$2 “\””}’ -- Felipe Salvador