From 05d3162553d495d56770d955a16c146257b26200 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 25 Apr 2008 15:44:07 +0200 Subject: [PATCH] Bug fixes. --- ChangeLog | 3 +++ Makefile | 5 ++++- lisp/org-archive.el | 6 ++++-- lisp/org-clock.el | 22 +++++++++++----------- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 271e52562..3682592f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-04-25 Carsten Dominik + * lisp/org-archive.el (org-extract-archive-file): Handle the + special case where the file name is the empty string. + * Makefile (BATCH): Fix the path to the local lisp files. * lisp/org.el (org-emphasis-alist): Use a different face for diff --git a/Makefile b/Makefile index 37adb2793..6707d2436 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ infodir = $(prefix)/info # BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")" BATCH=$(EMACS) -batch -q -eval \ - "(progn (add-to-list (quote load-path) \"./lisp\") \ + "(progn (add-to-list (quote load-path) (expand-file-name \"./lisp/\")) \ (add-to-list (quote load-path) \"$(lispdir)\"))" # Specify the byte-compiler for compiling org-mode files @@ -240,6 +240,9 @@ relup: make upload_release make upload_manual +db: + grep -e '(debug)' lisp/*el + cleanelc: rm -f $(ELCFILES) cleandoc: diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 2c3df331c..a6685b434 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -139,8 +139,10 @@ archive file is." (defun org-extract-archive-file (&optional location) (setq location (or location org-archive-location)) (if (string-match "\\(.*\\)::\\(.*\\)" location) - (expand-file-name - (format (match-string 1 location) buffer-file-name)))) + (if (= (match-beginning 1) (match-end 1)) + (buffer-file-name) + (expand-file-name + (format (match-string 1 location) buffer-file-name))))) (defun org-extract-archive-heading (&optional location) (setq location (or location org-archive-location)) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 9de924e7c..d3eafb352 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -101,6 +101,16 @@ When clocking into a task and the clock is currently running, this marker is moved to the position of the currently running task and continues to point there even after the task is clocked out.") +(defvar org-clock-default-task (make-marker) + "Marker pointing to the default task that should clock time. +The clock can be made to switch to this task after clocking out +of a different task.") + +(defvar org-clock-interrupted-task (make-marker) + "Marker pointing to the default task that should clock time. +The clock can be made to switch to this task after clocking out +of a different task.") + (defun org-clock-history-push (&optional pos buffer) (let ((m (org-last org-clock-history))) (move-marker m (or pos (point)) buffer) @@ -113,7 +123,7 @@ to point there even after the task is clocked out.") (defun org-clock-select-task (&optional prompt) "Select a task that recently was associated with clocking." (interactive) - (let (sel-list rpl file task (i 0)) + (let (sel-list rpl file task (i 0) s) (save-window-excursion (org-switch-to-buffer-other-window (get-buffer-create "*Clock Task Select*")) @@ -159,16 +169,6 @@ to point there even after the task is clocked out.") (insert (format "[%c] %-15s %s\n" i cat task)) (cons i marker))))) -(defvar org-clock-default-task (make-marker) - "Marker pointing to the default task that should clock time. -The clock can be made to switch to this task after clocking out -of a different task.") - -(defvar org-clock-interrupted-task (make-marker) - "Marker pointing to the default task that should clock time. -The clock can be made to switch to this task after clocking out -of a different task.") - (defun org-update-mode-line () (let* ((delta (- (time-to-seconds (current-time)) (time-to-seconds org-clock-start-time)))