From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kelly Jones" Newsgroups: gmane.emacs.help Subject: Hiding text in emacs buffer that matches regexp Date: Sun, 17 Dec 2006 13:59:18 -0700 Message-ID: <26face530612171259x1b5304fk65ed75d4b7a9e351@mail.gmail.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166389184 15334 80.91.229.10 (17 Dec 2006 20:59:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 17 Dec 2006 20:59:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 17 21:59:42 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gw36g-0005yC-5R for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Dec 2006 21:59:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gw36f-0006Dy-CW for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Dec 2006 15:59:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gw36R-0006Cy-0G for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 15:59:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gw36O-0006Br-6Q for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 15:59:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gw36O-0006Bm-1H for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 15:59:20 -0500 Original-Received: from [209.85.132.242] (helo=an-out-0708.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gw36O-0005Re-2o for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 15:59:20 -0500 Original-Received: by an-out-0708.google.com with SMTP id b8so348905ana for ; Sun, 17 Dec 2006 12:59:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FTjckUoS4PSzl4E6my5AG63KGSdAQ685e/ckBT3LvFeRKZYSjkLL98WWiaAxNZ9EExZICLUL2l22zqJPbw4RZxXbQj+Mh4af0cd0oi8o+lm4dKETefzskDJHWK8gaidc8MG4Ku85cqM0jDNBxgl5lvxrlLNgBOZhi3sY5bwvGlc= Original-Received: by 10.100.198.11 with SMTP id v11mr2506199anf.1166389158850; Sun, 17 Dec 2006 12:59:18 -0800 (PST) Original-Received: by 10.100.167.18 with HTTP; Sun, 17 Dec 2006 12:59:18 -0800 (PST) Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39675 Archived-At: I'm writing some Perl functions, and the POD doc uses up a lot of screen real estate: =item make_ref(URL,TEXT) Return string to make text a hyperlink to URL =cut sub make_ref {return "$_[1]"} (1 line of code to 5 lines of docs). How can I tell emacs: hide all text matching the Perl regex "/^=item.*?=cut$/is" and replace it with "<>" or something similar. I still want the text to "be" in the buffer and want it saved to disk-- I just don't want it displayed to me. Ideally, this would be a toggle that I could turn off/on so I could see the docs when I wanted to edit them. I'd be interested in the answer in general, but if there's a POD mode for emacs that would do this, that'd be great too. -- We're just a Bunch Of Regular Guys, a collective group that's trying to understand and assimilate technology. We feel that resistance to new ideas and technology is unwise and ultimately futile. From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Hiding text in emacs buffer that matches regexp Date: Mon, 18 Dec 2006 06:04:36 +0200 Message-ID: References: <26face530612171259x1b5304fk65ed75d4b7a9e351@mail.gmail.com> NNTP-Posting-Host: dough.gmane.org X-Trace: sea.gmane.org 1166414698 31004 80.91.229.10 (18 Dec 2006 04:04:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Dec 2006 04:04:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 18 05:04:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gw9kE-00011u-9A for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Dec 2006 05:04:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gw9kD-0001zV-Kd for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Dec 2006 23:04:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gw9jy-0001y5-Ka for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 23:04:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gw9jw-0001tR-2T for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 23:04:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gw9jv-0001tI-QV for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 23:04:35 -0500 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gw9jv-00082j-Aa for help-gnu-emacs@gnu.org; Sun, 17 Dec 2006 23:04:35 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-245-212.inter.net.il [84.229.245.212]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id BHG50179 (AUTH halo1); Mon, 18 Dec 2006 06:04:29 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: <26face530612171259x1b5304fk65ed75d4b7a9e351@mail.gmail.com> (kelly.terry.jones@gmail.com) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39679 Archived-At: > Date: Sun, 17 Dec 2006 13:59:18 -0700 > From: "Kelly Jones" > > How can I tell emacs: hide all text matching the Perl regex > "/^=item.*?=cut$/is" and replace it with "<>" or something similar. > > I still want the text to "be" in the buffer and want it saved to > disk-- I just don't want it displayed to me. Read the node "Invisible Text" in the ELisp manual. It describes how to make this happen. From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Hiding text in emacs buffer that matches regexp Date: Mon, 18 Dec 2006 15:39:40 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166471418 9357 80.91.229.2 (18 Dec 2006 19:50:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Dec 2006 19:50:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 18 20:50:08 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GwJhS-0004Lr-Ri for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Dec 2006 15:42:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GwJhR-0002sI-1m for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Dec 2006 09:42:41 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 9 Original-X-Trace: individual.net n0q+4ocZvbV3PRiqarzIYgZWFx36pbx6mAoKSSqqhi2g17uImE User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (windows-nt) Cancel-Lock: sha1:1ke3PM7XMaUPV8E6PRgHg8XqewY= Original-Xref: shelby.stanford.edu gnu.emacs.help:144088 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39703 Archived-At: "Kelly Jones" writes: > How can I tell emacs: hide all text matching the Perl regex > "/^=item.*?=cut$/is" and replace it with "<>" or something > similar. Try this: http://www.emacswiki.org/cgi-bin/wiki/HideLines