emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [Question] why my org-link-set-parameters :face function does not work?
Date: Thu, 21 May 2020 06:47:11 +0800	[thread overview]
Message-ID: <877dx68brk.fsf@gmail.com> (raw)
In-Reply-To: <CAJ51ETqA2iJ6WjH2+WtFi7xhYSJyj+cJw33FVMmnhuqR99faRQ@mail.gmail.com>

Hash: SHA256

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> On Tue, May 19, 2020 at 6:51 PM stardiviner <numbchild@gmail.com> wrote:
>> I actually borrowed code from your code example, Because I want to do the
>> following:
> Where did you find code that uses org-element-property on a link like this?
> This won’t work with org-link-set-parameters because the face function does
> not get an org-element, it gets only the path part of it.

Aha, I see. Thanks for point this out. I have not realized Org only pass the
path instead of whole link. I will take a note of this in my notebook.

>> I guess the issue is on the let-binding which invoked
>> ~org-element-property~. But
>> I can't edebug this function. When I =C-u C-M-x= set edebug on the
>> function, and
>> toggle ~font-lock-mode~ on Org Mode buffer, this function is not entering
>> edebug.
>> Don't know how to make Emacs enter this function edebug status.
> I don’t think you can use edebug in font lock functions. I always use the
> old fashioned (message “%s” thing-i-want-to-see) approach.
> Maybe there is some fancy way to do it, e.g. font-lock-studio, but I don’t
> do it often enough to be fluent in fancy things!

Seems this is the way to debug it. Thanks again. :)

- -- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


      reply	other threads:[~2020-05-20 22:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 13:11 stardiviner
2020-05-19 13:23 ` John Kitchin
2020-05-19 22:51   ` stardiviner
2020-05-20 14:41     ` John Kitchin
2020-05-20 22:47       ` stardiviner [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:

  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=877dx68brk.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \


* 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


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).