From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16904: 24.3; [PATCH] ff-find-other-file and friends now work with indirect clone buffers Date: Mon, 10 Mar 2014 01:00:51 -0400 Message-ID: References: <87txbj5vwi.fsf@secretsauce.net> <87eh2d4eeq.fsf@secretsauce.net> <87eh2a3f2l.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1394427733 30417 80.91.229.3 (10 Mar 2014 05:02:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2014 05:02:13 +0000 (UTC) Cc: 16904@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 10 06:02:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WMsM0-0006D5-Uz for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Mar 2014 06:02:21 +0100 Original-Received: from localhost ([::1]:46696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMsM0-0007Qo-K0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Mar 2014 01:02:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMsLq-0007Qi-Ga for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 01:02:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMsLj-0004oJ-51 for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 01:02:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMsLj-0004oF-1s for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 01:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WMsLi-0004iM-LN for bug-gnu-emacs@gnu.org; Mon, 10 Mar 2014 01:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Mar 2014 05:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16904 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 16904-submit@debbugs.gnu.org id=B16904.139442766218037 (code B ref 16904); Mon, 10 Mar 2014 05:02:02 +0000 Original-Received: (at 16904) by debbugs.gnu.org; 10 Mar 2014 05:01:02 +0000 Original-Received: from localhost ([127.0.0.1]:58597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMsKj-0004gg-Fm for submit@debbugs.gnu.org; Mon, 10 Mar 2014 01:01:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63869) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMsKf-0004gH-Vw for 16904@debbugs.gnu.org; Mon, 10 Mar 2014 01:00:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NBYQFA6R6gV6DE4FT X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NBYQFA6R6gV6DE4FT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="50966803" Original-Received: from 76-10-154-114.dsl.teksavvy.com (HELO ceviche.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Mar 2014 01:00:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id BE830660A5; Mon, 10 Mar 2014 01:00:51 -0400 (EDT) In-Reply-To: <87eh2a3f2l.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 09 Mar 2014 20:30:58 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86706 Archived-At: >> Multiple narrowing within the same buffer is indeed not supported, but >> we could easily add commands to "hide everything but the current region" >> which are per-window, where "hide" means "make invisible" rather than >> making it completely inaccessible as narrowing does. > Is the intent for this to replace narrowing? Not "replace", but yes, it would be a new similar feature. > I think it would be confusing to have two very similar but subtly > different mechanisms for doing the same thing. Agreed. But if we want several separate narrowings at the same time in a single buffer (i.e. without using indirect buffers), then I think that's what it would look like. I imagine it would come as an Elisp package which would replace C-x n n, for those rare users like you who want such a functionality. >> As for separate mark-rings, I'm not sure what alternative I can offer. >> Maybe we could have some kind of new command `pop-to-nearest-mark'? > Maybe. That's brittle, though. Yes, clearly. > Here's another way in which an indirect view into a buffer is better > than another window: iswitchb (and maybe other C-x b methods too) sorts > already-visible windows last. This usually results in way more typing > when trying to switch in this way. Interesting point, indeed. > Hmmm. You could set the buffer-file-name variable when the indirect > buffer is created. It's set to nil to avoid problems linked to having to handle "multiple buffers accessing the same file". We'd otherwise have to add special code so that (for example) when you save one of the buffers, the others's states are correspondingly updated (otherwise they'd think that some external process changed the file). > I guess I just don't know about (and haven't seen any) fundamental > breakage in indirect buffers, so my current instinct is to try to fix > it, rather than switch to something else entirely. Most of the issues > I've seen are small things, like modules that use (buffer-file-name). There's some major breakage lurking with most modes that use things like text-properties or after-change-functions. A way to "fix" things might be to restrict the use of indirect clones so they are read-only. > What issues are there with indirect buffers? The default C-x 4 c binding > makes an indirect clone, so it's not THAT obscure. I know. It seemed like a good idea at the time ;-( Stefan