Bug #1623
EmacsUI: annoying colours
Description
I have now found examples where the EmacsUI can change colours annoyingly: printing out homomorphisms.
use P ::= QQ[x,y]; images := [x^2,y^3]; PolyAlgebraHom(P,P, images);
The use of double-minus inside the arrows confuses emacs (which interprets them as comment starts).
History
#1 Updated by John Abbott over 2 years ago
I suppose we could change the printed form to something like this:
RingHom(FromRing = RingWithID(3, "QQ[x,y]"), ToRing = RingWithID(3, "QQ[x,y]") sending (x |-> x^2) & (y |-> y^3))
Or maybe
domain
and codomain
instead of FromRing
and ToRing
?Notice that I have also changed the "mapsto" symbols (to avoid the double minus).
What do you think?
#2 Updated by John Abbott over 2 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Now that I must consider how ringhoms are printed, I do think that readability of the current format is not so good.
Part of the problem is that rings are currently printed out in an ugly way.
Maybe I should just implement a new format, and see who screams?
#3 Updated by Anna Maria Bigatti over 2 years ago
John Abbott wrote:
I suppose we could change the printed form to something like this:
[...]
Or maybedomain
andcodomain
instead ofFromRing
andToRing
?
Notice that I have also changed the "mapsto" symbols (to avoid the double minus).What do you think?
this is my proposal:
RingHom(RingWithID(3, "QQ[x,y]") -> RingWithID(3, "QQ[x,y]") sending (x to x^2) & (y to y^3))
#4 Updated by John Abbott over 2 years ago
- Target version changed from CoCoA-5.4.0 to CoCoA-5.4.2
#5 Updated by John Abbott 6 months ago
Can we conclude this discussion, implement, and close? :-)
#6 Updated by Anna Maria Bigatti 6 months ago
New suggestion (the most compact I can think of)
RingHom(RingWithID(3, "QQ[x,y]") -> RingWithID(3, "QQ[x,y]") sending (x,y) to (x^2, y^3) )
#7 Updated by John Abbott 6 months ago
- % Done changed from 10 to 20
Not bad! Minor variant: using square brackets for lists
RingHom(RingWithID(3, "QQ[x,y]") -> RingWithID(3, "QQ[x,y]") sending [x,y] to [x^2, y^3] )
I still have some reservations about readability of the FromRing -> ToRing
part, but do not really have a better suggestion.
Does the printing change if we use indent
? I suppose not; but could it, should it?
RingHom(RingWithID(3, "QQ[x,y]") -> RingWithID(3, "QQ[x,y]") sending [x,y] to [x^2, y^3] )
#8 Updated by Anna Maria Bigatti 6 months ago
- Assignee set to Anna Maria Bigatti
John Abbott wrote:
Does the printing change if we use
indent
? I suppose not; but could it, should it?
It is printed by CoCoALib RingHomBase::myOutputSelf
, so CoCoA-5 indent
should have no effect on it.
#9 Updated by Anna Maria Bigatti 6 months ago
Done:
RingHom(RingWithID(3, "QQ[x,y]") -> RingWithID(3, "QQ[x,y]") sending [x, y] to [x^2, y^3])
(and also done some cleaning in old commented out code)
#10 Updated by Anna Maria Bigatti 6 months ago
- Status changed from In Progress to Feedback
#11 Updated by Anna Maria Bigatti 6 months ago
Tested also for DenseUPolyRing
(and made example for DUP)
#12 Updated by Anna Maria Bigatti 6 months ago
- % Done changed from 20 to 90