"Max Rydahl Andersen" <mande...@redhat.com> writes:

> Any pointers on how to do this ?
> I tried this but no luck to get hooked in:
> ```
> (defadvice org-fix-list-indent
>     (around org-list-indent-item-generic)
>   "Advise list indention to trigger creation of star instead"
>   (message "DO MAGIC!")
>   (ad-do-it)
> )
> ```
> But with this "DO MAGIC!" does not show up.

The function to advice is `org-shiftmetaleft', not

Anyway, you can also add something like the following to

  (defun my-shiftmetaleft ()
    (let* ((element (org-element-at-point))
           (list-parent (org-element-lineage element '(item plain-list) t)))
      (when (and list-parent
                 (= (line-beginning-position)
                    (org-element-property :post-affiliated element)))
         (if (org-element-lineage list-parent '(item)) ;not at top level


Reply via email to