* narrow with mode?
@ 2009-05-23 13:38 David Abrahams
2009-06-02 2:05 ` Lennart Borgman
2009-06-02 8:13 ` Teemu Likonen
0 siblings, 2 replies; 4+ messages in thread
From: David Abrahams @ 2009-05-23 13:38 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: John Wiegley
Hi All,
I often find myself wanting to work on a region of a buffer in a
different mode from the current one. For example, I'd like to use
markdown-mode on the body of a weblogger.el blog entry, and then I'd
further like to use c++-mode (or whatever) on code snippets within that
entry. So I'd like to first narrow the body of the entry into markdown
mode, then narrow again to c++-mode, then pop back out to markdown mode
on the whole body, and finally out to weblogger-entry-mode on the whole
buffer.
This seems like it must be an incredibly common need, but I've never
seen anything designed to support it. Closest thing I've seen is
http://www.blackie.dk/emacs/narrow-stack.el, but it only handles part of
the problem. Anyone got a hint for me?
Thanks,
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: narrow with mode?
[not found] <mailman.7673.1243085948.31690.help-gnu-emacs@gnu.org>
@ 2009-05-25 11:59 ` Michael Heerdegen
0 siblings, 0 replies; 4+ messages in thread
From: Michael Heerdegen @ 2009-05-25 11:59 UTC (permalink / raw)
To: help-gnu-emacs
What about mmm-mode?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: narrow with mode?
2009-05-23 13:38 narrow with mode? David Abrahams
@ 2009-06-02 2:05 ` Lennart Borgman
2009-06-02 8:13 ` Teemu Likonen
1 sibling, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2009-06-02 2:05 UTC (permalink / raw)
To: David Abrahams; +Cc: John Wiegley, help-gnu-emacs
On Sat, May 23, 2009 at 3:38 PM, David Abrahams <dave@boostpro.com> wrote:
>
> Hi All,
>
> I often find myself wanting to work on a region of a buffer in a
> different mode from the current one. For example, I'd like to use
> markdown-mode on the body of a weblogger.el blog entry, and then I'd
> further like to use c++-mode (or whatever) on code snippets within that
> entry. So I'd like to first narrow the body of the entry into markdown
> mode, then narrow again to c++-mode, then pop back out to markdown mode
> on the whole body, and finally out to weblogger-entry-mode on the whole
> buffer.
>
> This seems like it must be an incredibly common need, but I've never
> seen anything designed to support it. Closest thing I've seen is
> http://www.blackie.dk/emacs/narrow-stack.el, but it only handles part of
> the problem. Anyone got a hint for me?
You can do that with the latest version of nXhtml (ver 1.80)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: narrow with mode?
2009-05-23 13:38 narrow with mode? David Abrahams
2009-06-02 2:05 ` Lennart Borgman
@ 2009-06-02 8:13 ` Teemu Likonen
1 sibling, 0 replies; 4+ messages in thread
From: Teemu Likonen @ 2009-06-02 8:13 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-05-23 09:38 (-0400), David Abrahams wrote:
> I often find myself wanting to work on a region of a buffer in a
> different mode from the current one.
This is not exactly "narrowing with a mode" but how about cloning an
indirect buffer and using different modes there (with narrows if you
wish)? Press "C-x 4 c" and change the mode on the indirect buffer. For
more info:
C-h r m Indirect Buffers RET
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-02 8:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23 13:38 narrow with mode? David Abrahams
2009-06-02 2:05 ` Lennart Borgman
2009-06-02 8:13 ` Teemu Likonen
[not found] <mailman.7673.1243085948.31690.help-gnu-emacs@gnu.org>
2009-05-25 11:59 ` Michael Heerdegen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).