emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH v2] org.el: Fix percent substitutions in `org-open-file'
Date: Mon, 05 Sep 2022 13:46:41 +0800	[thread overview]
Message-ID: <875yi2xtj2.fsf@localhost> (raw)
In-Reply-To: <tf24vg$43p$1@ciao.gmane.io>

Max Nikulin <manikulin@gmail.com> writes:

> I have removed most parts of the example. In addition I fixed some 
> issues with references in the docstring (man mailcap is not recognized 
> as a link for some reason yet). I changed the function to consider 
> trailing backslash as a format error.

Thanks!
Applied onto main with minor amendments to punctuation in the docstrings.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ac2d0a249e5419fb52bc1e953e70c847a31d40de

> I mean another problem. A user adds (require 'some-package) that defines 
> new link type. Later the user invokes easy customization interface to 
> adjust a link unrelated to some-package. At this step
> links from some-package are added to user's init file. Ideally it should 
> not happen and after removing of (require 'some-package) there should be 
> no link types from the package in the init file at all, including 
> customization section.
>
>  From my point of view entries added to `org-link-parameters', 
> `org-file-apps', etc. by packages should not affect entries managed 
> through customization.

Well. The situation with third-party packages overriding/changing
defcustoms is not uncommon in Emacs. For example, display-buffer-alist
is altered by shackle.

I think that the usual approach to mitigate this problem (when it is a
problem) is adding an auxiliary variable supplementing defcustom. Just
like `org-entities' and `org-entities-user'. Note that we actually do
have such auxiliary variables for `org-file-apps':
`org-file-apps-macos', `org-file-apps-gnu', and
`org-file-apps-windowsnt'. They are currently declared as constants, but
we may change it - there is no strong reason to disallow altering those
OS-specific variables.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


      reply	other threads:[~2022-09-05  5:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 16:08 greedy substitution in org-open-file Maxim Nikulin
2021-02-12  7:16 ` Kyle Meyer
2021-02-12 16:46   ` Maxim Nikulin
2021-02-13  4:38     ` Kyle Meyer
2021-02-15 17:04       ` Maxim Nikulin
2021-03-03 12:47       ` Maxim Nikulin
2021-03-21 12:36       ` Maxim Nikulin
2022-08-27 17:20         ` [PATCH] org.el: Fix percent substitutions in `org-open-file' Max Nikulin
2022-09-02 12:08           ` Ihor Radchenko
2022-09-02 15:41             ` Max Nikulin
2022-09-03  8:26               ` Ihor Radchenko
2022-09-04 12:16                 ` [PATCH v2] " Max Nikulin
2022-09-05  5:46                   ` Ihor Radchenko [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=875yi2xtj2.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).