From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] Call org-reveal after archiving Date: Tue, 13 Jan 2009 19:04:30 -0500 Message-ID: <878wpe3g8h.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMtFV-00005M-9Z for emacs-orgmode@gnu.org; Tue, 13 Jan 2009 19:04:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMtFT-0008WH-BK for emacs-orgmode@gnu.org; Tue, 13 Jan 2009 19:04:44 -0500 Received: from [199.232.76.173] (port=46136 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMtFT-0008WB-4h for emacs-orgmode@gnu.org; Tue, 13 Jan 2009 19:04:43 -0500 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:60973) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LMtFS-0008GS-Sz for emacs-orgmode@gnu.org; Tue, 13 Jan 2009 19:04:43 -0500 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.148.180] helo=mail.norang.ca) by mho-02-bos.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LMtFQ-0001d7-FY for emacs-orgmode@gnu.org; Wed, 14 Jan 2009 00:04:40 +0000 Received: from gollum.intra.norang.ca (gollum.intra.norang.ca [192.168.1.5]) by mail.norang.ca (8.13.8/8.13.8/Debian-3) with ESMTP id n0E04Xhh024142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 13 Jan 2009 19:04:34 -0500 Received: from gollum.intra.norang.ca (localhost [127.0.0.1]) by gollum.intra.norang.ca (8.14.3/8.14.3/Debian-5) with ESMTP id n0E04X3Q032245 for ; Tue, 13 Jan 2009 19:04:33 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sometimes archiving a task displays the next task heading after ... at the end of a folded task. This keeps the next task the cursor is on starting in column 1 which feels more natural. --- Carsten: This is also available on my 'for-carsten' branch. lisp/org-archive.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-archive.el b/lisp/org-archive.el index d37f843..6ae6743 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -306,7 +306,8 @@ this heading." (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) - (concat "in file: " (abbreviate-file-name afile))))))) + (concat "in file: " (abbreviate-file-name afile)))))) + (org-reveal)) (defun org-archive-to-archive-sibling () "Archive the current heading by moving it under the archive sibling. @@ -357,7 +358,8 @@ sibling does not exist, it will be created at the end of the subtree." (outline-up-heading 1 t) (hide-subtree) (org-cycle-show-empty-lines 'folded) - (goto-char pos)))) + (goto-char pos))) + (org-reveal)) (defun org-archive-all-done (&optional tag) "Archive sublevels of the current tree without open TODO items. -- 1.6.1.28.gc32f76