emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: Org table alignment, horrible failures [9.1.5 (9.1.5-1-gb3d


From: John Kitchin
Subject: Re: [O] Bug: Org table alignment, horrible failures [9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /Users/genovese/.emacs.d/elpa/org-plus-contrib-20171225/)]
Date: Mon, 1 Jan 2018 20:14:37 -0800

No answer, but something like this was also posted on SO: https://emacs.stackexchange.com/questions/37828/org-mode-doesnt-align-column-bars-properly

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803

On Mon, Jan 1, 2018 at 8:01 PM, Christopher Genovese <address@hidden> wrote:
I make heavy use of org tables, often relying on the automatic realignment
with C-c C-c or TAB. But after updating org-mode to 9.1.5, this realignment
has started to lead to quite significant problems in the tables' appearances.
I'm on Mac OS X 10.12.6, running Gnu Emacs 26.0.50 installed via homebrew.
I installed org-mode 9.1.5 using the org-plus-contrib package with the standard
package mechanism.

I've run all these examples using emacs -Q with a minimal load of
org-plus-contrib (configuration #1 below) as well as my own set up
(configuration #2 below). Same results both ways.

I've attached images to this email to show the results, but I'll try to
reproduce them here as well in a fixed-width typeface.

Here is a sample table as a baseline, put in a file by itself.

| Date       | Time | Aerobic                     | Lifting                      | Strengthening          | Stretching             | Other | Notes |
| 2017 01 01 | 1100 | True:34, Ladder:10, Bike:10 | Light biceps, light forearms | Light Shoulders, Wrist | Calf, Hamstring, Groin |       |       |


With certain changes to these fields, automatic alignment of the columns
with either C-c C-c or TAB fails horribly in several ways. The baseline table
image is align-Q-baseline.png.

1. Change Time column from 1100 to any alphanumeric string *that
   includes a letter* and the alignment works as normal.
   (Image: align-Q-baseline.png). Note that 1100 also keeps the alignment
   normal (align-Q-equal-number.png) but only because it is the same length
   as Time.

2. Change Time to a short number, like 11, and the table appears as

| Date       | Time | Aerobic                     | Lifting                      | Strengthening          | Stretching             | Other | Notes |
| 2017 01 01 |     T e 4 L der:10, Bike:10 | Light biceps, light forearms | Light Shoulders, Wrist | Calf, Hamstring, Groin |       |       |

 
   (Image: align-Q-short-number.png)

3. Change Time to a long number, like 111000, and the table appears as

| Date       |  m | e b                      | Lifting                      | Strengthening          | Stretching             | Other | Notes |
| 2017 01 01 | 111000 | True:34, Ladder:10, Bike:10 | Light biceps, light forearms | Light Shoulders, Wrist | Calf, Hamstring, Groin |       |       |


   (Image: align-Q-long-number.png, similarly align-Q-confirm.png with 11000 instead.)

4. Change Date to include -'s (2017-01-01) and the table appears as

|     Date | Time | Aerobic                     | Lifting                      | Strengthening          | Stretching             | Other | Notes |
| 2017-01-01 | 1100 | True:34, Ladder:10, Bike:10 | Light biceps, light forearms | Light Shoulders, Wrist | Calf, Hamstring, Groin |       |       |


Other similar problems occur as well.

Again, these appear after either C-c C-c or a TAB in a field, nothing else.
The contents are not changed only the appearance and cannot
be fixed by editing. Killing the buffer and reopening makes the
table look correct, but any additional realignment messes it up again.

And just to be clear, this did not occur prior to installing 9.1.5,
even a few days back. I don't recall the previous version I had
installed. It was relatively recent but could have been a few
steps back.

Thanks, Chris

--------------------------------
Configuration #1:

Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
 of 2017-08-29
Package: Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /Users/genovese/.emacs.d/elpa/org-plus-contrib-20171225/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
             org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
           [add-hook change-major-mode-hook org-show-block-all append local] 5]
         #[0 "\300\301\302\303\304$\207"
           [add-hook change-major-mode-hook org-babel-show-result-all append local]
           5]
         org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"]




Configuration #2:

Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
 of 2017-08-29
Package: Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpaplus @ /Users/genovese/.emacs.d/elpa/org-plus-contrib-20171225/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-archive-location "~/org/archive::"
 org-mode-hook '(my-org-table-extensions turn-on-font-lock my/org-mode-hook
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-show-block-all append local] 5]
                 #[0 "\300\301\302\303\304$\207"
                   [add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-file-apps '((auto-mode . emacs) (directory . emacs) (system . "open %s") ("\\.mm\\'" . default)
                 ("\\.x?html?\\'" . system) ("\\.pdf\\'" . system)
                 ("\\.\\(?:png\\|jpe?g\\|gif\\|tiff?\\|bmp\\)\\'" . system)
                 ("\\`\\(?:.*/\\)?[^.]+\\'" . emacs))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (R . t) (python . t) (clojure . t) (latex . t)
                            (lisp . t) (haskell . t) (C . t) (ruby . t) (org . t) (css . t)
                            (sass . t) (dot . t) (java . t) (ocaml . t) (calc . t) (ditaa . t)
                            (sql . t) (asymptote . t))
 org-load-hook '(my/org-load-hook)
 org-hide-emphasis-markers t
 org-export-backends '(ascii beamer html icalendar latex md texinfo deck)
 org-babel-python-command "python3"
 org-occur-hook '(org-first-headline-recenter)
 org-ditaa-jar-path "~/bin/ditaa.jar"
 org-structure-template-alist '(("s" "#+begin_src ?\n\n#+end_src")
                                ("e" "#+begin_example\n?\n#+end_example")
                                ("q" "#+begin_quote\n?\n#+end_quote")
                                ("v" "#+begin_verbatim\n?\n#+end_verbatim")
                                ("V" "#+begin_verse\n?\n#+end_verse")
                                ("c" "#+begin_center\n?\n#+end_center")
                                ("l" "#+begin_latex\n?\n#+end_latex") ("L" "#+LaTeX: ")
                                ("h" "#+begin_html\n?\n#+end_html") ("H" "#+HTML: ")
                                ("a" "#+begin_ascii\n?\n#+end_ascii") ("A" "#+ASCII: ")
                                ("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?"))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO" "WAIT" "DONE"))
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
 org-tags-column -116
 org-babel-tangle-lang-exts '(("asymptote" . "asy") ("ocaml" . "ml") ("java" . "java")
                              ("ruby" . "rb") ("D" . "d") ("C++" . "cpp") ("haskell" . "hs")
                              ("lisp" . "lisp") ("latex" . "tex") ("clojure" . "clj")
                              ("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
                       ("rmail" :follow org-rmail-open :store org-rmail-store-link)
                       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
                       ("irc" :follow org-irc-visit :store org-irc-store-link)
                       ("info" :follow org-info-open :export org-info-export :store
                        org-info-store-link)
                       ("gnus" :follow org-gnus-open :store org-gnus-store-link)
                       ("docview" :follow org-docview-open :export org-docview-export :store
                        org-docview-store-link)
                       ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
                       ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
                        org-bbdb-complete-link :store org-bbdb-store-link)
                       ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
                       ("ipynb" :follow ein:org-open :help-echo "Open ipython notebook." :store
                        ein:org-store-link)
                       ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link)
                       ("file" :complete org-file-complete-link)
                       ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path))))
                       ("help" :follow org--open-help-link)
                       ("http" :follow (lambda (path) (browse-url (concat "http:" path))))
                       ("https" :follow (lambda (path) (browse-url (concat "https:" path))))
                       ("mailto" :follow (lambda (path) (browse-url (concat "mailto:" path))))
                       ("news" :follow (lambda (path) (browse-url (concat "news:" path))))
                       ("shell" :follow org--open-shell-link))
 org-tag-faces '(("urgent" . font-lock-warning-face))
 org-todo-keyword-faces '(("WAIT" . org-wait-face))
 org-src-window-setup 'current-window
 )



reply via email to

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