Re: [O] Table Columns

2019-01-25 Thread Nicolas Goaziou
Hello,

Scott Randby  writes:

> On 1/24/19 3:36 PM, Nicolas Goaziou wrote:
>> Scott Randby  writes:
>> 
>>> I wonder this: Is there a way to tell Org to align and shrink all the
>>> tables in an Org file after startup or does it have to be done on an
>>> individual basis?
>> 
>> It should be
>> 
>>#+startup: align shrink 
>
> This is what I had in my file originally, but when I opened the file,
> there would be a lengthy delay before it actually opened. When
> I removed the code from the file, it opened immediately. I don't know
> what is going on.

The code navigates to each table, align them, determine what columns
should be shrunk, and actually shrink them. This is long if you have
many tables. It is indeed better, in this case, to shrink them
individually.

Regards,

-- 
Nicolas Goaziou



Re: [O] Table Columns

2019-01-24 Thread Scott Randby
On 1/24/19 3:36 PM, Nicolas Goaziou wrote:
> Scott Randby  writes:
> 
>> I wonder this: Is there a way to tell Org to align and shrink all the
>> tables in an Org file after startup or does it have to be done on an
>> individual basis?
> 
> It should be
> 
>#+startup: align shrink 

This is what I had in my file originally, but when I opened the file, there 
would be a lengthy delay before it actually opened. When I removed the code 
from the file, it opened immediately. I don't know what is going on.

> 
>> My use case is this: I have an Org file with many tables and I edit
>> some of them which requires me to shrink those tables. Later, I run
>> a macro which accesses and alters all of the tables. I need all of the
>> tables to be in the same state so that the macro runs correctly.
>> I guess the solution is to have the macro put a table in the proper
>> state before it does anything to that table, but that is one more
>> thing I have to remember to put in the macro. It would be easiest if
>> I could just tell Org to unshrink (which is what I actually want) all
>> tables in the file before I run the macro.
> 
> There is no function to expand all tables in the buffer, but it is
> pretty straightforward, and fast:
> 
>   (dolist (o (overlays-in (point-min) (point-max)))
> (when (eq 'table-column-hide (overlay-get o 'org-overlay-type))
>   (delete-overlay o)))

Thanks, this works well. And I learned how to take your code and turn it into a 
function which is something I should have learned a long time ago. One of these 
days, I'll get around to really learning elisp instead of borrowing code others 
wrote and playing around with it like an amateur. Again, thank you very much.

Scott



Re: [O] Table Columns

2019-01-24 Thread Nicolas Goaziou
Hello,

Scott Randby  writes:

> I wonder this: Is there a way to tell Org to align and shrink all the
> tables in an Org file after startup or does it have to be done on an
> individual basis?

It should be

   #+startup: align shrink 

> My use case is this: I have an Org file with many tables and I edit
> some of them which requires me to shrink those tables. Later, I run
> a macro which accesses and alters all of the tables. I need all of the
> tables to be in the same state so that the macro runs correctly.
> I guess the solution is to have the macro put a table in the proper
> state before it does anything to that table, but that is one more
> thing I have to remember to put in the macro. It would be easiest if
> I could just tell Org to unshrink (which is what I actually want) all
> tables in the file before I run the macro.

There is no function to expand all tables in the buffer, but it is
pretty straightforward, and fast:

  (dolist (o (overlays-in (point-min) (point-max)))
(when (eq 'table-column-hide (overlay-get o 'org-overlay-type))
  (delete-overlay o)))

Regards,

-- 
Nicolas Goaziou



[O] Table Columns

2019-01-24 Thread Scott Randby
Greetings,

Sorry for repeating the message, but I want to add a bit to it.

I had to stop using the align and shrink startup options because at least one 
of them causes a considerable delay when opening an Org file that contains many 
tables (in my case, 25 or more tables). The delay makes sense, and it isn't a 
big deal to not use these options, but I wonder this: Is there a way to tell 
Org to align and shrink all the tables in an Org file after startup or does it 
have to be done on an individual basis?

My use case is this: I have an Org file with many tables and I edit some of 
them which requires me to shrink those tables. Later, I run a macro which 
accesses and alters all of the tables. I need all of the tables to be in the 
same state so that the macro runs correctly. I guess the solution is to have 
the macro put a table in the proper state before it does anything to that 
table, but that is one more thing I have to remember to put in the macro. It 
would be easiest if I could just tell Org to unshrink (which is what I actually 
want) all tables in the file before I run the macro.

