From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Bloggs Newsgroups: gmane.emacs.help Subject: Re: save file hide-region state Date: Sat, 26 Jul 2008 13:48:12 +0100 Message-ID: <878wvobylv.fsf@DEBLAP1.BeNet> References: <871w1ivzdk.fsf@DEBLAP1.BeNet> <87iqut4aaz.fsf@DEBLAP1.BeNet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1217079724 7824 80.91.229.12 (26 Jul 2008 13:42:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jul 2008 13:42:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 26 15:42:53 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KMk2q-00085h-SE for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Jul 2008 15:42:49 +0200 Original-Received: from localhost ([127.0.0.1]:44802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KMk1x-0004r4-48 for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Jul 2008 09:41:53 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sat, 26 Jul 2008 07:48:27 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:jmJclm8st6jyrbq82f/BkA3L1mA= Original-Lines: 33 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-gcN+GNdDDlbGbBgZunpe0jOP8DlyJvUhG/y3nvbDJ54w3tN+t8Zln3V6IKPOfYdZdawGweP207/C09Q!1dn87P2WJQIcpArxV1mXP2Hsuxg4ZQRGWTzSDR0ia6263dxtWbqV Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:160616 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:55964 Archived-At: Joe Bloggs writes: > Peter Dyballa writes: > >> Am 25.07.2008 um 15:59 schrieb Joe Bloggs: >> >>> Does anyone know if there is anyway to save the state of hidden >>> regions >>> so that when I revisit a file, the hidden regions are still hidden? >> >> Could be session.el does what you want. >> >> -- >> Greetings >> >> Pete >> >> When you meet a master swordsman, >> show him your sword. >> When you meet a man who is not a poet, >> do not show him your poem. >> – Rinzai, ninth century Zen master > > Thanks, that's a useful package. However I can't get it to work with hide-region-hide > I added the hide-region-overlays variable from hide-region to the session-globals-include > variable in session, but no joy. I have set the Max size to 20, and tried with both > possible states for Alist. Anyone? After further investigation I have come to realize that making this work would involve adding new functionality to session.el. It would require a variable to save the hide regions between sessions, and a function to add to find-file-hook to hide the saved hide regions when a buffer is opened.