From: Adrian A. <ad...@xe...> - 2004-12-13 18:29:41
|
Hoan Ton-That <ho...@to...> writes: > Hello, > > If `erc-log-channels-directory' is set to a directory which contains > uppercase characters then logging will not work. The function > `erc-current-logfile' downcases everything including the directory > part. The following simple patch fixes this bug. Hello Hoan, that explains the first hunk of your patch. Why are you throwing out all these occurences of expand-file-name in other functions which produce file paths based on erc-log-channels-directory ? Adrian > > > --- erc-log.el~ 2004-12-13 21:08:44.000000000 +1100 > +++ erc-log.el 2004-12-13 21:08:04.000000000 +1100 > @@ -269,20 +269,19 @@ > If BUFFER is nil, the value of `current-buffer' is used. > This is determined by `erc-generate-log-file-name-function'. > The result is converted to lowercase, as IRC is case-insensitive" > - (downcase (expand-file-name > - (funcall erc-generate-log-file-name-function > + (expand-file-name > + (downcase (funcall erc-generate-log-file-name-function > (or buffer (current-buffer)) > (or (erc-default-target) (buffer-name buffer)) > (erc-current-nick) > - erc-session-server erc-session-port)))) > - > + erc-session-server erc-session-port)) > + erc-log-channels-directory)) > + > (defun erc-generate-log-file-name-with-date (buffer &rest ignore) > "This function computes a short log file name. > The name of the log file is composed of BUFFER and the current date. > This function is a possible value for `erc-generate-log-file-name-function'." > - (expand-file-name > - (concat (buffer-name buffer) "-" (format-time-string "%Y-%m-%d") ".txt") > - erc-log-channels-directory)) > + (concat (buffer-name buffer) "-" (format-time-string "%Y-%m-%d") ".txt")) > > (defun erc-generate-log-file-name-short (buffer &rest ignore) > "This function computes a short log file name. > @@ -290,8 +289,7 @@ > you can affect that using `rename-buffer' and the-like. This > function is a possible value for > `erc-generate-log-file-name-function'." > - (expand-file-name (concat (buffer-name buffer) ".txt") > - erc-log-channels-directory)) > + (concat (buffer-name buffer) ".txt")) > > (defun erc-generate-log-file-name-long (buffer target nick server port) > "Generates a log-file name in the way ERC always did it. > @@ -303,8 +301,7 @@ > ((numberp port) > (number-to-string port))) ".txt"))) > ;; we need a make-safe-file-name function. > - (expand-file-name (convert-standard-filename file) > - erc-log-channels-directory))) > + (convert-standard-filename file))) > > ;;;###autoload > (defun erc-save-buffer-in-logs (&optional buffer) -- Adrian Aichner mailto:ad...@xe... http://www.xemacs.org/ |