On 2019-06-26, at 21:04, Russell Adams <rlad...@adamsinfoserv.com> 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'.

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'.

Hth,

--
Marcin Borkowski
http://mbork.pl

Reply via email to