Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-score-edit-current-scores does not use nnheader-translate-file-chars properly
@ 2001-07-19 15:00 Steven E. Harris
  0 siblings, 0 replies; only message in thread
From: Steven E. Harris @ 2001-07-19 15:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

[I tried sending the following message twice to bugs@gnus.org, but
it's come back twice as undeliverable.

After having applied the noted patch below, I'm seeing bad interaction
with groups that share the same score file. Emacs warns that the score
buffer changed on disk (Do you really want to save?) when I exit
different groups that use the same score file. This always worked fine
on Unix/Linux systems that didn't require this filename translation.]


[-- Attachment #2: Type: message/rfc822, Size: 9427 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 1638 bytes --]

Gnus v5.8.8
XEmacs 21.4 (patch 3) "Academic Rigor" [Lucid] (i686-pc-cygwin) of Thu May 17 2001 on SHALOM
200 Powered by Typhoon -- http://www.highwind.com/ (Typhoon v1.2.3)

When running on Windows NT, Gnus properly translates would-be score
file characters such as '+' to '-' to arrive at a filename usable to
the operating system. For example, "c++.SCORE" becomes "c--.SCORE" on
disk. However, gnus-score-edit-current-scores (V e in Summary Buffer)
fails to use nnheader-translate-file-chars to prepare the correct
filename when preparing its score editing buffer. Rather than finding
and allowing the user to edit, say, "c--.SCORE," the user starts to
edit "c++.SCORE," which will be empty since all previous score entries
were put into "c--.SCORE."

The problem can be fixed by using nnheader-translate-file-chars to
translate the "file" argument to gnus-score-edit-current-score, as
shown here:


--- /usr/local/lib/xemacs/xemacs-packages/lisp/gnus/gnus-score.el       Wed Jan 3 21:16:02 2001
+++ ./gnus-score.el     Wed Jul 18 10:36:38 2001
@@ -1061,7 +1061,8 @@
   (interactive (list gnus-current-score-file))
   (if (not gnus-current-score-file)
       (error "No current score file")
-    (let ((winconf (current-window-configuration)))
+    (let ((winconf (current-window-configuration))
+         (file (nnheader-translate-file-chars file)))
       (when (buffer-name gnus-summary-buffer)
        (gnus-score-save))
       (gnus-make-directory (file-name-directory file))


There may be other functions effected similarly by these translation
oddities, so this function may not be the best or only place to apply
the remedy.



[-- Attachment #2.1.2: User settings --]
[-- Type: application/x-emacs-lisp, Size: 7072 bytes --]

[-- Attachment #2.1.3: Type: text/plain, Size: 87 bytes --]

-- 
Steven E. Harris        :: seh@speakeasy.org
GnuPG                   :: 0x70248E67

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]



-- 
Steven E. Harris

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-19 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-19 15:00 gnus-score-edit-current-scores does not use nnheader-translate-file-chars properly Steven E. Harris

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 NNTP newsgroup(s).