From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: [PATCH] Allow S-left/S-right editing in indented clocktables Date: Mon, 13 Jun 2011 19:00:38 +0200 Message-ID: <87k4cpzmx5.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWAVU-0007Uu-41 for emacs-orgmode@gnu.org; Mon, 13 Jun 2011 13:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWAVS-0005TG-Ug for emacs-orgmode@gnu.org; Mon, 13 Jun 2011 13:00:56 -0400 Received: from lo.gmane.org ([80.91.229.12]:33014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWAVS-0005Sz-Gi for emacs-orgmode@gnu.org; Mon, 13 Jun 2011 13:00:54 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QWAVQ-0008Q1-Nu for emacs-orgmode@gnu.org; Mon, 13 Jun 2011 19:00:52 +0200 Received: from p57aaa84d.dip.t-dialin.net ([87.170.168.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jun 2011 19:00:52 +0200 Received: from Stromeko by p57aaa84d.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jun 2011 19:00:52 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= It wasn't possible to use S-up/down/left/right on the clocktable BEGIN line when the whole table was indented. Interestingly enough calling the function directly would work, it turned out to be a regexp in org.el that was still pinned to bol. There was a second one further down that is used to recognize dynamic blocks that got the same treatment. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-S-left-S-right-editing-in-indented-clocktables.patch Content-Description: Allow shift editing of indented clocktables >From ab9cb1d760f6f45eee026b30793dff0df5d5f719 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Mon, 13 Jun 2011 18:32:53 +0200 Subject: [PATCH] Allow S-left/S-right editing in indented clocktables * lisp/org.el (org-clocktable-try-shift, org-find-dblock): Fix regexp to allow space and tab before the #+BEGIN: cookie TINYCHANGE --- lisp/org.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 1b342a6..6c6843b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3902,7 +3902,7 @@ If yes, offer to stop it and to save the buffer with the changes." (defun org-clocktable-try-shift (dir n) "Check if this line starts a clock table, if yes, shift the time block." - (when (org-match-line "#\\+BEGIN: clocktable\\>") + (when (org-match-line "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>") (org-clocktable-shift dir n))) ;; Autoload org-timer.el @@ -10594,7 +10594,7 @@ If not found, stay at current position and return nil." (let (pos) (save-excursion (goto-char (point-min)) - (setq pos (and (re-search-forward (concat "^#\\+BEGIN:[ \t]+" name "\\>") + (setq pos (and (re-search-forward (concat "^[ \t]*#\\+BEGIN:[ \t]+" name "\\>") nil t) (match-beginning 0)))) (if pos (goto-char pos)) -- 1.7.5.4 --=-=-= Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra --=-=-=--