From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Subject: org-hide-entry Date: Thu, 14 Oct 2010 21:04:50 +0200 Message-ID: <4CB75452.2000008@easy-emacs.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080108050708010403090404" Return-path: Received: from [140.186.70.92] (port=36653 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6T7S-0005ns-Au for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 15:05:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6T7Q-00049k-SG for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 15:05:38 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:49192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6T7Q-00048E-HO for emacs-orgmode@gnu.org; Thu, 14 Oct 2010 15:05:36 -0400 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 This is a multi-part message in MIME format. --------------080108050708010403090404 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi. as org-mode knows a command `org-show-entry' looked for `org-hide-entry', but couldn't get it. So here it is. Andreas -- https://code.launchpad.net/~a-roehler/python-mode/python-mode-components https://code.launchpad.net/s-x-emacs-werkstatt/ --------------080108050708010403090404 Content-Type: text/x-patch; name="org-hide-entry.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="org-hide-entry.patch" diff --git a/lisp/org.el b/lisp/org.el index a80286f..df9ae99 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19391,6 +19391,24 @@ Stop at the first and last subheadings of a superior heading." (org-end-of-subtree t t)) nil)) +(defun org-hide-entry () + "Hide the body directly following this heading. " + (interactive) + (save-excursion + (condition-case nil + (progn + (org-back-to-heading t) + (outline-flag-region + (max (point-min) (1- (point))) + (save-excursion + (if (re-search-forward + (concat "[\r\n]\\(" outline-regexp "\\)") nil t) + (1- (match-beginning 1)) + (point-max))) + t) + (org-cycle-hide-drawers 'children)) + (error nil)))) + (defun org-show-entry () "Show the body directly following this heading. Show the heading too, if it is currently invisible." --------------080108050708010403090404 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --------------080108050708010403090404--