From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ChipsChap Newsgroups: gmane.emacs.help Subject: Re: EDB date display dies in 21.3 Date: 11 Nov 2003 16:45:28 GMT Organization: Concentric Internet Services Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87ekweam7b.fsf@linux.chungkuo.org> References: <87r80gf1jl.fsf@linux.chungkuo.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068570049 32566 80.91.224.253 (11 Nov 2003 17:00:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2003 17:00:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 11 18:00:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJbsk-0007IQ-00 for ; Tue, 11 Nov 2003 18:00:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJcp0-0007aF-8M for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Nov 2003 13:00:58 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!nntp-out.svc.us.xo.net!nntp1-feeder.SJ.svc.us.xo.net!newsfeed.concentric.net!sjc1.nntp.concentric.net!nntp-master.svc.us.xo.net Original-Newsgroups: gnu.emacs.sources,gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 64.1.157.54 User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux) Cancel-Lock: sha1:n84lWVgaOsrWtDIen4ZVJ1g0OiQ= Original-Xref: shelby.stanford.edu gnu.emacs.sources:9793 gnu.emacs.help:118124 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14064 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14064 Jesper Harder writes: > The problem is that EDB defines its own date functions in the global > name space (i.e. without a proper package prefix). This is bound to > break sooner or later. The solution would be to go through EDB and > replace them with the built-in Emacs date & time functions. This turns out to be not *quite* the problem I encountered (although it's surely a problem) but I will discuss that in the other newsgroup, as you suggest below. > NB: Please use gnu.emacs.sources for source code _only_. Questions > and discussion should go to gnu.emacs.help. Point noted and will do. However, I think it is appropriate to post a patch in this newsgroup and here is something that seems to work for the problem at hand, as opposed to a total, global solution. I also decided to get rid of a small Y2K problem at the same time. It is a patch to the EDB file db-time.el, and someone please inform me by e-mail if this is not the proper format for patches: ;;;;;;;;;;;;;;begin patch to db-time.el 57,58c57,59 < "Extract the year and return it modulo 1900." < (% (date-year date) 1900)) --- > "Extract the year and return it with the right two digits. > Makes no sense for years in early 1900s or late 2000s." > (% (date-year date) 100)) 443c444 < ("d" . ((date-day date) . (date-day date))) --- > ("d" . ((date-day date) . (format "%d" (date-day date)))) 447,448c448,449 < ("m" . ((date-month date) . (date-month date))) < ("year" . ((date-year date) . (date-year-long date))) --- > ("m" . ((date-month date) . (format "%d" (date-month date)))) > ("year" . ((date-year date) . (format "%d" (date-year-long date)))) ;;;;;;;;;;;;;;;; end patch to db-time.el