emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-id-goto doesn't work if buffer is narrowed.
Date: Fri, 23 Oct 2015 22:18:57 +0200	[thread overview]
Message-ID: <87vb9xz6by.fsf@gmx.us> (raw)
In-Reply-To: 87611xl5kr.fsf@fastmail.fm

Hi Matt,

Matt Lundin <mdl@imapmail.org> writes:

>>> I've attached a one-line patch to fix `org-id-goto' if the target
>>> buffer is narrowed. Let me know if this fix sounds reasonable or if
>>> you have other suggestions!
>>
>> It's not obvious that org should change a—potentially—carefully selected
>> narrowed region.
>
> Org mode already does this aggressively and often. For instance, it
> irrevocably widens all buffers associated with org-agenda-files when
> generating the agenda. (To replicate, try narrowing to a headline in a
> buffer and then calling the agenda.) The same is true of follow mode; it
> widens a buffer once one moves to a line in the agenda corresponding to
> that buffer. In other words, org currently does not go out of its way to
> protect user's narrowed regions.
>
> +1 on my part for widening a buffer if it contains a relevant id target.
> If I click org-id-goto and the target is in my buffer, I want it to
> widen that buffer.

It’s not that Org isn’t trying to save narrows, it’s just that you found
another bug (sounds like a missing org-with-wide-buffer to me, but I
haven’t tried to reproduce your example).  It could of course also be that
the same logic is not applied in this case on purpose.

In Org 8.3, you'll (thankfully) not lose your narrow when you click C-c
C-c on a footnote reference outside the current narrow.  Also not when you
insert a new footnote.

Whether it would be better to use an indirect buffer, as John suggests, or
whether it would be possible to utilize the familiar interface of
org-src.el for "remote editing" (or viewing) I don’t know.

Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .

      reply	other threads:[~2015-10-23 20:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 15:11 [PATCH] org-id-goto doesn't work if buffer is narrowed Puneeth Chaganti
2015-10-23 15:27 ` Rasmus
2015-10-23 18:05   ` Puneeth Chaganti
2015-10-23 18:48     ` John Kitchin
2015-10-23 20:22     ` Rasmus
2015-10-24  5:29       ` Puneeth Chaganti
2015-10-24 11:33         ` John Kitchin
2015-10-24 11:49           ` Puneeth Chaganti
2015-10-24 11:57           ` Nicolas Goaziou
2015-10-24 12:47           ` Rasmus
2015-10-24 17:48             ` John Kitchin
2015-10-24 18:03               ` Rasmus
2015-10-25 11:11                 ` John Kitchin
2015-10-24 12:27         ` Rasmus
2015-10-25  2:24           ` Puneeth Chaganti
2015-10-25  3:12             ` Puneeth Chaganti
2015-10-25  8:38               ` Nicolas Goaziou
2015-10-25  9:10                 ` Puneeth Chaganti
2015-10-25  9:42                   ` Nicolas Goaziou
2015-10-25  9:57                     ` Puneeth Chaganti
2015-10-25 11:19             ` Rasmus
2015-10-26 14:14               ` Puneeth Chaganti
2015-10-23 19:59   ` Matt Lundin
2015-10-23 20:18     ` Rasmus [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vb9xz6by.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).