emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Wider margins on text, but no margins on tables?
@ 2023-08-18 16:13 William Denton
  2023-08-23 11:40 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: William Denton @ 2023-08-18 16:13 UTC (permalink / raw)
  To: emacs-orgmode

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

I have always run Emacs full screen and never set any margins, so the text goes 
from one side of my screen to the other.  (It's not a big screen.)  Today I'm 
trying out narrowing how text is displayed by setting left-margin-width and 
right-margin-width, so there's blank space on either side.  It looks good for 
most things, and helps readability.

But for tables it can be a problem because sometimes I have a table that i want 
as wide as possible.  Is there a way to have tables fit inside the margin-width 
settings until they get too wide, then expand out?  That way a small table isn't 
flush left, but a big one is.

Or perhaps there is a way to set Org tables to have margin-widths of 0, so it 
would be:  narrowed paragraph, narrowed paragraph, table flush left, narrowed 
paragraph.

Has anyone here configured something like this?  If there's a hook to use it's 
beyond what I can hack.  Any related tips or configurations would be welcome too.


Thanks,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 419.19 ppm (Mauna Loa Observatory, 2023-08-17)

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

* Re: Wider margins on text, but no margins on tables?
  2023-08-18 16:13 Wider margins on text, but no margins on tables? William Denton
@ 2023-08-23 11:40 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-08-23 11:40 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> But for tables it can be a problem because sometimes I have a table that i want 
> as wide as possible.  Is there a way to have tables fit inside the margin-width 
> settings until they get too wide, then expand out?  That way a small table isn't 
> flush left, but a big one is.

No easy way, AFAIK. You may probably hook into
`window-size-change-functions' to calculate margins dynamically. See
`olivetti-mode' for an example how to use this hook.

> Or perhaps there is a way to set Org tables to have margin-widths of 0, so it 
> would be:  narrowed paragraph, narrowed paragraph, table flush left, narrowed 
> paragraph.

AFAIK, window margins are set for the whole window. They are fixed. The
best you can do it creating artificial margins by setting paragraph
line-prefix/wrap-prefix property + https://codeberg.org/joostkremers/visual-fill-column

-- 
Ihor Radchenko // yantar92,
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] 2+ messages in thread

end of thread, other threads:[~2023-08-23 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-18 16:13 Wider margins on text, but no margins on tables? William Denton
2023-08-23 11:40 ` 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).