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.