#+TITLE: taxy-magit-section.el

#+PROPERTY: LOGGING nil

# Note: This readme works with the org-make-toc <https://github.com/alphapapa/org-make-toc> package, which automatically updates the table of contents.

[[https://elpa.gnu.org/packages/taxy-magit-section.html][https://elpa.gnu.org/packages/taxy-magit-section.svg]]

This library renders [[https://github.com/alphapapa/taxy.el][Taxy]] structs with [[https://melpa.org/#/magit-section][magit-section]].

* Contents                                                         :noexport:
:PROPERTIES:
:TOC:      :include siblings
:END:
:CONTENTS:
- [[#installation][Installation]]
- [[#changelog][Changelog]]
- [[#development][Development]]
- [[#credits][Credits]]
:END:

* COMMENT Examples

* Installation

=taxy-magit-section= is distributed in [[https://elpa.gnu.org/][GNU ELPA]], which is available in Emacs by default.  Use =M-x package-install RET taxy-magit-section RET=, then ~(require 'taxy-magit-section)~ in your Elisp project.

* COMMENT Usage

* Changelog
:PROPERTIES:
:TOC:      :depth 0
:END:

** 0.14.2

*Changes*
+ Avoid redundant calculations of the width of strings containing images (a minor performance improvement).

** 0.14.1

*Fixes*
+ Don't pass string as ~ELLIPSIS~ argument to ~truncate-string-to-width~; pass t, which defaults to value of variable ~truncate-string-ellipsis~.  (The width of the string passed before, the U+2026 HORIZONTAL ELLIPSIS character, varies by font, and fonts which display it with a width different than that of a single space cause misalignment of columns.  Now users may specify the ellipsis string according to their needs.)
+ Try to find a graphical frame when calculating image widths for column widths (or signal an error if none are available, rather than leaving ~image-size~ to signal an error).  (For example, if both graphical and text frames are available, and a column's values contain an image, and the buffer is being redisplayed on a text frame, try to use a graphical frame for calculating the image width, rather than just signaling an error.)

** 0.14

*Fixes*
+ Reduce the potential width of macro-expanded docstrings to prevent byte-compiler warnings.

** 0.13

*Additions*

+ Function ~taxy-magit-section-insert~ takes a ~:section-class~ argument, which is passed to ~magit-insert-section~ as its ~class~ argument.  This allows a custom subclass of ~magit-section~ to be passed, which, with a custom method on ~magit-section-ident-value~, allows section visibility to be cached concisely.

** 0.12.2

*Fixes*
+ Header alignment.

** 0.12.1

*Fixes*
+ Compilation error.

** 0.12

*Fixes*
+ Section visibility caching.

** 0.11

*Additions*
+  Truncated column values receive help-echo tooltips so the full value can be viewed.

** 0.10

*Fixes*
+  Require package ~taxy~ in package headers.

** 0.9.1

*Fixes*
+  =taxy-magit-section-insert= appends heading faces, so users can override (or merge with) the default.
+  =taxy-magit-section-format-items= uses columns' headers as their minimum width, which preserves each column's width regardless of items' values.

** 0.9

+  =taxy-magit-section= moved to separate package.
+  Better align columns whose values are images.

* Development
:PROPERTIES:
:TOC:      :ignore (descendants)
:END:

=taxy-magit-section= is developed in a branch of the [[https://github.com/alphapapa/taxy.el][main Taxy repo]].

* Credits

+  Thanks to Stefan Monnier for his feedback, and for maintaining GNU ELPA.

* License
:PROPERTIES:
:TOC:      :ignore (this)
:END:

GPLv3

* COMMENT Export setup                                             :noexport:
:PROPERTIES:
:TOC:      :ignore (this descendants)
:END:

# Copied from org-super-agenda's readme, in which much was borrowed from Org's =org-manual.org=.

#+OPTIONS: broken-links:t *:t

** Info export options

#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: Taxy Magit Section: (taxy-magit-section)
#+TEXINFO_DIR_DESC: Render Taxy structs with Magit Section

# NOTE: We could use these, but that causes a pointless error, "org-compile-file: File "..README.info" wasn't produced...", so we just rename the files in the after-save-hook instead.
# #+TEXINFO_FILENAME: taxy.info
# #+EXPORT_FILE_NAME: taxy.texi

** File-local variables

# NOTE: Setting org-comment-string buffer-locally is a nasty hack to work around GitHub's org-ruby's HTML rendering, which does not respect noexport tags.  The only way to hide this tree from its output is to use the COMMENT keyword, but that prevents Org from processing the export options declared in it.  So since these file-local variables don't affect org-ruby, wet set org-comment-string to an unused keyword, which prevents Org from deleting this tree from the export buffer, which allows it to find the export options in it.  And since org-export does respect the noexport tag, the tree is excluded from the info page.

# Local Variables:
# before-save-hook: org-make-toc
# after-save-hook: (lambda nil (when (and (require 'ox-texinfo nil t) (org-texinfo-export-to-info)) (delete-file "README.texi") (rename-file "README.info" "taxy-magit-section.info" t)))
# org-export-initial-scope: buffer
# org-comment-string: "NOTCOMMENT"
# End:
