all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Narrowing to non-adjacent regions
@ 2008-01-30 19:42 davidjneu@gmail.com
  2008-02-01 14:27 ` Andreas Röhler
  2008-02-01 19:00 ` Andreas Röhler
  0 siblings, 2 replies; 6+ messages in thread
From: davidjneu@gmail.com @ 2008-01-30 19:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Hi, I'm wondering if it's possible to narrow a buffer so that multiple
non-adjacent
regions are displayed.

The code snippet below doesn't work, but conveys what I'm looking for.

Many thanks!

Cheers,
David

(defun narrow-two ()
  (interactive "*")
  (widen)
  (goto-char (point-min))
  (let ((start-1 (point))
	(end-1 (progn (next-line 5) (point)))
	(start-2 (progn (next-line 7) (point)))
	(end-2 (progn (end-of-buffer) (point))))
  (narrow-to-region start-1 end-1)
  (narrow-to-region start-2 end-2)))

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-01 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-30 19:42 Narrowing to non-adjacent regions davidjneu@gmail.com
2008-02-01 14:27 ` Andreas Röhler
2008-02-01 14:39   ` Lennart Borgman (gmail)
2008-02-01 16:58     ` Andreas Röhler
2008-02-01 18:51     ` Andreas Röhler
2008-02-01 19:00 ` Andreas Röhler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.