emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Helm <nick@tenpoint.co.nz>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Cc: Eric S Fraga <esflists@gmail.com>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Bug: Org 9.2.1 table issues [9.2.1 (9.2.1-dist @ /Users/nick/.emacs.d/lisp/org-9.2.1/)]
Date: Tue, 19 Feb 2019 11:46:55 +0000	[thread overview]
Message-ID: <m21s44ngpe.fsf@tenpoint.co.nz> (raw)
In-Reply-To: <xuu64l90ytpk.fsf@gmail.com> (Eric S. Fraga's message of "Tue, 19 Feb 2019 10:10:31 +0000")

Eric S Fraga <esflists@gmail.com> writes:

> On Tuesday, 19 Feb 2019 at 03:16, Nick Helm wrote:
>
> [...]
>
>> Great, got it sorted now. Thanks again for your time.
>
> It would be great, for others that may be interested, if you could post
> your solution to this list.

Sure, patch below. It's a bit crude, but it works for 9.2.1-dist (needs
changes for today's master):

--- a/lisp/org-table.el	2019-02-19 14:06:13.000000000 +1300
+++ b/lisp/org-table.el	2019-02-19 14:07:58.000000000 +1300
@@ -3938,7 +3938,7 @@
     (list (org-table--make-shrinking-overlay
 	   start end
 	   (concat (make-string (max 0 (1+ width)) ?-)
-		   org-table-shrunk-column-indicator)
+		   "-")
 	   "")))
    (t
     ;; If the field is not empty, consider using two overlays: one for
@@ -3962,7 +3962,7 @@
 		  ;; white space characters to the right overlay.
 		  (org-table--make-shrinking-overlay
 		   (1- end) end (concat (make-string (- width w) ?\s)
-					org-table-shrunk-column-indicator)
+					" ")
 		   contents)
 		;; Find cut location so that WIDTH characters are visible.
 		(org-table--make-shrinking-overlay
@@ -3979,7 +3979,10 @@
 			   ((pred (< width)) (setq upper mean))
 			   (_ (setq lower mean)))))
 		     upper))
-		 end org-table-shrunk-column-indicator contents)))))
+		 end (if (> (length contents) width)
+               org-table-shrunk-column-indicator
+             " ")
+       contents)))))
       (delq nil (list pre-overlay post-overlay))))))
 
 (defun org-table--read-column-selection (select max)

  reply	other threads:[~2019-02-19 11:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15  0:29 Bug: Org 9.2.1 table issues [9.2.1 (9.2.1-dist @ /Users/nick/.emacs.d/lisp/org-9.2.1/)] Nick Helm
2019-02-15 10:50 ` Nicolas Goaziou
2019-02-16  8:48   ` Nick Helm
2019-02-17 17:52     ` Nicolas Goaziou
2019-02-18  8:11       ` Nick Helm
2019-02-18 21:30         ` Nicolas Goaziou
2019-02-18 22:11           ` Nick Helm
2019-02-18 22:44             ` Nicolas Goaziou
2019-02-19  3:16               ` Nick Helm
2019-02-19 10:10                 ` Eric S Fraga
2019-02-19 11:46                   ` Nick Helm [this message]
2019-02-21 20:42                   ` Nick Helm
2019-02-26 10:10                     ` Eric S Fraga
2019-02-19 12:17       ` Nick Helm
2019-02-19 16:07         ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21s44ngpe.fsf@tenpoint.co.nz \
    --to=nick@tenpoint.co.nz \
    --cc=emacs-orgmode@gnu.org \
    --cc=esflists@gmail.com \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).