From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John J Foerch Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: patch to outline.el concerning isearch Date: Wed, 13 Dec 2006 22:53:11 -0500 Message-ID: <87bqm7yvyw.fsf@earthlink.net> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1166068086 11673 80.91.229.10 (14 Dec 2006 03:48:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 03:48:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Thu Dec 14 04:48:04 2006 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuhZd-0001hX-C6 for geo-emacs-orgmode@m.gmane.org; Thu, 14 Dec 2006 04:47:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuhZc-0007I0-UL for geo-emacs-orgmode@m.gmane.org; Wed, 13 Dec 2006 22:47:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuhZS-0007HM-Qu for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuhZS-0007H0-0Q for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuhZR-0007Gn-QC for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:45 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuhZR-0002Lv-PT for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GuhZH-0002l8-Ee for emacs-orgmode@gnu.org; Thu, 14 Dec 2006 04:47:35 +0100 Original-Received: from dialup-4.158.210.211.dial1.chicago1.level3.net ([4.158.210.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Dec 2006 04:47:35 +0100 Original-Received: from jjfoerch by dialup-4.158.210.211.dial1.chicago1.level3.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Dec 2006 04:47:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-orgmode@gnu.org Original-Lines: 49 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialup-4.158.210.211.dial1.chicago1.level3.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) Cancel-Lock: sha1:NmZbsWi6h0AXSBGQDO8gNZb9spo= X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-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 Xref: news.gmane.org gmane.emacs.orgmode:957 gmane.emacs.devel:63700 Archived-At: --=-=-= Hello, I want to implement a particular feature in org-mode that depends upon some functionality being added to outline-mode. (org-mode is derived from outline-mode.) The feature concerns display of ancestor and sibling headings when an isearch has come to successful completion in a hidden part of the file. The function whose job it is to decide what to display when an isearch has completed is called `outline-isearch-open-invisible'. Currently, it simply calls `(show-entry)'. The following patch changes that function, and adds a new variable, to allow derived modes or motivated users to implement alternate behavior. The default behavior remains the same, but can more easily be reprogrammed by a derived mode. Please comment, criticize, or enlighten. Thank you, John Foerch --=-=-= Content-Disposition: inline; filename=outline-patch.diff Content-Description: patch to outline.el concerning isearch Index: lisp/outline.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/outline.el,v retrieving revision 1.24 diff -r1.24 outline.el 745a746,757 > (defvar outline-isearch-open-invisible-fun > 'outline-isearch-open-invisible-show-entry > "Function that will be called when a successful isearch > finishes in an invisible overylay. The overlay will be passed > to the function as its sole argument.") > > ;; Default function for outline-isearch-open-invisible-fun. Makes only the > ;; single entry containing point visible. > (defun outline-isearch-open-invisible-show-entry (overlay) > ;; We rely on the fact that isearch places point on the matched text. > (show-entry)) > 751c763,764 < (show-entry)) --- > (if outline-isearch-open-invisible-fun > (funcall outline-isearch-open-invisible-fun overlay))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John J Foerch Subject: patch to outline.el concerning isearch Date: Wed, 13 Dec 2006 22:53:11 -0500 Message-ID: <87bqm7yvyw.fsf@earthlink.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuhZS-0007HM-Qu for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuhZS-0007H0-0Q for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuhZR-0007Gn-QC for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:45 -0500 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuhZR-0002Lv-PT for emacs-orgmode@gnu.org; Wed, 13 Dec 2006 22:47:46 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GuhZH-0002l8-Ee for emacs-orgmode@gnu.org; Thu, 14 Dec 2006 04:47:35 +0100 Received: from dialup-4.158.210.211.dial1.chicago1.level3.net ([4.158.210.211]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Dec 2006 04:47:35 +0100 Received: from jjfoerch by dialup-4.158.210.211.dial1.chicago1.level3.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Dec 2006 04:47:35 +0100 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 Cc: emacs-devel@gnu.org --=-=-= Hello, I want to implement a particular feature in org-mode that depends upon some functionality being added to outline-mode. (org-mode is derived from outline-mode.) The feature concerns display of ancestor and sibling headings when an isearch has come to successful completion in a hidden part of the file. The function whose job it is to decide what to display when an isearch has completed is called `outline-isearch-open-invisible'. Currently, it simply calls `(show-entry)'. The following patch changes that function, and adds a new variable, to allow derived modes or motivated users to implement alternate behavior. The default behavior remains the same, but can more easily be reprogrammed by a derived mode. Please comment, criticize, or enlighten. Thank you, John Foerch --=-=-= Content-Disposition: inline; filename=outline-patch.diff Content-Description: patch to outline.el concerning isearch Index: lisp/outline.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/outline.el,v retrieving revision 1.24 diff -r1.24 outline.el 745a746,757 > (defvar outline-isearch-open-invisible-fun > 'outline-isearch-open-invisible-show-entry > "Function that will be called when a successful isearch > finishes in an invisible overylay. The overlay will be passed > to the function as its sole argument.") > > ;; Default function for outline-isearch-open-invisible-fun. Makes only the > ;; single entry containing point visible. > (defun outline-isearch-open-invisible-show-entry (overlay) > ;; We rely on the fact that isearch places point on the matched text. > (show-entry)) > 751c763,764 < (show-entry)) --- > (if outline-isearch-open-invisible-fun > (funcall outline-isearch-open-invisible-fun overlay))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--