all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: help-gnu-emacs@gnu.org
Subject: Re: efficiently viewing Unix timestamps as dates
Date: Thu, 14 Apr 2011 19:31:44 -0500	[thread overview]
Message-ID: <87sjtk73tb.fsf@lifelogs.com> (raw)
In-Reply-To: jwvzks5w2is.fsf-monnier+gnu.emacs.help@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

On Thu, 16 Dec 2010 21:35:10 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

>> I'd rather make this a minor mode than a hook, so I can easily turn it
>> on in a buffer.  Is that easy or hard to do?  Any specific example I can
>> look at?

SM> Use `define-minor-mode' rather than `add-hook'.

Attached is my attempt to view numbers matching "\\<[0-9]\\{8,11\\}\\>"
as dates.  It works all right, but not perfectly.  I looked at
rainbow-mode.el for some of the setup and did some on my own.

It uses the `help-echo' text property, which means you have to use the
mouse to look at the date as a tooltip.  I didn't like how it looked
with the `display' property: you would hit backspace from a string of 8
digits to 7, and the display property would remain the previously
computed date.  If someone could explain how to display the calculated
date in some other way besides `help-echo', or how to use the margins or
something else to show the `help-echo' string, I'd really appreciate it.

Once this is ready I'll put it up on the GNU ELPA or wherever...  It's
really useful for me but others may not find it so useful.

Thanks
Ted


[-- Attachment #2: epoch-view.el --]
[-- Type: application/emacs-lisp, Size: 2719 bytes --]

  reply	other threads:[~2011-04-15  0:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 17:20 efficiently viewing Unix timestamps as dates Ted Zlatanov
2010-12-16  7:28 ` Kevin Rodgers
     [not found] ` <mailman.8.1292484545.7231.help-gnu-emacs@gnu.org>
2010-12-16 19:26   ` Ted Zlatanov
2010-12-16 20:48     ` Burton Samograd
2010-12-16 21:34     ` PJ Weisberg
2010-12-16 22:23     ` Stefan Monnier
2010-12-16 23:12       ` Ted Zlatanov
2010-12-17  2:35         ` Stefan Monnier
2011-04-15  0:31           ` Ted Zlatanov [this message]
2011-04-15 15:29             ` Stefan Monnier
2011-04-15 16:59               ` Ted Zlatanov
2011-04-17 14:38                 ` Stefan Monnier
2011-04-19 13:23                   ` Ted Zlatanov
2011-04-19 15:23                     ` Stefan Monnier
2011-04-19 18:09                       ` Ted Zlatanov
2011-04-21 20:20                         ` Stefan Monnier
2011-04-21 20:48                           ` Ted Zlatanov
2011-04-24  5:18                             ` Stefan Monnier
2011-04-25 19:52                               ` Ted Zlatanov
2011-04-26  2:50                                 ` Ted Zlatanov
2011-04-26 13:28                                 ` Stefan Monnier
2011-04-26 15:43                                   ` Ted Zlatanov
2011-04-27 14:18                                     ` Stefan Monnier
2011-05-04 13:35                                       ` Ted Zlatanov
2011-05-04 15:32                                         ` Stefan Monnier
2011-05-04 19:40                                           ` Ted Zlatanov
2010-12-17  8:25         ` Eli Zaretskii
     [not found]         ` <mailman.7.1292574349.666.help-gnu-emacs@gnu.org>
2010-12-17 14:07           ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sjtk73tb.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.