Re: [O] a more inteligant way of signaling the exporter to start a new line than "\\"?

2015-10-19 Thread Eric Abrahamsen
Xebar Saram  writes:

> Thanks so much Eric
>
> that helped me alot :)
>
> appreciate it

And, if the time ever comes that you really do want to preserve line
breaks for some reason, you can set the org-export-preserve-breaks
variable to t, or use the \n:nil OPTIONS line.

>
> Z
>
> On Mon, Oct 19, 2015 at 4:34 PM, Eric S Fraga 
> wrote:
>
>
> On Monday, 19 Oct 2015 at 16:10, Xebar Saram wrote:
> > Hi
> >
> > This maybe a really stupid neewb question, but when im writing
> my slides
> > and course homework in org and export to reveal html, pdf etc i
> always get
> > all lines stitched together and the only way i managed to get
> over this is
> > use a "\\" sign at the end of EACH line. this is really
> cumbersome. I
> > wonder how you more experienced guys deal with this? am i
> missing
> > something? cant the exporter just use emacs lines as lines? why
> are they
> > getting joined during export?
>
> Essentially you want each line to be a separate "paragraph" so
> simply
> leave a blank line in between:
>
> #+begin_src org
> ,*** Basic data types in R
> Decimals values like 4.5 are called numerics
>
> Natural numbers like 4 are called integers. Integers are also
> numerics
> #+end_src
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org
> release_8.3beta-1229-ge900eb




[O] Links in comments

2015-10-19 Thread Kaushal Modi
Hi,

This question has come up a few times on emacs.stackexchange so I was
curious if the more experienced org-mode users had a solution to this.. or
if a fix is needed to resolve this issue.

Referenced emacs.stackexchange questions:

- http://emacs.stackexchange.com/q/17505/115
- http://emacs.stackexchange.com/q/9413/115


The issue if that if there is a link in an org-mode commented line like
below:

* Links in comments
#+BEGIN_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.
#+END_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.

the link gets completely camouflaged as seen below.

[image: Inline image 3]

The only way I know that that's a link is if I toggle the visible-mode or
hover over that link with mouse (as below).

[image: Inline image 1]

Solutions??
- Different face for such links within comments? Or let the link face
supersede comment face?
- Option to not collapse links within comments?

What do you guys think?


--
Kaushal Modi


Re: [O] Return Top-Level Heading

2015-10-19 Thread Myles English
Hello Zach,

Zach Sheffler writes:

> Is there a way to reference the top-level heading that a lower-level
> heading belongs to? For instance:
>
> * One
> ** Two
> *** Three
>
> If I have "Three", how can I get it to tell me that the top-level is "One"?
> For reference, this is for an org-agenda-prefix.

Perhaps this:

