emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)]
@ 2022-08-13 10:54 Jean Louis
  2022-08-13 11:48 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Louis @ 2022-08-13 10:54 UTC (permalink / raw)
  To: emacs-orgmode



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

|       Date | Description                     | Expense |
|------------+---------------------------------+---------|
| 2022-08-12 | Buying store, PRN 2230001079059 |  -50000 |
| 2022-08-12 | Mobile money agent              |   -2000 |
| 2022-08-13 |                                 |         |
|------------+---------------------------------+---------|
|            |       TOTAL                     |         |

I would actually like "TOTAL" to be right aligned, but instead I have
tried inserting some non-breaking space before the word, and then
table does not align well with it. My font is fixed width, so it
should align correctly.

Emacs  : GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.6, Xaw3d scroll bars)
 of 2022-08-10
Package: Org mode version 9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)

current state:
==============
(setq
 org-link-elisp-confirm-function nil
 org-directory "~/Documents/Org"
 org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3 "\n\n(fn ENTRY)"]
 org-log-done 'time
 org-link-abbrev-alist '(("gpatent" . "https://www.google.com/patents/US%s")
			 ("xau2usd" . "https://duckduckgo.com/?q=%s+xau+to+usd&ia=currency") ("geo" . "geo:%s")
			 ("hyperscope" . hyperscope))
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-html-doctype "html5"
 org-default-notes-file "~/.notes.org"
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . "evince %s"))
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-export-with-tasks 'todo
 org-ascii-format-drawer-function #[771 "\x01\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww org-id ol-info)
 org-link-from-user-regexp "\\<nobody@protected\\.\\.com\\>"
 org-mode-hook '((lambda nil (setq org-adapt-indentation 'heading-data)) (lambda nil (electric-indent-mode 0))
		 #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-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-babel-load-languages '((emacs-lisp . t) (plantuml . t) (ditaa . t) (sql . t) (shell . t) (scheme . t) (perl . t) (lisp . t)
			    (dot . t))
 outline-minor-mode-hook '((lambda nil (make-local-variable 'smart-outline-cut) (setq smart-outline-cut nil)))
 outline-mode-hook '((lambda nil (make-local-variable 'smart-outline-cut) (setq smart-outline-cut nil))
		     outline-highlight-keywords)
 org-agenda-span 'month
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-adapt-indentation 'heading-data
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-plantuml-jar-path "/home/data1/protected/lib/java/plantuml.jar"
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-protocol-protocol-alist '(("Hyperscope Store Hyperlink" :protocol "store-link" :function hyperscope-org-protocol-store-link)
			       ("Hyperscope Capture From Hyperlink" :protocol "capture" :function
				hyperscope-org-protocol-capture-link :kill-client t)
			       )
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-latex-packages-alist '(("margins=2cm" "geometry" nil))
 org-babel-tangle-lang-exts '(("lisp" . "lisp") ("perl" . "pl") ("emacs-lisp" . "el") ("elisp" . "el"))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-export-backends '(org md odt latex html ascii)
 org-confirm-babel-evaluate nil
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-html-prefer-user-labels t
 outline-minor-mode-cycle t
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 outline-minor-mode-prefix "\x03\x04"
 org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link)
		       ("info" :follow org-info-open :export org-info-export :store org-info-store-link)
		       ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-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)
		       ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell)
		       ("news" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
		       ("mailto" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])
		       ("https" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"])
		       ("http" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
		       ("ftp" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])
		       ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file)
		       ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi))
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-metaup-hook '(org-babel-load-in-session-maybe)
 outline-minor-mode-highlight 'append
 )

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/


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

* Re: Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)]
  2022-08-13 10:54 Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)] Jean Louis
@ 2022-08-13 11:48 ` Ihor Radchenko
  2022-08-14  4:40   ` Jean Louis
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-08-13 11:48 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

Jean Louis <bugs@gnu.support> writes:

