emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Items with emphasis marks are not sorted properly in a list
@ 2021-03-22 21:59 Juan Manuel Macías
  2021-03-23  8:36 ` Juan Manuel Macías
  0 siblings, 1 reply; 2+ messages in thread
From: Juan Manuel Macías @ 2021-03-22 21:59 UTC (permalink / raw)
  To: orgmode

Hi,

Consider this list:

- vol.
- adj.
- /circa/
- /vid./

If I evaluate `(org-sort-list t ?a)', it seems that `org-sort-list'
doesn't sort correctly items that contain an emphasis mark:

- /circa/
- /vid./
- adj.
- vol.

I don't know if there is any solution to this, or if I'm doing something wrong...

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Items with emphasis marks are not sorted properly in a list
  2021-03-22 21:59 Items with emphasis marks are not sorted properly in a list Juan Manuel Macías
@ 2021-03-23  8:36 ` Juan Manuel Macías
  0 siblings, 0 replies; 2+ messages in thread
From: Juan Manuel Macías @ 2021-03-23  8:36 UTC (permalink / raw)
  To: orgmode

Hello again:

I think I have found where the problem is. On line 7 of
`org-sort-remove-invisible' there are two spurious spaces (in the `format'
expression):

7    org-emph-re (lambda (m) (format " %s " (match-string 4 m)))

When the spaces are removed, then the items with emphasis marks are
sorted correctly in the list:

7    org-emph-re (lambda (m) (format "%s" (match-string 4 m)))

Can this be a fix? Or were those spaces there for any other reason?

Best regards,

Juan Manuel 

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Hi,
>
> Consider this list:
>
> - vol.
> - adj.
> - /circa/
> - /vid./
>
> If I evaluate `(org-sort-list t ?a)', it seems that `org-sort-list'
> doesn't sort correctly items that contain an emphasis mark:
>
> - /circa/
> - /vid./
> - adj.
> - vol.
>
> I don't know if there is any solution to this, or if I'm doing something wrong...
>
> Best regards,
>
> Juan Manuel 
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-23  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 21:59 Items with emphasis marks are not sorted properly in a list Juan Manuel Macías
2021-03-23  8:36 ` Juan Manuel Macías

Code repositories for project(s) associated with this 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).