(defun findTop()
(interactive)
(let* ((tree (org-element-parse-buffer))
   (curs_pos (point))
   (up_tree (org-element-map tree 'headline
  (lambda (hl)
(and (> curs_pos (org-element-property :begin hl))
 (= (org-element-property :level hl) 1)
 (org-element-property :raw-value hl) 
   (local_up_tree (last up_tree)))
  local_up_tree))

Myles



[O] Show first leaf heading on startup

2015-10-19 Thread Shankar Rao
If I have the following org document:

* Heading A
** Subheading AA
*** Subsubheading AAA
Stuff about topic AAA
*** Subsubheading AAB
Stuff about topic AAB
** Subheading AB
*** Subheading ABA
Stuff about topic ABA
*** Subheading ABB
Stuff about topic ABB
* Heading B
** Subheading BA
*** Subheading BAA
Stuff about topic BAA

How can I make it so that on startup, only the content of the first "leaf"
heading is revealed, so that the document looks like:

* Heading A
** Subheading AA
*** Subsubheading AAA
Stuff about topic AAA
*** Subsubheading AAB ...
** Subheading AB ...
* Heading B ...

Shankar Rao


[O] BUG in org-lint and tangle

2015-10-19 Thread Rainer M Krug

The following R file causes an crash of the org-lint function and of
tangling -
backtrace attached. The problem seems to be the missing specification of
:exports.


--8<---cut here---start->8---
* Test
#+begin_src R :exports 
#+end_src
--8<---cut here---end--->8---


Cheers,

Rainer

,
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   string-match("[ \f  \n.]+" nil 0)
|   split-string(nil)
|   (funcall e-merge exports-exclusive-groups exports (split-string (cdr pair)))
|   (setq exports (funcall e-merge exports-exclusive-groups exports 
(split-string (cdr pair
|   (cond ((eql temp (quote :var)) (let ((name (if (listp (cdr pair)) (car (cdr 
pair)) (and (string-match "^\\([^= \f   \n.]+\\)[  ]*=" ...) (intern 
...) (if name (setq vars (append (if (member name ...) (progn ... ...) 
vars) (list (cons name pair (if (and vars (nth variable-index vars)) (let 
((name ...)) (setq clearnames (cons name clearnames)) (prog1 (let* ... ...) 
(setq variable-index ...))) (error "Variable \"%s\" must be assigned a default 
value" (cdr pair)) ((eql temp (quote :results)) (setq results (funcall 
e-merge results-exclusive-groups results (split-string (let ((r ...)) (if 
(stringp r) r (eval r))) ((eql temp (quote :file)) (if (cdr pair) (progn 
(setq results (funcall e-merge results-exclusive-groups results (quote 
("file" (if (or (member "both" exports) (member "none" exports) (member 
"code" exports)) nil (setq exports (funcall e-merge exports-exclusive-groups 
exports (quote ... (setq params (cons pair (assq-delete-all (car pair) 
params)) ((eql temp (quote :file-ext)) (if (cdr pair) (progn (setq results 
(funcall e-merge results-exclusive-groups results (quote ("file" (if (or 
(member "both" exports) (member "none" exports) (member "code" exports)) nil 
(setq exports (funcall e-merge exports-exclusive-groups exports (quote ... 
(setq params (cons pair (assq-delete-all (car pair) params)) ((eql temp 
(quote :exports)) (setq exports (funcall e-merge exports-exclusive-groups 
exports (split-string (cdr pair) ((eql temp (quote :tangle)) (setq tangle 
(or (list (cdr pair)) tangle))) ((eql temp (quote :noweb)) (setq noweb (funcall 
e-merge (quote (("yes" "no" "tangle" "no-export" "strip-export" "eval"))) noweb 
(split-string (or (cdr pair) "") ((eql temp (quote :cache)) (setq cache 
(funcall e-merge (quote (("yes" "no"))) cache (split-string (or (cdr pair) 
"") ((eql temp (quote :padline)) (setq padline (funcall e-merge (quote 
(("yes" "no"))) padline (split-string (or (cdr pair) "") ((eql temp (quote 
:shebang)) (setq shebang (or (list (cdr pair)) shebang))) ((eql temp (quote 
:comments)) (setq comments (funcall e-merge (quote (("yes" "no"))) comments 
(split-string (or (cdr pair) "") (t (setq params (cons pair 
(assq-delete-all (car pair) params)
|   (let* ((temp (car pair))) (cond ((eql temp (quote :var)) (let ((name (if 
(listp ...) (car ...) (and ... ... (if name (setq vars (append (if ... ... 
vars) (list ...))) (if (and vars (nth variable-index vars)) (let (...) (setq 
clearnames ...) (prog1 ... ...)) (error "Variable \"%s\" must be assigned a 
default value" (cdr pair)) ((eql temp (quote :results)) (setq results 
(funcall e-merge results-exclusive-groups results (split-string (let (...) (if 
... r ...)) ((eql temp (quote :file)) (if (cdr pair) (progn (setq results 
(funcall e-merge results-exclusive-groups results (quote ...))) (if (or (member 
"both" exports) (member "none" exports) (member "code" exports)) nil (setq 
exports (funcall e-merge exports-exclusive-groups exports ...))) (setq params 
(cons pair (assq-delete-all ... params)) ((eql temp (quote :file-ext)) (if 
(cdr pair) (progn (setq results (funcall e-merge results-exclusive-groups 
results (quote ...))) (if (or (member "both" exports) (member "none" exports) 
(member "code" exports)) nil (setq exports (funcall e-merge 
exports-exclusive-groups exports ...))) (setq params (cons pair 
(assq-delete-all ... params)) ((eql temp (quote :exports)) (setq exports 
(funcall e-merge exports-exclusive-groups exports (split-string (cdr pair) 
((eql temp (quote :tangle)) (setq tangle (or (list (cdr pair)) tangle))) ((eql 
temp (quote :noweb)) (setq noweb (funcall e-merge (quote (("yes" "no" "tangle" 
"no-export" "strip-export" "eval"))) noweb (split-string (or (cdr pair) "") 
((eql temp (quote :cache)) (setq cache (funcall e-merge (quote (("yes" "no"))) 
cache (split-string (or (cdr pair) "") ((eql temp (quote :padline)) (setq 
padline (funcall e-merge (quote (("yes" "no"))) padline (split-string (or (cdr 
pair) "") ((eql temp (quote :shebang)) (setq shebang (or (list (cdr pair)) 
shebang))) ((eql temp (quote :comments)) (setq comments (funcall e-merge (quote 
(("yes" "no"))) comments (split-string (or (cdr pair) "") (t (setq params 
(cons pair (assq-delete-all (car

Re: [O] A recent mobile org change causing sync issues

2015-10-19 Thread Steve Harman
Thanks Nicolas,

I am not able to post the diff due to the personal nature of the data.
However, I can say that with the commit, the tags in the #+TAGS line is
missing. Also, a link to one of the org files is missing.

Would it be possible to revert this change? This is such a critical bug and
it really disrupted many of ours personal workflows. It also embarrassed us
towards our colleagues, families, and friends who held the view that
proprieatary solutions are better.

In general, it is preferable to have a test suite which should pass before
releasing these commits. Yes, there is MELPA stable but not every package
is on MELPA.

thanks

Stv


On Mon, Oct 19, 2015 at 2:48 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Steve Harman  writes:
>
> > I believe a recent change in org-mobile.el is causing a sync problem on
> the
> > Android app. There is some info here:
> > https://github.com/matburt/mobileorg-android/issues/472
> >
> > The info for the commit is at the bottom.
>
> Thank you for the report.
>
> This is a known issue, but it is not clear as why it failing.
>
> Could you should the differences between "index.org" created with or
> without this commit ?
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] a more inteligant way of signaling the exporter to start a new line than "\\"?

2015-10-19 Thread Eric S Fraga
On Monday, 19 Oct 2015 at 17:05, Xebar Saram wrote:
> Thanks so much Eric
>
> that helped me alot :)

Glad I could help.

I had meant to add that what you probably wanted, in any case, was to
use lists if the text was intended for slides, as in:

#+begin_src org
  ,*** Basic data types in R
  - Decimals values like 4.5 are called numerics
  - Natural numbers like 4 are called integers. Integers are also numerics
#+end_src

As each list entry starts a new paragraph, you don't need the blank line
between them.  A list may look better than separate lines alone.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] a more inteligant way of signaling the exporter to start a new line than "\\"?

2015-10-19 Thread Xebar Saram
Thanks so much Eric

that helped me alot :)

appreciate it

Z

On Mon, Oct 19, 2015 at 4:34 PM, Eric S Fraga  wrote:

> On Monday, 19 Oct 2015 at 16:10, Xebar Saram wrote:
> > Hi
> >
> > This maybe a really stupid neewb question, but when im writing my slides
> > and course homework in org and export to reveal html, pdf etc i always
> get
> > all lines stitched together and the only way i managed to get over this
> is
> > use a "\\" sign at the end of EACH line. this is really cumbersome. I
> > wonder how you more experienced guys deal with this? am i missing
> > something? cant the exporter just use emacs lines as lines? why are they
> > getting joined during export?
>
> Essentially you want each line to be a separate "paragraph" so simply
> leave a blank line in between:
>
> #+begin_src org
>   ,*** Basic data types in R
>   Decimals values like 4.5 are called numerics
>
>   Natural numbers like 4 are called integers. Integers are also numerics
> #+end_src
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb
>


Re: [O] a more inteligant way of signaling the exporter to start a new line than "\\"?

2015-10-19 Thread Eric S Fraga
On Monday, 19 Oct 2015 at 16:10, Xebar Saram wrote:
> Hi
>
> This maybe a really stupid neewb question, but when im writing my slides
> and course homework in org and export to reveal html, pdf etc i always get
> all lines stitched together and the only way i managed to get over this is
> use a "\\" sign at the end of EACH line. this is really cumbersome. I
> wonder how you more experienced guys deal with this? am i missing
> something? cant the exporter just use emacs lines as lines? why are they
> getting joined during export?

Essentially you want each line to be a separate "paragraph" so simply
leave a blank line in between:

#+begin_src org
  ,*** Basic data types in R
  Decimals values like 4.5 are called numerics

  Natural numbers like 4 are called integers. Integers are also numerics
#+end_src

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



[O] a more inteligant way of signaling the exporter to start a new line than "\\"?

2015-10-19 Thread Xebar Saram
Hi

This maybe a really stupid neewb question, but when im writing my slides
and course homework in org and export to reveal html, pdf etc i always get
all lines stitched together and the only way i managed to get over this is
use a "\\" sign at the end of EACH line. this is really cumbersome. I
wonder how you more experienced guys deal with this? am i missing
something? cant the exporter just use emacs lines as lines? why are they
getting joined during export?

for example this section

*** Basic data types in R
Decimals values like 4.5 are called numerics
Natural numbers like 4 are called integers. Integers are also numerics

appears like this in export



Decimals values like 4.5 are called numerics.Natural numbers like 4 are
called integers. Integers are also numerics.

the only way to deal with it is to end every line with \\

*** Basic data types in R
Decimals values like 4.5 are called numerics.\\
Natural numbers like 4 are called integers. Integers are also numerics.\\
Boolean values (TRUE or FALSE) are called logical (TRUE can be abbreviated
to T and FALSE to F).\\
Text (or string) values are called characters.\\


thanks so much in advance

Z


Re: [O] preparing a R course in org for slides..can i link back to org document?

2015-10-19 Thread Eric S Fraga
On Monday, 19 Oct 2015 at 11:05, Xebar Saram wrote:
> Also if people are using other alternative to org-reveal that can do that i
> also wouldnt mind to try it out (a long as its as simple as org-revel :-))

You might want to try org-treeslide [1].  List of alternatives can be
found on Worg [2].

I'm suggesting org-treeslide because it runs within Emacs so you have
the full power of Emacs at hand.  It should be easy to use babel in the
presentation although I've never tried.  I'm a beamer person (with
org-reveal as a useful quick'n'dirty backup).

HTH,
eric

Footnotes: 
[1]  https://github.com/avdi/org-tree-slide

[2]  http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] function to cycle through specific org files?

2015-10-19 Thread Kaushal Modi
In the event those org files are part of your org agenda, there is an
inbuilt command to do that: org-cycle-agenda-files

C-' (org-cycle-agenda-files)
C-,Cycle through agenda file list, visiting one file after the other.

http://orgmode.org/manual/Agenda-files.html
On Oct 19, 2015 7:06 AM, "John Kitchin"  wrote:

> this feels kind of hacky, but it seems to do what you want:
>
> (setq my-files '("a.org" "b.org" "c.org"))
>
> (defun my-next-file ()
>  (interactive)
>  (let ((f (pop my-files)))
>(add-to-list 'my-files f t)
>(find-file f)))
>
> (defun my-previous-file ()
>   (interactive)
>   (let* ((r-my-files (reverse my-files))
>  (f (pop r-my-files)))
> (add-to-list 'r-my-files f t)
> (setq my-files (reverse r-my-files))
> (find-file f)))
>
> (global-set-key (kbd "s-") 'my-next-file)
> (global-set-key (kbd "s-") 'my-previous-file)
>
> the my-files var is not saved, so the order will not persist when you
> close emacs.
>
>
> Xebar Saram writes:
>
> > Hi all
> >
> > I know this should be easy (for anyone that knows elisp that is :)). how
> > does one create a function that cycles up/down through a list of pre
> > defined buffers/files?
> > for example i want to cycle (ie open and show in the emacs window)
> through:
> > A.org B.org C.org
> > i want to use ie A-left and A-right to open (if not already) and cycle
> > through these files. any one has such a system?
> >
> > best
> >
> > Z
>
> --
> 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
>
>


Re: [O] function to cycle through specific org files?

2015-10-19 Thread John Kitchin
this feels kind of hacky, but it seems to do what you want:

(setq my-files '("a.org" "b.org" "c.org"))

(defun my-next-file ()
 (interactive)
 (let ((f (pop my-files)))
   (add-to-list 'my-files f t)
   (find-file f)))

(defun my-previous-file ()
  (interactive)
  (let* ((r-my-files (reverse my-files))
 (f (pop r-my-files)))
(add-to-list 'r-my-files f t)
(setq my-files (reverse r-my-files))
(find-file f)))

(global-set-key (kbd "s-") 'my-next-file)
(global-set-key (kbd "s-") 'my-previous-file)

the my-files var is not saved, so the order will not persist when you
close emacs.


Xebar Saram writes:

> Hi all
>
> I know this should be easy (for anyone that knows elisp that is :)). how
> does one create a function that cycles up/down through a list of pre
> defined buffers/files?
> for example i want to cycle (ie open and show in the emacs window) through:
> A.org B.org C.org
> i want to use ie A-left and A-right to open (if not already) and cycle
> through these files. any one has such a system?
>
> best
>
> Z

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



[O] preparing a R course in org for slides..can i link back to org document?

2015-10-19 Thread Xebar Saram
Hi all

I am building an introduction to R course using org (and now org-reveal!).
in some slide i show code blocks and would like to show the students the
actual run of the code.

I was wondering if anyone knew if there is a way to press a link in my
reveal slide show that would take me to the corresponding org header where
i could actually run the code in R+ESS.

Also if people are using other alternative to org-reveal that can do that i
also wouldnt mind to try it out (a long as its as simple as org-revel :-))

Thanks so much in advance

Z


Re: [O] Using constants in columns

2015-10-19 Thread Guido Van Hoecke
On 19 October 2015 at 08:12, Eric S Fraga  wrote:

> On Saturday, 17 Oct 2015 at 22:27, Guido Van Hoecke wrote:
>
> [...]
>
> > I really should study the calc manual ;)
>
> The last time I delved into the calc manual, I didn't resurface for
> three days ;-)


​:-
​)​


[O] Off line until Sunday 25

2015-10-19 Thread Nicolas Goaziou
Happy Org'ing.