From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug, org] footnote-action broken with narrowed buffer Date: Sat, 25 Apr 2015 20:17:58 +0200 Message-ID: <87bnicxeax.fsf@gmx.us> References: <87lhhhzdf5.fsf@gmx.us> <87bnidcnfq.fsf@nicolasgoaziou.fr> <87h9s5z2kx.fsf@gmx.us> <87fv7obnyb.fsf@nicolasgoaziou.fr> <87tww4xz4i.fsf@gmx.us> <877ft0bdw0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym4fT-0008Sw-Qr for emacs-orgmode@gnu.org; Sat, 25 Apr 2015 14:19:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ym4em-0005uC-8O for emacs-orgmode@gnu.org; Sat, 25 Apr 2015 14:18:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:49542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym4em-0005pj-1M for emacs-orgmode@gnu.org; Sat, 25 Apr 2015 14:18:24 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ym4ef-0008Kd-BV for emacs-orgmode@gnu.org; Sat, 25 Apr 2015 20:18:17 +0200 Received: from x5ce153b6.dyn.telefonica.de ([92.225.83.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Apr 2015 20:18:17 +0200 Received: from rasmus by x5ce153b6.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Apr 2015 20:18:17 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: >> In any case, how about some of these alternative approaches to the issue >> of handling footnotes from a narrowed buffer. >> >> 1. Retrieve the footnote in the minibuffer. E.g. org-footnote-action >> shows the footnote-definition if it is outside of the narrow (and >> known) in the minibuffer? E.g. 2. when using prefix. > > I suggested it already in this thread, i.e., if the definition is > outside the narrowed part of the buffer, offer to widen and jump to it, > or display the definition, or do nothing. The problem is that narrow can be time-consuming to recreate. Consider this narrow where I have to edit fn:1 * top ** h1 ** h2 *** h3 Txt[fn:1] To recreate the narrow I have to go to *top, narrow to the subtree, potentially collapse *h{1,2}... > Actually, displaying the definition could be a separate binding (e.g., > C-u C-c C-c), since it could be useful even outside this case. > >> 2. Show the definition in the minibuffer as editable text (read input) >> and update it if necessary. > > Then you have to deal with out of sync buffers, closed buffers,.. Wouldn't it only find definition in the same file? If you use a popup indirect buffer narrowed to the footnote-definition in question I don't think these problems can exist. In any case, this would seem similar to the way ob handles code blocks. > I'm pretty sure that in this situation, the user is able to widen the > buffer himself and then jump to the definition in order to edit it. This > would be a lot of trouble for a debatable benefit. Sure, but recreating your narrow takes time. And it's annoying when you want to review a section, say. —Rasmus -- And I faced endless streams of vendor-approved Ikea furniture. . .