* bug#7588: smtpmail: wrong file name for queued mail on Windows
@ 2010-12-07 23:26 Vida Gábor
2010-12-08 3:32 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Vida Gábor @ 2010-12-07 23:26 UTC (permalink / raw
To: 7588
Hi!
I've already sent this bug to help-emacs-windows (as advised by M-x
report-emacs-bug in Windows port of "GNU Emacs 23.1.50.1
(i386-mingw-nt6.0.6001) of 2009-11-04 on LENNART-69DE564 (patched)"),
but I think that is not the best place, so do I report it here.
[h-e-w] 23.1.50; smtpmail: wrong file name for queued mail
From: Gábor Vida
Subject: [h-e-w] 23.1.50; smtpmail: wrong file name for queued mail
Date: Sat, 25 Sep 2010 23:51:41 +0200
Hi!
I set smtpmail to queue the mails (and so save them to disk) before I
can send them (setq smtpmail-queue-mail t).
When I'm ready with the mail, smtpmail-send-it is called and it tries to
save the mail to disk using a file name like
`2010-09-25_22:12:32_6'. The results is:
Saving file
c:/home/evidgbo/config/emacs.d/queued-mails/2010-09-25_23:45:56_13...
basic-save-buffer-2: Opening output file: invalid argument,
c:/home/evidgbo/config/emacs.d/queued-mails/2010-09-25_23:45:56_13
If I change the format string that is used to create the file name
string in function smtpmail-send-it, and replace every `:' with e.g.
underscores, this problem disapears. I guess this is because on Windows
colon in filenames clashes with the absolute file names like
drive:\dir\to\file.
I run Emacs from Cygwin.
Thanks and regards,
Gábor
This is a bug report for the PATCHED Emacs+EmacsW32.
Please test the unpatched version of Emacs+EmacsW32 before reporting
if you can. If the bug is also in the unpatched version then
report from the unpatched version else report here.
If it is very inconvenient for you to try the unpatched version,
but you believe the bug is not related to the patches then you
may change the address above to address@hidden
For easy to read information about the patches see EmacsW32 home
page.
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the address@hidden mailing list.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug. If you can, give
a recipe starting from `emacs -Q':
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
c:/Program Files/Emacs/emacs/etc/DEBUG.
In GNU Emacs 23.1.50.1 (i386-mingw-nt6.0.6001)
of 2009-11-04 on LENNART-69DE564 (patched)
Windowing system distributor `Microsoft Corp.', version 6.0.6001
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/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: C.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default enable-multibyte-characters: t
Major mode: Summary
Minor modes in effect:
gnus-mailing-list-mode: t
minibuffer-depth-indicate-mode: t
icicle-mode: t
display-time-mode: t
pretty-control-l-mode: t
delete-selection-mode: t
shell-dirtrack-mode: t
which-function-mode: t
show-paren-mode: t
hl-line-mode: t
tooltip-mode: t
mouse-wheel-mode: t
noticeable-minibuffer-prompts-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-l C-n C-n C-n C-n C-n C-n C-n C-n SPC SPC M-F C-x
C-f ~ / a l m a : f a <return> <return> <return> e
<return> <return> <return> e <return> <return> e <return>
C-x C-s C-x C-f a l m a : f a : f a <return> a u a
o u <return> a e u <return> C-x C-s C-g <help-echo>
SPC M-B SPC M-x b u g <tab> <S-tab> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> C-a C-k b u g <S-tab>
C-n M-F C-g M-B C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
M-F M-x r e p o r t - e m a c s - b u <tab> <return>
s m t p m a i l SPC q u e d <backspace> <backspace>
<backspace> <backspace> <backspace> : SPC q u e u e
d SPC m a i l M-b M-b M-b M-f M-f M-b w o <backspace>
r o n g SPC f i l e SPC n a m e SPC f o r SPC <return>
M-< C-n C-n C-c C-k y M-x s m t p m a <tab> C-g M-x
s C-g C-g M-x s e t - v a r <tab> <return> s m p <backspace>
t p m a <tab> q u <tab> d <backspace> <tab> m <tab>
<return> n i l <return> C-z 0 C-n C-n C-p C-c C-k y
C-g C-g C-n C-p C-n C-x b * G r <tab> <return> C-n
C-n C-n <return> M-x r e p o r t - e m a <tab> <re
turn>
Recent messages:
Remove the backup file too? (y or n)
Quit [2 times]
Computing completion candidates...
Retrieving newsgroup: nnimap+nedu:incoming...
nnimap: Updating info for nnimap+nedu:incoming...done
Fetching headers for nnimap+nedu:incoming...
Unknown charset: unknown
Fetching headers for nnimap+nedu:incoming...done
Generating summary...done
Computing completion candidates...
Load-path shadows:
~/config/emacs.d/elisp/apel/timezone hides c:/Program
Files/Emacs/emacs/lisp/timezone
~/config/emacs.d/elisp/apel/env hides c:/Program Files/Emacs/emacs/lisp/env
c:/Program Files/Emacs/EmacsW32/nxhtml/util/chart hides c:/Program
Files/Emacs/emacs/lisp/emacs-lisp/chart
Features:
(shadow emacsbug debug smiley gnus-async gnus-bcklg goto-addr vc-cvs
noutline outline cl-specs edebug mule-diag newcomment multi-isearch
windmove time-stamp mailalias sort bbdb-gui gnus-cite face-remap
parse-time gnus-ml gnus-topic nnfolder utf-7 utf7 nnimap nndraft nnmh
bbdb-gnus bbdb-snarf mail-extr bbdb-com nnagent nnml gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 pgg pgg-parse pgg-def mm-view smime dig gnus-cache gnus-sum
gnus-demon nntp gnus-group gnus-undo nnmail mail-source nnoo gnus-start
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems mb-depth two-column
bookmark pp icicles icicles-mode icicles-cmd2 yow cookie1 etags
icicles-cmd1 icicles-mcmd help-mode view icicles-fn icicles-mac
icicles-var icicles-opt icicles-face hexrgb time google-maps
google-maps-static google-maps-geocode google-maps-base json
bbdb-autoloads bbdb hidesearch hide-lines jabber-autoloads tramp-imap
epa epg epg-config imap-hash imap message ecomplete rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 qp
ietf-drums mailabbrev nnheader gmm-utils mailheader canlock sha1
hex-util hashcash mail-utils assoc tramp-gw tramp-fish tramp-cache
tramp-ftp tramp-cmds tramp auth-source gnus-util netrc time-date
password-cache format-spec tramp-compat trampver traverselisp grep-a-lot
grep+ compile+ compile- uniquify byte-opt hexview-mode htmlize
auto-install thingatpt bytecomp byte-compile smtpmail sendmail
modeline-posn shebang pp-c-l buff-menu+ delsel irfc muse-html
muse-xml-common pcomplete cus-edit cus-start muse-publish muse-project
muse-protocols info muse-regexps derived muse muse-nested-tags muse-mode
google winner filecache multi-term term ehelp elscreen-server
elscreen-w3m mule-util alist elscreen multi-shell edmacro kmacro
ansi-color shell type-break sunrise-commander advice help-fns
advice-preload dired-x dired-aux dired w3m-load url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-util
url-parse timezone pym static apel-ver product url-vars mm-util
mail-prsvr mailcap esense-start erlang regexp-opt erlang-start
whitespace which-func imenu paren hl-line+ hl-line avoid ffap memo-pop
fixme-mode saveplace vc-dispatcher vc-svn emacsw32 find-func w32-meta
menuacc tmm electric w32-integ w32shell w32-grep grep compile comint
ring rebind ourcomments-widgets new-key-seq-widget wid-edit hfyview
easy-mmode easymenu htmlfontify cl cl-19 noprint nxhtml-loader
emacsw32-eol 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
mldrag 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 button minibuffer faces cus-face text-properties overlay md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-07 23:26 bug#7588: smtpmail: wrong file name for queued mail on Windows Vida Gábor
@ 2010-12-08 3:32 ` Glenn Morris
2010-12-08 14:56 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2010-12-08 3:32 UTC (permalink / raw
To: 7588-done
Version: 23.3
Thanks; fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 3:32 ` Glenn Morris
@ 2010-12-08 14:56 ` Eli Zaretskii
2010-12-08 19:31 ` Glenn Morris
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Eli Zaretskii @ 2010-12-08 14:56 UTC (permalink / raw
To: Glenn Morris, Vida Gábor; +Cc: 7588
> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 07 Dec 2010 22:32:16 -0500
> Cc:
>
> Version: 23.3
>
> Thanks; fixed.
Thanks, but I don't understand why is such a fix needed. The code in
question (unless I'm missing something) did this:
(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))
The call to convert-standard-filename should, on MS-Windows, replace
all characters invalid in a file name with a `!'. I just tried that
now, on Windows, and it did precisely that.
To the OP: could you please see why this code didn't DTRT for you in
the first place? According to the bug report, you are using a version
of Emacs post 23.1, and I just verified that 23.1 as released does
have the above fragment.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 14:56 ` Eli Zaretskii
@ 2010-12-08 19:31 ` Glenn Morris
2010-12-08 21:23 ` Eli Zaretskii
2010-12-08 22:10 ` Vida Gábor
2010-12-09 12:24 ` Jason Rumney
2 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2010-12-08 19:31 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Vida Gábor, 7588
Eli Zaretskii wrote:
> Thanks, but I don't understand why is such a fix needed.
Oh, sorry, I don't use MS Windows. Feel free to revert this.
> (file-data (convert-standard-filename file-data))
I missed that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 19:31 ` Glenn Morris
@ 2010-12-08 21:23 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2010-12-08 21:23 UTC (permalink / raw
To: Glenn Morris; +Cc: vidagabor, 7588
> Cc: Vida =?iso-8859-1?Q?G=E1bor?= <vidagabor@gmail.com>,
> 7588@debbugs.gnu.org
> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 08 Dec 2010 14:31:39 -0500
>
> Eli Zaretskii wrote:
>
> > Thanks, but I don't understand why is such a fix needed.
>
> Oh, sorry, I don't use MS Windows.
No sweat.
> Feel free to revert this.
As soon as I understand why the existing code didn't work for the OP.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 14:56 ` Eli Zaretskii
2010-12-08 19:31 ` Glenn Morris
@ 2010-12-08 22:10 ` Vida Gábor
2010-12-08 22:39 ` Eli Zaretskii
2010-12-09 12:24 ` Jason Rumney
2 siblings, 1 reply; 10+ messages in thread
From: Vida Gábor @ 2010-12-08 22:10 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 7588
Hi!
When I start Emacs without loading my init.el, convert-standard-filename
is loaded from w32-fns.el. Then I use an auxiliary package
hexview-mode.el that loads files.el by (load-library "files"). After
this, convert-standard-filename is redefined from files.el with this
function body:
(if (eq system-type 'cygwin)
(let ((name (copy-sequence filename))
(start 0))
;; Replace invalid filename characters with !
(while (string-match "[?*:<>|\"\000-\037]" name start)
(aset name (match-beginning 0) ?!)
(setq start (match-end 0)))
name)
filename)
system-type for me is windows-nt hence the conversion is not
performed. Without load of files.el, the problem reported in this bug
report disappears.
Once again I want to say (don't know if it is important or not) that I
use Emacs W32 downloaded from http://ourcomments.org/Emacs/EmacsW32.html
and not the one that is part of Cygwin, but I start it from within a
Cygwin shell (to use its environment), and this may cause that the
system-type is not cygwin but windows-nt.
Thanks and regards,
Gábor
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 22:10 ` Vida Gábor
@ 2010-12-08 22:39 ` Eli Zaretskii
2010-12-09 19:14 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2010-12-08 22:39 UTC (permalink / raw
To: Vida Gábor; +Cc: 7588
> Date: Wed, 08 Dec 2010 23:10:40 +0100
> From: Vida Gábor <vidagabor@gmail.com>
> Cc: Glenn Morris <rgm@gnu.org>, 7588@debbugs.gnu.org
>
> When I start Emacs without loading my init.el, convert-standard-filename
> is loaded from w32-fns.el. Then I use an auxiliary package
> hexview-mode.el that loads files.el by (load-library "files"). After
> this, convert-standard-filename is redefined from files.el with this
> function body:
Now everything is clear. This is a bug in hexview-mode.el: reloading
files.elc is not a transparent action on MS-Windows, because doing so
removes some redefinition of functions necessary for the Windows port
of Emacs. convert-standard-filename is just one of those functions;
there are others.
I suggest to report this as a bug to the maintainers of
hexview-mode.el. At the very least, if they must re-load files.el,
they should on Windows after that re-load w32-fns.el and ls-lisp.el.
Preferably, hexview-mode.el should not re-load files.el at all.
> Once again I want to say (don't know if it is important or not) that I
> use Emacs W32 downloaded from http://ourcomments.org/Emacs/EmacsW32.html
> and not the one that is part of Cygwin, but I start it from within a
> Cygwin shell (to use its environment), and this may cause that the
> system-type is not cygwin but windows-nt.
system-type does not depend on the shell from which you invoke Emacs.
It depends on how your Emacs binary was built. EmacsW32 is a native
Windows build, so its value of system-type should be windows-nt, no
matter what shell was used to launch it.
I will revert the changes made by Glenn in a day or two.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 14:56 ` Eli Zaretskii
2010-12-08 19:31 ` Glenn Morris
2010-12-08 22:10 ` Vida Gábor
@ 2010-12-09 12:24 ` Jason Rumney
2010-12-09 14:16 ` Eli Zaretskii
2 siblings, 1 reply; 10+ messages in thread
From: Jason Rumney @ 2010-12-09 12:24 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Vida Gábor, 7588
Eli Zaretskii <eliz@gnu.org> writes:
> The call to convert-standard-filename should, on MS-Windows, replace
> all characters invalid in a file name with a `!'. I just tried that
> now, on Windows, and it did precisely that.
The OP said he was using Cygwin. Perhaps the real bug is that
convert-standard-filename does not DTRT in Cygwin builds.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-09 12:24 ` Jason Rumney
@ 2010-12-09 14:16 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2010-12-09 14:16 UTC (permalink / raw
To: Jason Rumney; +Cc: vidagabor, 7588
> From: Jason Rumney <jasonr@gnu.org>
> Cc: Glenn Morris <rgm@gnu.org>, Vida =?utf-8?Q?G=C3=A1bor?=
> <vidagabor@gmail.com>, 7588@debbugs.gnu.org
> Date: Thu, 09 Dec 2010 20:24:34 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > The call to convert-standard-filename should, on MS-Windows, replace
> > all characters invalid in a file name with a `!'. I just tried that
> > now, on Windows, and it did precisely that.
>
> The OP said he was using Cygwin.
No, he said he was invoking from the Cygwin shell Lennart's EmacsW32.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7588: smtpmail: wrong file name for queued mail on Windows
2010-12-08 22:39 ` Eli Zaretskii
@ 2010-12-09 19:14 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2010-12-09 19:14 UTC (permalink / raw
To: vidagabor, 7588
> Date: Thu, 09 Dec 2010 00:39:30 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 7588@debbugs.gnu.org
>
> I will revert the changes made by Glenn in a day or two.
I see that Glenn already reverted it.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-12-09 19:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 23:26 bug#7588: smtpmail: wrong file name for queued mail on Windows Vida Gábor
2010-12-08 3:32 ` Glenn Morris
2010-12-08 14:56 ` Eli Zaretskii
2010-12-08 19:31 ` Glenn Morris
2010-12-08 21:23 ` Eli Zaretskii
2010-12-08 22:10 ` Vida Gábor
2010-12-08 22:39 ` Eli Zaretskii
2010-12-09 19:14 ` Eli Zaretskii
2010-12-09 12:24 ` Jason Rumney
2010-12-09 14:16 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.