all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [DISCUSS] "same text-property competing" problem in external packages
@ 2023-02-28  2:16 stardiviner
  2023-02-28  4:30 ` Fwd: " stardiviner
  2023-02-28 10:47 ` Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: stardiviner @ 2023-02-28  2:16 UTC (permalink / raw)
  To: Org-mode; +Cc: emacs-help

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

I got a problem when more than one Emacs package competing on setting
text-property on same target from different packages.

Here is the original problem and discussion link:
https://github.com/nobiot/org-transclusion/issues/166

Does anybody have a good idea to solve this problem?

Thanks for your idea and suggestions.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

[-- Attachment #2: Type: text/html, Size: 1539 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Fwd: [DISCUSS] "same text-property competing" problem in external packages
  2023-02-28  2:16 [DISCUSS] "same text-property competing" problem in external packages stardiviner
@ 2023-02-28  4:30 ` stardiviner
  2023-02-28 12:07   ` Eli Zaretskii
  2023-02-28 10:47 ` Ihor Radchenko
  1 sibling, 1 reply; 4+ messages in thread
From: stardiviner @ 2023-02-28  4:30 UTC (permalink / raw)
  To: emacs-help

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


---------- Forwarded message ---------
From: stardiviner <numbchild@gmail.com>
Date: Tue, Feb 28, 2023 at 10:16 AM
Subject: [DISCUSS] "same text-property competing" problem in external
packages
To: Org-mode <emacs-orgmode@gnu.org>
Cc: <emacs-help@gnu.org>


I got a problem when more than one Emacs package competing on setting
text-property on same target from different packages.

Here is the original problem and discussion link:
https://github.com/nobiot/org-transclusion/issues/166

Does anybody have a good idea to solve this problem?

Thanks for your idea and suggestions.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [DISCUSS] "same text-property competing" problem in external packages
  2023-02-28  2:16 [DISCUSS] "same text-property competing" problem in external packages stardiviner
  2023-02-28  4:30 ` Fwd: " stardiviner
@ 2023-02-28 10:47 ` Ihor Radchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-02-28 10:47 UTC (permalink / raw)
  To: stardiviner; +Cc: Org-mode, emacs-help

stardiviner <numbchild@gmail.com> writes:

> I got a problem when more than one Emacs package competing on setting
> text-property on same target from different packages.
>
> Here is the original problem and discussion link:
> https://github.com/nobiot/org-transclusion/issues/166
>
> Does anybody have a good idea to solve this problem?

I am not sure which property you are referring to.

There is a number of possible solutions you may use depending on what is
more appropriate for your specific use case:

1. Use overlays with 'priority property. That way, you can "overlay" the
   property above/below existing and Emacs will automatically restore
   the existing value upon removing your overlay. This is the most
   common approach.

2. You can utilize `char-property-alias-alist' and actually store your
   property value in a different property. This will make the priority
   of the existing property _strictly higher_ than yours. org-fold-core
   uses this approach.

3. You can store a "backup" of the existing property and restore it when
   your minor mode is disabled. isearch.el uses this approach.

-- 
Ihor Radchenko // yantar92,
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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: [DISCUSS] "same text-property competing" problem in external packages
  2023-02-28  4:30 ` Fwd: " stardiviner
@ 2023-02-28 12:07   ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-02-28 12:07 UTC (permalink / raw)
  To: help-gnu-emacs

> From: stardiviner <numbchild@gmail.com>
> Date: Tue, 28 Feb 2023 12:30:41 +0800
> 
> I got a problem when more than one Emacs package competing on setting
> text-property on same target from different packages.
> 
> Here is the original problem and discussion link:
> https://github.com/nobiot/org-transclusion/issues/166
> 
> Does anybody have a good idea to solve this problem?

Use a different text property.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-28 12:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28  2:16 [DISCUSS] "same text-property competing" problem in external packages stardiviner
2023-02-28  4:30 ` Fwd: " stardiviner
2023-02-28 12:07   ` Eli Zaretskii
2023-02-28 10:47 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.