emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Insert time in Org-mode


From: Tim Cross
Subject: Re: [O] Insert time in Org-mode
Date: Thu, 27 Jun 2019 08:04:33 +1000
User-agent: mu4e 1.3.1; emacs 26.2

Marcin Borkowski <address@hidden> writes:

> On 2019-06-26, at 21:04, Russell Adams <address@hidden> wrote:
>
>> On Tue, Jun 25, 2019 at 06:41:15PM +0200, gmx wrote:
>>> Hello,
>>>
>>> How to insert the current time? I have a table in which I want to
>>> indicate the beginning of an oral exam (firt column), the end (second
>>> column), and (third column) make the difference between the two (I can
>>> do that).
>>
>> I use this:
>>
>> ;; Insert immediate timestamp
>> (bind-key "<f9>"
>>                '(lambda () (interactive)
>>                       (when (eq major-mode 'org-mode)
>>                         (org-insert-time-stamp nil t t)
>>                         (insert "\n"))))
>>
>> I press f9 all the time while note taking to timestamp my activities.
>
> That is a bit strange - my Emacs doesn't seem to have `bind-key'.
>

It is from a separate package called bind-key that you can install from
MELPA.

The excellent 'use-package' package uses it as a convenience method to
bind keys in use-pacakge definition blocks.

> Also, I would just add f9 to `org-mode-map', e.g. using `define-key' -
> there's no need then to check for `major-mode'.
>

Yep, exactly my first thoughts when I saw the example. I use to have
something similar, but now my capture templates and 'Journal' option
take care of all of that, plus other useful details - like the
place/buffer/mode you were in when you took the note etc. 


-- 
Tim Cross



reply via email to

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