emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Link to named block


From: Bastien
Subject: Re: [O] Link to named block
Date: Mon, 20 Oct 2014 11:35:57 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Hi Greg,

Daimrod <address@hidden> writes:

> I've made a small function to link to a named block in org files.
>
> #+BEGIN_SRC emacs-lisp
> (defun dmd--org-link-to-named-block ()
>   "Create an org-link to the named block at point.
>
> Blocks are named with #+NAME."
>   (when (eq major-mode 'org-mode)
>     (let* ((el (org-element-at-point))
>            (name (org-element-property :name el)))
>       (when name
>         (org-store-link-props
>          :link name)))))
> #+END_SRC
>
> Do you think it should be added to org? I find it useful to add a link
> to a figure when I'm exporting to latex.

I'm not sure how to use the function above -- how do you set the link
itself, not just its properties?

> I tried to add it to `org-store-link` but it's a big function and I
> wonder why it's not splitted in smaller functions. (e.g.
> org-help-store-link, org-w3-store-link, org-image-store-link, ...).
> If you agree, I could split it.

Yes, please go ahead.

Thanks,

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]