all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ELPA] New package: valign.el
@ 2020-11-30  4:24 Yuan Fu
  2020-11-30  7:43 ` Pankaj Jangid
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yuan Fu @ 2020-11-30  4:24 UTC (permalink / raw)
  To: emacs-devel\@gnu.org

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

Text-based tables in Emacs has a problem when used with variable-pitch fonts and CJK characters: they don’t align. To solve that problem, I wrote a package, vailgn.el, to provide automatic alignment for Org Mode, Markdown, and table.el tables. Many people have been using it (primarily the Chinese community) with success and many bugs have been fixed. With the latest version, I am satisfied with the features valign.el provides and its stability, so I want to see added to ELPA.

I’ve updated the copyright header and I’ve signed the assignment. What should I do next? I wish to keep hosting the project on GitHub. Here is the project homepage: https://github.com/casouri/valign

Thanks,
Yuan

----------------------------------

Variable-pitch fonts:


CJK characters:


table.el tables:



[-- Attachment #2.1: Type: text/html, Size: 2203 bytes --]

[-- Attachment #2.2: Screen Shot 2020-11-29 at 11.12.45 PM.png --]
[-- Type: image/png, Size: 104417 bytes --]

[-- Attachment #2.3: Screen Shot 2020-11-29 at 11.13.31 PM.png --]
[-- Type: image/png, Size: 78220 bytes --]

[-- Attachment #2.4: Screen Shot 2020-11-29 at 11.21.22 PM.png --]
[-- Type: image/png, Size: 96416 bytes --]

[-- Attachment #2.5: Screen Shot 2020-11-29 at 11.15.07 PM.png --]
[-- Type: image/png, Size: 29490 bytes --]

[-- Attachment #2.6: Screen Shot 2020-11-29 at 11.21.05 PM.png --]
[-- Type: image/png, Size: 47047 bytes --]

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

* Re: [ELPA] New package: valign.el
  2020-11-30  4:24 [ELPA] New package: valign.el Yuan Fu
@ 2020-11-30  7:43 ` Pankaj Jangid
  2020-11-30 14:55   ` Yuan Fu
  2020-11-30 15:02   ` Alexander Adolf
  2020-12-02  3:39 ` 황병희
  2020-12-05 19:12 ` William Xu
  2 siblings, 2 replies; 11+ messages in thread
From: Pankaj Jangid @ 2020-11-30  7:43 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel@gnu.org

Yuan Fu <casouri@gmail.com> writes:

> Text-based tables in Emacs has a problem when used with variable-pitch
> fonts and CJK characters: they don’t align. To solve that problem, I
> wrote a package, vailgn.el, to provide automatic alignment for Org
> Mode, Markdown, and table.el tables. Many people have been using it
> (primarily the Chinese community) with success and many bugs have been
> fixed. With the latest version, I am satisfied with the features
> valign.el provides and its stability, so I want to see added to ELPA.
>
> I’ve updated the copyright header and I’ve signed the assignment. What
> should I do next? I wish to keep hosting the project on GitHub. Here
> is the project homepage: https://github.com/casouri/valign

This looks really good. I have a question.

Is this package related to tables only or will this be a generic
enhancement? I feel that this should be a generic enhancement. Following
are the two cases where I see its appliation:

*One:*

A few days back I was tinkering with the ``Gnus Summary Line Format''
and I was thinking if it is possible to align the lines containing
non-english multi-byte characters with the other lines containing ASCII
names.

Value of my `gnus-summary-line-format' is

"%4P %U%R%z %-16&user-date; %(%[%4L(%4k):%*%-23,23f%]%) %B%s

I have reserved 23 characters for name but it misaligns when there are
multi-byte characters in it.

*Two:*

When I enable any of the `modus-' themes, org-mode tables with too many
columns misaligns.



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

* Re: [ELPA] New package: valign.el
  2020-11-30  7:43 ` Pankaj Jangid
@ 2020-11-30 14:55   ` Yuan Fu
  2020-11-30 15:02   ` Alexander Adolf
  1 sibling, 0 replies; 11+ messages in thread
From: Yuan Fu @ 2020-11-30 14:55 UTC (permalink / raw)
  To: Pankaj Jangid; +Cc: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]



> On Nov 30, 2020, at 2:43 AM, Pankaj Jangid <pankaj@codeisgreat.org> wrote:
> 
> Yuan Fu <casouri@gmail.com <mailto:casouri@gmail.com>> writes:
> 
>> Text-based tables in Emacs has a problem when used with variable-pitch
>> fonts and CJK characters: they don’t align. To solve that problem, I
>> wrote a package, vailgn.el, to provide automatic alignment for Org
>> Mode, Markdown, and table.el tables. Many people have been using it
>> (primarily the Chinese community) with success and many bugs have been
>> fixed. With the latest version, I am satisfied with the features
>> valign.el provides and its stability, so I want to see added to ELPA.
>> 
>> I’ve updated the copyright header and I’ve signed the assignment. What
>> should I do next? I wish to keep hosting the project on GitHub. Here
>> is the project homepage: https://github.com/casouri/valign
> 
> This looks really good. I have a question.
> 
> Is this package related to tables only or will this be a generic
> enhancement? I feel that this should be a generic enhancement. Following
> are the two cases where I see its appliation:
> 

This package is only about tables. AFAICT providing a generic auto-alignment is difficult. A better way is to ask the author of each of the packages to align the columns in the package. That’s quite easy, often one only need to replace

(insert (make-string 3 ?\s))

with

(insert (propertize " " 'display '(space :align-to xxx)))


Yuan


[-- Attachment #2: Type: text/html, Size: 8060 bytes --]

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

* Re: [ELPA] New package: valign.el
  2020-11-30  7:43 ` Pankaj Jangid
  2020-11-30 14:55   ` Yuan Fu
@ 2020-11-30 15:02   ` Alexander Adolf
  2020-12-02  9:32     ` Lars Ingebrigtsen
  2020-12-05 19:17     ` William Xu
  1 sibling, 2 replies; 11+ messages in thread
