Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get mail address from abook fail when forget add Comma #4179

Closed
wanderl5 opened this issue Feb 2, 2024 · 3 comments
Closed

get mail address from abook fail when forget add Comma #4179

wanderl5 opened this issue Feb 2, 2024 · 3 comments
Labels

Comments

@wanderl5
Copy link

wanderl5 commented Feb 2, 2024

Expected Behaviour

when i compose an email, i usually need to specify multiple recipients, i will type in head char and use tab to query from abook to auto complete;

Actual Behaviour

it always works ok, but when i forget to type "," between recipients and press tab , then it will get error like:
"cannot open xxx@gmail.com: No such file"

Steps to Reproduce

  • compose new mail, not add comma between recipients and press tab

How often does this happen?

  • Always

When did it start to happen?

  • when compose or reply a mail

NeoMutt Version

NeoMutt 20231221
Copyright (C) 1996-2022 Michael R. Elkins and others.
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Linux 6.1.0-14-amd64 (x86_64)
ncurses: ncurses 6.4.20221231 (compiled with 6.4.20221231)
libidn2: 2.3.3 (compiled with 2.3.3)

Configure options: --disable-doc

Compilation CFLAGS: -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -DNCURSES_WIDECHAR -I/usr/include -O2

Compile options:
-autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo -gnutls -gpgme
-gsasl -gss -hcache -homespool +idn +inotify -locales_hack -lua -mixmaster
+nls -notmuch -openssl +pgp +regex -sasl +smime -sqlite +truecolor

MAILPATH="/var/mail"
PKGDATADIR="/usr/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/etc"

@wanderl5 wanderl5 added the type:bug Bug label Feb 2, 2024
@roccoblues
Copy link
Member

Thanks for the report. I can reproduce this with set query_command="abook --mutt-query '%s'"

Adding additional logging:

diff --git a/alias/dlg_query.c b/alias/dlg_query.c
index e00391f4e..5f92c211d 100644
--- a/alias/dlg_query.c
+++ b/alias/dlg_query.c
@@ -279,6 +279,8 @@ int query_run(const char *s, bool verbose, struct AliasList *al, const struct Co
   const char *const c_query_command = cs_subset_string(sub, "query_command");
   buf_file_expand_fmt_quote(cmd, c_query_command, s);

+  mutt_debug(LL_DEBUG5, "command: %s\n", buf_string(cmd));
+
   pid_t pid = filter_create(buf_string(cmd), NULL, &fp, NULL, EnvList);
   if (pid < 0)
   {

I can see that the quoting is messed up:

[2024-02-21 10:46:21]<5> query_run() command: abook --mutt-query ''Technik Lux <info@technik-lux.de>''
$ abook --mutt-query ''Technik Lux <info@technik-lux.de>''
zsh: no such file or directory: info@technik-lux.de

But when I remove the quotes:

set query_command="abook --mutt-query %s"

everything seems to work as expected.

@gahr gahr added type:question Question and removed type:bug Bug labels Mar 13, 2024
@gahr
Copy link
Member

gahr commented Mar 13, 2024

I think it's ok to close this?

@wanderl5
Copy link
Author

wanderl5 commented Apr 9, 2024

it's ok now, Thx a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants