unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11037: 24.0.94; gnutls-cli.exe program not found
@ 2012-03-17 17:24 Uday S Reddy
  2012-03-17 18:09 ` Eli Zaretskii
  2012-03-22 18:33 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Uday S Reddy @ 2012-03-17 17:24 UTC (permalink / raw)
  To: 11037; +Cc: U.S.Reddy

It has been known for some time that starttls.el's negotiation fails on
Windows because Windows does not respond to SIGALRM requests.  Rob Davenport
proposed a work-around in this post:

  http://article.gmane.org/gmane.emacs.windows/3250

I wonder first of all if this fix can be incorporated into starttls.el file
somehow.

Secondly, trying starttls on Emacs 24.0.94 produces a misleading error
message:

    smtpmail-send-it: Sending failed: Emacs does not support TLS, and no
    external `gnutls-cli.exe' program was found 

This despite the fact that gnutls-cli.exe is available on the exec-path:

   (locate-file "gnutls-cli.exe" exec-path)
   "c:/Cygwin/bin/gnutls-cli.exe"

Applying Rob Daverport's patches to starttls.el allowed the smtpmail to
function fine.

So, I would appreciate if the error message can be improved by making it
more specific about the nature of the problem.  As it is currently worded,
most Windows users are going to get thrown off course.

Cheers,
Uday Reddy
(Maintainer of the Emacs/VM mail client)


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
d:/gnu/emacs-24.0.94/etc/DEBUG.


In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
 of 2012-02-27 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Buffer Menu

Minor modes in effect:
  savehist-mode: t
  show-paren-mode: t
  which-function-mode: t
  mouse-wheel-mode: t
  menu-bar-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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-b C-b C-b M-d M-d M-d 3 . 3 C-e s t a r t SPC SPC 
SPC SPC <return> M-x e d i f f - b u f <return> <return> 
<return> n n n n n n n n n n n n n n n n n n n n n 
p p p p p a p <switch-frame> <switch-frame> a p <switch-frame> 
<switch-frame> a p <switch-frame> <switch-frame> a 
p q <switch-frame> <switch-frame> y C-x C-w s t a r 
t t l s - c y g w i n . SPC e l <return> C-x C-b <f1> 
M-x l a o <backspace> <backspace> o a d - l i b \ <return> 
s <backspace> <backspace> <return> s t a r t t l s 
- c y g w i n <return> C-x m C-p C-f C-f C-f C-f C-f 
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-k u d 
y a <backspace> <backspace> a y . s . r e d d y @ g 
m a i l . c o m > C-n u . s . r e d d y @ c s . b h 
a m . a c . u k C-n t e s t i n g SPC g m a i l SPC 
s m t p SPC i n SPC E m c s <backspace> <backspace> 
a c s 2 4 C-x . t e s t <return> <backspace> i n g 
<return> M-x s e t p <backspace> u p - g SPC SPC <return> 
C-c C-c g <help-echo> <down-mouse-1> <mouse-1> C-x 
C-g <down-mouse-1> <mouse-1> C-x m C-x k <return> M-x 
r e p o r t - e m a c s - b u g <return>

Recent messages:
Sending...
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
Sending email 
Sending email done
250 OK id=1S8wvV-0007y6-Us
221 mx1.cs.bham.ac.uk closing connection
Sending...done
Quit

Load-path shadows:
d:/Home/udr/.emacs.d/elpa/auctex-11.86/toolbar-x hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/toolbar-x
d:/Home/udr/.emacs.d/elpa/auctex-11.86/texmathp hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/texmathp
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-style hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-style
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-mik hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-mik
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-jp hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-jp
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-info hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-info
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-fptex hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-fptex
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-font hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-font
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-fold hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-fold
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-buf hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-buf
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-bar hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/tex-bar
d:/Home/udr/.emacs.d/elpa/auctex-11.86/prv-emacs hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/prv-emacs
d:/Home/udr/.emacs.d/elpa/auctex-11.86/preview hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/preview
d:/Home/udr/.emacs.d/elpa/auctex-11.86/multi-prompt hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/multi-prompt
d:/Home/udr/.emacs.d/elpa/auctex-11.86/latex hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/latex
d:/Home/udr/.emacs.d/elpa/auctex-11.86/font-latex hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/font-latex
d:/Home/udr/.emacs.d/elpa/auctex-11.86/context hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/context
d:/Home/udr/.emacs.d/elpa/auctex-11.86/context-nl hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/context-nl
d:/Home/udr/.emacs.d/elpa/auctex-11.86/context-en hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/context-en
d:/Home/udr/.emacs.d/elpa/auctex-11.86/bib-cite hides d:/gnu/packages/auctex-11.86/site-lisp/auctex/bib-cite
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-site hides d:/gnu/emacs-24.0.94/../packages/auctex-11.86/site-lisp/tex-site
d:/Home/udr/.emacs.d/elpa/auctex-11.86/tex-site hides d:/gnu/emacs-24.0.94/../site-lisp/tex-site
d:/Home/udr/share/emacs/sml-mode hides d:/gnu/emacs-24.0.94/../site-lisp/sml-mode
d:/Home/udr/share/emacs/savehist-20+ hides d:/gnu/emacs-24.0.94/../site-lisp/savehist-20+
d:/gnu/emacs-24.0.94/../site-lisp/longlines hides d:/gnu/emacs-24.0.94/lisp/longlines
d:/gnu/emacs-24.0.94/../site-lisp/electric hides d:/gnu/emacs-24.0.94/lisp/electric

