[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Circe-help] lui-time-stamp: support timestamps in margins

From: John Foerch
Subject: [Circe-help] lui-time-stamp: support timestamps in margins
Date: Wed, 4 Mar 2009 16:19:21 -0500


  I have been looking for a better way to do time-stamps for some
time now because of the way that the current implementation
affects point movement in the vicinity of the time-stamp when the
time-stamp is on the right.  I previously sent a patch that
reworked the way that right time-stamps work, but after further
experimentation, I found that that earlier patch merely
substituted one bug for another.

  Now I think I have a good solution to the problem, using a
feature called Display Margins which is new in Emacs 23.
See (info "(elisp)Display Margins") for details.  The attached
patch adds two new allowed values to lui-time-stamp-position:
'right-margin and 'left-margin.  The one weakness of the patch in
its current state is that it does not turn the margin on.
Enabling the margins may be best left to the user, unless we can
find a reliable way to pre-determine the width needed.

  To try this feature, do the following:

    lui-time-stamp-position 'right-margin
    lui-time-stamp-format "%H:%M")

   (defun jjf-circe-set-margin ()
     (setq right-margin-width 5))
   (add-hook 'lui-mode-hook 'jjf-circe-set-margin)

  Let me know what you think.  I hope this can become part of Circe.

Thank you,

John Foerch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]