Subject: 25.1; Unbalanced parentheses

From: micah anderson <[email-masked]>
Date: Fri, 28 Apr 2017 11:16:09 -0400

Hello,

I'm trying to send an signed/encrypted email using notmuch and
mml-mode. The user that I'm trying to encrypt the mail to has a UID on
their key with a " in their name. When I try to send, I get this
(anonymized):

Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 7 42)
  scan-sexps(7 1)
  forward-sexp(1)
  mail-header-parse-address("Someone. O\"shaunissy <[email-masked]>")
  mml-secure-check-user-id([cl-struct-epg-key none ([cl-struct-epg-sub-key none (sign certify authentication) nil 1 4096 "zzzkeyidherezzz" (22764 . 54792) (23246 . 2440) "xxxkeyidherexxx"] [cl-struct-epg-sub-key none (encrypt) nil 1 4096 "yyykeyidhereyy" (22764 . 54792) (23246 . 2440) "xxxxkeyidherexxx"]) ([cl-struct-epg-user-id none "Someone. O\"shaunissy <[email-masked]>" nil])] "<[email-masked]>")
  mml-secure-find-usable-keys([cl-struct-epg-context OpenPGP "/usr/bin/gpg2" nil nil nil nil nil nil nil (epg-passphrase-callback-function) nil nil nil nil nil nil nil nil nil "" nil] "<[email-masked]>" encrypt)
  #[(name) "\306	\n#\211G\211\307U\203&
\204\310\311\312\n	#!?\2056\313\314\n	#\2026\f\315U\2030\2026\316	\n$*\207" [context name usage keys keyno mml-secure-fail-when-key-problem mml-secure-find-usable-keys 0 y-or-n-p format "No %s key for %s; skip it? " error "No %s key for %s" 1 mml-secure-select-keys] 6]("<[email-masked]>")
  mapcar(#[(name) "\306	\n#\211G\211\307U\203&
\204\310\311\312\n	#!?\2056\313\314\n	#\2026\f\315U\2030\2026\316	\n$*\207" [context name usage keys keyno mml-secure-fail-when-key-problem mml-secure-find-usable-keys 0 y-or-n-p format "No %s key for %s; skip it? " error "No %s key for %s" 1 mml-secure-select-keys] 6] ("<[email-masked]>"))
  mml-secure-select-preferred-keys([cl-struct-epg-context OpenPGP "/usr/bin/gpg2" nil nil nil nil nil nil nil (epg-passphrase-callback-function) nil nil nil nil nil nil nil nil nil "" nil] ("<[email-masked]>") encrypt)
  mml-secure-recipients(OpenPGP [cl-struct-epg-context OpenPGP "/usr/bin/gpg2" nil nil nil nil nil nil nil (epg-passphrase-callback-function) nil nil nil nil nil nil nil nil nil "" nil] (program . "gpg2") (curve . "cv25519;ed25519;nistp256;nistp384;nistp521;brainpoolP256r1;brainpoolP384r1;brainpoolP512r1;secp256k1") (compressname . "Uncompressed;ZIP;ZLIB;BZIP2") (compress 0 1 2 3) (digestname . "SHA1;RIPEMD160;SHA256;SHA384;SHA512;SHA224") (digest 2 3 8 9 10 11) (ciphername . "IDEA;3DES;CAST5;BLOWFISH;AES;AES192;AES256;TWOFISH;CAMELLIA128;CAMELLIA192;CAMELLIA256") (cipher 1 2 3 4 7 8 9 10 11 12 13) (pubkeyname . "RSA;ELG;DSA;ECDH;ECDSA;EDDSA") (pubkey 1 16 17 18 19 22) (version . "2.1.20")) "[email-masked]")
  mml-secure-epg-encrypt(OpenPGP (part (sign . "pgpmime") (encrypt . "pgpmime") (tag-location . 228) (contents . "\nsome message here\n")) t)
  mml2015-epg-encrypt((part (sign . "pgpmime") (encrypt . "pgpmime") (tag-location . 228) (contents . "\nsome message here\n")) t)
  mml2015-encrypt((part (sign . "pgpmime") (encrypt . "pgpmime") (tag-location . 228) (contents . "\nsome message here\n")) t)
  mml-pgpmime-encrypt-buffer((part (sign . "pgpmime") (encrypt . "pgpmime") (tag-location . 228) (contents . "\nsome message here\n")) t)
  mml-generate-mime-1((part (sign . "pgpmime") (encrypt . "pgpmime") (tag-location . 228) (contents . "\nsome message here\n")))
  mml-generate-mime()
  message-encode-message-body()
  message-send-mail(nil)
  message-send-via-mail(nil)
  message-send(nil)
  message-send-and-exit(nil)
  notmuch-mua-send-and-exit(nil)
  funcall-interactively(notmuch-mua-send-and-exit nil)
  #<subr call-interactively>(notmuch-mua-send-and-exit nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> notmuch-mua-send-and-exit nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (notmuch-mua-send-and-exit nil nil))
  call-interactively(notmuch-mua-send-and-exit nil nil)
  command-execute(notmuch-mua-send-and-exit)

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.12)
 of 2017-04-23, modified by Debian built on trouble
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Debian GNU/Linux 9.0 (stretch)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-d2FC1K/emacs25-25.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Message[Notmuch]

Minor modes in effect:
  recentf-mode: t
  helm-mode: t
  flyspell-mode: t
  projectile-global-mode: t
  projectile-mode: t
  nyan-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  mml-mode: t
  desktop-save-mode: t
  ido-ubiquitous-mode: t
  ido-vertical-mode: t
  ido-everywhere: t
  icomplete-mode: t
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  minibuffer-depth-indicate-mode: t
  helm-descbinds-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: message-do-auto-fill
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
Desktop saved in ~/.emacs.d/
Mark set
Desktop saved in ~/.emacs.d/ [2 times]
Mark set
Saved text from "Hellllllllllo!

