emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Timestamps for a whole year, or a year and month
@ 2013-12-29 22:23 Erik Hetzner
  2013-12-30 18:29 ` Erik Hetzner
  2013-12-30 20:11 ` Eric S Fraga
  0 siblings, 2 replies; 5+ messages in thread
From: Erik Hetzner @ 2013-12-29 22:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I am trying to get together a configuration for taking notes for
historical research using org mode. I think org mode could be very
useful for this, with its many ways of presenting, sorting and
searching information in orgmode files.

One thing that has me a bit stuck, though, is timestamps that might
represent a year. For instance, it would be nice to write:

  By <1849> the California Gold Rush had ...

I’ve tried:

  By <1849-00-00> the California Gold Rush had ...

and this at least registers as a time stamp, but it doesn’t seem to
work (at least running M-x org-timeline on the file doesn’t seem to
find the entry).

I’ve tried ranges too:

  By <1849-01-01>--<1849-12-31> the California Gold Rush had ...

And this kind of works, but it’s pretty awkward. I’m also not sure I
want to see that entry for every date in 1849.

Is there any way to represent this in orgmode? I guess what I am
looking for is something that would show up on the first of the year
in a timeline, but would represent the fact that the year is being
treated as whole unit, and not a specific date.

Any ideas are welcome! Thanks.

best, Erik Hetzner

-- 
Sent from my free software system <http://fsf.org/>.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Timestamps for a whole year, or a year and month
  2013-12-29 22:23 Timestamps for a whole year, or a year and month Erik Hetzner
@ 2013-12-30 18:29 ` Erik Hetzner
  2013-12-30 20:11 ` Eric S Fraga
  1 sibling, 0 replies; 5+ messages in thread
From: Erik Hetzner @ 2013-12-30 18:29 UTC (permalink / raw)
  To: emacs-orgmode

At Sun, 29 Dec 2013 14:23:32 -0800,
Erik Hetzner wrote:
> 
> Hi,
> 
> I am trying to get together a configuration for taking notes for
> historical research using org mode. I think org mode could be very
> useful for this, with its many ways of presenting, sorting and
> searching information in orgmode files.
> 
> One thing that has me a bit stuck, though, is timestamps that might
> represent a year. For instance, it would be nice to write:
> 
>   By <1849> the California Gold Rush had ...

Well, I think I’ve decided that my best bet here is to do the
following:

  By 1849 <1849-01-01> the California Gold Rush had ...

This preserves the information that we are talking about the year
while giving me a time stamp I can use. Alternately one could use a
drawer to hide this information, or put it in the headline.

best, Erik

-- 
Sent from my free software system <http://fsf.org/>.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Timestamps for a whole year, or a year and month
  2013-12-29 22:23 Timestamps for a whole year, or a year and month Erik Hetzner
  2013-12-30 18:29 ` Erik Hetzner
@ 2013-12-30 20:11 ` Eric S Fraga
  2013-12-31  0:49   ` Erik Hetzner
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2013-12-30 20:11 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: emacs-orgmode

Erik Hetzner <egh@e6h.org> writes:

> Hi,
>
> I am trying to get together a configuration for taking notes for
> historical research using org mode. I think org mode could be very
> useful for this, with its many ways of presenting, sorting and
> searching information in orgmode files.
>
> One thing that has me a bit stuck, though, is timestamps that might
> represent a year. For instance, it would be nice to write:
>
>   By <1849> the California Gold Rush had ...

[...]

Erik,

I am not sure but I remember having a discussion about the problems with
dates that precede time 0 in Unix which corresponds to 1 January
1970.  See man page for ctime(3) for instance.

I am currently offline (in the tunnel under the North Sea :-) so cannot
find out what the conclusions of our discussion may have been.  Please
search the mailing list on Worg.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.2.1, Org release_8.2.4-322-gece429

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Timestamps for a whole year, or a year and month
  2013-12-30 20:11 ` Eric S Fraga
@ 2013-12-31  0:49   ` Erik Hetzner
  2014-01-02  9:54     ` Eric S Fraga
  0 siblings, 1 reply; 5+ messages in thread
From: Erik Hetzner @ 2013-12-31  0:49 UTC (permalink / raw)
  To: Eric S Fraga, emacs-orgmode

At Mon, 30 Dec 2013 20:11:17 +0000,
Eric S Fraga wrote:
> 
> Erik,
> 
> I am not sure but I remember having a discussion about the problems with
> dates that precede time 0 in Unix which corresponds to 1 January
> 1970.  See man page for ctime(3) for instance.
> 
> I am currently offline (in the tunnel under the North Sea :-) so cannot
> find out what the conclusions of our discussion may have been.  Please
> search the mailing list on Worg.

Hi Eric,

This looks to be the main thread on the issue:

http://thread.gmane.org/gmane.emacs.orgmode/39206

I have set org-read-date-force-compatible-dates to nil and tested on
two different emacs, one 32 bit and one 64 bit:

  GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4) of 2013-10-03 on menkib, modified by Debian
  GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4) of 2013-10-03 on elnath, modified by Debian

For the 64 bit system, I can get accurate dates back until 1583
(comparing with the calendar here:
http://www.arc.id.au/Calendar.html). This is just before the Gregorian
calendar was introduced. (Of course this depends on your locale :)
since some countries were a little slower introducing it.)

Using dates before that generates the wrong day of the week, but
doesn’t seem to cause an error. It seems that I am also able to enter
dates up until year 9999 and get the correct day of the week (as
compared with the output of the cal command).

On the 32 bit machine using dates before 14 Dec 1901 or after 18 Jan
2038 throws an error:

  Debugger entered--Lisp error: (error "Specified time is not representable")
    encode-time(0 0 0 13 12 1901 (nil nil nil))

So using 32 bit emacs does seem to be a problem.

It is strange to me that dates before 1970 seem to work fine on both
machines.

best, Erik

-- 
Sent from my free software system <http://fsf.org/>.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Timestamps for a whole year, or a year and month
  2013-12-31  0:49   ` Erik Hetzner
@ 2014-01-02  9:54     ` Eric S Fraga
  0 siblings, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2014-01-02  9:54 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: emacs-orgmode

Erik Hetzner <egh@e6h.org> writes:

[...]

> This looks to be the main thread on the issue:
>
> http://thread.gmane.org/gmane.emacs.orgmode/39206

[...]

> So using 32 bit emacs does seem to be a problem.
>
> It is strange to me that dates before 1970 seem to work fine on both
> machines.
>
> best, Erik

Well, the thread did indicate that the behaviour was dependent on the
actual Emacs installation.  Factors that affect the behaviour probably
include the underlying OS, the compilation settings and the libraries
used.

Happy new year!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.4-415-geb5cb3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-02  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-29 22:23 Timestamps for a whole year, or a year and month Erik Hetzner
2013-12-30 18:29 ` Erik Hetzner
2013-12-30 20:11 ` Eric S Fraga
2013-12-31  0:49   ` Erik Hetzner
2014-01-02  9:54     ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).