all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Phil Sainty <psainty@orcon.net.nz>
Cc: 17401@debbugs.gnu.org, contact@zaneashby.co.nz
Subject: bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect clone buffer in the other window
Date: Fri, 18 Sep 2020 16:02:27 +0000 (UTC)	[thread overview]
Message-ID: <bf6f227e-d360-44e4-8c79-8f30ca93d812@default> (raw)
In-Reply-To: <87ft7fgpbm.fsf@gnus.org>

> > That post provides a function which creates a indirect clone of
> > the current buffer, and narrows to the marked region in that, so
> > that you have both the original un-narrowed buffer and the narrowed
> > indirect clone available simultaneously.
> >
> > This is incredibly useful, and it seems like an obvious contender
> > for standard functionality in Emacs.
> >
> > I'm attaching a patch which uses that approach to implement the
> > following functions and bindings:
> >
> > C-x 4 n n: narrow-to-region-indirect-other-window
> > C-x 4 n p: narrow-to-page-indirect-other-window
> > C-x 4 n d: narrow-to-defun-indirect-other-window
> 
> Sounds like a good idea to me, and seems to be a logical extension.
> Anybody got an opinion?
> 
> However:
> 
> > It's still essentially Zane's code, so I've confirmed that he's
> > happy for me to send this, and am CCing this to him.
> 
> We'd need copyright assignment papers for something like this.  Zane,
> would you be willing to assign copyright for this code to the FSF?

FWIW, `narrow-indirect.el' is based on this and extends
it in a few ways.  From the Commentary (and the wiki page):

;;  Acknowledgments:
;;
;;   The idea and original code for a command that combines narrowing
;;   with cloning a buffer as an indirect-buffer is due to Zane Ashby:
;;   https://demonastery.org/2013/04/emacs-narrow-to-region-indirect/.
;;
;;   In Emacs bug thread #17401, Phil Sainty proposed adding three
;;   commands to Emacs based on this approach.  Lennart Borgman
;;   contributed code that uses, in the cloned buffer name, some text
;;   based on the narrowed region.
;;
;;   The code in `narrow-indirect.el' extends this a bit and provides
;;   a couple of user options and some alternative (prefix-argument)
;;   behavior.  It is doubtful that Emacs Dev will ever adopt features
;;   such as those defined here, and if they do then this library can
;;   at least help for Emacs versions prior to their addition.

Description here:

https://www.emacswiki.org/emacs/NarrowIndirect

Code:

https://www.emacswiki.org/emacs/download/narrow-indirect.el





  reply	other threads:[~2020-09-18 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04 10:38 bug#17401: 24.4.50; Narrow to {region,page,defun} in an indirect clone buffer in the other window Phil Sainty
2014-05-04 13:43 ` Drew Adams
2014-05-08  0:05 ` Lennart Borgman
2014-05-10 13:06   ` Phil Sainty
2014-05-10 20:57     ` Josh
2014-05-11  4:12     ` Drew Adams
2020-09-18 13:57 ` Lars Ingebrigtsen
2020-09-18 16:02   ` Drew Adams [this message]
2020-09-18 21:22   ` Zane Ashby
2020-09-19 14:14     ` Lars Ingebrigtsen

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=bf6f227e-d360-44e4-8c79-8f30ca93d812@default \
    --to=drew.adams@oracle.com \
    --cc=17401@debbugs.gnu.org \
    --cc=contact@zaneashby.co.nz \
    --cc=larsi@gnus.org \
    --cc=psainty@orcon.net.nz \
    /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.