Re: [O] Concatenation of cells using 'remote'

2016-02-15 Thread Loris Bennett
Michael Brand  writes:

> Hi Loris
>
> On Fri, Jan 29, 2016 at 2:20 PM, Loris Bennett
>  wrote:
>> Hi,
>>
>> I can create a concatenation of the element in column like this:
>>
>> #+NAME: addresses
>> | able| a...@example.org |
>> | baker   | ba...@example.org|
>> | charlie | char...@example.org  |
>> | | a...@example.org, ba...@example.org, char...@example.org |
>> #+TBLFM: $2='(concat $1 "@example.org")
>> #+TBLFM: @4$2='(mapconcat 'identity (list @1$2..@3$2) ", ")
>>
>> I tried the following to create the concatenation in a
>> separate table:
>>
>> | #ERROR |
>> #+TBLFM: $1='(mapconcat 'identity '(list remote(addresses,@1$2..@3$2) ", ")
>>
>> but this doesn't work.  Presumably the expansion of the range happens at
>> the wrong time.
>>
>> Does anyone know how to do this properly?
>
> Just typos:
>
> | a...@example.org, ba...@example.org, char...@example.org |
> #+TBLFM: $1='(mapconcat 'identity (list remote(addresses,@1$2..@3$2)) ", ")
>
> Michael

Thanks.  Obviously I shouldn't be highlighting matching parens, but
rather ones which don't match ...

Cheers,

Loris


-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] org table with auto-incrementing numbers in a column

2016-02-15 Thread H. Dieter Wilhelm
>
> Try this
>
>   | N |   |
>   |---+---|
>   |   |   |
>   |   |   |
>   |   |   |
>   |   |   |
>   #+TBLFM: $1..>$1= -1 + 1:: 2$1=1
>

I don't know exactly why  "N" is *not* erased but the following is
working for me (org 8.2.10).

| N |
|---|
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
#+TBLFM: $1=@#-1

> Placing point on the TBLFM line and doing C-c C-c should recalculate the
> whole table.

and C-u C-c C-* does it anywhere in the table.

Dieter
-- 
Best wishes
H. Dieter Wilhelm
Kelkheim, Germany




Re: [O] org table with auto-incrementing numbers in a column

2016-02-15 Thread Derek Feichtinger
Hi

Kaushal Modi  gmail.com> writes:

> 
> Hi,
> I am trying to get auto-incrementing numbers in the first column in an org
table. The goal is to recalculate the numbers after adding/removing rows.
> 
> I checked out the org
FAQ: 
http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers
> 
> 
> But I am still not getting it to work as I need to.
> 
> Below is the minimum working example. Paste the below in an org buffer.
> 
> 
> 
> | N |   |
> |---+---|
> |   |   |
> |   |   |
> |   |   |
> |   |   |
> #+TBLFM: $1=  -1+1::  2$1=1
> 
> 

Try this

  | N |   |
  |---+---|
  |   |   |
  |   |   |
  |   |   |
  |   |   |
  #+TBLFM: $1..>$1= -1 + 1:: 2$1=1


One problem is that $1 also includes the first row with the "N" heading.
that is why in your example the second and third lines both will at first
contain 1 (at least with my org version 8.3.3), and in the second iteration
only show the correct series.

> Now with the point anywhere in the table, when I hit "C-c *" or M-x
org-table-recalculate, I expect the first column to be auto-populated with
numbers 1,2,3,4 (or that's how I understood from the tutorial in the FAQ
link above).
> 
> But it does not work that way. Instead I need to go to each row and hit C-c *.

Placing point on the TBLFM line and doing C-c C-c should recalculate the
whole table.


Cheers,
Derek




[O] org table with auto-incrementing numbers in a column

2016-02-15 Thread Kaushal Modi
Hi,

I am trying to get auto-incrementing numbers in the first column in an org
table. The goal is to recalculate the numbers after adding/removing rows.

I checked out the org FAQ:
http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers

But I am still not getting it to work as I need to.

Below is the minimum working example. Paste the below in an org buffer.


| N |   |
|---+---|
|   |   |
|   |   |
|   |   |
|   |   |
#+TBLFM: $1=@-1+1::@2$1=1


Now with the point anywhere in the table, when I hit "C-c *" or M-x
org-table-recalculate, I expect the first column to be auto-populated with
numbers 1,2,3,4 (or that's how I understood from the tutorial in the FAQ
link above).

But it does not work that way. Instead I need to go to each row and hit C-c
*.

So I am definitely missing out on something that's preventing the whole
table to be recalculated in one go. Any help?

Thanks!

