🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188893

selective display

#188893
From: Gary Levin
Date: Mon, 10 Jun 1991 14:49
35 lines
1703 bytes
When I turn off selective display, point seems to move to some random
location.  I tried to remember point and goto-char, but this doesn't
seem to help.

Even something as simple as: 
    (set-selective-display 16)
    moving the point somewhere below, but not on, a hidden line
    (set-selective-display nil)
results in point jumping to a random place.

I wanted this as a way to hide a level of a program, move to the
section I wanted to be in and then to remove the hiding.  If I can't
cancel the selective display without losing my place, it isn't much
good.  Any idea why this doesn't work?

    (defun point-selective-display()
	(interactive)
	(let ((arg (current-column))
	      (was (point))
	      )
	  (if (zerop arg)
	      (set-selective-display nil)
	    (set-selective-display arg)
	    )
	  (goto-char was)
	  )
	)

    (define-key global-map "\C-x$" 'point-selective-display)

Gary Levin/Bellcore PYA 1E132/Piscataway, NJ 08854
(908)699-3754  base!gary    gary@base.bellcore.com
--
Gary Levin/Bellcore PYA 1E132/Piscataway, NJ 08854
(908)699-3754  base!gary    gary@base.bellcore.com
Technical Details
Message-ID: <GARY.91Jun10104958@astros.bellcore.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!stanford.edu!rutgers!bellcore!bellcore!gary

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,adfa097c17476f52,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-06-10 10:13:56 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!stanford.edu!rutgers!bellcore!bellcore!gary
From: gary@astros.bellcore.com (Gary Levin)
Newsgroups: gnu.emacs.help
Subject: selective display
Message-ID: <GARY.91Jun10104958@astros.bellcore.com>
Date: 10 Jun 91 14:49:58 GMT
Sender: usenet@bellcore.bellcore.com (Poster of News)
Distribution: gnu
Organization: /bdfs/users/gary/.organization
Lines: 35