emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Enrico Flor <enrico@eflor.net>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: Cannot set invisible text property
Date: Fri, 7 Jan 2022 17:26:25 -0500	[thread overview]
Message-ID: <CAJ51ETpu9HfiD8R2XG_0zP8ehWgX0GbUxxUAum86n=krYP57Hg@mail.gmail.com> (raw)
In-Reply-To: <87pmp41nx1.fsf@eflor.net>

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

Maybe try this instead (you added the symbol as a list, not just a symbol):

123

#+BEGIN_SRC emacs-lisp
(add-text-properties 1 3 '(invisible hide-this-stuff))
(add-to-invisibility-spec 'hide-this-stuff)
#+END_SRC

#+RESULTS:
: (hide-this-stuff (org-hide-block . t) (org-link) (outline . t) t)

#+BEGIN_SRC emacs-lisp
(remove-from-invisibility-spec 'hide-this-stuff)
#+END_SRC

#+RESULTS:
: ((org-hide-block . t) (org-link) (outline . t) t)


John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Thu, Jan 6, 2022 at 5:48 PM Enrico Flor <enrico@eflor.net> wrote:

> In a minor mode I wrote for myself, I use add-text-properties to make
> certain things invisible.  This does not work in org-mode, and I don't
> understand why.  For instance, the following has no effect in when the
> buffer is in org-mode (and only when it's in org mode):
>
>     (add-text-properties 1 3 '(invisible t))
>
> Any other text property I try to add does not give me any problem.
> I have also tried to achieve the same by adding things to
> buffer-invisibility-spec, but again, the following has no effect
> whatsoever, if in org-mode:
>
>     (add-text-properties 1 3 '(invisible hide-this-stuff))
>     (add-to-invisibility-spec '(hide-this-stuff))
>
> Can anyone give me a hint as to what is going on?
>
> Thank you.
>

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

  reply	other threads:[~2022-01-07 22:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 22:48 Cannot set invisible text property Enrico Flor
2022-01-07 22:26 ` John Kitchin [this message]
2022-01-12 14:05 ` Ihor Radchenko
2022-01-12 15:10   ` Enrico Flor

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='CAJ51ETpu9HfiD8R2XG_0zP8ehWgX0GbUxxUAum86n=krYP57Hg@mail.gmail.com' \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=enrico@eflor.net \
    /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).