Scott Randby



[O] Table Columns

2019-01-24 Thread Scott Randby
Greetings,

I had to stop using the align and shrink startup options because at least one 
of them causes a considerable delay when opening an Org file that contains many 
tables (in my case, 25 or more tables). The delay makes sense, and it isn't a 
big deal to not use these options, but I wonder this: Is there a way to tell 
Org to align and shrink all the tables in an Org file after startup or does it 
have to be done on an individual basis?

Scott Randby



Re: [O] Table columns not aligning when width set

2017-08-19 Thread Kaushal Modi
On Sat, Aug 19, 2017 at 6:19 AM Nicolas Goaziou 
wrote:

> Fixed. Thank you.
>

Thanks! I confirm the fix.
-- 

Kaushal Modi


Re: [O] Table columns not aligning when width set

2017-08-19 Thread Nicolas Goaziou
Hello,

William Denton  writes:

> I noticed this last week, but I'm on vacation.  I'm compiling and running Org 
> and Emacs from source, and have been keeping up to date, but the problem's 
> been 
> there for a while.  For Org, I'm on the master branch, not tables, and 
> running 
> "make update" to update.
>
> In the example below, the <40> and <10> widths are not respected.  If you hit 
> C-c C-C on the STARTUP line, first one things goes wrong and then another, 
> and 
> you can toggle back and forth.
>
> Bill
>
> # --
>
> #+TITLE: Table column problem
> #+STARTUP: align
>
> | Forty| Ten  |
> | <40> | <10> |
> |--+--|
> | This cell has more than forty characters in it, but it won't align | Under. 
>   |
> | This cell has under forty characters.| More than ten over here. |
>
> # --

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Table columns not aligning when width set

2017-08-14 Thread Colin Baxter
> "William" == William Denton  writes:

William> I was able to use git bisect (on master) to narrow down
William> where the problem started (for me, at least):

William> 27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4 is the first bad
William> commit commit 27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4
William> Author: Nicolas Goaziou  Date: Thu
William> Jul 27 15:22:45 2017 +0200

William> Fix `org-string-width'

William> * lisp/org.el (org-string-width): Better handle various
William> invisible characters.

William> I'm not sure what's going on ... is anyone else seeing this
William> problem with tables?

Yes, I have it too. I'm on org-mode release_9.0.9-748-g3359e0, with
emacs-25.2.

-- 
--
Colin Baxter
m43...@yandex.com
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8



Re: [O] Table columns not aligning when width set

2017-08-14 Thread Kaushal Modi
On Mon, Aug 14, 2017 at 1:55 PM William Denton  wrote:

> I was able to use git bisect (on master) to narrow down where the problem
> started (for me, at least):
>
> 27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4 is the first bad commit
> commit 27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4
> Author: Nicolas Goaziou 
> Date:   Thu Jul 27 15:22:45 2017 +0200
>
>  Fix `org-string-width'
>
>  * lisp/org.el (org-string-width): Better handle various invisible
>characters.
>
> I'm not sure what's going on ... is anyone else seeing this problem with
> tables?
>

Thanks for doing the bisect. I am also seeing the same problem you stated.

Here's what the table in your example looks like after I hit tab in the
first cell.. it should have got aligned.

[image: image.png]
-- 

Kaushal Modi


Re: [O] Table columns not aligning when width set

2017-08-14 Thread William Denton
I was able to use git bisect (on master) to narrow down where the problem 
started (for me, at least):


27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4 is the first bad commit
commit 27466a38bcd6f5f3c6bd3c61b8ec9253d4dbf4e4
Author: Nicolas Goaziou 
Date:   Thu Jul 27 15:22:45 2017 +0200

