* Re: Journal package for Emacs?
[not found] <mailman.1031586979.16781.help-gnu-emacs@gnu.org>
@ 2002-09-09 16:40 ` Jochen Küpper
2002-09-09 17:05 ` David Forrest
2002-09-09 21:25 ` Kevin Rodgers
1 sibling, 1 reply; 22+ messages in thread
From: Jochen Küpper @ 2002-09-09 16:40 UTC (permalink / raw)
On Mon, 9 Sep 2002 11:53:56 -0400 (EDT) David Forrest wrote:
David> On 9 Sep 2002, Stefan Monnier <foo@acm.com> wrote:
>> >>>>> "David" == David Forrest <drf5n@mug.sys.virginia.edu> writes:
>>
>> > (if (local-variable-p 'is-journal)
>>
>> What for exactly ? `local-variable-p' should basically never be used,
>> except for very unusual circumstances.
David> I was looking for a function like 'defined' and am probably
David> missing something very basic. (when 'is-journal) is always true
David> and stamps everything, while (when is-journal) stamps journal
David> files, but faults with "Symbol's value as variable is void:
David> is-journal"
What's about boundp or bound-and-true-p?
Greetings,
Jochen
--
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
Liberté, Égalité, Fraternité GnuPG key: 44BCCD8E
Sex, drugs and rock-n-roll
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
[not found] <mailman.1031586979.16781.help-gnu-emacs@gnu.org>
2002-09-09 16:40 ` Journal package for Emacs? Jochen Küpper
@ 2002-09-09 21:25 ` Kevin Rodgers
2002-09-09 22:10 ` Alex Schroeder
1 sibling, 1 reply; 22+ messages in thread
From: Kevin Rodgers @ 2002-09-09 21:25 UTC (permalink / raw)
David Forrest wrote:
> On 9 Sep 2002, Stefan Monnier <foo@acm.com> wrote:
...
> Thanks, I was certain that was true, and I appreciate your response.
> I now have:
>
> (defun my-journal-hook ()
> "Append time stamp to -*- is-journal: t -*- files."
> (when (local-variable-p 'is-journal))
> (end-of-buffer)
> (insert-current-time)))
>
>
>>> (if (local-variable-p 'is-journal)
>>>
>>What for exactly ? `local-variable-p' should basically never be used,
>>except for very unusual circumstances.
>>
>
> I was looking for a function like 'defined' and am probably missing
> something very basic. (when 'is-journal) is always true and stamps
> everything, while (when is-journal) stamps journal files, but faults with
> "Symbol's value as variable is void: is-journal"
Here's the conventional way to handle that:
(defvar my-journal-var nil
"*Non-nil if visited file is a journal.")
(make-variable-buffer-local 'my-journal-var)
(defun my-journal-hook ()
"Append time stamp to -*- my-journal-var: t -*- files."
(when is-journal)
(end-of-buffer)
(insert-current-time)))
--
Kevin Rodgers <kevinr@ihs.com>
^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.1031541847.25738.help-gnu-emacs@gnu.org>]
* Re: Journal package for Emacs?
[not found] <mailman.1031541847.25738.help-gnu-emacs@gnu.org>
@ 2002-09-09 14:49 ` Stefan Monnier <foo@acm.com>
2002-09-09 15:53 ` David Forrest
0 siblings, 1 reply; 22+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2002-09-09 14:49 UTC (permalink / raw)
>>>>> "David" == David Forrest <drf5n@mug.sys.virginia.edu> writes:
> Is this good elisp?
Hmm... I'm sorry to say I've seen better:
> (defun my-journal-hook ()
> "Go to the bottom and insert a timestamp on journal files
> Identified with the is-journal local variable thus:
> -*- is-journal : t -*- "
The first line of a docstring should stand on its own (i.e. end with
a period, basically) so that it makes sense when displayed by M-x apropos.
> (if (local-variable-p 'is-journal)
What for exactly ? `local-variable-p' should basically never be used,
except for very unusual circumstances.
> (progn (end-of-buffer) ( insert-current-time))
(if a (progn b c)) can be advantageously replaced with (when a b c).
> ))
This is a clear mark of bad Lisp.
> ;where insert-current-time is:
If you indent this, it'll jump to column 40. Use `;;' instead.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-09 14:49 ` Stefan Monnier <foo@acm.com>
@ 2002-09-09 15:53 ` David Forrest
0 siblings, 0 replies; 22+ messages in thread
From: David Forrest @ 2002-09-09 15:53 UTC (permalink / raw)
Cc: help-gnu-emacs
On 9 Sep 2002, Stefan Monnier <foo@acm.com> wrote:
> >>>>> "David" == David Forrest <drf5n@mug.sys.virginia.edu> writes:
> > Is this good elisp?
>
> Hmm... I'm sorry to say I've seen better:
Thanks, I was certain that was true, and I appreciate your response.
I now have:
(defun my-journal-hook ()
"Append time stamp to -*- is-journal: t -*- files."
(when (local-variable-p 'is-journal))
(end-of-buffer)
(insert-current-time)))
>
> > (if (local-variable-p 'is-journal)
>
> What for exactly ? `local-variable-p' should basically never be used,
> except for very unusual circumstances.
I was looking for a function like 'defined' and am probably missing
something very basic. (when 'is-journal) is always true and stamps
everything, while (when is-journal) stamps journal files, but faults with
"Symbol's value as variable is void: is-journal"
Thanks again for your time,
Dave
--
Dave Forrest drf5n@virginia.edu
(804)642-0662h (434)924-3954w http://mug.sys.virginia.edu/~drf5n/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Journal package for Emacs?
@ 2002-09-07 14:20 mike hardy
2002-09-07 15:45 ` F. Xavier Noria
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: mike hardy @ 2002-09-07 14:20 UTC (permalink / raw)
I've been searching DN/Google/elisp list for some kind of journalling
package for Emacs and surprisingly I can't find anything except some old
Perl script called "plod" (and I don't think diary is what I want). What
I'd like to do is something like 'M-x journal' that opens my/a journal
file, inserts a date/timestamp and I can start editing under the
date/timestamp. Anyone know of something like this for Emacs? Or how
about just a function I could use that would insert the date/time (and
I'll just use bookmarks for the journal file)? I'm most interested in
just being able to insert the date into a buffer. I tried looking for
some existing function in Emacs to allow me to do that but I don't find
anything.
Thanks...
Mike
--
------------------------
mhardy_mail@NO_SPAM@yahoo.com
Help Wanted: Psychic. You know where to apply.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 14:20 mike hardy
@ 2002-09-07 15:45 ` F. Xavier Noria
2002-09-07 16:02 ` David Forrest
` (2 subsequent siblings)
3 siblings, 0 replies; 22+ messages in thread
From: F. Xavier Noria @ 2002-09-07 15:45 UTC (permalink / raw)
On Sat, 07 Sep 2002 14:20:12 GMT
mike hardy <no_sp@m.for_me.org> wrote:
: I'll just use bookmarks for the journal file)? I'm most interested in
: just being able to insert the date into a buffer. I tried looking for
: some existing function in Emacs to allow me to do that but I don't find
: anything.
From my .emacs:
(defun fxn-insert-time-stamp ()
(interactive)
(insert (time-stamp-string)))
(global-set-key (kbd "C-c t") 'fxn-insert-time-stamp)
-- fxn
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 14:20 mike hardy
2002-09-07 15:45 ` F. Xavier Noria
@ 2002-09-07 16:02 ` David Forrest
2002-09-07 17:42 ` Thien-Thi Nguyen
2002-09-07 19:30 ` Kai Großjohann
3 siblings, 0 replies; 22+ messages in thread
From: David Forrest @ 2002-09-07 16:02 UTC (permalink / raw)
On Sat, 7 Sep 2002, mike hardy wrote:
>
> I've been searching DN/Google/elisp list for some kind of journalling
> package for Emacs and surprisingly I can't find anything except some old
> Perl script called "plod" (and I don't think diary is what I want). What
> I'd like to do is something like 'M-x journal' that opens my/a journal
> file, inserts a date/timestamp and I can start editing under the
> date/timestamp. Anyone know of something like this for Emacs? Or how
Not me, Maybe you could add something using a local variable and
find-file-hooks, but I dislike having my editor execute code.
> about just a function I could use that would insert the date/time (and
> I'll just use bookmarks for the journal file)? I'm most interested in
> just being able to insert the date into a buffer. I tried looking for
> some existing function in Emacs to allow me to do that but I don't find
> anything.
I use
(global-set-key (kbd "C-c t") 'insert-current-time)
(defun insert-current-time ()
"Insert the Current Time in ISO 8601 format"
(interactive)
(insert
(format-time-string "%Y-%m-%dT%T%z ") ; ISO8601
)
)
> Thanks...
>
> Mike
>
--
Dave Forrest drf5n@virginia.edu
(804)642-0662h (434)924-3954w http://mug.sys.virginia.edu/~drf5n/
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 14:20 mike hardy
2002-09-07 15:45 ` F. Xavier Noria
2002-09-07 16:02 ` David Forrest
@ 2002-09-07 17:42 ` Thien-Thi Nguyen
2002-09-07 19:30 ` Kai Großjohann
3 siblings, 0 replies; 22+ messages in thread
From: Thien-Thi Nguyen @ 2002-09-07 17:42 UTC (permalink / raw)
mike hardy <no_sp@m.for_me.org> writes:
> 'M-x journal' that opens my/a journal file, inserts a date/timestamp
> and I can start editing under the date/timestamp.
in a former life
http://www.glug.org/people/ttn/trips/
i would do `M-x trl-begin-entry' to begin a trip log entry, and `C-c
C-c' to conclude (add title, adjust hyperlinks, check into RCS, update
index). this facility was provided by homegrown elisp (actually grown
on the road, following the two-wheeled meditation programming skool ;-)
http://www.glug.org/people/ttn/software/ttn-pers-elisp/dist/lisp/editing/trl.el
a sample template file is appended (remove the "; " line prefix). this
template fits w/ trl, so if you change one you should change the other
accordingly.
happy tripping,
thi
______________________________________________________________________
; <html>
; <head>
; <title>Life the Universe and Everything Trip Log Entry </title>
; </head>
;
; <body>
;
; <p><hr>
; Copyright (C) 2002 Thien-Thi Nguyen <br>
; <a href="index.html">Index.</a>
; <!-- <a href="">Next log entry.</a>
; -->
; <a href="/people/ttn/contact.html">Comments?</a>
; </body>
; </html>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 14:20 mike hardy
` (2 preceding siblings ...)
2002-09-07 17:42 ` Thien-Thi Nguyen
@ 2002-09-07 19:30 ` Kai Großjohann
2002-09-07 22:04 ` mike hardy
` (2 more replies)
3 siblings, 3 replies; 22+ messages in thread
From: Kai Großjohann @ 2002-09-07 19:30 UTC (permalink / raw)
mike hardy <no_sp@m.for_me.org> writes:
> What I'd like to do is something like 'M-x journal' that opens my/a
> journal file, inserts a date/timestamp and I can start editing under
> the date/timestamp.
I'm sure there are a lot of them. You could do M-x
add-change-log-entry RET, for instance.
There is steno or steno-mode or similar. I even used it for a while.
There is records mode.
Then maybe Hyperbole does something like this?
And then, of course, diary, but you don't want to use it...
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 19:30 ` Kai Großjohann
@ 2002-09-07 22:04 ` mike hardy
2002-09-08 20:26 ` Kai Großjohann
2002-09-09 11:18 ` Galen Boyer
2002-09-08 6:49 ` Sacha Chua
[not found] ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
2 siblings, 2 replies; 22+ messages in thread
From: mike hardy @ 2002-09-07 22:04 UTC (permalink / raw)
Nostradamus foretold that on Sat Sep 07 2002, Kai Großjohann would write:
> mike hardy <no_sp@m.for_me.org> writes:
>
> > What I'd like to do is something like 'M-x journal' that opens my/a
> > journal file, inserts a date/timestamp and I can start editing under
> > the date/timestamp.
>
> I'm sure there are a lot of them. You could do M-x
> add-change-log-entry RET, for instance.
>
> There is steno or steno-mode or similar. I even used it for a while.
>
> There is records mode.
>
> Then maybe Hyperbole does something like this?
>
Thanks all for the info. I at least have something I can use now.
I found steno/hyperbole (Google). Indiana U is down right now and I
usually use that, Ohio St. or Wiki - but is there a "best" central
(complete and up to date) elisp repository that you others use? I didn't
find steno or hyperbole at any of the three sites I usually use...
Mike
------------------------
mhardy_mail@NO_SPAM@yahoo.com
Help Wanted: Psychic. You know where to apply.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 22:04 ` mike hardy
@ 2002-09-08 20:26 ` Kai Großjohann
2002-09-09 0:17 ` mike hardy
2002-09-09 11:18 ` Galen Boyer
1 sibling, 1 reply; 22+ messages in thread
From: Kai Großjohann @ 2002-09-08 20:26 UTC (permalink / raw)
mike hardy <no_sp@m.for_me.org> writes:
> I found steno/hyperbole (Google). Indiana U is down right now and I
> usually use that, Ohio St. or Wiki - but is there a "best" central
> (complete and up to date) elisp repository that you others use? I didn't
> find steno or hyperbole at any of the three sites I usually use...
I use the Emacs Lisp List (see Google). But there should be another
Emacs Lisp archive -- if only I could remember if it is
lispmeralda.org, or emacslisp.org, or emacs.org.
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-08 20:26 ` Kai Großjohann
@ 2002-09-09 0:17 ` mike hardy
2002-09-09 9:48 ` Francesco Scaglioni
0 siblings, 1 reply; 22+ messages in thread
From: mike hardy @ 2002-09-09 0:17 UTC (permalink / raw)
Nostradamus foretold that on Sun Sep 08 2002, Kai Großjohann would write:
> mike hardy <no_sp@m.for_me.org> writes:
>
> > I found steno/hyperbole (Google). Indiana U is down right now and I
> > usually use that, Ohio St. or Wiki - but is there a "best" central
> > (complete and up to date) elisp repository that you others use? I didn't
> > find steno or hyperbole at any of the three sites I usually use...
>
> I use the Emacs Lisp List (see Google). But there should be another
> Emacs Lisp archive -- if only I could remember if it is
> lispmeralda.org, or emacslisp.org, or emacs.org.
Thx. lispmeralda (according to Ohio St. readme) has been absorbed. But
the Ohio St. site doesn't have a /pub/* and what is there is somewhat old.
So I don't know if they're still working on the site or if it's been
moved. And evidently (www/)emacslist.org has decided there's more money in
"attachment enhancement" :-> Maybe there's nothing better than what I
already use?
Mike
--
------------------------
mhardy_mail@NO_SPAM@yahoo.com
Help Wanted: Psychic. You know where to apply.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 22:04 ` mike hardy
2002-09-08 20:26 ` Kai Großjohann
@ 2002-09-09 11:18 ` Galen Boyer
2002-09-09 22:23 ` mike hardy
1 sibling, 1 reply; 22+ messages in thread
From: Galen Boyer @ 2002-09-09 11:18 UTC (permalink / raw)
On Sat, 07 Sep 2002, no_sp@m.for_me.org wrote:
>
> is there a "best" central (complete and up to date) elisp repository
> that you others use?
This is the first place I turn.
http://www.anc.ed.ac.uk/~stephen/emacs/ell.html
--
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-07 19:30 ` Kai Großjohann
2002-09-07 22:04 ` mike hardy
@ 2002-09-08 6:49 ` Sacha Chua
[not found] ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 22+ messages in thread
From: Sacha Chua @ 2002-09-08 6:49 UTC (permalink / raw)
I use planner.el mode, although remember.el does most of what you
want. planner.el allows you to keep track of tasks, schedules, notes,
and other nifty things. Bonus - it's wikified. remember.el
auto-inserts timestamps in a neatly outlined file. I like it too.
Definitely worth checking out.
Both can be found at http://www.gci-net.com/~johnw/emacs.html
--
Sacha Chua <sacha@free.net.ph> - 4 BS CS Ateneo geekette
interests: emacs, gnu/linux, wearables, teaching compsci
^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.1031467986.16594.help-gnu-emacs@gnu.org>]
* Re: Journal package for Emacs?
[not found] ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
@ 2002-09-08 20:26 ` Kai Großjohann
2002-09-09 0:22 ` mike hardy
1 sibling, 0 replies; 22+ messages in thread
From: Kai Großjohann @ 2002-09-08 20:26 UTC (permalink / raw)
Sacha Chua <sacha@free.net.ph> writes:
> I use planner.el mode, although remember.el does most of what you
> want.
I knew I had forgotten something. Thanks.
kai
--
A large number of young women don't trust men with beards. (BFBS Radio)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
[not found] ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
2002-09-08 20:26 ` Kai Großjohann
@ 2002-09-09 0:22 ` mike hardy
2002-09-09 3:22 ` David Forrest
1 sibling, 1 reply; 22+ messages in thread
From: mike hardy @ 2002-09-09 0:22 UTC (permalink / raw)
Nostradamus foretold that on Sun Sep 08 2002, Sacha Chua would write:
> I use planner.el mode, although remember.el does most of what you
> want. planner.el allows you to keep track of tasks, schedules, notes,
> and other nifty things. Bonus - it's wikified. remember.el
> auto-inserts timestamps in a neatly outlined file. I like it too.
> Definitely worth checking out.
>
> Both can be found at http://www.gci-net.com/~johnw/emacs.html
>
Great! Someone posted a perfect insert-date function that I'm now using
to satisfaction but the planner looks like it has stuff I didn't know I
wanted...
Mike
--
------------------------
mhardy_mail@NO_SPAM@yahoo.com
Help Wanted: Psychic. You know where to apply.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Journal package for Emacs?
2002-09-09 0:22 ` mike hardy
@ 2002-09-09 3:22 ` David Forrest
0 siblings, 0 replies; 22+ messages in thread
From: David Forrest @ 2002-09-09 3:22 UTC (permalink / raw)
Cc: help-gnu-emacs
On Mon, 9 Sep 2002, mike hardy wrote:
...
Mike asked about having the journal open and do a time stamp, and I
thought it might work with hooks, so I wrote this as a venture into
learning elisp. Is this good elisp?
(defun my-journal-hook ()
"Go to the bottom and insert a timestamp on journal files
Identified with the is-journal local variable thus:
-*- is-journal : t -*- "
(if (local-variable-p 'is-journal)
(progn (end-of-buffer) ( insert-current-time))
))
(add-hook 'find-file-hooks 'my-journal-hook)
;where insert-current-time is:
(defun insert-current-time ()
"Insert the Current Time in ISO 8601 mode"
(interactive)
(insert
(format-time-string "%Y-%m-%dT%T%z ") ; ISO8601
)
)
Dave
--
Dave Forrest drf5n@virginia.edu
(804)642-0662h (434)924-3954w http://mug.sys.virginia.edu/~drf5n/
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2002-09-10 16:07 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1031586979.16781.help-gnu-emacs@gnu.org>
2002-09-09 16:40 ` Journal package for Emacs? Jochen Küpper
2002-09-09 17:05 ` David Forrest
2002-09-09 21:25 ` Kevin Rodgers
2002-09-09 22:10 ` Alex Schroeder
2002-09-10 16:07 ` Kevin Rodgers
[not found] <mailman.1031541847.25738.help-gnu-emacs@gnu.org>
2002-09-09 14:49 ` Stefan Monnier <foo@acm.com>
2002-09-09 15:53 ` David Forrest
2002-09-07 14:20 mike hardy
2002-09-07 15:45 ` F. Xavier Noria
2002-09-07 16:02 ` David Forrest
2002-09-07 17:42 ` Thien-Thi Nguyen
2002-09-07 19:30 ` Kai Großjohann
2002-09-07 22:04 ` mike hardy
2002-09-08 20:26 ` Kai Großjohann
2002-09-09 0:17 ` mike hardy
2002-09-09 9:48 ` Francesco Scaglioni
2002-09-09 11:18 ` Galen Boyer
2002-09-09 22:23 ` mike hardy
2002-09-08 6:49 ` Sacha Chua
[not found] ` <mailman.1031467986.16594.help-gnu-emacs@gnu.org>
2002-09-08 20:26 ` Kai Großjohann
2002-09-09 0:22 ` mike hardy
2002-09-09 3:22 ` David Forrest
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.