GNU bug report logs - #5338
[PATCH] Make a new fortune dat file in compile time if dat file not exist

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Fri, 8 Jan 2010 10:13:02 UTC

Severity: minor

Tags: patch

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Glenn Morris <rgm <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#5338: closed ([PATCH] Make a new fortune dat file in compile
 time if dat file not  exist)
Date: Wed, 13 Feb 2013 08:13:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 13 Feb 2013 03:11:52 -0500
with message-id <gcr4kkvdiv.fsf <at> fencepost.gnu.org>
and subject line Re: bug#5338: [PATCH] Make a new fortune dat file in compile time if dat file not exist
has caused the debbugs.gnu.org bug report #5338,
regarding [PATCH] Make a new fortune dat file in compile time if dat file not  exist
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
5338: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5338
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juanma Barranquero <lekktu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Make a new fortune dat file in compile time if dat file not 
	exist
Date: Fri, 8 Jan 2010 11:12:25 +0100
Package: emacs
Severity: minor
tags: patch
X-Debbugs-CC: Kirill A. Korinskiy <catap <at> catap.ru>


---------- Forwarded message ----------
From: Kirill A. Korinskiy <catap <at> catap.ru>
Date: Fri, Jan 8, 2010 at 03:20
Subject: [PATCH] Make a new fortune dat file in compile time if dat
file not exist
To: emacs-devel <at> gnu.org
Cc: "Kirill A. Korinskiy" <catap <at> catap.ru>


---
 lisp/play/fortune.el |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el
index 3b895c7..0f92085 100644
--- a/lisp/play/fortune.el
+++ b/lisp/play/fortune.el
@@ -245,15 +245,21 @@ the value of `fortune-file'.  This currently
cannot handle directories."
  (let* ((fortune-file (expand-file-name (substitute-in-file-name file)))
        (fortune-dat (expand-file-name
                      (substitute-in-file-name
-                       (concat fortune-file fortune-database-extension)))))
-  (cond ((file-exists-p fortune-file)
-        (if (file-exists-p fortune-dat)
-            (cond ((file-newer-than-file-p fortune-file fortune-dat)
-                   (message "Compiling new fortune database %s" fortune-dat)
-                   (shell-command
-                    (concat fortune-strfile fortune-strfile-options
-                            " " fortune-file
fortune-quiet-strfile-options))))))
-       (t (error "Can't compile fortune file %s" fortune-file)))))
+                       (concat fortune-file fortune-database-extension))))
+        (fortune-file-exist (file-exists-p fortune-file))
+        (fortune-dat-exist (file-exists-p fortune-dat))
+        (fortune-file-newer (file-newer-than-file-p
+                             fortune-file fortune-dat)))
+    (cond
+     (fortune-file-exist
+      (if (or (not fortune-dat-exist)
+             (and fortune-dat-exist
+                  fortune-file-newer))
+         (message "Compiling new fortune database %s" fortune-dat)
+       (shell-command
+        (concat fortune-strfile fortune-strfile-options
+                " " fortune-file fortune-quiet-strfile-options))))
+     (t (error "Can't compile fortune file %s" fortune-file)))))


 ;;; **************
--
1.6.2



[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 5338-done <at> debbugs.gnu.org
Subject: Re: bug#5338: [PATCH] Make a new fortune dat file in compile time if
	dat file not exist
Date: Wed, 13 Feb 2013 03:11:52 -0500
Version: 24.4

Sorry for the delay. At last applied.


This bug report was last modified 12 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.