From: Alexander Adolf @ 2020-11-30 15:02 UTC (permalink / raw)
  To: Pankaj Jangid, Yuan Fu; +Cc: emacs-devel@gnu.org


Pankaj Jangid <pankaj@codeisgreat.org> writes:

> [...]
> *One:*
>
> A few days back I was tinkering with the ``Gnus Summary Line Format''
> and I was thinking if it is possible to align the lines containing
> non-english multi-byte characters with the other lines containing ASCII
> names.
>
> Value of my `gnus-summary-line-format' is
>
> "%4P %U%R%z %-16&user-date; %(%[%4L(%4k):%*%-23,23f%]%) %B%s
>
> I have reserved 23 characters for name but it misaligns when there are
> multi-byte characters in it.
> [...]

:+1: Same issue here with notmuch-search. But it seems unlikely that this
package will solve our issue, since the docs talk about aligning stuff
in tables only.

To do what this package offers, you will need to do "edge detection" on
the surrounding material in order to know which parts of the surrounding
text to stretch. This seems somewhat feasible in tables, because the
"edges" are readily marked up, and equally where "surrounding material"
ends.



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

* Re: [ELPA] New package: valign.el
  2020-11-30  4:24 [ELPA] New package: valign.el Yuan Fu
  2020-11-30  7:43 ` Pankaj Jangid
@ 2020-12-02  3:39 ` 황병희
  2020-12-02  4:24   ` Yuan Fu
  2020-12-05 19:12 ` William Xu
  2 siblings, 1 reply; 11+ messages in thread
From: 황병희 @ 2020-12-02  3:39 UTC (permalink / raw)
  To: emacs-devel@gnu.org

Dear Yuan,

Yuan Fu <casouri@gmail.com> writes:

> Text-based tables in Emacs has a problem when used with variable-pitch fonts and CJK characters: they don’t
> align. To solve that problem, I wrote a package, vailgn.el, to provide automatic alignment for Org Mode,
> Markdown, and table.el tables. Many people have been using it (primarily the Chinese community) with success
> and many bugs have been fixed. With the latest version, I am satisfied with the features valign.el provides and its
> stability, so I want to see added to ELPA.
>
> I’ve updated the copyright header and I’ve signed the assignment. What should I do next? I wish to keep hosting
> the project on GitHub. Here is the project homepage: https://github.com/casouri/valign
>
> Thanks,
> Yuan
>
> ----------------------------------
>
> Variable-pitch fonts:
> *
>
> CJK characters:
> *
> *
>
> table.el tables:
> *
> *
>

I saw the screenshots at your git repo. That is very amazing!!! THANK
YOU VERT SO MUCH!!!

Sincerely, CJK user Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//



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

* Re: [ELPA] New package: valign.el
  2020-12-02  3:39 ` 황병희
@ 2020-12-02  4:24   ` Yuan Fu
  2020-12-02  4:33     ` 황병희
  0 siblings, 1 reply; 11+ messages in thread
From: Yuan Fu @ 2020-12-02  4:24 UTC (permalink / raw)
  To: 황병희; +Cc: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

> 
> I saw the screenshots at your git repo. That is very amazing!!! THANK
> YOU VERT SO MUCH!!!
> 
> Sincerely, CJK user Byung-Hee
> 
> -- 
> ^고맙습니다 _地平天成_ 감사합니다_^))//

I’m glad it’s useful to you :-D

Yuan

