From: Tim Wichmann <schlemme-wichmann@arcor.de>
To: emacs-orgmode@gnu.org
Subject: Re: Question regarding org-capture-bookmark and org-bookmark-names-plist
Date: Thu, 08 Feb 2024 19:09:08 +0100 [thread overview]
Message-ID: <87bk8qreqm.fsf@arcor.de> (raw)
In-Reply-To: <87bk8r2ig1.fsf@localhost>
Dear Ihor,
Ihor Radchenko <yantar92@posteo.net> writes:
>> My question: Is this the intended way to suppress bookmark creation?
>
> I think so.
Great!
> We first introduced `org-capture-bookmark' and only then added
> `org-bookmark-names-plist'. Maybe we should obsolete
> `org-capture-bookmark' to avoid confusion.
Thanks for the clarification. Obsoleting `org-capture-bookmark' sounds
good, as the variable does not add new functionality which can not be
achieved with `org-bookmark-names-plist' already.
>> ...(Note, moreover, that currently
>> the :last-capture-marker bookmark is created even in case
>> `org-capture-bookmark' is set to nil, see `org-refile'.)
>
> May you elaborate? Are you sure that it is still the case on the latest main?
I double checked in newest version of defun `org-refile' in main branch:
The bookmark for :last-capture-marker is set independently of the value
of `org-capture-bookmark'. The corresponding code looks like this:
---[snip: org-refile.el, line 608 ff.]---
(when (bound-and-true-p org-capture-is-refiling)
(let ((bookmark-name (plist-get org-bookmark-names-plist
:last-capture-marker)))
(when bookmark-name
(condition-case err
(bookmark-set bookmark-name)
---[end snip]---
I would have expected that this bookmark is not set in case
`org-capture-bookmark' is set to nil, something like this:
---[snip]---
(when (bound-and-true-p org-capture-is-refiling)
(when org-capture-bookmark
(let ((bookmark-name (plist-get org-bookmark-names-plist
[...]
---[end snip]---
But, when obsoleting `org-capture-bookmark', this problem is solved
anyhow: Bookmark creation can be fully controlled using the plist
variable (and only there).
So, I vote for obsoleting `org-capture-bookmark'.
Thanks again for your help!
Best regards,
Tim.
next prev parent reply other threads:[~2024-02-12 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 20:07 Question regarding org-capture-bookmark and org-bookmark-names-plist Tim Wichmann
2024-02-08 13:29 ` Ihor Radchenko
2024-02-08 18:09 ` Tim Wichmann [this message]
2024-02-08 20:58 ` Tim Wichmann
2024-02-09 16:50 ` Ihor Radchenko
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=87bk8qreqm.fsf@arcor.de \
--to=schlemme-wichmann@arcor.de \
--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).