emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Add org-bookmark-heading to Org proper?
Date: Sun, 25 Sep 2016 10:14:39 +0200	[thread overview]
Message-ID: <87lgyg2y6o.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87eg48vjsl.fsf@alphapapa.net> (Adam Porter's message of "Sat, 24 Sep 2016 20:40:26 -0500")

Hello,

Adam Porter <adam@alphapapa.net> writes:

> I think I see what you mean, but at the same time, it seems like an
> Org-specific feature since it calls org-tree-to-indirect-buffer.  I
> guess I think of Org as building on core Emacs features, so putting an
> Org-specific feature in core bookmark.el seems...backwards?  (Though I'm
> not sure that's what you meant...)

I'm not saying that Bookmark should call `org-tree-to-indirect-buffer',
but provide a way for major modes to specify a jump function.

In any way, you are right, it already exists through the `handler'
mechanism.

> That hook idea sounds interesting, but I'm not sure I understand how it
> would be different than the built-in bookmark-handler feature.

There is only one handler per major mode. Providing a "-function" (or
a "-hook", it depends if it extends a default feature or replace it)
variable could allow users to add their own "view" function
(`org-tree-to-indirect-buffer' in your case, but not limited to it).

> Or maybe something like an org-bookmark-jump-hook could be added to call
> other functions after jumping to an Org bookmark. I guess this is what
> you meant, I just had to talk myself through it.  :)

This is what I meant.

> I went by the docstring for bookmark-make-record-function, which says
> that modes can set it buffer-locally for locations that should be
> treated specially, and that the function called should return a record
> according to bookmark-alist.  I guess the setters are intended for
> modifying existing bookmarks...?

It makes sense, indeed.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2016-09-25  8:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 14:33 Add org-bookmark-heading to Org proper? Adam Porter
2016-09-22 15:11 ` Xebar Saram
2016-09-22 15:19 ` Kaushal Modi
2016-09-22 17:04   ` Adam Porter
2016-09-22 15:52 ` Aaron Ecay
2016-09-22 17:01   ` Adam Porter
2016-09-22 19:35 ` Nicolas Goaziou
2016-09-22 23:40   ` Adam Porter
2016-09-24 17:11     ` Nicolas Goaziou
2016-09-25  1:40       ` Adam Porter
2016-09-25  8:14         ` Nicolas Goaziou [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=87lgyg2y6o.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=adam@alphapapa.net \
    --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).