[-- Attachment #2: Type: text/html, Size: 4944 bytes --]

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

* Re: [ELPA] New package: valign.el
  2020-12-02  4:24   ` Yuan Fu
@ 2020-12-02  4:33     ` 황병희
  0 siblings, 0 replies; 11+ messages in thread
From: 황병희 @ 2020-12-02  4:33 UTC (permalink / raw)
  To: emacs-devel@gnu.org

> I’m glad it’s useful to you :-D
>
> Yuan

INDEED!!! Yuan! Again you are NICE Guy~!!!

Sincerely, CJK user Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//

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

* Re: [ELPA] New package: valign.el
  2020-11-30 15:02   ` Alexander Adolf
@ 2020-12-02  9:32     ` Lars Ingebrigtsen
  2020-12-05 19:17     ` William Xu
  1 sibling, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-02  9:32 UTC (permalink / raw)
  To: Alexander Adolf; +Cc: Yuan Fu, Pankaj Jangid, emacs-devel@gnu.org

Alexander Adolf <alexander.adolf@condition-alpha.com> writes:

> :+1: Same issue here with notmuch-search. But it seems unlikely that this
> package will solve our issue, since the docs talk about aligning stuff
> in tables only.

See bug#44664, where Eli and I are discussing possible new methods for
buffers that want to have aligned monospaced columns.  It's possible,
hopefully, that we can do something general to fix this common problem.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: [ELPA] New package: valign.el
  2020-11-30  4:24 [ELPA] New package: valign.el Yuan Fu
  2020-11-30  7:43 ` Pankaj Jangid
  2020-12-02  3:39 ` 황병희
@ 2020-12-05 19:12 ` William Xu
  2 siblings, 0 replies; 11+ messages in thread
From: William Xu @ 2020-12-05 19:12 UTC (permalink / raw)
  To: emacs-devel

Yuan Fu <casouri@gmail.com> writes:

> Text-based tables in Emacs has a problem when used with variable-pitch fonts and CJK characters: they don’t align. To solve
> that problem, I wrote a package, vailgn.el, to provide automatic alignment for Org Mode, Markdown, and table.el tables. Many
> people have been using it (primarily the Chinese community) with success and many bugs have been fixed. With the latest
> version, I am satisfied with the features valign.el provides and its stability, so I want to see added to ELPA.

The result looks really nice!

In addition, the valign-fancy-bar removes all gaps between vertical
bars, which makes the tables look much nicer. 

-- 
William




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

* Re: [ELPA] New package: valign.el
  2020-11-30 15:02   ` Alexander Adolf
  2020-12-02  9:32     ` Lars Ingebrigtsen
@ 2020-12-05 19:17     ` William Xu
  2020-12-05 22:50       ` Yuan Fu
  1 sibling, 1 reply; 11+ messages in thread
From: William Xu @ 2020-12-05 19:17 UTC (permalink / raw)
  To: emacs-devel

Alexander Adolf <alexander.adolf@condition-alpha.com> writes:

> To do what this package offers, you will need to do "edge detection" on
> the surrounding material in order to know which parts of the surrounding
> text to stretch. This seems somewhat feasible in tables, because the
> "edges" are readily marked up, and equally where "surrounding material"
> ends.

That being said, I think the same method may be also applied to calendar
buffer, when the weekdays are shown using non-ascii characters. There,
the space might be used as the "bar" of the table.

I wonder if there is even some package that shows each calendar month in
a table.. 

-- 
William




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

* Re: [ELPA] New package: valign.el
  2020-12-05 19:17     ` William Xu
@ 2020-12-05 22:50       ` Yuan Fu
  0 siblings, 0 replies; 11+ messages in thread
From: Yuan Fu @ 2020-12-05 22:50 UTC (permalink / raw)
  To: William Xu; +Cc: emacs-devel



> On Dec 5, 2020, at 2:17 PM, William Xu <william.xwl@gmail.com> wrote:
> 
> Alexander Adolf <alexander.adolf@condition-alpha.com> writes:
> 
>> To do what this package offers, you will need to do "edge detection" on
>> the surrounding material in order to know which parts of the surrounding
>> text to stretch. This seems somewhat feasible in tables, because the
>> "edges" are readily marked up, and equally where "surrounding material"
>> ends.
> 
> That being said, I think the same method may be also applied to calendar
> buffer, when the weekdays are shown using non-ascii characters. There,
> the space might be used as the "bar" of the table.
> 
> I wonder if there is even some package that shows each calendar month in
> a table.. 
> 
> 
> William


I think it should be relatively easy for the packages to align code-generated contents themselves, because they are already aligning columns by padding spaces, all they need to do is to change the padding spaces to a space with a :align-to property. 

Yuan


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

end of thread, other threads:[~2020-12-05 22:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30  4:24 [ELPA] New package: valign.el Yuan Fu
2020-11-30  7:43 ` Pankaj Jangid
2020-11-30 14:55   ` Yuan Fu
2020-11-30 15:02   ` Alexander Adolf
2020-12-02  9:32     ` Lars Ingebrigtsen
2020-12-05 19:17     ` William Xu
2020-12-05 22:50       ` Yuan Fu
2020-12-02  3:39 ` 황병희
2020-12-02  4:24   ` Yuan Fu
2020-12-02  4:33     ` 황병희
2020-12-05 19:12 ` William Xu

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.