Fix `org-string-width'

* lisp/org.el (org-string-width): Better handle various invisible
  characters.

I'm not sure what's going on ... is anyone else seeing this problem with tables?

Bill

On 8 August 2017, William Denton wrote:

I noticed this last week, but I'm on vacation.  I'm compiling and running Org 
and Emacs from source, and have been keeping up to date, but the problem's 
been there for a while.  For Org, I'm on the master branch, not tables, and 
running "make update" to update.


In the example below, the <40> and <10> widths are not respected.  If you hit 
C-c C-C on the STARTUP line, first one things goes wrong and then another, 
and you can toggle back and forth.


Bill

# --

#+TITLE: Table column problem
#+STARTUP: align

| Forty| Ten  |
| <40> | <10> |
|--+--|
| This cell has more than forty characters in it, but it won't align | Under. 
|

| This cell has under forty characters.| More than ten over here. |

# --



--
William Denton :: Toronto, Canada   ---   Listening to Art: 
https://listeningtoart.org/
https://www.miskatonic.org/ ---   GHG.EARTH: http://ghg.earth/
Caveat lector.  ---   STAPLR: http://staplr.org/



[O] Table columns not aligning when width set

2017-08-08 Thread William Denton
I noticed this last week, but I'm on vacation.  I'm compiling and running Org 
and Emacs from source, and have been keeping up to date, but the problem's been 
there for a while.  For Org, I'm on the master branch, not tables, and running 
"make update" to update.


In the example below, the <40> and <10> widths are not respected.  If you hit 
C-c C-C on the STARTUP line, first one things goes wrong and then another, and 
you can toggle back and forth.


Bill

# --

#+TITLE: Table column problem
#+STARTUP: align

| Forty| Ten  |
| <40> | <10> |
|--+--|
| This cell has more than forty characters in it, but it won't align | Under.   
|
| This cell has under forty characters.| More than ten over here. |

# --

--
William Denton :: Toronto, Canada   ---   Listening to Art: 
https://listeningtoart.org/
https://www.miskatonic.org/ ---   GHG.EARTH: http://ghg.earth/
Caveat lector.  ---   STAPLR: http://staplr.org/



Re: [O] table, columns and plot

2016-01-27 Thread Eric S Fraga
On Wednesday, 27 Jan 2016 at 07:58, f...@epita.fr wrote:
> Eric S Fraga  writes:

[...]

>>>   #+name: tab1
>>>   #+begin: columnview :hlines 1 :id "prj_encours"
>>
>> What is this line meant to do?  Without it, the gnuplot src block works
>> just fine.
>
>#+begin: columnview :hlines 1 :id "prj_encours"
>
> without this line "#+begin: columnview :hlines 1 :id "prj_encours", I
> can't extract properties to make my table, isn't it ?

Apologies for the previous reply which got sent before I had a chance to
type anything -- hit wrong key! 

Anyway, I cannot help with this particular aspect as I have never tried
to extract properties from a table.  I do not even know what that
means.  :-)

Hope somebody else can help you.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.3-456-g164555



Re: [O] table, columns and plot

2016-01-27 Thread Eric S Fraga
On Wednesday, 27 Jan 2016 at 07:58, f...@epita.fr wrote:
> Eric S Fraga  writes:
>
>> On Tuesday, 26 Jan 2016 at 11:20, f...@epita.fr wrote:
>>> Hi !
>>> I want to plot the extract of columns :
>>> But, the gnuplot block do not found the tab1.
>>> Is it possible to name the columnview table ?
>>>
>>> Org-mode version 8.3.3 (8.3.3-17-gce80a0-elpa @
>>> /home/flav/.emacs.d/elpa/org-20160118/) 
>>>
>>> Thks
>>>
>>> * Synthèse
>>>
>>>   #+name: tab1
>>>   #+begin: columnview :hlines 1 :id "prj_encours"
>>
>> What is this line meant to do?  Without it, the gnuplot src block works
>> just fine.
>
>#+begin: columnview :hlines 1 :id "prj_encours"
>
> without this line "#+begin: columnview :hlines 1 :id "prj_encours", I
> can't extract properties to make my table, isn't it ?



Re: [O] table, columns and plot

2016-01-26 Thread flav
Eric S Fraga  writes:

> On Tuesday, 26 Jan 2016 at 11:20, f...@epita.fr wrote:
>> Hi !
>> I want to plot the extract of columns :
>> But, the gnuplot block do not found the tab1.
>> Is it possible to name the columnview table ?
>>
>> Org-mode version 8.3.3 (8.3.3-17-gce80a0-elpa @
>> /home/flav/.emacs.d/elpa/org-20160118/) 
>>
>> Thks
>>
>> * Synthèse
>>
>>   #+name: tab1
>>   #+begin: columnview :hlines 1 :id "prj_encours"
>
> What is this line meant to do?  Without it, the gnuplot src block works
> just fine.

   #+begin: columnview :hlines 1 :id "prj_encours"

without this line "#+begin: columnview :hlines 1 :id "prj_encours", I
can't extract properties to make my table, isn't it ?

-- 
flav




Re: [O] table, columns and plot

2016-01-26 Thread Eric S Fraga
On Tuesday, 26 Jan 2016 at 11:20, f...@epita.fr wrote:
> Hi !
> I want to plot the extract of columns :
> But, the gnuplot block do not found the tab1.
> Is it possible to name the columnview table ?
>
> Org-mode version 8.3.3 (8.3.3-17-gce80a0-elpa @
> /home/flav/.emacs.d/elpa/org-20160118/) 
>
> Thks
>
> * Synthèse
>
>   #+name: tab1
>   #+begin: columnview :hlines 1 :id "prj_encours"

What is this line meant to do?  Without it, the gnuplot src block works
just fine.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3.3-449-gd85ff3



[O] table, columns and plot

2016-01-26 Thread flav
Hi !
I want to plot the extract of columns :
But, the gnuplot block do not found the tab1.
Is it possible to name the columnview table ?

Org-mode version 8.3.3 (8.3.3-17-gce80a0-elpa @
/home/flav/.emacs.d/elpa/org-20160118/) 

Thks

* Synthèse
  #+name: tab1
  #+begin: columnview :hlines 1 :id "prj_encours"
  | prj | Client | Acteurs | Début | Charges |
  |-++-+---+-|
  | || |   | |
  | p1  | c1 | a1, a2  | [2016-01-26 mar.] |  10 |
  | p2  | c2 | a3  | [2017-01-02 lun.] |  12 |
  #+end

  #+begin_src gnuplot :var data=tab1 :file syn_prj.png
  reset
  #   ZZset terminal png transparent truecolor
  set grid
  set style data histograms
  set key top left outside horizontal autotitle columnhead
  set style histogram cluster gap 1
  set boxwidth 0.9 relative
  set style fill solid 1.0 border -1
  set xtics rotate by 30
  set xtics offset 0,-1.0
  plot data using 5:xticlabels(1)
  #+end_src

   #+RESULTS:
   [[file:syn_prj.png]]

* prj en cours
  :PROPERTIES:
  :ID:   prj_encours  
  :COLUMNS:  %prj %Client %Acteurs %Début %Charges
  :END:
** mig UIM
   :PROPERTIES:
   :prj:  p1
   :Client:   c1
   :Acteurs:  a1, a2
   :Début:[2016-01-26 mar.]
   :Charges:  10
   :END:
** D-Series
   :PROPERTIES:
   :prj: p2
   :Client:   c2
   :Acteurs:  a3
   :Début:[2017-01-02 lun.]
   :Charges:  12
   :END:
   
* prj archives

-- 
flav




Re: [O] Table columns verbatim export

2014-10-31 Thread Nick Dokos
Michael Bach  writes:

> Hi,
>
> I am looking for a way to format table columns to be verbatim for the
> (latex) export.  The reason is that in the following table, the numpy
> `A[0]` will be interpreted as a footnote without a matching description
> and export will fail.
>
> || matlab| r   | numpy   |
> | element access | A(1, 1)   | A[1, 1] | A[0, 0] |
> | row access | A(1, 1:2) | A[1, ]  | @@latex: A[0]@@|

is one way - there are probably others.

Nick





[O] Table columns verbatim export

2014-10-31 Thread Michael Bach
Hi,

I am looking for a way to format table columns to be verbatim for the
(latex) export.  The reason is that in the following table, the numpy
`A[0]` will be interpreted as a footnote without a matching description
and export will fail.

|| matlab| r   | numpy   |
| element access | A(1, 1)   | A[1, 1] | A[0, 0] |
| row access | A(1, 1:2) | A[1, ]  | A[0]|

I had a look into the manual and maybe relatedly found section 3.5.3
"Emacs Lisp forms as formulas" with string manipulation, e.g. wrapping
== or ~~ around the string, but I am really just concerned with export.

Is there an obvious way I am missing?

Thanks and Best Regards,
Michael