aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-05-05 20:50:51 -0700
committerGlenn Morris2014-05-05 20:50:51 -0700
commit088e020172e7cdbf75a94ab13a147ff9bb1dd7b4 (patch)
tree253a81e0c93c7243d9aca2fa55b2a13bda9d6d50
parentbf67c3f7ef0260eaf31ec301f8ba3c87809bd076 (diff)
downloademacs-088e020172e7cdbf75a94ab13a147ff9bb1dd7b4.tar.gz
emacs-088e020172e7cdbf75a94ab13a147ff9bb1dd7b4.zip
* gnus-fun.el (gnus-grab-cam-face): Do not use predictable temp-file name.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-fun.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 00dbf131880..5c490c4b07a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12014-05-06 Glenn Morris <rgm@gnu.org>
2
3 * gnus-fun.el (gnus-grab-cam-face):
4 Do not use predictable temp-file name. (http://bugs.debian.org/747100)
5
12014-05-01 Glenn Morris <rgm@gnu.org> 62014-05-01 Glenn Morris <rgm@gnu.org>
2 7
3 * gnus-registry.el (gnus-registry-install-p): Doc fix. 8 * gnus-registry.el (gnus-registry-install-p): Doc fix.
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 50076821a8d..28c6a4d3312 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -250,20 +250,21 @@ colors of the displayed X-Faces."
250 (interactive) 250 (interactive)
251 (shell-command "xawtv-remote snap ppm") 251 (shell-command "xawtv-remote snap ppm")
252 (let ((file nil) 252 (let ((file nil)
253 (tempfile (make-temp-file "gnus-face-" nil ".ppm"))
253 result) 254 result)
254 (while (null (setq file (directory-files "/tftpboot/sparky/tmp" 255 (while (null (setq file (directory-files "/tftpboot/sparky/tmp"
255 t "snap.*ppm"))) 256 t "snap.*ppm")))
256 (sleep-for 1)) 257 (sleep-for 1))
257 (setq file (car file)) 258 (setq file (car file))
258 (shell-command 259 (shell-command
259 (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm > /tmp/gnus.face.ppm" 260 (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm >> %s"
260 file)) 261 file tempfile))
261 (let ((gnus-convert-image-to-face-command 262 (let ((gnus-convert-image-to-face-command
262 (format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng" 263 (format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng"
263 (gnus-fun-ppm-change-string)))) 264 (gnus-fun-ppm-change-string))))
264 (setq result (gnus-face-from-file "/tmp/gnus.face.ppm"))) 265 (setq result (gnus-face-from-file tempfile)))
265 (delete-file file) 266 (delete-file file)
266 ;;(delete-file "/tmp/gnus.face.ppm") 267 ;;(delete-file tempfile) ; FIXME why are we not deleting it?!
267 result)) 268 result))
268 269
269(defun gnus-fun-ppm-change-string () 270(defun gnus-fun-ppm-change-string ()