[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] to correctly sort the items with emphasis marks in a list
From: |
Nicolas Goaziou |
Subject: |
Re: [Patch] to correctly sort the items with emphasis marks in a list |
Date: |
Mon, 19 Apr 2021 10:33:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> I wonder if this other approach can be viable or if it is something
> crazy: if the spaces in org-sort-remove-invisible are a
> problem only for the first emphasis of each item, how about this
> fix to org-sort-list? (not modifying org-sort-remove-invisible):
I think `org-sort-remove-invisible' is wrong, so it is the one that
needs to be fixed.
Could you try the following instead?
--8<---------------cut here---------------start------------->8---
(defun org-sort-remove-invisible (s)
"Remove invisible part of links and emphasis markers from string S."
(let ((remove-markers
(lambda (m)
(concat (match-string 1 m)
(match-string 4 m)
(match-string 5 m)))))
(remove-text-properties 0 (length s) org-rm-props s)
(replace-regexp-in-string
org-verbatim-re remove-markers
(replace-regexp-in-string org-emph-re remove-markers
(org-link-display-format s) t tt)
t t)))
--8<---------------cut here---------------end--------------->8---
Regards,
--
Nicolas Goaziou
- Re: [Patch] to correctly sort the items with emphasis marks in a list, (continued)
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/14
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Juan Manuel Macías, 2021/04/14
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Juan Manuel Macías, 2021/04/14
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/15
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Juan Manuel Macías, 2021/04/15
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/16
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/16
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/17
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Juan Manuel Macías, 2021/04/18
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Juan Manuel Macías, 2021/04/18
- Re: [Patch] to correctly sort the items with emphasis marks in a list,
Nicolas Goaziou <=
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Nicolas Goaziou, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Greg Minshall, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Tom Gillespie, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Greg Minshall, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Nicolas Goaziou, 2021/04/19
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/20
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Maxim Nikulin, 2021/04/20
- Re: [Patch] to correctly sort the items with emphasis marks in a list, Nicolas Goaziou, 2021/04/20