help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need to know how to goto-column


From: Michael Heerdegen
Subject: Re: Need to know how to goto-column
Date: Sun, 06 Dec 2020 23:34:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> (my-print-table-to-string '(("OK" "More")
>                           ("One" "Two")) nil '(10 50))
>
> I have expected that above will give some aligned columns. Maybe you
> have example how to use it?

I made it so that the last argument is expected to be a list of symbols
left, right, centered (not numbers as you tried) - like in the example I
had given:

#+begin_src emacs-lisp
(my-print-table-to-string
  '((1 "xx") (20 "yyy"))
  `(,#'number-to-string ,#'identity) ; how cols are formatted
  '(left right))                    ; col alignments
#+end_src

Columns are always made as narrow as possible with the given strings.
One could use the COL-FORMATTERS argument to add padding to a certain
column (I guess I would use `format' for that).

Does that answer your question?  Would you prefer different semantics?


Regards,

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]