From: "davidjneu@gmail.com" <neu@rutcor.rutgers.edu>
To: help-gnu-emacs@gnu.org
Subject: Narrowing to non-adjacent regions
Date: Wed, 30 Jan 2008 11:42:51 -0800 (PST) [thread overview]
Message-ID: <fb5c72c1-f708-430d-8d4b-dffe105be5cc@d4g2000prg.googlegroups.com> (raw)
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)))
next reply other threads:[~2008-01-30 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 19:42 davidjneu@gmail.com [this message]
2008-02-01 14:27 ` Narrowing to non-adjacent regions 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb5c72c1-f708-430d-8d4b-dffe105be5cc@d4g2000prg.googlegroups.com \
--to=neu@rutcor.rutgers.edu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.