unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7933: 23.2; rcirc-log-write goes berserk trying to write filenames containing * (windows)
@ 2011-01-28 18:47 Vagn Johansen
  2011-01-31  8:22 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Vagn Johansen @ 2011-01-28 18:47 UTC (permalink / raw)
  To: 7933


Problem 
-------

rcirc (M-x irc RET) goes berserk with a lot messages in *Messages*

rcirc-log-write: Opening output file: invalid argument, c:/Users/vagn/.emacs.d/rcirc-log/*irc.freenode.net* [30 times]
Mark saved where search started
rcirc-log-write: Opening output file: invalid argument, c:/Users/vagn/.emacs.d/rcirc-log/*irc.freenode.net* [130 times]

Reproduce
1) Enable logging (customize rcirc-log-flag)
2) M-x irc RET
3) go to the *irc.freenode.net* and fire off a dummy command
4) wait for rcirc to log to a file
5) rcirc now tries and fails to write a file with * in the name. This
fails on windows

I fixed it in my local installation by replacing * with _ (See below).


The problem is that rcirc-log-filename-function defaults to
rcirc-generate-new-buffer-name which constructs the server buffer name
via (concat "*" (process-name process) "*"). Buffer names are used as
file names.


(defun rcirc-log (process sender response target text)
  "Record line in `rcirc-log', to be later written to disk."
  (let ((filename 
         ;; --- fix ----
         (replace-regexp-in-string "\\*" "_" 
         (funcall rcirc-log-filename-function process target))
         ;; ------------
         ))
    (unless (null filename)
      (let ((cell (assoc-string filename rcirc-log-alist))
	    (line (concat (format-time-string rcirc-time-format)
			  (substring-no-properties
			   (rcirc-format-response-string process sender
							 response target text))
			  "\n")))
	(if cell
	    (setcdr cell (concat (cdr cell) line))
	  (setq rcirc-log-alist
		(cons (cons filename line) rcirc-log-alist)))))))


In GNU Emacs 23.2.1 (i386-mingw-nt6.1.7600)
 of 2010-05-08 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/xpm/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: DAN
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  show-paren-mode: t
  minibuffer-electric-default-mode: t
  iswitchb-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  which-function-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  tooltip-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-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> C-x <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> C-x C-r <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <return> C-=e5 u s 
e r . . j j s <down> <down> <up> <return> <next> <prior> 
<next> <prior> C-x b b a c <return> M-< <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> C-s e x t e n M-< 
<lwindow> C-x b C-g M-x e m a c s - s <tab> <M-backspace> 
<M-backspace> <M-backspace> s u b m <tab> <backspace> 
<tab> C-g M-x r e p o <tab> r <tab> <return> C-g C-x 
b m e <return> C-x r j t <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<left> C-a C-SPC <C-right> <C-right> <C-right> M-w 
M-x M-p <return>

Recent messages:
Open c:/Users/vagn/tempfile
Loading vc-svn...done

Mark set
Mark saved where search started
Mark set
Quit [2 times]
Making completion list...
Quit
Mark set

Load-path shadows:
~/site-lisp/org-mode/contrib/lisp/htmlize hides ~/setup/site-lisp/htmlize
~/setup/site-lisp/css-mode hides c:/tools/emacs-23.2/lisp/textmodes/css-mode
~/site-lisp/org-mode/lisp/org hides c:/tools/emacs-23.2/lisp/org/org
~/site-lisp/org-mode/lisp/org-xoxo hides c:/tools/emacs-23.2/lisp/org/org-xoxo
~/site-lisp/org-mode/lisp/org-wl hides c:/tools/emacs-23.2/lisp/org/org-wl
~/site-lisp/org-mode/lisp/org-w3m hides c:/tools/emacs-23.2/lisp/org/org-w3m
~/site-lisp/org-mode/lisp/org-vm hides c:/tools/emacs-23.2/lisp/org/org-vm
~/site-lisp/org-mode/lisp/org-timer hides c:/tools/emacs-23.2/lisp/org/org-timer
~/site-lisp/org-mode/lisp/org-table hides c:/tools/emacs-23.2/lisp/org/org-table
~/site-lisp/org-mode/lisp/org-src hides c:/tools/emacs-23.2/lisp/org/org-src
~/site-lisp/org-mode/lisp/org-rmail hides c:/tools/emacs-23.2/lisp/org/org-rmail
~/site-lisp/org-mode/lisp/org-remember hides c:/tools/emacs-23.2/lisp/org/org-remember
~/site-lisp/org-mode/lisp/org-publish hides c:/tools/emacs-23.2/lisp/org/org-publish
~/site-lisp/org-mode/lisp/org-protocol hides c:/tools/emacs-23.2/lisp/org/org-protocol
~/site-lisp/org-mode/lisp/org-plot hides c:/tools/emacs-23.2/lisp/org/org-plot
~/site-lisp/org-mode/lisp/org-mouse hides c:/tools/emacs-23.2/lisp/org/org-mouse
~/site-lisp/org-mode/lisp/org-mobile hides c:/tools/emacs-23.2/lisp/org/org-mobile
~/site-lisp/org-mode/lisp/org-mhe hides c:/tools/emacs-23.2/lisp/org/org-mhe
~/site-lisp/org-mode/lisp/org-mew hides c:/tools/emacs-23.2/lisp/org/org-mew
~/site-lisp/org-mode/lisp/org-macs hides c:/tools/emacs-23.2/lisp/org/org-macs
~/site-lisp/org-mode/lisp/org-mac-message hides c:/tools/emacs-23.2/lisp/org/org-mac-message
~/site-lisp/org-mode/lisp/org-list hides c:/tools/emacs-23.2/lisp/org/org-list
~/site-lisp/org-mode/lisp/org-latex hides c:/tools/emacs-23.2/lisp/org/org-latex
~/site-lisp/org-mode/lisp/org-jsinfo hides c:/tools/emacs-23.2/lisp/org/org-jsinfo
~/site-lisp/org-mode/lisp/org-irc hides c:/tools/emacs-23.2/lisp/org/org-irc
~/site-lisp/org-mode/lisp/org-install hides c:/tools/emacs-23.2/lisp/org/org-install
~/site-lisp/org-mode/lisp/org-inlinetask hides c:/tools/emacs-23.2/lisp/org/org-inlinetask
~/site-lisp/org-mode/lisp/org-info hides c:/tools/emacs-23.2/lisp/org/org-info
~/site-lisp/org-mode/lisp/org-indent hides c:/tools/emacs-23.2/lisp/org/org-indent
~/site-lisp/org-mode/lisp/org-id hides c:/tools/emacs-23.2/lisp/org/org-id
~/site-lisp/org-mode/lisp/org-icalendar hides c:/tools/emacs-23.2/lisp/org/org-icalendar
~/site-lisp/org-mode/lisp/org-html hides c:/tools/emacs-23.2/lisp/org/org-html
~/site-lisp/org-mode/lisp/org-habit hides c:/tools/emacs-23.2/lisp/org/org-habit
~/site-lisp/org-mode/lisp/org-gnus hides c:/tools/emacs-23.2/lisp/org/org-gnus
~/site-lisp/org-mode/lisp/org-freemind hides c:/tools/emacs-23.2/lisp/org/org-freemind
~/site-lisp/org-mode/lisp/org-footnote hides c:/tools/emacs-23.2/lisp/org/org-footnote
~/site-lisp/org-mode/lisp/org-feed hides c:/tools/emacs-23.2/lisp/org/org-feed
~/site-lisp/org-mode/lisp/org-faces hides c:/tools/emacs-23.2/lisp/org/org-faces
~/site-lisp/org-mode/lisp/org-exp hides c:/tools/emacs-23.2/lisp/org/org-exp
~/site-lisp/org-mode/lisp/org-exp-blocks hides c:/tools/emacs-23.2/lisp/org/org-exp-blocks
~/site-lisp/org-mode/lisp/org-docbook hides c:/tools/emacs-23.2/lisp/org/org-docbook
~/site-lisp/org-mode/lisp/org-datetree hides c:/tools/emacs-23.2/lisp/org/org-datetree
~/site-lisp/org-mode/lisp/org-crypt hides c:/tools/emacs-23.2/lisp/org/org-crypt
~/site-lisp/org-mode/lisp/org-compat hides c:/tools/emacs-23.2/lisp/org/org-compat
~/site-lisp/org-mode/lisp/org-colview hides c:/tools/emacs-23.2/lisp/org/org-colview
~/site-lisp/org-mode/lisp/org-clock hides c:/tools/emacs-23.2/lisp/org/org-clock
~/site-lisp/org-mode/lisp/org-bibtex hides c:/tools/emacs-23.2/lisp/org/org-bibtex
~/site-lisp/org-mode/lisp/org-bbdb hides c:/tools/emacs-23.2/lisp/org/org-bbdb
~/site-lisp/org-mode/lisp/org-attach hides c:/tools/emacs-23.2/lisp/org/org-attach
~/site-lisp/org-mode/lisp/org-ascii hides c:/tools/emacs-23.2/lisp/org/org-ascii
~/site-lisp/org-mode/lisp/org-archive hides c:/tools/emacs-23.2/lisp/org/org-archive
~/site-lisp/org-mode/lisp/org-agenda hides c:/tools/emacs-23.2/lisp/org/org-agenda
~/setup/site-lisp/nnir hides c:/tools/emacs-23.2/lisp/gnus/nnir
~/setup/site-lisp/pulse hides c:/tools/emacs-23.2/lisp/cedet/pulse

Features:
(shadow sort mail-extr warnings emacsbug help-mode view multi-isearch
vc-dispatcher vc-svn js2-mode js2-indent js2-parse js2-browse
js2-highlight js2-ast js2-messages js2-scan js2-util js2-vars cc-langs
paren gnus gnus-ems cus-start cus-load server vj-complete-elisp
vj-complete-util vj-complete vj-complete-completion-ui completion-ui
vps dired-x dired-aux etags html-script tempo flyspell ispell
lang-info auto-recompile csharp-mode cc-mode cc-fonts cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs vj-grep vj-util
anything-config rx thingatpt anything fold-dwim hideshow noutline
outline minibuf-eldef message ecomplete rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp
ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils mailheader
canlock sha1 hex-util hashcash mail-utils iswitchb generic-x stripes
stripes-mode ffap filecache code-keywords smart-compile
color-file-completion vj-add-missing-includes vj-hl xml-indent
sgml-mode psvn cl cl-19 log-edit pcvs-util add-log diff-mode
easy-mmode filladapt uniquify compile time appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs find-func hi-lock
which-func imenu edmacro kmacro ange-ftp tramp-imap assoc tramp-gw
tramp-fish tramp-cache tramp-ftp tramp-cmds tramp auth-source
gnus-util netrc time-date advice help-fns advice-preload shell comint
ring password-cache format-spec tramp-compat trampver recentf
tree-widget wid-edit easymenu dired regexp-opt 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)

-- 
Vagn Johansen





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

end of thread, other threads:[~2011-01-31 23:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 18:47 bug#7933: 23.2; rcirc-log-write goes berserk trying to write filenames containing * (windows) Vagn Johansen
2011-01-31  8:22 ` Glenn Morris
2011-01-31 15:28   ` Deniz Dogan
2011-01-31 23:11   ` Chong Yidong
2011-01-31 23:22     ` Glenn Morris
2011-01-31 23:13   ` Chong Yidong

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).