* bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes
@ 2014-10-02 12:50 Óscar Fuentes
2014-10-30 17:37 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Óscar Fuentes @ 2014-10-02 12:50 UTC (permalink / raw)
To: 18606
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
emacs -Q
Visit the attached SES file
Go to the last row that contains data.
Mark and copy the row to the kill ring (C-Spc Down Meta-w)
Press C-y to yank a new row. SES asks "Yank will insert 1 rows.
Continue? (y or n)". Press y.
The first cell of the new row is left-aligned. The cell it was copied
from is right-aligned.
Until recently, alignment was copied too.
[-- Attachment #2: conta14.ses --]
[-- Type: application/octet-stream, Size: 1668 bytes --]
-10.00
Fecha Concepto Suma Resta Saldo
1/ene First 1.00
1/ene Somewhat large text that doesn't fit 10.00 -9.00
2/ene Another -9.00
\f
(ses-cell A1 nil nil nil nil)
(ses-cell B1 nil nil nil nil)
(ses-cell C1 nil nil nil nil)
(ses-cell D1 -10 (- (apply (quote ses+) (ses-range C3 C5)) (apply (quote ses+) (ses-range D3 D5))) nil nil)
(ses-cell E1 nil nil nil nil)
(ses-cell A2 "Fecha" "Fecha" nil nil)
(ses-cell B2 "Concepto" "Concepto" nil nil)
(ses-cell C2 "Suma" "Suma" nil nil)
(ses-cell D2 "Resta" "Resta" nil nil)
(ses-cell E2 "Saldo" "Saldo" nil nil)
(ses-cell A3 "1/ene" "1/ene" nil nil)
(ses-cell B3 "First" "First" nil nil)
(ses-cell C3 nil nil nil (D1))
(ses-cell D3 nil nil nil (D1))
(ses-cell E3 1 1 nil (E4))
(ses-cell A4 "1/ene" "1/ene" nil nil)
(ses-cell B4 "Somewhat large text that doesn't fit" "Somewhat large text that doesn't fit" nil nil)
(ses-cell C4 *skip* nil nil (E4 D1))
(ses-cell D4 10 10 nil (E4 D1))
(ses-cell E4 -9.0 (+ E3 (- (ses+ C4 0.0) (ses+ D4 0.0))) nil (E5))
(ses-cell A5 "2/ene" "2/ene" nil nil)
(ses-cell B5 "Another" "Another" nil nil)
(ses-cell C5 nil nil nil (E5 D1))
(ses-cell D5 nil nil nil (E5 D1))
(ses-cell E5 -9.0 (+ E4 (- (ses+ C5 0.0) (ses+ D5 0.0))) nil nil)
(ses-column-widths [6 30 7 7 8])
(ses-column-printers [nil ("%s") "%.2f" "%.2f" "%.2f"])
(ses-default-printer "%.7g")
(ses-header-row 0)
( ;Global parameters (these are read first)
2 ;SES file-format
5 ;numrows
5 ;numcols
)
;; Local Variables:
;; mode: ses
;; End:
[-- Attachment #3: Type: text/plain, Size: 490 bytes --]
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit)
of 2014-10-01 on qcore
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.1 LTS
Configured using:
`configure --without-toolkit-scroll-bars --with-x-toolkit=lucid'
Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: SES
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes
2014-10-02 12:50 bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes Óscar Fuentes
@ 2014-10-30 17:37 ` Stefan Monnier
2014-10-30 19:15 ` Óscar Fuentes
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2014-10-30 17:37 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: 18606
> Until recently, alignment was copied too.
Actually, the alignment has simply changed in the new code (it was
never copied/preserved). You can see it if you create a new .ses file
and insert "test" in the first field: in 24.4 it is right aligned, and
in 25.0.50 it's left aligned.
More specifically, you can now control whether the text is left-aligned
or right-aligned by choosing between using a string (left-aligned) or
a symbol (right aligned).
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes
2014-10-30 17:37 ` Stefan Monnier
@ 2014-10-30 19:15 ` Óscar Fuentes
2014-10-30 19:31 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Óscar Fuentes @ 2014-10-30 19:15 UTC (permalink / raw)
To: 18606, Stefan Monnier
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> Until recently, alignment was copied too.
>
> Actually, the alignment has simply changed in the new code (it was
> never copied/preserved). You can see it if you create a new .ses file
> and insert "test" in the first field: in 24.4 it is right aligned, and
> in 25.0.50 it's left aligned.
>
> More specifically, you can now control whether the text is left-aligned
> or right-aligned by choosing between using a string (left-aligned) or
> a symbol (right aligned).
Ok, now I understand what happens a bit better. The printer for the A
colunm on the attached file is `nil', the default one. So you changed
what that means for strings from right-aligned to left-aligned. Now, ses
files show the previously existing string cells right-aligned, but the
new ones left-aligned. That is, if visited with future emacs versions,
but not if visited with existing versions.
And I do not see an easy way of setting a column/cell/default printer
that right-aligns strings: ("%s") left-aligns, as advertised, and "%s"
does the default for strings, which is to left-align too.
So we have two issues here: a change on default behavior that alters
apparience depending on the Emacs version used to visit the ses file,
and missing an easy method for achieving what the user originally
intended (right-aligned strings.)
I understand that, most often, the user will like to see strings
left-aligned, so your change makes sense. You force existing users to
adapt their ses files, if they used right-aligned strings. That's ok
with me personally, and you are the one entitled to decide when it is
worth to take that type of decissions. So I'll not argue here. But we
absolutely need a way to implement the previous behavior, providing a
printer that right-aligns strings. And one that does not break backwards
compatibility, preferably.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes
2014-10-30 19:15 ` Óscar Fuentes
@ 2014-10-30 19:31 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-10-30 19:31 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: 18606
> Now, ses files show the previously existing string cells
> right-aligned, but the new ones left-aligned.
Yes, when you open an SES file, the cells aren't e-computed nor
re-printed, so you get the appearance from the last time you visited
that file.
> But we absolutely need a way to implement the previous behavior,
> providing a printer that right-aligns strings.
The idea was to replace the strings with symbols. But indeed, it might
be inconvenient. Hmmm...
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-30 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-02 12:50 bug#18606: 25.0.50; SES: Copy&Paste row doesn't keep attributes Óscar Fuentes
2014-10-30 17:37 ` Stefan Monnier
2014-10-30 19:15 ` Óscar Fuentes
2014-10-30 19:31 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.