* Re: EDB date display dies in 21.3
[not found] <87r80gf1jl.fsf@linux.chungkuo.org>
@ 2003-11-10 22:40 ` Jesper Harder
2003-11-11 16:45 ` ChipsChap
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Harder @ 2003-11-10 22:40 UTC (permalink / raw)
ChipsChap <chungkuo@chungkuo.org> writes:
> I have a report, which I confirmed but mistakenly attributed to
> Windows EMACS, that EDB (and as a consequence the recently released
> ELIP app) fails when doing date display under Emacs 21.3. You might
> know that I tested from Emacs 19 up through Emacs 21.2 with no
> problem...... it figures.
The date and time functions in EDB are broken ... bitrot. It's not
only an issue for Emacs 21.3, I've also seen it in 20.7.
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.
NB: Please use gnu.emacs.sources for source code _only_. Questions
and discussion should go to gnu.emacs.help.
Crosspost & Followup-To: gnu.emacs.help
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: EDB date display dies in 21.3
2003-11-10 22:40 ` EDB date display dies in 21.3 Jesper Harder
@ 2003-11-11 16:45 ` ChipsChap
0 siblings, 0 replies; 2+ messages in thread
From: ChipsChap @ 2003-11-11 16:45 UTC (permalink / raw)
Jesper Harder <harder@myrealbox.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-11 16:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87r80gf1jl.fsf@linux.chungkuo.org>
2003-11-10 22:40 ` EDB date display dies in 21.3 Jesper Harder
2003-11-11 16:45 ` ChipsChap
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.