>I am one who is known b"
Desktop saved in ~/.emacs.d/
Auto-saving...
Desktop saved in ~/.emacs.d/ [2 times]

Load-path shadows:
/home/micah/.emacs.d/plugins/post hides /home/micah/.emacs.d/post
~/.emacs.d/plugins/puppet-flymake/flymake-puppet hides /home/micah/.emacs.d/elpa/flymake-puppet-20141006.1855/flymake-puppet
~/.emacs.d/plugins/puppet-syntax-emacs/puppet-mode hides /home/micah/.emacs.d/elpa/puppet-mode-20161204.713/puppet-mode
/home/micah/.emacs.d/elpa/color-theme-20080305.34/color-theme hides /usr/share/emacs25/site-lisp/emacs-goodies-el/color-theme
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/micah/.emacs.d/custom hides /usr/share/emacs/25.1/lisp/custom
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.1/lisp/textmodes/rst
/home/micah/.emacs.d/plugins/avl-tree hides /usr/share/emacs/25.1/lisp/emacs-lisp/avl-tree
/home/micah/.emacs.d/elpa/seq-20151121.1017/seq hides /usr/share/emacs/25.1/lisp/emacs-lisp/seq

Features:
(shadow emacsbug sendmail recentf tree-widget debug
minibuffer-complete-cycle gnus gnus-ems nnheader mml2015 mail-extr sort
warnings rst make-mode sql view python ruby-mode arc-mode archive-mode
markdown-mode elfeed-show shr dom elfeed-csv elfeed-db avl-tree elfeed
elfeed-curl elfeed-lib elfeed-log url-queue xml-query elfeed-search
dns-mode json-mode json-reformat json-snatcher js sgml-mode imenu
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs conf-mode org-element org-indent org-habit org-agenda
org-id org-w3m org-irc org-info org-gnus org-bbdb puppet-mode flycheck
subr-x sh-script smie executable vc-git epa-file epa derived helm-mode
flyspell ispell my-projectile helm-projectile helm-files image-dired
ffap helm-tags helm-bookmark helm-adaptive helm-info bookmark pp
helm-external helm-net browse-url xml helm-buffers helm-grep helm-regexp
helm-elscreen helm-utils helm-locate helm-help helm-types projectile
grep ibuf-ext ibuffer my-jenkins jenkins my-ledger ledger-mode
ledger-check ledger-schedule ledger-xact ledger-texi ledger-test
ledger-sort ledger-report ledger-reconcile ledger-post ledger-occur
ledger-init ledger-fontify ledger-state ledger-navigate ledger-fonts
ledger-exec ledger-context ledger-complete ledger-commodities esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-groups eshell esh-module
esh-mode esh-arg esh-util ledger-regex my-elpa my-gnus my-puppet
flymake-puppet flymake compile my-nyan nyan-mode my-ediff ediff dired+
dired-x ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util dired-aux my-magit magit-gh-pulls gh gh-users
gh-issues gh-pulls gh-repos gh-comments gh-gist gh-oauth gh-api logito
gh-cache pcache eieio-base gh-auth gh-url url-http tls gnutls url
url-proxy url-privacy url-expand url-methods url-history url-auth
url-cookie url-domsuf url-util url-gw magit-blame magit-stash
magit-bisect magit-remote magit-commit magit-sequence magit magit-apply
magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert
autorevert filenotify magit-process magit-popup magit-mode magit-git
magit-section magit-utils git-commit log-edit pcvs-util add-log
with-editor async-bytecomp async tramp-sh tramp tramp-compat
tramp-loaddefs trampver shell server my-notmuch eudc eudc-vars notmuch
hl-line notmuch-message notmuch-maildir-fcc notmuch-hello notmuch-tree
notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-address
notmuch-company notmuch-parser notmuch-wash diff-mode coolj
notmuch-query goto-addr thingatpt icalendar diary-lib diary-loaddefs
notmuch-tag crm notmuch-lib notmuch-version notmuch-compat cl message
rfc822 mml mailabbrev mail-utils gmm-utils mailheader mm-view mml-smime
mml-sec epg smime dig mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums my-terminal my-smex smex my-desktop
desktop frameset my-org org-clock org org-macro org-footnote
org-pcomplete pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-src ob-keys ob-comint comint ansi-color ring ob-core ob-eval
org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar
cal-loaddefs org-install my-ido ido-ubiquitous ido-completing-read+
cus-edit wid-edit ido-vertical-mode flx-ido flx ido my-tls
my-generickeys my-generic speedbar sb-image ezimage dframe icomplete
saveplace windmove time delsel avoid paren mb-depth helm-descbinds helm
edmacro kmacro helm-source helm-multi-match helm-lib dired cus-start
cus-load my-package finder-inf advice gh-common gh-profile url-parse
auth-source gnus-util mm-util help-fns mail-prsvr password-cache
url-vars rx s ucs-normalize marshal cl-seq eieio-compat ht json map dash
eieio eieio-core cl-macs logito-autoloads info package epg-config seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib debian-el debian-el-loaddefs erlang-start
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
dpkg-dev-el dpkg-dev-el-loaddefs time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 810183 119405)
 (symbols 48 59060 0)
 (miscs 40 4731 1005)
 (strings 32 171466 19370)
 (string-bytes 1 6201108)
 (vectors 16 96977)
 (vector-slots 8 2241576 197340)
 (floats 8 2312 388)
 (intervals 56 19903 0)
 (buffers 976 557))