emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Make wide tables more readable
@ 2016-12-01 20:17 David Talmage
  2016-12-01 20:31 ` John Kitchin
  2016-12-01 22:47 ` David Talmage
  0 siblings, 2 replies; 6+ messages in thread
From: David Talmage @ 2016-12-01 20:17 UTC (permalink / raw)
  To: emacs-orgmode

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

I'm looking for ways to make a wide table more readable.  My motivation is
from a table that is too wide to fit on my screen.  I need to be able to
see all of the contents of a cell. If it were just text, I'd use M-q
(fill-paragraph).  I've already tried org-table-wrap-region and couldn't
figure it out.

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

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

* Re: Make wide tables more readable
  2016-12-01 20:17 Make wide tables more readable David Talmage
@ 2016-12-01 20:31 ` John Kitchin
  2016-12-01 20:43   ` Joost Kremers
  2016-12-01 22:47 ` David Talmage
  1 sibling, 1 reply; 6+ messages in thread
From: John Kitchin @ 2016-12-01 20:31 UTC (permalink / raw)
  To: David Talmage; +Cc: emacs-orgmode@gnu.org

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

I use:

;;;###autoload
(defun tq-increase-text-size ()
  "Increase text size."
  (interactive)
  (set-face-attribute 'default nil :height
     (truncate (* 1.1 (face-attribute 'default :height)))))

;;;###autoload
(defun tq-decrease-text-size ()
  "Decrease text size."
  (interactive)
  (set-face-attribute 'default nil :height
     (truncate (* 0.9 (face-attribute 'default :height)))))

which I bind to C-- and  C-= to shrink the font size down until it fits,
then when I am done increase it.

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Thu, Dec 1, 2016 at 3:17 PM, David Talmage <david.talmage@shoutpoint.com>
wrote:

> I'm looking for ways to make a wide table more readable.  My motivation is
> from a table that is too wide to fit on my screen.  I need to be able to
> see all of the contents of a cell. If it were just text, I'd use M-q
> (fill-paragraph).  I've already tried org-table-wrap-region and couldn't
> figure it out.
>
>
>

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

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

* Re: Make wide tables more readable
  2016-12-01 20:31 ` John Kitchin
@ 2016-12-01 20:43   ` Joost Kremers
  2016-12-01 21:12     ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Joost Kremers @ 2016-12-01 20:43 UTC (permalink / raw)
  To: John Kitchin; +Cc: David Talmage, emacs-orgmode@gnu.org


On Thu, Dec 01 2016, John Kitchin wrote:
> I use:
>
> ;;;###autoload
> (defun tq-increase-text-size ()
>   "Increase text size."
>   (interactive)
>   (set-face-attribute 'default nil :height
>      (truncate (* 1.1 (face-attribute 'default :height)))))
>
> ;;;###autoload
> (defun tq-decrease-text-size ()
>   "Decrease text size."
>   (interactive)
>   (set-face-attribute 'default nil :height
>      (truncate (* 0.9 (face-attribute 'default :height)))))
>
> which I bind to C-- and  C-= to shrink the font size down until 
> it fits,
> then when I am done increase it.

Why not use `text-scale-adjust`? This function has convenient 
bindings in the form `C-x C-+` to increase text size, `C-x C--` to 
decrease, and `C-x C-0` to reset to default size. Furthermore, 
once you press any of these, you can simply use `+`, `-` and `0` 
for increasing, decreasing and resetting until you've found your 
preferred text size.

-- 
Joost Kremers
Life has its moments

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

* Re: Make wide tables more readable
  2016-12-01 20:43   ` Joost Kremers
@ 2016-12-01 21:12     ` John Kitchin
  2016-12-01 21:33       ` Clément Pit--Claudel
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2016-12-01 21:12 UTC (permalink / raw)
  To: Joost Kremers; +Cc: David Talmage, emacs-orgmode@gnu.org

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

If I had to guess its because I was unaware of that command when I wrote
those functions ;)

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Thu, Dec 1, 2016 at 3:43 PM, Joost Kremers <joostkremers@fastmail.fm>
wrote:

>
> On Thu, Dec 01 2016, John Kitchin wrote:
>
>> I use:
>>
>> ;;;###autoload
>> (defun tq-increase-text-size ()
>>   "Increase text size."
>>   (interactive)
>>   (set-face-attribute 'default nil :height
>>      (truncate (* 1.1 (face-attribute 'default :height)))))
>>
>> ;;;###autoload
>> (defun tq-decrease-text-size ()
>>   "Decrease text size."
>>   (interactive)
>>   (set-face-attribute 'default nil :height
>>      (truncate (* 0.9 (face-attribute 'default :height)))))
>>
>> which I bind to C-- and  C-= to shrink the font size down until it fits,
>> then when I am done increase it.
>>
>
> Why not use `text-scale-adjust`? This function has convenient bindings in
> the form `C-x C-+` to increase text size, `C-x C--` to decrease, and `C-x
> C-0` to reset to default size. Furthermore, once you press any of these,
> you can simply use `+`, `-` and `0` for increasing, decreasing and
> resetting until you've found your preferred text size.
>
> --
> Joost Kremers
> Life has its moments
>

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

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

* Re: Make wide tables more readable
  2016-12-01 21:12     ` John Kitchin
@ 2016-12-01 21:33       ` Clément Pit--Claudel
  0 siblings, 0 replies; 6+ messages in thread
From: Clément Pit--Claudel @ 2016-12-01 21:33 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 645 bytes --]

On Thu, Dec 1, 2016 at 3:43 PM, Joost Kremers wrote:
> Why not use `text-scale-adjust`? 

On 2016-12-01 16:12, John Kitchin wrote:
> If I had to guess its because I was unaware of that command when I wrote those functions ;)

Note that these two don't do the same thing.  Text-scale-adjust changes the face-remapping-alist, which breaks things like company-mode.  On the other hand, text-scale-adjust is very fast, while John's solution (which works fine with company-mode) is rather slow.

Additionally, John's solution applies to the current frame, whereas text-scale-adjust is usually restricted to a single buffer.

Clément.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Make wide tables more readable
  2016-12-01 20:17 Make wide tables more readable David Talmage
  2016-12-01 20:31 ` John Kitchin
@ 2016-12-01 22:47 ` David Talmage
  1 sibling, 0 replies; 6+ messages in thread
From: David Talmage @ 2016-12-01 22:47 UTC (permalink / raw)
  To: emacs-orgmode

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

On Thu, Dec 1, 2016 at 3:17 PM, David Talmage <david.talmage@shoutpoint.com>
wrote:

> ...
>
(fill-paragraph).  I've already tried org-table-wrap-region and couldn't
> figure it out.
>

I figured out org-table-wrap-region.  Most of the time it works as
expected.  Sometimes it puts text cells below the one I want.  I ended up
manually justifying my cells in a few cases.

Thank you all for the suggestions.

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

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

end of thread, other threads:[~2016-12-01 22:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01 20:17 Make wide tables more readable David Talmage
2016-12-01 20:31 ` John Kitchin
2016-12-01 20:43   ` Joost Kremers
2016-12-01 21:12     ` John Kitchin
2016-12-01 21:33       ` Clément Pit--Claudel
2016-12-01 22:47 ` David Talmage

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).