[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs formatting strings - %s expansion
From: |
Felipe Salvador |
Subject: |
Re: Emacs formatting strings - %s expansion |
Date: |
Tue, 19 Sep 2017 18:40:56 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
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:
>
> <lista-help-emacs>
>
> 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