Features:
(shadow emacsbug message mml mml-sec mm-decode mm-bodies mm-encode gmm-utils
mailheader smtpmail flyspell ispell mailalias ediff-merg ediff-diff
ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff add-log
mule-util vm-delete utf-7 format-spec network-stream starttls tls bbdb-hooks
mail-parse rfc2231 vm-save tapestry vm-sort vm-thread vm-crypto cus-edit
cus-start cus-load wid-edit help-mode view utf7 vm-imap u-vm-color my-vm
vc-bzr etags vm-ps-print vm-rfaddons vm-menu vm-window vm-toolbar vm-mime
vm-undo vm-virtual vm-summary-faces vm-mouse vm-page vm-message vm-macro
bbdb-vm vm-autoload bbdb-snarf mail-extr rfc822 bbdb-com mailabbrev vm
auctex-autoloads info easymenu package tabulated-list w3m-load
bbdb-autoloads bbdb warnings vm-reply vm-motion vm-summary vm-folder
vm-minibuf vm-misc timezone vm-pcrisis vm-autoloads vm-version vm-vars
myautopair autopair savehist ange-ftp comint ansi-color ring session
tex-site auto-loads movement natural-space NatSpeak sendmail rfc2047 rfc2045
ietf-drums mail-utils auth-source eieio byte-opt bytecomp byte-compile cconv
macroexp assoc gnus-util mm-util mail-prsvr password-cache epa-file epa epg
epg-config regexp-opt paren echistory chistory ehelp electric easy-mmode cl
derived which-func imenu advice help-fns advice-preload edmacro kmacro
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32
disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese case-table
epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 17:24 bug#11037: 24.0.94; gnutls-cli.exe program not found Uday S Reddy
@ 2012-03-17 18:09 ` Eli Zaretskii
  2012-03-17 20:14   ` Uday S Reddy
  2012-03-17 21:31   ` Uday S Reddy
  2012-03-22 18:33 ` Lars Magne Ingebrigtsen
  1 sibling, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-03-17 18:09 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: 11037

> Date: Sat, 17 Mar 2012 17:24:51 +0000
> From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
> Cc: U.S.Reddy@cs.bham.ac.uk
> 
> It has been known for some time that starttls.el's negotiation fails on
> Windows because Windows does not respond to SIGALRM requests.  Rob Davenport
> proposed a work-around in this post:
> 
>   http://article.gmane.org/gmane.emacs.windows/3250
> 
> I wonder first of all if this fix can be incorporated into starttls.el file
> somehow.

Why is that needed?  Emacs supports linking against GnuTLS now,
including on Windows (see below).  Can you use the built-in GnuTLS
support instead of starttls?

> Secondly, trying starttls on Emacs 24.0.94 produces a misleading error
> message:
> 
>     smtpmail-send-it: Sending failed: Emacs does not support TLS, and no
>     external `gnutls-cli.exe' program was found 
> 
> This despite the fact that gnutls-cli.exe is available on the exec-path:
> 
>    (locate-file "gnutls-cli.exe" exec-path)
>    "c:/Cygwin/bin/gnutls-cli.exe"

Please show a Lisp backtrace from this error.

> So, I would appreciate if the error message can be improved by making it
> more specific about the nature of the problem.

Once the nature of the problem is clear, of course.

> In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
>  of 2012-02-27 on MARVIN
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> Configured using:
>  `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
>  -ID:/devel/emacs/libs/libXpm-3.5.8/include
>  -ID:/devel/emacs/libs/libXpm-3.5.8/src
>  -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
>  -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
>  -ID:/devel/emacs/libs/giflib-4.1.4-1/include
>  -ID:/devel/emacs/libs/jpeg-6b-4/include
>  -ID:/devel/emacs/libs/tiff-3.8.2-1/include
>  -ID:/devel/emacs/libs/gnutls-3.0.9/include'
                         ^^^^^^^^^^^^^^^^^^^^
As you see, your Emacs was built with GnuTLS support, you just need
the binaries and DLLs to be able to use that.  One place you can find
them is here

  http://sourceforge.net/projects/ezwinports/files/gnutls-3.0.9-w32-bin.zip/download





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 18:09 ` Eli Zaretskii
@ 2012-03-17 20:14   ` Uday S Reddy
  2012-03-27  0:11     ` Glenn Morris
  2012-03-17 21:31   ` Uday S Reddy
  1 sibling, 1 reply; 14+ messages in thread
From: Uday S Reddy @ 2012-03-17 20:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Uday S Reddy, 11037

The error trace isn't all that helpful, because I think the error message is
getting constructed from somewhere deeper using property lists.  In any
case, here it is:

Debugger entered--Lisp error: (error "Sending failed: Emacs does not support TLS, and no external `gnutls-cli' program was found")
  signal(error ("Sending failed: Emacs does not support TLS, and no external `gnutls-cli' program was found"))
  error("Sending failed: %s" "Emacs does not support TLS, and no external `gnutls-cli' program was found")
  (progn (error "Sending failed: %s" result))
  (if (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (progn (error "Sending failed: %s" result)))
  (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result))
  (if (not (null smtpmail-recipient-address-list)) (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result)) (error "Sending failed; no recipients"))
  (if (not smtpmail-queue-mail) (if (not (null smtpmail-recipient-address-list)) (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result)) (error "Sending failed; no recipients")) (let* ((file-data (expand-file-name (format "%s_%i" (format-time-string "%Y-%m-%d_%H:%M:%S") (setq smtpmail-queue-counter (1+ smtpmail-queue-counter))) smtpmail-queue-dir)) (file-data (convert-standard-filename file-data)) (file-elisp (concat file-data ".el")) (buffer-data (create-file-buffer file-data)) (buffer-elisp (create-file-buffer file-elisp)) (buffer-scratch "*queue-mail*")) (unless (file-exists-p smtpmail-queue-dir) (make-directory smtpmail-queue-dir t)) (with-current-buffer buffer-data (erase-buffer) (set-buffer-file-coding-system (coding-system-change-eol-conversion (or smtpmail-code-conv-from (quote undecided)) (quote unix)) nil t) (insert-buffer-substring tembuf) (write-file file-data) (set-buffer buffer-elisp) (erase-buffer) (insert (concat "(setq smtpmail-recipient-address-list '" (prin1-to-string smtpmail-recipient-address-list) ")\n")) (write-file file-elisp) (set-buffer (generate-new-buffer buffer-scratch)) (insert (concat file-data "\n")) (append-to-file (point-min) (point-max) (expand-file-name smtpmail-queue-index-file smtpmail-queue-dir))) (kill-buffer buffer-scratch) (kill-buffer buffer-data) (kill-buffer buffer-elisp)))
  (save-current-buffer (set-buffer tembuf) (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style (quote angles)) (insert "From: " fullname) (let (... ...) (goto-char fullname-start) (if ... ...)) (insert " <" login ">\n")) ((eq mail-from-style (quote parens)) (insert "From: " login " (") (let (...) (insert fullname) (let ... ... ... ... ...)) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style (quote angles)) (insert "From: " fullname) (let (... ...) (goto-char fullname-start) (if ... ...)) (insert " <" login ">\n")) ((eq mail-from-style (quote parens)) (insert "From: " login " (") (let (...) (insert fullname) (let ... ... ... ... ...)) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (unwind-protect (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style ...) (insert "From: " fullname) (let ... ... ...) (insert " <" login ">\n")) ((eq mail-from-style ...) (insert "From: " login " (") (let ... ... ...) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (let ((errbuf (if mail-interactive (generate-new-buffer " smtpmail errors") 0)) (tembuf (generate-new-buffer " smtpmail temp")) (case-fold-search nil) delimline result (mailbuf (current-buffer)) (smtpmail-mail-address (or (and mail-specify-envelope-from (mail-envelope-from)) (smtpmail-user-mail-address) (let ((from (mail-fetch-field "from"))) (and from (cadr (mail-extract-address-components from)))))) (smtpmail-code-conv-from (if enable-multibyte-characters (let ((sendmail-coding-system smtpmail-code-conv-from)) (select-message-coding-system))))) (unwind-protect (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= ... delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname ...)) (cond (... ... ... ...) (... ... ... ...) (... ...)))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  smtpmail-send-it()
  mail-send()
  vm-mail-send()
  vm-mail-send-and-exit(nil)
  call-interactively(vm-mail-send-and-exit nil nil)

You would probably need to reproduce the error to figure out where the
message is coming from.  The way to reproduce it is:

- to make sure that Emacs isn't able to use GnuTLS
- set smtpmail-stream-type to 'starttls
- invoke smtpmail on some message asking for starttls (I use smtp.gmail.com
on port 587).

On |Emacs 23.3, this would hang, because starttls.el would try SIGALRM which
Windows doesn't respond to.

But, on Emacs 24.0.94, it is coming back and giving an error message.  They
seem to, but the current behaviour was unexpected.

> Why is that needed?  Emacs supports linking against GnuTLS now,
> including on Windows (see below).  Can you use the built-in GnuTLS
> support instead of starttls?

I probably could.  But my interest is first in checking what Emacs is able
to deliver, because we end up having to spend enormous amounts of time in
answering queries from VM users about how to configure various things for
email servers.  The users who have been using starttls.el with Emacs23 will
assume that it will continue to work because the NEWS file says:

    **** smtpmail now uses encrypted connections (via STARTTLS) by default
    if the mail server supports them.  This uses either built-in GnuTLS
    support, or the starttls.el library.  Customize `smtpmail-stream-type'
    to change this.

Please feel free to get rid of starttls.el from here.  I wouldn't object.

> As you see, your Emacs was built with GnuTLS support, you just need
> the binaries and DLLs to be able to use that.  One place you can find
> them is here
> 
>   http://sourceforge.net/projects/ezwinports/files/gnutls-3.0.9-w32-bin.zip/download

Thanks.  I will try these binaries.

Cheers,
Uday

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 18:09 ` Eli Zaretskii
  2012-03-17 20:14   ` Uday S Reddy
@ 2012-03-17 21:31   ` Uday S Reddy
  2012-03-18  3:48     ` Eli Zaretskii
  1 sibling, 1 reply; 14+ messages in thread
From: Uday S Reddy @ 2012-03-17 21:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Uday S Reddy, 11037

Eli Zaretskii writes:

> As you see, your Emacs was built with GnuTLS support, you just need
> the binaries and DLLs to be able to use that.  One place you can find
> them is here
> 
>   http://sourceforge.net/projects/ezwinports/files/gnutls-3.0.9-w32-bin.zip/download
> 

I am sorry, Eli.  I downloaded the binaries.  But I have no idea how to get
Emacs to find them.

I have created d:/usr as you seemed to recommend, and put all the bin, lib,
include, and share subdirectories there.  I have put the bin directory on
exec-path.  locate-file says it is visible:

(locate-file "gnutls-cli.exe" exec-path)
"d:/usr/bin/gnutls-cli.exe"

But I get

(gnutls-available-p)
nil

I must be missing something.

Cheers,
Uday





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 21:31   ` Uday S Reddy
@ 2012-03-18  3:48     ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-03-18  3:48 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: 11037

> Date: Sat, 17 Mar 2012 21:31:41 +0000
> From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
> Cc: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>,
>     11037@debbugs.gnu.org
> 
> >   http://sourceforge.net/projects/ezwinports/files/gnutls-3.0.9-w32-bin.zip/download
> > 
> 
> I am sorry, Eli.  I downloaded the binaries.  But I have no idea how to get
> Emacs to find them.
> 
> I have created d:/usr as you seemed to recommend, and put all the bin, lib,
> include, and share subdirectories there.  I have put the bin directory on
> exec-path.

On PATH, not on exec-path.  And restart Emacs after that.

FWIW, I use those same binaries, and I get

  (gnutls-available-p)
  t

If the above doesn't help, step with a debugger through
init_gnutls_functions and see what goes wrong there.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 17:24 bug#11037: 24.0.94; gnutls-cli.exe program not found Uday S Reddy
  2012-03-17 18:09 ` Eli Zaretskii
@ 2012-03-22 18:33 ` Lars Magne Ingebrigtsen
  2012-03-22 20:16   ` Eli Zaretskii
  1 sibling, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-03-22 18:33 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: 11037

Uday S Reddy <u.s.reddy@cs.bham.ac.uk> writes:

> It has been known for some time that starttls.el's negotiation fails on
> Windows because Windows does not respond to SIGALRM requests.  Rob Davenport
> proposed a work-around in this post:
>
>   http://article.gmane.org/gmane.emacs.windows/3250

[...]

> Applying Rob Daverport's patches to starttls.el allowed the smtpmail to
> function fine.

Hopefully Emacs 24 will be distributed with the gnutls libraries on
Windows, so that Emacs users under Windows also get a fully functioning
emacs.

But I wonder why, er, the following:

> (signal-process (process-id process) 'SIGALRM)

> does not work with Win32 Emacs, even with Cygwin also installed.  But
> one can mimic that with:

> (call-process "c:\\cygwin\\bin\\kill.exe" nil nil nil
>                                      "-ALRM" (format "%d" (process-id process)))

If this is the case, then why not do something along these lines under
Windows?  That is, define `signal-process' (under Windows) to call the
external "kill.exe" program (if `signal-process' is broken under
Windows, as claimed), or fix `signal-process' to do whatever the
"kill.exe" program does?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-22 18:33 ` Lars Magne Ingebrigtsen
@ 2012-03-22 20:16   ` Eli Zaretskii
  2012-03-22 20:45     ` Uday S Reddy
  2012-03-22 21:05     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-03-22 20:16 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: u.s.reddy, 11037

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 22 Mar 2012 19:33:28 +0100
> Cc: 11037@debbugs.gnu.org
> 
> But I wonder why, er, the following:
> 
> > (signal-process (process-id process) 'SIGALRM)
> 
> > does not work with Win32 Emacs, even with Cygwin also installed.  But
> > one can mimic that with:
> 
> > (call-process "c:\\cygwin\\bin\\kill.exe" nil nil nil
> >                                      "-ALRM" (format "%d" (process-id process)))
> 
> If this is the case, then why not do something along these lines under
> Windows?  That is, define `signal-process' (under Windows) to call the
> external "kill.exe" program (if `signal-process' is broken under
> Windows, as claimed), or fix `signal-process' to do whatever the
> "kill.exe" program does?

Several reasons:

 . kill.exe is part of Cygwin, and won't exist on a Windows machine,
   unless Cygwin is installed.

 . there's no SIGALRM on Windows, so the only way this kill.exe could
   work is if it would send the signal to a Cygwin program (I guess
   gnutls-cli.exe was meant in the message which you cited).

IOW, all this can only work, and as a kludge at that, if a complete
Cygwin installation, including a Cygwin-built GnuTLS, were available
on the target machine.  Which is not really a good way of letting
users of the native Windows build of Emacs to have TLS.  Especially
now, that a built-in TLS is available and working, without any need
for such kludges.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-22 20:16   ` Eli Zaretskii
@ 2012-03-22 20:45     ` Uday S Reddy
  2012-03-23  8:01       ` Eli Zaretskii
  2012-03-22 21:05     ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Uday S Reddy @ 2012-03-22 20:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: u.s.reddy, Lars Magne Ingebrigtsen, 11037

Dear Eli,

I agree.

I can verify that putting your binary of gnutls on system PATH worked fine
with Emacs 24.  (It just occurred to me that I haven't tried putting Cygwin
gnutls on the system PATH, and I will try that as well.)

The basic bug report here was that Emacs couldn't find gnutls-cli.exe that
was available on exec-path.  That was simply based on my misunderstanding of
where it is supposed to be found.  Since the README.W32 file says that it
should be found during startup, it implies that it needs to be put on the
system PATH.

Perhaps all that you need to do in response to this bug report is to add a
line in README.W32 to the effect that the binaries should be on system PATH,
to help out other dimwits like me.

Cheers,
Uday





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-22 20:16   ` Eli Zaretskii
  2012-03-22 20:45     ` Uday S Reddy
@ 2012-03-22 21:05     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-03-22 21:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: u.s.reddy, 11037

Eli Zaretskii <eliz@gnu.org> writes:

>  . kill.exe is part of Cygwin, and won't exist on a Windows machine,
>    unless Cygwin is installed.
>
>  . there's no SIGALRM on Windows, so the only way this kill.exe could
>    work is if it would send the signal to a Cygwin program (I guess
>    gnutls-cli.exe was meant in the message which you cited).

I see.  So this is basically just relevant for a single program
(gnutls-cli), and using that program shouldn't be necessary in Emacs
24.  So I agree that there's not much point in doing anything here.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-22 20:45     ` Uday S Reddy
@ 2012-03-23  8:01       ` Eli Zaretskii
  2012-03-23  8:18         ` Uday S Reddy
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-03-23  8:01 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: larsi, 11037

> Date: Thu, 22 Mar 2012 20:45:40 +0000
> From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
> Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,
>     u.s.reddy@cs.bham.ac.uk,
>     11037@debbugs.gnu.org
> 
> I can verify that putting your binary of gnutls on system PATH worked fine
> with Emacs 24.

Great.

> The basic bug report here was that Emacs couldn't find gnutls-cli.exe that
> was available on exec-path.  That was simply based on my misunderstanding of
> where it is supposed to be found.  Since the README.W32 file says that it
> should be found during startup, it implies that it needs to be put on the
> system PATH.
> 
> Perhaps all that you need to do in response to this bug report is to add a
> line in README.W32 to the effect that the binaries should be on system PATH,
> to help out other dimwits like me.

I will add that, but please note that this is in no way specific to
Windows.  There's a subtle difference between exec-path and PATH, in
that exec-path is only used by Emacs's own code to find executables it
runs directly.  By contrast, PATH is used by external programs,
system-level APIs, and the OS features in general.  As an example, a
program invoked through shell-command and its ilk _must_ be on PATH,
because it's the shell that will look for it, not Emacs; Emacs only
looks for the shell itself.  Similarly, to load a dynamic library,
Emacs uses system APIs, which use PATH and not exec-path.

So if what you tried to accomplish needed either shell-command or
loaded a DLL, exec-path will not help.

(To keep your sanity, I suggest to always have exec-path derived from
PATH, and not modify exec-path inside Emacs so that it deviates from
PATH.)





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-23  8:01       ` Eli Zaretskii
@ 2012-03-23  8:18         ` Uday S Reddy
  2012-03-23  8:33           ` Eli Zaretskii
  2012-03-23 12:30           ` Stefan Monnier
  0 siblings, 2 replies; 14+ messages in thread
From: Uday S Reddy @ 2012-03-23  8:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Uday S Reddy, larsi, 11037

Eli Zaretskii writes:

> I will add that, but please note that this is in no way specific to
> Windows.

I know.  In retrospect, it is obvious that I should have used the system
PATH.  But, since we, the Cygwin users, have been used to having gnutls-cli
on the exec-path but not necessarily on the system PATH, a bit more
confusion is likely to arise in this case.

Cheers,
Uday





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-23  8:18         ` Uday S Reddy
@ 2012-03-23  8:33           ` Eli Zaretskii
  2012-03-23 12:30           ` Stefan Monnier
  1 sibling, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-03-23  8:33 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: larsi, 11037

> Date: Fri, 23 Mar 2012 08:18:38 +0000
> From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
> Cc: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>,
>     larsi@gnus.org,
>     11037@debbugs.gnu.org
> 
> the Cygwin users, have been used to having gnutls-cli on the
> exec-path but not necessarily on the system PATH

I know.  My point was that doing this gets you a tad closer to
insanity, and thus should be avoided.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-23  8:18         ` Uday S Reddy
  2012-03-23  8:33           ` Eli Zaretskii
@ 2012-03-23 12:30           ` Stefan Monnier
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2012-03-23 12:30 UTC (permalink / raw)
  To: Uday S Reddy; +Cc: 11037, larsi

>> I will add that, but please note that this is in no way specific to
>> Windows.
> I know.  In retrospect, it is obvious that I should have used the system
> PATH.  But, since we, the Cygwin users, have been used to having gnutls-cli
> on the exec-path but not necessarily on the system PATH, a bit more
> confusion is likely to arise in this case.

BTW, IIUC Emacs-24 does not use gnutls-cli, but the gnutls DLL instead.


        Stefan





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#11037: 24.0.94; gnutls-cli.exe program not found
  2012-03-17 20:14   ` Uday S Reddy
@ 2012-03-27  0:11     ` Glenn Morris
  0 siblings, 0 replies; 14+ messages in thread
From: Glenn Morris @ 2012-03-27  0:11 UTC (permalink / raw)
  To: 11037-done

Version: 24.0.95

The network-stream-open-starttls error message has been changed on MS
Windows, and that was the only part of this that was an Emacs issue.

http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00333.html





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-03-27  0:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-17 17:24 bug#11037: 24.0.94; gnutls-cli.exe program not found Uday S Reddy
2012-03-17 18:09 ` Eli Zaretskii
2012-03-17 20:14   ` Uday S Reddy
2012-03-27  0:11     ` Glenn Morris
2012-03-17 21:31   ` Uday S Reddy
2012-03-18  3:48     ` Eli Zaretskii
2012-03-22 18:33 ` Lars Magne Ingebrigtsen
2012-03-22 20:16   ` Eli Zaretskii
2012-03-22 20:45     ` Uday S Reddy
2012-03-23  8:01       ` Eli Zaretskii
2012-03-23  8:18         ` Uday S Reddy
2012-03-23  8:33           ` Eli Zaretskii
2012-03-23 12:30           ` Stefan Monnier
2012-03-22 21:05     ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).