> ------------------------------------------------------------------------
>
> |       Date | Description                     | Expense |
> |------------+---------------------------------+---------|
> | 2022-08-12 | Buying store, PRN 2230001079059 |  -50000 |
> | 2022-08-12 | Mobile money agent              |   -2000 |
> | 2022-08-13 |                                 |         |
> |------------+---------------------------------+---------|
> |            |       TOTAL                     |         |
>
> I would actually like "TOTAL" to be right aligned, but instead I have
> tried inserting some non-breaking space before the word, and then
> table does not align well with it. My font is fixed width, so it
> should align correctly.

Could you please detail what you mean by does not align well?
Your table looks fine on my side.

You may also take a look at space entities "\_   " (each extra space is +0.5em)

I do not know how to set the cell alignment individually without
changing the whole column.


-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

* Re: Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)]
  2022-08-13 11:48 ` Ihor Radchenko
@ 2022-08-14  4:40   ` Jean Louis
  2022-08-14  5:14     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Louis @ 2022-08-14  4:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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

* Ihor Radchenko <yantar92@gmail.com> [2022-08-13 14:47]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > ------------------------------------------------------------------------
> >
> > |       Date | Description                     | Expense |
> > |------------+---------------------------------+---------|
> > | 2022-08-12 | Buying store, PRN 2230001079059 |  -50000 |
> > | 2022-08-12 | Mobile money agent              |   -2000 |
> > | 2022-08-13 |                                 |         |
> > |------------+---------------------------------+---------|
> > |            |       TOTAL                     |         |
> >
> > I would actually like "TOTAL" to be right aligned, but instead I have
> > tried inserting some non-breaking space before the word, and then
> > table does not align well with it. My font is fixed width, so it
> > should align correctly.
> 
> Could you please detail what you mean by does not align well?
> Your table looks fine on my side.

See attached frameshot.

I can see that it aligns well in `emacs -Q'. However no matter what
theme I tried in running Emacs I could not get it to align. Do you
know by what does that alignment depends? Then I could maybe remove
that dependency.

> I do not know how to set the cell alignment individually without
> changing the whole column.

Is there a way to insert total in the next table for the previous table?

Then I could do something like this:


|       Date | Description | Amount |
|------------+-------------+--------|
| 2022-08-14 | Something   |     10 |
| 2022-08-14 | Someting    |     20 |
|------------+-------------+--------|

|------+-------+-------|
| <10> | <r11> | <6>   |
|      | TOTAL | XXXXX |
|------+-------+-------|

Then I could do some formula to place total from first table in the second table where is XXX?

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/

[-- Attachment #2: Screenshot-2022-08-14-07-30-16-171508483.png --]
[-- Type: image/png, Size: 45647 bytes --]

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

* Re: Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)]
  2022-08-14  4:40   ` Jean Louis
@ 2022-08-14  5:14     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-08-14  5:14 UTC (permalink / raw)
  To: Jean Louis; +Cc: emacs-orgmode

Jean Louis <bugs@gnu.support> writes:

>> Could you please detail what you mean by does not align well?
>> Your table looks fine on my side.
>
> See attached frameshot.
>
> I can see that it aligns well in `emacs -Q'. However no matter what
> theme I tried in running Emacs I could not get it to align. Do you
> know by what does that alignment depends? Then I could maybe remove
> that dependency.

It looks like you have some kind of minor mode that changes the display
of non-breaking space.

You may consider using https://github.com/Malabarba/elisp-bug-hunter to
hunt down the cause.

>> I do not know how to set the cell alignment individually without
>> changing the whole column.
>
> Is there a way to insert total in the next table for the previous table?
>
> Then I could do something like this:
>
>
> |       Date | Description | Amount |
> |------------+-------------+--------|
> | 2022-08-14 | Something   |     10 |
> | 2022-08-14 | Someting    |     20 |
> |------------+-------------+--------|
>
> |------+-------+-------|
> | <10> | <r11> | <6>   |
> |      | TOTAL | XXXXX |
> |------+-------+-------|
>
> Then I could do some formula to place total from first table in the second table where is XXX?

See [[info:org#References][org#References]], Remote references

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

end of thread, other threads:[~2022-08-14  5:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-13 10:54 Bug: Table does not align if there is non-breaking space [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)] Jean Louis
2022-08-13 11:48 ` Ihor Radchenko
2022-08-14  4:40   ` Jean Louis
2022-08-14  5:14     ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).