Org-mode version 8.3.3 (release_8.3.3-597-gcaf66e @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


--
Kaushal Modi


[O] some ideas

2016-02-15 Thread nasciiboy

such beloved community, with humility a couple of ideas for the future

#+TITLE: C BOOK

Lorem =main= ad =size_t= his =main=, scripta blandit =main= partiendo,
eum fastidii accumsan euripidis in, eum liber hendrerit an. =int=. Qui
ut wisi vocibus =if=-=else=. =printf()=, =getchar()=, =char=, =int=,
suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis
reformidans eu, legimus senserit =for= definiebas an eos. Eu sit
tincidunt incorrupte definitionem, vis mutat affert percipit cu,
eirmod consectetuer signiferumque eu per. In usu latine equidem
dolores. Quo no falli viris intellegam, ut fugit veritus placerat per.

#+TITLE: C BOOK
#+CODE_KEYWORKS: main for while size_t int void char printf getchar else if

Lorem main ad size_t his main, scripta blandit main partiendo, eum
fastidii accumsan euripidis in, eum liber hendrerit an. int. Qui ut
wisi vocibus if-else. printf(), getchar(), char, int, suscipiantur,
quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu,
legimus senserit for definiebas an eos. Eu sit tincidunt incorrupte
definitionem, vis mutat affert percipit cu, eirmod consectetuer
signiferumque eu per. In usu latine equidem


*both have highlighted text in org-mode, and as both exported to html*


Lorem main ad size_t his main, 
scripta blandit main partiendo, eum
fastidii accumsan euripidis in, eum liber hendrerit an. 
int. Qui ut
wisi vocibus if-else printf(), 
getchar(), char, int,

suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis
reformidans eu, legimus senserit for definiebas an eos. Eu sit
tincidunt incorrupte definitionem, vis mutat affert percipit cu,
eirmod consectetuer signiferumque eu per. In usu latine equidem
dolores. Quo no falli viris intellegam, ut fugit veritus placerat per.



* Description list styles

  - default default default default :: ipsum ad his scripta blandit
   partiendo, eum fastidii accumsan euripidis in, eum liber
   hendrerit an.

  - default default default default default default default  ::

   ipsum ad his scripta blandit partiendo, eum fastidii accumsan
   euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
   suscipiantur.

  - default :: ipsum ad his scripta blandit partiendo, eum fastidii
   accumsan euripidis in, eum liber hendrerit an. Qui ut
   wisi vocibus suscipiantur. quo dicit ridens inciderint
   id.

===
  - default ::


   ipsum ad his scripta blandit partiendo, eum fastidii
   accumsan euripidis in, eum liber hendrerit an. Qui ut
   wisi vocibus suscipiantur. quo dicit ridens inciderint
   id.

  to

  - default ::

   ipsum ad his scripta blandit partiendo, eum fastidii accumsan
   euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
   suscipiantur.


  and

  - default default default default default default default default 
default  default default ::


   ipsum ad his scripta blandit partiendo, eum fastidii accumsan
   euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
   suscipiantur.


  to

  - default default default default default default
default default default  default default ::

   ipsum ad his scripta blandit partiendo, eum fastidii accumsan
   euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
   suscipiantur.



  - another style -: ipsum ad his scripta blandit partiendo,
eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut
wisi vocibus suscipiantur.

  - another style -:

ipsum ad his scripta blandit partiendo, eum fastidii accumsan
euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
suscipiantur..

  - another style another style another style another style another
style another style another style  -:

ipsum ad his scripta blandit partiendo, eum fastidii accumsan
euripidis in, eum liber hendrerit an. Qui ut wisi vocibus
suscipiantur..

* emphasis and monospaced

  would be good to define the signs of turn off

  #+OPTIONS: emphasis:'' monospace:# italic:¤

  or to turn them off

  #+OPTIONS: superscript:nil subscript:nil underline:nul bold:nul

  and agree the no emphasis-highlight sign '^'

  ^size_t^ ^*scratch*^

  and auto highlight-export option for single quote and double quote

  '\0' 'a' "msg string" "quote"

  export to html as

  '\0' 'a' "msg string"
  "quote"

  to avoid making

  '=\0=' '=a=' "=msg string=" "=quote="




[O] Treat node or subtree as source block?

2016-02-15 Thread Paul M.
I'm interested in treating an entire node or subtree as a source block for
the purposes of tangling.

Is there some way to specify that, say with properties, without having to
explicitly surround text to be tangled with "#+BEGIN_SRC...#+END_SRC" ?

Thanks,
Paul


Re: [O] Concatenation of cells using 'remote'

2016-02-15 Thread Michael Brand
Hi Loris

On Fri, Jan 29, 2016 at 2:20 PM, Loris Bennett
 wrote:
> Hi,
>
> I can create a concatenation of the element in column like this:
>
> #+NAME: addresses
> | able| a...@example.org |
> | baker   | ba...@example.org|
> | charlie | char...@example.org  |
> | | a...@example.org, ba...@example.org, char...@example.org |
> #+TBLFM: $2='(concat $1 "@example.org")
> #+TBLFM: @4$2='(mapconcat 'identity (list @1$2..@3$2) ", ")
>
> I tried the following to create the concatenation in a
> separate table:
>
> | #ERROR |
> #+TBLFM: $1='(mapconcat 'identity '(list remote(addresses,@1$2..@3$2) ", ")
>
> but this doesn't work.  Presumably the expansion of the range happens at
> the wrong time.
>
> Does anyone know how to do this properly?

Just typos:

| a...@example.org, ba...@example.org, char...@example.org |
#+TBLFM: $1='(mapconcat 'identity (list remote(addresses,@1$2..@3$2)) ", ")

Michael



Re: [O] src code fontification in org 8.3

2016-02-15 Thread John Kitchin
Thanks. A rebuild of emacs did indeed fix 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 Sun, Feb 14, 2016 at 11:52 PM, Kyle Meyer  wrote:

> John Kitchin  writes:
>
> > I have this set:
> >
> > (setq org-src-fontify-natively t)
> >
> > but the code blocks are all black text.
> >
> > Is there a known issue with a transition from 8.2.10 to 8.3 that would
> > affect fontification? or some previous setting that would interfere with
> > it? Thanks,
>
> Are you using a developmental build of Emacs?  If so, it should be fixed
> if you update your build.
>
> Here are the details from Org's eb3b104 (org-src: Use font-lock-ensure
> to highlight blocks, 2016-01-29):
>
> * lisp/org-src.el (org-src-font-lock-fontify-block): Use
>   org-font-lock-ensure instead of font-lock-fontify-buffer.
>
> This replacement has previously been made (f36b19e, d81e6b5) and then
> reverted
> (99f, 003a0f1) twice because source blocks were not being reliably
> highlighted when font-lock-ensure was used instead of
> font-lock-fontify-buffer.  This was due to a bug in font-lock-ensure
> that has now been fixed (see Emacs's 21beb19 and bug#22399).
>
> font-lock-ensure was introduced after Emacs 24.5, so this issue only
> pertains to users with a developmental version of Emacs.
>
> --
> Kyle
>


Re: [O] [PATCH] ox-koma-letter.el: Add support for 'location' koma variable

2016-02-15 Thread Myles English


Rasmus writes:

> I will try to merge your patch soon, this weekend.  Again, unless someone
> beats me to it.

Please would someone apply this patch?

Thanks,
Myles

>From 4495abd39d57abc0dd64361f852c3a638f86915b Mon Sep 17 00:00:00 2001
From: Myles English 
Date: Wed, 27 Jan 2016 18:18:38 +
Subject: [PATCH] ox-koma-letter: Add support for LOCATION koma variable

* contrib/lisp/ox-koma-letter.el (koma-letter): Duplicated code
  used for 'place' variable, renamed as 'location'

Whenever OPTION keyword contains a 'location' item or LOCATION
keyword is used in the buffer, set KOMA option 'location' after
LCO inclusion.
---
 contrib/lisp/ox-koma-letter.el | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 9a4686e..8afeed2 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -41,6 +41,7 @@
 ;;   - PHONE_NUMBER: see `org-koma-letter-phone-number',
 ;;   - SIGNATURE: see `org-koma-letter-signature',
 ;;   - PLACE: see `org-koma-letter-place',
+;;   - LOCATION: see `org-koma-letter-location',
 ;;   - TO_ADDRESS:  If unspecified this is set to "\mbox{}".
 ;;
 ;; TO_ADDRESS and FROM_ADDRESS can also be specified using heading
@@ -58,6 +59,7 @@
 ;;   - phone (see `org-koma-letter-use-phone')
 ;;   - email (see `org-koma-letter-use-email')
 ;;   - place (see `org-koma-letter-use-place')
+;;   - location (see `org-koma-letter-use-location')
 ;;   - subject, a list of format options
 ;; (see `org-koma-letter-subject-format')
 ;;   - after-closing-order, a list of the ordering of headings with
@@ -188,6 +190,12 @@ This option can also be set with the PLACE keyword."
   :group 'org-export-koma-letter
   :type 'string)
 
+(defcustom org-koma-letter-location ""
+  "Sender's extension field, as a string.
+This option can also be set with the LOCATION keyword."
+  :group 'org-export-koma-letter
+  :type 'string)
+
 (defcustom org-koma-letter-opening ""
   "Letter's opening, as a string.
 
@@ -356,6 +364,13 @@ This option can also be set with the OPTIONS keyword, e.g.:
   :group 'org-export-koma-letter
   :type 'boolean)
 
+(defcustom org-koma-letter-use-location t
+  "Non-nil prints the contents of the letter's extension below the header.
+This option can also be set with the OPTIONS keyword, e.g.:
+\"location:nil\"."
+  :group 'org-export-koma-letter
+  :type 'boolean)
+
 (defcustom org-koma-letter-default-class "default-koma-letter"
   "Default class for `org-koma-letter'.
 The value must be a member of `org-latex-classes'."
@@ -406,6 +421,7 @@ e.g. \"title-subject:t\"."
 (:email "EMAIL" nil (org-koma-letter--get-value org-koma-letter-email) t)
 (:to-address "TO_ADDRESS" nil nil newline)
 (:place "PLACE" nil org-koma-letter-place)
+(:location "LOCATION" nil org-koma-letter-location)
 (:subject "SUBJECT" nil nil parse)
 (:opening "OPENING" nil org-koma-letter-opening parse)
 (:closing "CLOSING" nil org-koma-letter-closing parse)
@@ -425,6 +441,7 @@ e.g. \"title-subject:t\"."
 (:with-foldmarks nil "foldmarks" org-koma-letter-use-foldmarks)
 (:with-phone nil "phone" org-koma-letter-use-phone)
 (:with-place nil "place" org-koma-letter-use-place)
+(:with-location nil "location" org-koma-letter-use-location)
 (:with-subject nil "subject" org-koma-letter-subject-format)
 (:with-title-as-subject nil "title-subject" org-koma-letter-prefer-subject)
 (:with-headline-opening nil nil org-koma-letter-headline-is-opening-maybe)
@@ -435,12 +452,14 @@ e.g. \"title-subject:t\"."
 (:inbuffer-email "EMAIL" nil 'koma-letter:empty)
 (:inbuffer-phone-number "PHONE_NUMBER" nil 'koma-letter:empty)
 (:inbuffer-place "PLACE" nil 'koma-letter:empty)
+(:inbuffer-location "LOCATION" nil 'koma-letter:empty)
 (:inbuffer-signature "SIGNATURE" nil 'koma-letter:empty)
 (:inbuffer-with-backaddress nil "backaddress" 'koma-letter:empty)
 (:inbuffer-with-email nil "email" 'koma-letter:empty)
 (:inbuffer-with-foldmarks nil "foldmarks" 'koma-letter:empty)
 (:inbuffer-with-phone nil "phone" 'koma-letter:empty)
-(:inbuffer-with-place nil "place" 'koma-letter:empty))
+(:inbuffer-with-place nil "place" 'koma-letter:empty)
+(:inbuffer-with-location nil "location" 'koma-letter:empty))
   :translate-alist '((export-block . org-koma-letter-export-block)
 		 (export-snippet . org-koma-letter-export-snippet)
 		 (headline . org-koma-letter-headline)
@@ -755,6 +774,14 @@ a communication channel."
 	(format "\\setkomavar{place}{%s}\n"
 		(if (plist-get info :with-place) (plist-get info :place)
 		  ""
+ ;; Location.
+ (let ((with-location-set (funcall check-scope 'with-location))
+	   (location-set (funcall check-scope 'location)))
+   (and (or (and with-location-set location-set)
+		(and (eq scope 'buffer) (or with-location-set location-set)))
+	(format 

[O] use adjustbox rather than resizebox for diagrams?

2016-02-15 Thread chopps

I've had very good luck using adjustbox for diagrams in ox-beamer
generated presentations. I've had much less luck using the standard
output (resizebox). I'm wondering if people might consider switching
over to adjustbox rather than resizebox for graphical inclusion?

The main difference between adjustbox and resizebox seems to be that
resizebox always resizes the included graphics whereas adjustbox only
resizes the graphics if they exceed the space as specified, and then the
graphics are scaled proportionally. This generally leads to getting what
you actually want all the time vs. having to tweak either the width or
height of the results to get the correct visuals.

IOW if ox-latex switched to adjustbox it could assign defaults for both
width and height and generally the user would get what they wanted
without having to specify anything.

Example raw latex using adjustbox:

\begin{adjustbox}{max totalsize={.9\textwidth}{.9\textheight},center}
\input{sequence.tikz}
\end{adjustbox}

Thanks,
Chris.


signature.asc
Description: PGP signature


Re: [O] babel question: how to detect the REPL has finished replying

2016-02-15 Thread Alan Schmitt
Hello Aaron,

On 2016-02-11 20:57, Aaron Ecay  writes:

> Hi Alan,
>
> Other backends send an unlikely string literal to the interpreter as the
> last command, which will be echoed back verbatim.  The code detects the
> presence of this string in the output stream, and thus knows that the
> interaction has finished.  Check out the ‘org-babel-comint-with-output’
> macro for the implementation.
>
> (This is the usual function of the org-babel-coq-eoe variable that your
> last patch deleted.  It was probably cargo-culted in from another
> backend and never properly implemented.)
>
> Hope this is helpful,

It is, thank you for the suggestion. I’m going to look into how it’s
used in other languages.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52


signature.asc
Description: PGP signature