From: Andreas Gerler Date: Sat, 24 Dec 2022 13:09:31 +0000 (+0100) Subject: fix bba-clock-in and bba-clock-out X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=56af936f82ea3261f50164412fe53b7e36f0d55f;p=emacsconfig.git fix bba-clock-in and bba-clock-out Signed-off-by: Andreas Gerler --- diff --git a/bba-orgmode.org b/bba-orgmode.org index 8aaa8228..e34d2afb 100644 --- a/bba-orgmode.org +++ b/bba-orgmode.org @@ -1576,7 +1576,9 @@ is not working in my configuration. (defun bba-clock-in () "Clock in of workhours." (interactive) - (find-file "~/org/workhours.org") + (if (get-buffer "workhours.org") + (pop-to-buffer "workhours.org") + (find-file "~/org/workhours.org")) (goto-char (point-min)) (if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t) (progn (org-beginning-of-line) @@ -1592,7 +1594,9 @@ is not working in my configuration. (defun bba-clock-out () "Clock out of workhours." (interactive) - (find-file "~/org/workhours.org") + (if (get-buffer "workhours.org") + (pop-to-buffer "workhours.org") + (find-file "~/org/workhours.org")) (goto-char (point-min)) (if (re-search-forward (concat "^\*\* "(format-time-string "%Y-%m")) nil t) (progn (org-beginning-of-line)