Itemized list editing is a bit counterintuitive?

In particular, the focus works in unexpected ways. Sometimes the bullet alone is the focus. Sometimes the entire list (instead of the list item) is in focus.

Moreover, editing can result in multiple bullets on the same line, which should never be allowed.

Anyone else bothered by these issues?

I can not reproduce the multiple bullets on the same line.

I would like to see is a way to change the rank level of the items with a shortcut for example. It may already exist, is someone aware of this kind of feature ?

Try copying an entire bulleted item (i.e., with the bullet and its text selected). Then paste it after the bullet. You get two adjacent bullets on the same line.

Also, try the same thing but this time paste it before the bullet. Now you get two items without a return between them.

The problem is that sometimes the bullet is treated as special and sometimes it is treated like a normal character.

Ok indeed I’ve just reproduced this. Don’t know if it’s the intended behavior, I personally find it useful but opinion may vary depending on the user.

Here is below a small gif made in Lyx where items ranks are moved with tab or shit+tab


Another one where one can move the item with alt+up/down

Don’t know if such things are possible with Texmacs or how to define it ?

It should be possible to implement it, however one has to pay attention to have a well-behaving feature. I’ve just checked in LyX and what you show does not work if one item spans multiple lines (use Cmd+enter to go to the line). So, nice on the surface, but does it add something?
I do not use very much this feature myself, is it really useful? How much time people spend reorganising items in a list?
Anyway if one really feels cannot live without there should be ways to implement it in scheme. It could be a nice exercise :slight_smile:

I think the problem is that TeXmacs uses the tab key for something else. Implementing this feature without using the tab key would make it less compelling.

This feature would be useful when using TeXmacs for notes/todo lists.

Then the proper way to implement it is to have a style file which creates a todo lists environment and which creates UI elements useful to manage this kind of workflow. For an example give a look at how Philippe implemented an outline mode for TeXmacs:

Do you mean the proper way for now? And when the code becomes stable, it would be part of all documents in TeXmacs?

Why should it be part of all documents? I was thinking that it is appropriate to subordinate such keybindings to a given “todo mode” which will be activated if the user choose to, as in the “outline mode above”. Have you checked it? I think is a nice example of how additional features could be implemented without cluttering the basic interface (which could use some simplification, btw).

Even shorter documents such as conference papers would benefit from an outline mode (which isn’t just about lists). It’s a fundamental feature.

@amichail, maybe. I cannot judge myself. My personal opinion is that it is not such fundamental, as I told you I never felt this need. It would be useful to have other opinions or use cases. Can you show me conference papers with multiple levels of itemise lists?

I’m myself reluctant to add features just because they seems nice. Anyway it should not be difficult to program and we can put any such improvement in tm-forge, so users can add to their TeXmacs without Joris having to maintain it (or make it right, which for me is not so nontrivial: already LyX does not implement it correctly for multiline items, it seems).

I agree that nested lists are not that important for research publications. But an outline mode can help you even without any lists in your document.

Not sure if I’ve tested correctly what you have checked yourself.
I may be wrong but it looks like it kinda “works” here for me Lyx 2.3.6 on Ubuntu. Is this what you’ve tested ?

Regarding the usefulness, I personally think it is useful because I use it frequently in Lyx (org-mode too) :grinning:. But that’s indeed only my point of view which by no means reflect what others may think.

And thanks @mgubi for giving us a starting point to look at :+1:

I sometimes use nested lists for multi-part exercises and on beamer slides.
I have on occasion thought that a “structured editing” keyboard shortcut (Ctrl-Meta-“Left/Right arrow” with the look-and-feel I use) would be nice, but it doesn’t bother me enough to try to implement it :slight_smile:

I agree that we have to be careful about what we include in the standard TeXmacs. It seems very reasonable to have several stages of maturity before anything can be included (from code on the forge, to a development branch of TeXmacs, to the stable release, for example).

I was looking at the promotion/demotion of items in the hierarchy. Indeed I haven’t tested the change of order. This could be indeed useful, in my opinion. Along the same lines one would like similar commands for other environments, like slides or table row/columns, i.e. two keybindings to change the order among the siblings of a given subtree (for table row/cols this is trickier). You can also want to give a look at how the macro which exchange numerator and denominator of a fraction in Help->Scheme extension->TeXmacs editing model, e.g.

(define (swap-numerator-denominator)
  (with-innermost t 'frac
    (with p (tree-cursor-path t)
      (tree-set! t `(frac ,(tree-ref t 1) ,(tree-ref t 0)))
      (tree-go-to t (cons (- 1 (car p)) (cdr p))))))

Something similar could work. Also do not hesitate to peek into $TEXMACS_PATH/progs/ see how some commands which look similar the one you would like to implement are coded.

I think the possibility of publishing code—like in tm-forge—without it being part of the standard program is in fact a strength. It is an idea that has been thought … many times before :slight_smile:

Maybe the Lyx behavior on Mac is not the same, it looks like the promotion/demotion of items in the hierarchy works for me, at least the way I imagine it:


Anyway many thanks @mgubi for your kind answer and great pointers. :+1:

@jeroen and @pireddag
I agree with you, it is indeed wise to let the new features mature and also to leave the choice to the user to integrate certain functionalities or not.
Feedback from the community may possibly influence whether certain features are then default in Texmacs or not.