Re: [O] Cookies on check-boxed plain lists don't get updated

2015-08-11 Thread Gerald Wildgruber

Hi Nicolas,

thanks for the fix! The sub list cookie does get updated now, perfect!


Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):

* TODO Organize party [2/4]
 - [-] call people [1/3]
   - [ ] Peter
   - [X] Sarah
   - [ ] Sam
 - [X] order food
 - [ ] think about what music to play
 - [X] talk to the neighbors

With the new code now this gives:

* TODO Organize party [3/7]
 - [-] call people [1/3]
   - [ ] Peter
   - [X] Sarah
   - [ ] Sam
 - [X] order food
 - [ ] think about what music to play
 - [X] talk to the neighbors


Per default, the count now happens through ALL levels irrespective of
hierarchy ("organize party now has SEVEN sub tasks, not FOUR).

So the default behavior with regard to
"org-checkbox-hierarchical-statistics" has changed.

Manual: "Each cookie covers checkboxes of direct children structurally
below the headline/item on which the cookie appears. Set the option
org-checkbox-hierarchical-statistics if you want such cookies to count
all checkboxes below the cookie, not just those belonging to direct
children."

Perhaps it should be reflected in the Manual also.

Thanks again for your quick help!

Gerald.


On Mo, Aug 10 2015, Nicolas Goaziou  wrote:

> Hello,
>
> Gerald Wildgruber  writes:
>
>> Hi Rasmus,
>>
>> thanks for your hint, indeed this particular commit changed the
>> check-box related algorithm; "git log" gives:
>>
>> commit a4cc9d82d8069741be64c55f35f9d3ad7e2663d5
>> Author: Nicolas Goaziou 
>> Date:   Tue Jun 9 17:06:17 2015 +0200
>>
>> org-list: Fix checkbox update with inlinetasks
>> 
>> * lisp/org-list.el (org-update-checkbox-count): Change algorithm.  Use
>>   Element parser.
>> 
>> * testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
>>   New test.
>>
>>
>> I then looked at this particular file's git log:
>>
>> git log lisp/org-list.el
>>
>> and checked out Nicolas' last revision BEFORE his commit on Tue Jun 9:
>>
>> git checkout a0c1e490b30cc4c0dd9e9ecdd70c32a52b08a57e lisp/org-list.el
>>
>> And indeed: everything works again as expected.
>>
>> Nicolas, can you see what caused this regression and can it be fixed?
>
> Fixed. Thanks to Rasmus and you.
>
> Regards,



[O] org-habit: completed-glyph not shown in graph-column

2015-08-11 Thread Mario Martelli
Hi all,

I’m just setting up org-mode. So I do not know whether this has worked in the 
past or not.

If I complete a habit I get this:

** TODO Shave
   SCHEDULED: <2015-08-11 Tue .+1d/2d>
   :PROPERTIES:
   :STYLE:habit
   :END:
   - State "TODO"   from "DONE"   [2015-08-10 Mon 18:27]
   - State "TODO"   from "DONE"   [2015-08-05 Wed 22:36]
   - State "TODO"   from "DONE"   [2015-08-02 Sun 08:04]
   - State "TODO"   from "DONE"   [2015-08-01 Sat 08:03]
 

From what I found in the documentation it should be:

** TODO Shave
SCHEDULED: <2009-10-17 Sat .+2d/4d>
:PROPERTIES:
:STYLE:habit
:LAST_REPEAT: [2009-10-19 Mon 00:36]
:END:
- State "DONE"   from "TODO"   [2009-10-15 Thu]
- State "DONE"   from "TODO"   [2009-10-12 Mon]
- State "DONE"   from "TODO"   [2009-10-10 Sat]
- State "DONE"   from "TODO"   [2009-10-04 Sun]

Despite of missing the LAST_REPEAT property I verified that the inversion of 
TODO and DONE is the reason that the completed-glyph is not shown in the 
graph-column.


The configuration of my habit file is:

* Habits
  :PROPERTIES:
  :LOGGING:  TODO(!) WAIT(!) DONE(!) CANCELED(!)
  :END:

Don’t know if this is a bug or a misconfiguration. 


Org-mode version 8.3.1 (8.3.1-16-gf6aa53-elpaplus

Kind regards
Mario
— 




Re: [O] Block level specification for tex code html export method

2015-08-11 Thread Haochen Xie
Hi Andreas,

Thank you for your reply. I've read the whole thread, and found your
example (the second link) very useful. Although for some reason, SVG
image is not working well on my machine (not being displayed in
chrome, nor on IE. I don't have firefox installed), but since the SVG
image generated by imagemagick is indeed a raster image, I don't see
any benefit using SVG over PNG, and exporting to PNG works perfectly.

I think I've come cross to the "by-backend" approach while searching
over the Internet, I found nothing about how by-backend is defined so
gave up. Even this tutorial [1] mention the use of by-backend, but
giving no information on what it is. Maybe it would be nice if
somebody write a tutorial on it and post on the website?

But in the other hand, I still think my proposal is still valid, since
my proposing extension would make it much easier and intuitive to
include advancedly typesetted contents to HTML with great freedom,
which remain the same semantics for the exporting to latex forms. I'd
like know what others think about it.

Also, to help other org-mode newbies to achieving including a diagram
or other figures typesetted with latex codes in HTML exports, I'd like
to sum up what's needed here:

1) make sure you have a latex environment and imagemagick installed on
   your system

2) define the by-backend macro in ~/.emacs as

   (defmacro by-backend (&rest body)
 `(case (if (boundp 'backend) (org-export-backend-name backend) nil)
,@body))

3) in the org file you want to include a latex rendered figure, add
   latex preambles you need in the following format:

   #+LATEX_HEADER: \usepackage{tikz}

4) include the latex code for the figure in a SRC block like the
   following one:

  #+HEADER: :packages '(("" "tikz"))
  #+HEADER: :file (by-backend (latex "example_diagram.tikz") (html
"example_diagram.png")
  #+HEADER: :imagemagick yes :iminoptions -density 300
  #+HEADER: :results file raw
  #+HEADER: :fit yes
  #+BEGIN_SRC latex
\begin{tikzpicture}
  \node[red!50!black] (a) {A};
  \node (b) [right of=a] {B};
  \draw[->] (a) -- (b);
\end{tikzpicture}
  #+END_SRC

  Notes: the first line is important for the case of tikz, but may or
  may not needed for your use case. the size of the image file could
  be adjusted with the -density option passed to imagemagick

Bonus) you can use C-c C-x C-l to preview the latex block output,
   and if you like, add the following to your ~/.emacs to scale the
preview:

   (plist-put org-format-latex-options :scale 1.5)

Regards,

Haochen

[1]: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html



--

Mail from Haochen Xie

On Tue, Aug 11, 2015 at 7:56 AM, Andreas Leha <
andreas.l...@med.uni-goettingen.de> wrote:

> Hi Haochen,
>
>
> Haochen Xie  writes:
> > Hi,
> >
> > I'm trying to include a diagram drawn with tikz in a document, but
> > couldn't find an elegant way to conditionally export it as png when
> > generating HTML output and raw TeX code when generating PDF. It is
> > possible to use
> >
> > #+OPTIONS: tex:imagemagick
> >
> > to have tex blocks in the document exported as PNG in HTML, but since
> > I have other formulas which will render much better with MathJAX other
> > than embedded PNGs, i really don't want to do it. What I'm currently
> > doing is to use something like
> >
> > #+BEGIN_SRC latex :file diagram.png :results value raw
> > \begin{tikzpicture}
> > \draw (0,0) grid (7,5);
> > \draw (0,0) node[below left] {$A$};
> > \draw (7,5) node[above right] {$B$};
> > \fill (0,0) circle (2pt);
> > \fill (7,5) circle (2pt);
> > \end{tikzpicture}
> > #+END_SRC
> >
> > #+RESULTS[da59bc402ce2d1055b5ff471ea7e398c4e0488f5]:
> > [[file:diagram.png]]
> >
> > so that the diagram will be include in the HTML file as a png image,
> > and the pdf file will also include it as a raster image.
> >
> > But this method is rather a workaround. I'd like to see a vector
> > diagram in the pdf file, which could be achieved if there is a way to
> > specify how a block of TeX source code should be handled when exported
> > to HTML regardless to the global settings. So I propose an extension
> > to #+BEGIN_LaTeX block so that a new header :html will control how the
> > specific block will be handled when exporting to HTML. The possible
> > values might be none, t, dvipng, or imagemagick. "none" will ignore
> > the whole block when exporting to HTML, just like the current
> > behavior; "t" will try to call MathJAX to interpret this block of TeX
> > code; and "dvipng" and "imagemagick" will call "dvipng" or
> > "imagemagick" to render a png file to be embedded in the HTML page.
> >
> > If that extension is supported, we could then left the global option
> > tex:t while inline a tex powered figure with great convenience. For
> > example, in my use case, I could then just used the following code to
> > achieve what I want:
> >
> > #+BEGIN_LaTeX :html imagemagick
> > \begin{tikzpicture}
> > \draw (0,0) grid (7,5);
> > \d

Re: [O] Evil-mode text objects

2015-08-11 Thread Eric S Fraga
On Monday, 10 Aug 2015 at 10:47, Spencer Boucher wrote:
> Here are two examples of what I am seeing:
> https://www.dropbox.com/sh/ri5x9i9bqm1v6qy/AABFKgHifbut-9sDrrfPn7Nya?dl=0.

I'm not sure what it is these images are meant to illustrate?  If it's
the highlighting or paragraph motion, babel code is going to confuse
most regexps used to define paragraphs regardless of whether you use
evil mode or not.

If I'm missing the point, please try to explain what it is you expect
that you are not getting or vice versa.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



Re: [O] Block level specification for tex code html export method

2015-08-11 Thread Fabrice Popineau
2015-08-11 10:47 GMT+02:00 Haochen Xie :

> Hi Andreas,
>
> Thank you for your reply. I've read the whole thread, and found your
> example (the second link) very useful. Although for some reason, SVG
> image is not working well on my machine (not being displayed in
> chrome, nor on IE. I don't have firefox installed), but since the SVG
> image generated by imagemagick is indeed a raster image, I don't see
> any benefit using SVG over PNG, and exporting to PNG works perfectly.
>
>
Use dvisvgm instead of imagemagick to generate the svg file.

Fabrice


Re: [O] Cookies on check-boxed plain lists don't get updated

2015-08-11 Thread Rasmus
Gerald Wildgruber  writes:

> Hi Nicolas,
>
> thanks for the fix! The sub list cookie does get updated now, perfect!
>
>
> Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):
>
> * TODO Organize party [2/4]
>  - [-] call people [1/3]
>- [ ] Peter
>- [X] Sarah
>- [ ] Sam
>  - [X] order food
>  - [ ] think about what music to play
>  - [X] talk to the neighbors
>
> With the new code now this gives:
>
> * TODO Organize party [3/7]
>  - [-] call people [1/3]
>- [ ] Peter
>- [X] Sarah
>- [ ] Sam
>  - [X] order food
>  - [ ] think about what music to play
>  - [X] talk to the neighbors

>From a clean Emacs, I get the first desired behavior.

I also got a couple of errors:

org-update-checkbox-count: Invalid search bound (wrong side of point)

but I cannot seem to reproduce this consistently.  One time I had two
"[/]" boxes.

Rasmus

-- 
When the facts change, I change my mind. What do you do, sir?




Re: [O] How to execute calc commands in src blocks?

2015-08-11 Thread Eric S Fraga
On Sunday,  9 Aug 2015 at 21:22, jenia.ivlev wrote:
> Hello.
>
> I want to use calc in org src-blocks. But it doesnt always work.

I've usually found that calc in org babel works best in algebraic mode
as opposed to stack mode:

> Here is another example where it doesn't work:
>
>   #+BEGIN_SRC calc
>   [3 2]
>   [2 10]
>   '+
>   #+END_SRC

Try

  #+BEGIN_SRC calc
[3,2] + [2,10]
  #+END_SRC

instead.  Stack mode is best for interactive use but really has few
benefits for non-interactive use, in my experience.  And I say this as a
fervent HP calculator user for  decades... :-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



Re: [O] Cookies on check-boxed plain lists don't get updated

2015-08-11 Thread Gerald Wildgruber

On Di, Aug 11 2015, Rasmus  wrote:

> Gerald Wildgruber  writes:
>> Yet, check out this example from p.57 of the Org Manual (ch. "Checkboxes"):
>>
>> * TODO Organize party [2/4]
>>  - [-] call people [1/3]
>>- [ ] Peter
>>- [X] Sarah
>>- [ ] Sam
>>  - [X] order food
>>  - [ ] think about what music to play
>>  - [X] talk to the neighbors
>>
>> With the new code now this gives:
>>
>> * TODO Organize party [3/7]
>>  - [-] call people [1/3]
>>- [ ] Peter
>>- [X] Sarah
>>- [ ] Sam
>>  - [X] order food
>>  - [ ] think about what music to play
>>  - [X] talk to the neighbors
>
> From a clean Emacs, I get the first desired behavior.
>
> I also got a couple of errors:
>
> org-update-checkbox-count: Invalid search bound (wrong side of point)
>
> but I cannot seem to reproduce this consistently.  One time I had two
> "[/]" boxes.
>
> Rasmus

You are right: the default setting of this variable is "t", meaning to
count only direct children; I just checked on a clean emacs install
under linux.

I have to verify again what is different on my OSX machine where I tried
it out earlier.

I don't get the errors on either machine though.

Gerald.



[O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Rasmus
Hi,

In org 8.3 orgstruct-mode and org-cycle is no longer working as expected.

In my init file I have,

 ;; Local Variables:
 ;; outline-regexp: ";;\\*+\\|\\`"
 ;; orgstruct-heading-prefix-regexp: ";;\\*+\\|\\`"
 ;; eval: (when after-init-time (orgstruct-mode) (org-global-cycle 3))
 ;; End:

With org 8.3+, when I use org-cycle on a headline, e.g. ";;* Org", the
display is no longer consistent with outline-toggle-children (I think the
"outline"-prefix might be a recent addition).

In Org 8.3+

No tabs:
;;* Org

One tab:
;;* Org
...

Two tabs:
;;* Org
;;** Subhead1
 forms1
;;** Subhead2
 forms2


In Org 8.2.10 behavior is consistent with outline-toggle-children:


No tabs:
;;* Org

One tab:
;;* Org
;;** Subhead1
;;** Subhead2

Two tabs:
;;* Org
;;** Subhead1
 forms1
;;** Subhead2
 forms2

I don't know how to debug this further.  Hints appreciated.

Ramus

-- 
Lasciate ogni speranza, voi che leggete questo.





Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Fabrice Popineau
On this thread, I will report quite a different user experience.
I have been a long time user of emacs and Gnus (Emacs since 1987).
I have been using (ding) Gnus under Windows NT in the late 90's and up to
about 2010.

But now, I process my mail using the GMail browser interface.
The reasons are mostly due to :
- emacs is slow, chrome displays email more precisely and more quickly
- emacs is not multi-threaded, hence it may get stuck processing stuff.
Using the browser to process mail allows me not to be disturbed when I'm
writing documents or programming using Emacs.

I'll keep and eye on the solutions that have been reported here though.

Best regards,

Fabrice


[O] Agenda very slow with org-agenda-dimmed-blocked-tasks

2015-08-11 Thread Matt Lundin
The recent commit 570b1935e7db9913a2eb9084b6f1adc0d07a36cc dramatically
slowed down the generation of the agenda on my machine when
org-agenda-dimmed-blocked-tasks and org-enforce-todo-dependencies are
both set to t.

There seem to be an extraordinary number of calls to org-entry-blocked-p
and org-entry-get. Here's are the first several lines of profiling
information from a custom agenda command that has both of the settings
above enabled:

--8<---cut here---start->8---
   org-agenda-redo   1   
7.827560172   7.827560172
   org-agenda-run-series 2   
7.8218210500  3.9109105250
   org-let   3   
7.200832372.4002774566
   org-agenda-finalize   4   
6.844503497   1.7111258742
   org-agenda-dim-blocked-tasks  1   
6.699442204   6.699442204
   org-entry-blocked-p   9935
5.7348475660  0.0005772367
   org-block-todo-from-children-or-siblings-or-parent9935
4.0232743180  0.0004049596
   org-entry-get 20138   
1.5084527930  7.490...e-05
   org-get-todo-state47077   
1.2677654579  2.692...e-05
   org-entry-is-done-p   29892   
1.0612141059  3.550...e-05
   org-back-to-heading   89176   
0.7644088809  8.571...e-06
   org-property--local-values10203   
0.6607707660  6.476...e-05
   org-outline-level 45939   
0.6526133970  1.420...e-05
   org-entry-is-todo-p   16970   
0.6425987680  3.786...e-05
   [snip]
--8<---cut here---end--->8---

By way of comparison here is the profiling information for the same
custom agenda command prior to the commit. Notice the 139 calls to
org-agenda-blocked-p compared to the 9935 above:

--8<---cut here---start->8---
   org-agenda-redo   1   
2.165556182.16555618
   org-agenda-run-series 1   
2.164402155   2.164402155
   org-let   2   
1.563410317   0.7817051585
   org-agenda-finalize   4   
1.212033806   0.3030084515
   org-agenda-dim-blocked-tasks  1   
1.170204698   1.170204698
   org-let2  3   
0.591343907   0.1971146356
   org-agenda-prepare4   
0.3530507439  0.0882626859
   org-agenda-prepare-buffers1   
0.327547542   0.327547542
   org-agenda-list-stuck-projects1   
0.326917219   0.326917219
   org-tags-view 1   
0.326905634   0.326905634
   org-scan-tags 50  
0.3165784299  0.0063315685
   org-todo-list 1   
0.225206383   0.225206383
   org-set-regexps-and-options   50  
0.198799971   0.0039759994
   org--setup-collect-keywords   50  
0.1926802859  0.0038536057
   org-agenda-finalize-entries   3   
0.183284111   0.0610947036
   org-element-at-point  100 
0.1775049539  0.0017750495
   org-element--parse-to 100 
0.174980767   0.0017498076
   org-agenda-highlight-todo 157 
0.1738833260  0.0011075371
   org-element--cache-put101 
0.165917795   0.0016427504
   org-agenda-get-day-entries100 
0.063475662   0.0006347566
   org-refresh-category-properties   50  
0.045959423   0.0009191884
   org-agenda-list   1   
0.039187090.03918709
   org-refresh-properties100 
0.034035472   0.0003403547
   org-agenda-get-todos  50  
0.033929208   0.0006785841
   org-entry-blocked-p   139 
0.0336150219  0.0002418346
   org-outline-level 3906

Re: [O] Agenda very slow with org-agenda-dimmed-blocked-tasks

2015-08-11 Thread Matt Lundin
Matt Lundin  writes:

> Minimal recipe to replicate:
>
> a) Config file

Here's the minimal config. (The inline attachment didn't display
properly in gnus on my end).

(add-to-list 'load-path "~/org-mode/lisp")
(add-to-list 'load-path "~/org-mode/contrib/lisp")

(setq org-enforce-todo-dependencies t)
(setq org-agenda-dim-blocked-tasks t)
(setq org-agenda-files '("~/test.org"))

Best,
Matt



Re: [O] Cookies on check-boxed plain lists don't get updated

2015-08-11 Thread Nicolas Goaziou
Rasmus  writes:

> I also got a couple of errors:
>
> org-update-checkbox-count: Invalid search bound (wrong side of point)
>
> but I cannot seem to reproduce this consistently.  One time I had two
> "[/]" boxes.

This should be fixed in 9bb87f49f72de1ff7fcddc063f961d898b9f3c81. Thank
you.

Regards,



Re: [O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> In org 8.3 orgstruct-mode and org-cycle is no longer working as
> expected.

I assume you mean development version (i.e., Org 8.4), not Org 8.3
(maint).

> With org 8.3+, when I use org-cycle on a headline, e.g. ";;* Org", the
> display is no longer consistent with outline-toggle-children (I think the
> "outline"-prefix might be a recent addition).
>
> In Org 8.3+
>
> No tabs:
> ;;* Org
>
> One tab:
> ;;* Org
> ...
>
> Two tabs:
> ;;* Org
> ;;** Subhead1
>  forms1
> ;;** Subhead2
>  forms2
>
>
> In Org 8.2.10 behavior is consistent with outline-toggle-children:
>
>
> No tabs:
> ;;* Org
>
> One tab:
> ;;* Org
> ;;** Subhead1
> ;;** Subhead2
>
> Two tabs:
> ;;* Org
> ;;** Subhead1
>  forms1
> ;;** Subhead2
>  forms2
>
> I don't know how to debug this further.  Hints appreciated.

Could you comment out

  (define-key org-mode-map [remap show-children] 'org-show-children)

in org.el?

I added this line, but I think it is a mistake.


Regards,

-- 
Nicolas Goaziou



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Peter Davis
Fabrice Popineau  writes:

> On this thread, I will report quite a different user experience.
> I have been a long time user of emacs and Gnus (Emacs since 1987).
> I have been using (ding) Gnus under Windows NT in the late 90's and up
> to about 2010.
>
> But now, I process my mail using the GMail browser interface.
> The reasons are mostly due to :
> - emacs is slow, chrome displays email more precisely and more quickly
> - emacs is not multi-threaded, hence it may get stuck processing
> stuff. 
> Using the browser to process mail allows me not to be disturbed when
> I'm writing documents or programming using Emacs.
>
> I'll keep and eye on the solutions that have been reported here
> though.

Interesting. I use a variety of email clients, mainly browser-based ones 
(GMail, Fastmail), Thunderbird, and gnus. I keep gnus in
the arsenal for three main reasons:

1) I can do everything quickly without having to move my hands from the 
keyboard. If there isn't already a shortcut for what I want,
I can add one.

2) I need a decent editor for replies. I have not found a browser-based client 
that has this.

3) To bring this somewhat back on topic, I've recently discovered org capture, 
and I love the fact that I can capture a note with a
link to a specific email message.

That last feature alone is reason enough for me.  FWIW, I'm on a Mac, and I 
generally use Gnu emacs for editing, programming, etc.,
and use Aquamacs for running gnus. This avoids any latency problems, etc.

-pd




Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Fabrice Popineau
2015-08-11 14:23 GMT+02:00 Peter Davis :

>
> 2) I need a decent editor for replies. I have not found a browser-based
> client that has this.
>
> Agreed. The biggest problem arises when you need to format code.
There is an "edit with emacs" extension for chrome which is working quite
well.


> That last feature alone is reason enough for me.  FWIW, I'm on a Mac, and
> I generally use Gnu emacs for editing, programming, etc.,
> and use Aquamacs for running gnus. This avoids any latency problems, etc.
>
>
So you are running 2 instances of Emacs. This is what I considered for a
moment :-)

Fabrice


Re: [O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Rasmus
Hi,

>> In org 8.3 orgstruct-mode and org-cycle is no longer working as
>> expected.
>
> I assume you mean development version (i.e., Org 8.4), not Org 8.3
> (maint).

I pull from master, but (org-version) gives "Org-mode version 8.3.1
(release_8.3.1-47-g3e7aa3 @ /usr/share/emacs/site-lisp/org/)".

>> ..
>
> Could you comment out
>
>   (define-key org-mode-map [remap show-children] 'org-show-children)
>
> in org.el?
>
> I added this line, but I think it is a mistake.

I tried to recompile with that line commented out but it doesn't make a
difference.  I also tried to remove that defun from orgstruct-setup, but
that also didn't make change anything.

If there is a way to get the buffer-string for what is actually displayed
in the window I could use git bisect to find the bad commit, but I don't
know if that is possible.

Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers




Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Nicolas Richard
Peter Davis  writes:
> 2) I need a decent editor for replies. I have not found a
> browser-based client that has this.


Firefox has an extension,
https://addons.mozilla.org/fr/firefox/addon/its-all-text/, which allows
you to edit any text in your favourite editor (aka emacs) with
emacsclient.

-- 
Nico



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Rasmus
Fabrice Popineau  writes:

>> That last feature alone is reason enough for me.  FWIW, I'm on a Mac, and
>> I generally use Gnu emacs for editing, programming, etc.,
>> and use Aquamacs for running gnus. This avoids any latency problems, etc.
>>
>>
> So you are running 2 instances of Emacs. This is what I considered for a
> moment :-)

I typically run three Emacs servers.  One for editing, one for Gnus and
one for EMMS.  I change the icon, title and background color based on the
"purpose" of the instance.

Rasmus

-- 
May the Force be with you




Re: [O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Nicolas Goaziou
Rasmus  writes:

> I tried to recompile with that line commented out but it doesn't make a
> difference.  I also tried to remove that defun from orgstruct-setup, but
> that also didn't make change anything.

Hmm. Odd.
>
> If there is a way to get the buffer-string for what is actually displayed
> in the window I could use git bisect to find the bad commit, but I don't
> know if that is possible.

See `org-copy-visible'.

Regards,



Re: [O] Agenda very slow with org-agenda-dimmed-blocked-tasks

2015-08-11 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> The recent commit 570b1935e7db9913a2eb9084b6f1adc0d07a36cc dramatically
> slowed down the generation of the agenda on my machine when
> org-agenda-dimmed-blocked-tasks and org-enforce-todo-dependencies are
> both set to t.
>
> There seem to be an extraordinary number of calls to org-entry-blocked-p
> and org-entry-get.

Oops. This is fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-habit: completed-glyph not shown in graph-column

2015-08-11 Thread Nicolas Goaziou
Hello,

Mario Martelli  writes:

> The configuration of my habit file is:
>
> * Habits
>   :PROPERTIES:
>   :LOGGING:  TODO(!) WAIT(!) DONE(!) CANCELED(!)
>   :END:

Shouldn't it be 

  :LOGGING:  TODO(!) WAIT(!) | DONE(!) CANCELED(!)

Otherwise, DONE is not considered as a final keyword. Only CANCELED is.

Regards,

-- 
Nicolas Goaziou



Re: [O] A bug with expanding headlines of the sparse tree?

2015-08-11 Thread Nicolas Goaziou
Hello,

Meir Goldenberg  writes:

> I am using org-mode 8.2.10. Suppose we have this:
>
> * TODO Task1 [0/1]
> SCHEDULED: <2015-08-09 Sun>
> - [ ] Buy bread
> * FUTURE Task2
>
> Now, if we do C-/ T and give TODO for the keyword, then we correctly get:
>
> * TODO Task1 [0/1]...
>
> However, if we press Tab on this line, then the whole content, including
> next headline (the one marked FUTURE) shows up, which seems to be
> wrong.

This is to be expected. TAB discloses the entry and all children. It
also leaves the entry in an editable state. What you suggest gives

  * TODO Task1 [0/1]
  SCHEDULED: <2015-08-09 Sun>
  - [ ] Buy bread...

which means 1. that you can't reach Task2 easily, 2. that you can't edit
plain list comfortably.

Regards,

-- 
Nicolas Goaziou



Re: [O] Commit ceae5d651b80295f35c01ecfc53661c7e8eceba7 Breaks syncing with Android

2015-08-11 Thread Nicolas Goaziou
Hello,

Charles Philip Chan  writes:

> On 30 Jul 2015, ohwoeo...@gmail.com wrote:
>
> Hi Oleh:
>
>> I'm pretty sure my commit isn't to blame  and you meant this one:
>>
>> c15db80e32d22dace184203f6f03a0b586bb4b50
>> Author: Sergey Gordienko 
>> Date:   Fri Jun 26 17:44:20 2015 +0300
>>
>> org-mobile: Tiny fix in creating index.org file
>>
>> * lisp/org-mobile.el (org-mobile-create-index-file):
>> Eliminate cloning of `#+READONLY' property in the `index.org' file.
>> A sublists of `org-todo-keywords' don't need to contain the `|'.
>>
>> TINYCHANGE
>>
>> --Oleh
>
> Yes, this is the one I meant. Sorry for quoting the wrong commit.

Do you have any other information to share? E.g., what happens when
syncing breaks?

I'm Cc'ing Sergey Gordienko as he may have an idea about what is wrong
here.

Regards,

-- 
Nicolas Goaziou



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Suvayu Ali
On Tue, Aug 11, 2015 at 02:35:57PM +0200, Nicolas Richard wrote:
> Peter Davis  writes:
> > 2) I need a decent editor for replies. I have not found a
> > browser-based client that has this.
> 
> 
> Firefox has an extension,
> https://addons.mozilla.org/fr/firefox/addon/its-all-text/, which allows
> you to edit any text in your favourite editor (aka emacs) with
> emacsclient.

Doesn't work anymore with Gmail.

  https://github.com/docwhat/itsalltext/issues/36

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Matt Lundin
Fabrice Popineau  writes:

> On this thread, I will report quite a different user experience.
> I have been a long time user of emacs and Gnus (Emacs since 1987).
> I have been using (ding) Gnus under Windows NT in the late 90's and up
> to about 2010.
>
> But now, I process my mail using the GMail browser interface.
> The reasons are mostly due to :
> - emacs is slow, chrome displays email more precisely and more quickly
> - emacs is not multi-threaded, hence it may get stuck processing
> stuff. 

Just to add my own off-topic contribution to this thread...

I've found that gnus has sped up a good deal since 2010. I believe there
have been some optimizatons in the code in the last several years. It
takes about 5 seconds to start gnus on my under-powered machine, and
that is with 4 nntp accounts (including rss via gwene.org), 2 email
backends, and far too many groups! :) And this is with a lot of sorting
and mail splitting. E.g., I've configured gnus to sort subscribed groups
automatically by the number of times accessed, with the least read
groups falling to the bottom.

In my own experience (YMMV), I find the speed gain of navigating mail
and news in gnus makes up for the brief lock-ups caused by (re)starting
gnus or accessing a very large nntp group. I particularly appreciate the
ability to insert the text of attachments into the buffer (via docx2txt,
antiword, pdftotext, etc.) and to clip their contents into org-mode.

Matt



Re: [O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Rasmus
Nicolas Goaziou  writes:

> Rasmus  writes:
>
>> I tried to recompile with that line commented out but it doesn't make a
>> difference.  I also tried to remove that defun from orgstruct-setup, but
>> that also didn't make change anything.
>
> Hmm. Odd.
>>
>> If there is a way to get the buffer-string for what is actually displayed
>> in the window I could use git bisect to find the bad commit, but I don't
>> know if that is possible.
>
> See `org-copy-visible'.

Great.  The bad commit seems to be:

commit 898cfbcac0560d1d742d939a62c5a8253fe9b66f
Author: Nicolas Goaziou 
Date:   Mon Aug 10 13:34:07 2015 +0200

Implement faster `show-children' function

* lisp/org.el (org-show-children): New function.
(org-cycle-internal-local):
(org-set-visibility-according-to-property):
(org-content):
(org-move-subtree-down):
(orgstruct-setup):
(org-show-set-visibility):
* contrib/lisp/org-toc.el (org-toc-cycle-subtree):
(org-toc-restore-config):
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-feed.el (org-feed-update): Use new function.

* etc/ORG-NEWS: Document new function.

Suggested-by: Samuel Wales 


I guess I will have to dissect it more to figure out what broke.

Here's my test.el

(add-to-list 'load-path "~/src/code/org-mode/lisp")
(require 'org)
(let ((ol-rx ";;\\*+\\|\\`")
  (kill noninteractive))
  (with-temp-buffer
(insert ";;* test
;;** subhead
form1
")
(set 'outline-regexp ol-rx)
(set 'orgstruct-heading-prefix-regexp ol-rx)
(orgstruct-mode)
(org-global-cycle 3)
(goto-char (point-min))
(orgstruct-hijacker-org-cycle-4 nil)
(let ((str (org-copy-visible (point-min) (point-max
  (if (string-match-p ";;\\* test\n+$" str)
  (progn (message "failed")
 (and kill (kill-emacs 1)))
(message "success")
(and kill (kill-emacs 0)))
  str)))

And my test.sh

#!/bin/sh
emacs --batch --load test.el

Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Scott Randby

On 08/11/2015 08:23 AM, Peter Davis wrote:


2) I need a decent editor for replies. I have not found a
browser-based client that has this.


For me, setting up any of the Emacs email clients to work properly with 
my various email tasks is a daunting task. This especially true for my 
work email account which is not a Gmail account. I simply don't have the 
technical knowledge to get everything working, and I don't have the time 
to acquire that technical knowledge.


As a result, I use Thunderbird for all of my email and feed reading 
tasks. Thunderbird is trivial for me to set up, it is very easy to use, 
and I can still use Emacs for writing and editing email (as I'm doing 
now) with the External Editor add-on (http://globs.org/).


Scott Randby



3) To bring this somewhat back on topic, I've recently discovered
org capture, and I love the fact that I can capture a note with a
link to a specific email message.  That last feature alone is reason
enough for me.  FWIW, I'm on a Mac, and I generally use Gnu emacs
for editing, programming, etc., and use Aquamacs for running
gnus. This avoids any latency problems, etc.

-pd







Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Gerald Wildgruber

Hi,

I'm very happy with mu4e!

http://www.djcbsoftware.nl/code/mu/mu4e.html
https://github.com/djcb/mu

Its speed and ease in searching are unparalleled: the results of
searches in tens of thousands of mails is immediate. I like its concepts
of generating folders only virtually through searches: everything is
search. The only lag that might occur is during sending. Yet by using,
not the SMTP implementation that comes with emacs but a local postfix
installation or something like nullmailer:

http://vxlabs.com/2014/06/06/configuring-emacs-mu4e-with-nullmailer-offlineimap-and-multiple-identities

mail is taken over in the background and no time is lost. mu4e (an its
database backend mu) work on local copies of mail (sync'ed e.g. by
offlineimap). In conjunction with offlineimap interfacing with Gmail is
easy and well documented.

Gerald.

On Di, Aug 11 2015, Fabrice Popineau  wrote:

> On this thread, I will report quite a different user experience.
> I have been a long time user of emacs and Gnus (Emacs since 1987).
> I have been using (ding) Gnus under Windows NT in the late 90's and up to
> about 2010.
>
> But now, I process my mail using the GMail browser interface.
> The reasons are mostly due to :
> - emacs is slow, chrome displays email more precisely and more quickly
> - emacs is not multi-threaded, hence it may get stuck processing stuff.
> Using the browser to process mail allows me not to be disturbed when I'm
> writing documents or programming using Emacs.
>
> I'll keep and eye on the solutions that have been reported here though.
>
> Best regards,
>
> Fabrice



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Peter Davis
Scott Randby  writes:

> On 08/11/2015 08:23 AM, Peter Davis wrote:
>>
>> 2) I need a decent editor for replies. I have not found a
>> browser-based client that has this.
>
> For me, setting up any of the Emacs email clients to work properly
> with my various email tasks is a daunting task. This especially true
> for my work email account which is not a Gmail account. I simply don't
> have the technical knowledge to get everything working, and I don't
> have the time to acquire that technical knowledge.

This has certainly been the case for me with gnus. I spent years (literally) 
playing with gnus and giving up, only to be drawn back
to it weeks, months or years later to try again. Seriously, it was only after 
years of this that I managed to get things working
well enough to actually use gnus, and even at that I only use it with IMAP.

FWIW, I also used VM for a while (easier to configure, but much less powerful), 
MH-E, Wanderlust as well as non-Emacs clients
(Sylpheed, mutt, Thunderbird, and others.) It's a crowded field. I generally 
liked some things about each of these, and disliked
others. There's no perfect solution.

One of the persistent frustrations for me with Thunderbird is that it still, 
even years after the problem was reported, can't get
the unread counts correct for various folders all the time. It frequently shows 
unread counts for folders that have no unread
messages, and vice versa.

I get hundreds of messages a day, so I like to just be able to plow through 
them quickly, replying as needed, flagging some for
later attention, etc. Mutt was actually the fastest for that, but I hate the 
way it displays HTML messages with w3m in dump
mode. Mutt is also pretty challenging to configure, and that has to be 
re-created for each new machine. With gnus, I just copy my
.gnus.el file over and, bam, done.

-pd





Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Xebar Saram
On Tue, Aug 11, 2015 at 5:16 PM, Peter Davis  wrote:

> spent years (literally) playing with gnus and giving up, only to be drawn
> back
> to it weeks, months or years later to try again. Seriously, it was only
> after years of this that I managed to get things working
> well enough to actually use gnus, and even at that I only use it with IMAP.
>

Hehe this is *exactly* what i have experienced. im dying to move over to
emacs for emails but so far both gnus and mu4e are giving me so many issues
(and it may be that im just not smart enough to configure them properly).
The latest i tried was setting up gnus via imap (gmail ) which worked for
approximately 2 hours before getting errors and making me (once again..)
give up and crawl back defeated to gmail :) plus the fact that i need a
separate emacs session just for mail and all other small quirks in gnus are
kind of a pain to setup (at least it seems so).
mu4e seemed so promising but for me it seems that no matter what i do i
cant get the headers to auto refresh when i get a new email which is
driving me crazy so had to give up on that.


Z


Re: [O] Commit ceae5d651b80295f35c01ecfc53661c7e8eceba7 Breaks syncing with Android

2015-08-11 Thread Charles Philip Chan
On 11 Aug 2015, m...@nicolasgoaziou.fr wrote:

Hi Nicolas:

> Do you have any other information to share? E.g., what happens when
> syncing breaks?

Yes. The sync fails with a "Syntax error in regexp pattern near index
383" error on the Android (version 5.1.1) side.

Charles

-- 
"Are [Linux users] lemmings collectively jumping off of the cliff of
reliable, well-engineered commercial software?"
(By Matt Welsh)


signature.asc
Description: PGP signature


Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Scott Randby

On 08/11/2015 10:16 AM, Peter Davis wrote:


One of the persistent frustrations for me with Thunderbird is that
it still, even years after the problem was reported, can't get the
unread counts correct for various folders all the time. It
frequently shows unread counts for folders that have no unread
messages, and vice versa.


I know this is way off topic, but I've not experienced the unread 
messages bug with Thunderbird (fortunately). This might be due to the 
fact that I use POP instead of IMAP, or perhaps it may be because my 
daily email traffic is rather small (mostly messages from this list). My 
biggest beef with Thunderbird is that it doesn't follow the preferences 
I've set for news feeds.


Scott



[O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Johan Sandblom
Consider the attached orgmode file fragment, also included below. Prior 
to commit 0f93638ce sums were produced in the top row. After that 
commit, column view sums fail. Poor knowledge of git and elisp prevent 
me from finding the actual problem, but I did manage to find the first 
commit were it fails, and this hopefully helps


* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


[O] couple questions about simple todo

2015-08-11 Thread scrawler
Hi guys,

Pardon the baby-level questions.

With a file that looks like this:

#+startup: align nologdone showall
#+todo: next doing finished

* All to Do
** [2015-08-11 Tue] [1/1]
*** finished iron the cat

How can I enter the date stamp so that it is neither active nor inactive? I 
don't want a link to the agenda, and I'd like it to look like a heading.

also, what's the difference between "doing finished" and "doing | finished"
the pipe character doesn't seem to affect anything.

Thanks.
-- 
signature in pain: "ouch!"
:-)



Re: [O] [bug] org-cycle changed behavior in orgstruct-mode

2015-08-11 Thread Nicolas Goaziou
Rasmus  writes:

> I tried to recompile with that line commented out but it doesn't make a
> difference.  I also tried to remove that defun from orgstruct-setup, but
> that also didn't make change anything.

What if you replace the defun with `show-children' in `orgstruct-setup'
instead of simply removing the line? You may want to still comment out
the line above though.

Regards,



[O] remote R session

2015-08-11 Thread Zhihao Ding
Hi there,

I was wondering how to automatically fire up a remote R session when
editing source code in babel source code block? I'd like to have everything
on server and be able to play with it including making plots. Currently I
do tangle to a file on server first and then use tramp to access it.
Although I get a remote R session, the problem is that I'll be working on a
generated copy. Any ways to make improve this ?

Thanks,
Zhihao


Re: [O] Block level specification for tex code html export method

2015-08-11 Thread Haochen Xie
Hi Fabrice,

Thank you for mentioning dvisvgm. I did some researches on it, and it seems
that as for now, the only way to invoke dvisvgm is to first export the
latex part to dvi, and call dvisvgm manually to convert it to svg, then
include it in the org file, which, is too troublesome for me. Is there any
plan to add dvisvgm as an alternative to dvipng and imagemagick? IMO svg
images will look much better than png (well, in browsers supporting it), so
that's a nice option to have.

Regards,

Haochen


--

Mail from Haochen Xie

On Tue, Aug 11, 2015 at 5:53 PM, Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

>
>
> 2015-08-11 10:47 GMT+02:00 Haochen Xie :
>
>> Hi Andreas,
>>
>> Thank you for your reply. I've read the whole thread, and found your
>> example (the second link) very useful. Although for some reason, SVG
>> image is not working well on my machine (not being displayed in
>> chrome, nor on IE. I don't have firefox installed), but since the SVG
>> image generated by imagemagick is indeed a raster image, I don't see
>> any benefit using SVG over PNG, and exporting to PNG works perfectly.
>>
>>
> Use dvisvgm instead of imagemagick to generate the svg file.
>
> Fabrice
>


Re: [O] org-habit: completed-glyph not shown in graph-column

2015-08-11 Thread Mario Martelli
Hi Nicolas,


> Shouldn't it be 
> 
>  :LOGGING:  TODO(!) WAIT(!) | DONE(!) CANCELED(!)
> 
> Otherwise, DONE is not considered as a final keyword. Only CANCELED is.

thanks for the hint. I was not aware that ‘|’ is also necessary within LOGGING:

Nevertheless I’ve changed the logging property to:

  :LOGGING: DONE(!) 

as I do only need DONE within my habits file.

Now my agenda looks much nicer :-)

Thanks again
Mario




[O] Html export error

2015-08-11 Thread Flávio L. C. de Moura
Hi,

After the last org update, I am getting an error concerning the head of the
org file:

#+TITLE: 117366 - Lógica Computacional 1 (Turma D) 
#+AUTHOR: Flávio L. C. de Moura

If I org-html-export-as-html then I get:

apply: Wrong type argument: listp, #("Flávio L. C. de Moura" 0 21
(:parent (#0)))

If I remove these lines, everything works fine...

Any help is appreciated.

Best regards,
Flávio.




Re: [O] remote R session

2015-08-11 Thread Cook, Malcolm
Using ESS, If you are editing a org file file via tramp, editing an R src code 
block should “just work” to start the attached R session remotely.  I do it all 
the time.

Try this: make sure you do NOT have a local R session already and edit your 
source block….


From: emacs-orgmode-bounces+mec=stowers@gnu.org 
[mailto:emacs-orgmode-bounces+mec=stowers@gnu.org] On Behalf Of Zhihao Ding
Sent: Tuesday, August 11, 2015 11:04 AM
To: emacs-orgmode@gnu.org
Subject: [O] remote R session

Hi there,

I was wondering how to automatically fire up a remote R session when editing 
source code in babel source code block? I'd like to have everything on server 
and be able to play with it including making plots. Currently I do tangle to a 
file on server first and then use tramp to access it.  Although I get a remote 
R session, the problem is that I'll be working on a generated copy. Any ways to 
make improve this ?

Thanks,
Zhihao


[O] Macros or properties in source blocks

2015-08-11 Thread Gary Oberbrunner
I'd like to have either a macro or a property that controls some behavior
of an org-mode babel file:

#+PROPERTY: report_type All

and use that property inline: {{{property(report_type)}}} and in a source
block:

#+NAME: rtype
#+BEGIN_SRC emacs-lisp :results value
{{{property(report_type)}}}
#+END_SRC

And use that source block:

The report type is call_rtype()[:results raw]

But this doesn't work, I get "Symbol's value as variable is void:
{{{property

Is there any way to interpolate macros or properties into a source block
like this? Or is there a better way for me to set org-mode "global
variables" at the top of my file?

-- 
Gary


Re: [O] Html export error

2015-08-11 Thread Haochen Xie
Hi Flávio,

I can confirm the same problem on my box. After reverting to the old
version, exporting came back to normal.

Haochen


--

Mail from Haochen Xie

On Wed, Aug 12, 2015 at 1:29 AM, Flávio L. C. de Moura 
wrote:

> Hi,
>
> After the last org update, I am getting an error concerning the head of the
> org file:
>
> #+TITLE: 117366 - Lógica Computacional 1 (Turma D)
> #+AUTHOR: Flávio L. C. de Moura
>
> If I org-html-export-as-html then I get:
>
> apply: Wrong type argument: listp, #("Flávio L. C. de Moura" 0 21
> (:parent (#0)))
>
> If I remove these lines, everything works fine...
>
> Any help is appreciated.
>
> Best regards,
> Flávio.
>
>
>


Re: [O] couple questions about simple todo

2015-08-11 Thread Eric S Fraga
On Tuesday, 11 Aug 2015 at 10:46, scraw...@gmail.com wrote:

[...]

> How can I enter the date stamp so that it is neither active nor
> inactive? I don't want a link to the agenda, and I'd like it to look
> like a heading.

I don't think you can.  But the agenda will, by default, only show
active time stamps.

> also, what's the difference between "doing finished" and "doing | finished"
> the pipe character doesn't seem to affect anything.

>From the manual: 

"The vertical bar separates the TODO keywords (states that _need
 action_) from the DONE states (which need _no further action_)."

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



Re: [O] Html export error

2015-08-11 Thread Kyle Meyer
Hello,

flaviomo...@unb.br (Flávio L. C. de Moura) wrote:
> Hi,
>
> After the last org update, I am getting an error concerning the head of the
> org file:
[...]
> If I org-html-export-as-html then I get:
>
> apply: Wrong type argument: listp, #("Flávio L. C. de Moura" 0 21
> (:parent (#0)))

This seems similar to

  http://permalink.gmane.org/gmane.emacs.orgmode/99535

and

  http://permalink.gmane.org/gmane.emacs.orgmode/99680

and is likely an issue with compiling the new installation while the old
one is loaded.

Try installing from the package-list-packages before Org has been
loaded.

--
Kyle



Re: [O] couple questions about simple todo

2015-08-11 Thread scrawler
On Tue, Aug 11, 2015 at 05:37:59PM +0100, Eric S Fraga wrote:

> From the manual: 
> 
> "The vertical bar separates the TODO keywords (states that _need
>  action_) from the DONE states (which need _no further action_)."
> 

I'll go ahead and throw the bar in there. The last todo state is still colored 
as a "done" state, even without it, but it might just be the leuven theme that 
does that.

thanks.
-- 
signature drinking: "glugluglug"
:-)



Re: [O] couple questions about simple todo

2015-08-11 Thread Nicolas Goaziou
Hello,

scraw...@gmail.com writes:

> I'll go ahead and throw the bar in there. The last todo state is still
> colored as a "done" state, even without it, but it might just be the
> leuven theme that does that.

No vertical bar is equivalent to a vertical bar just before the last
TODO state.

The vertical bar is useful when you have more than one final state,
e.g., "DONE", "CANCELED", "FAILED"...

Regards,

-- 
Nicolas Goaziou



Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Nicolas Goaziou
Hello,

Johan Sandblom  writes:

> Consider the attached orgmode file fragment, also included below.
> Prior to commit 0f93638ce sums were produced in the top row. After
> that commit, column view sums fail. Poor knowledge of git and elisp
> prevent me from finding the actual problem, but I did manage to find
> the first commit were it fails, and this hopefully helps
>
> * sum
>   :PROPERTIES:
>   :COLUMNS:  %30ITEM %5A{+} %5B{+}
>   :END:
> ** bla
> *** blabla
> :PROPERTIES:
> :A:1
> :END:
> ** bli
>:PROPERTIES:
>:A:1
>:END:

This is fixed. Thank you.


Regard,

-- 
Nicolas Goaziou



[O] Stable releases

2015-08-11 Thread Scott Randby
While I've used Org's development version in the past, I stopped doing 
that due to my failure to learn how to use git (no time) and other 
issues. Now, I only use the stable releases. But the latest 8.3 release 
doesn't seem so stable to me, so I'd like some clarification about what 
the Org maintainers mean by a stable release. Perhaps this is too vague, 
so let me explain a bit.


Normally, I wait many months before upgrading Org to a new stable 
release, but when 8.3 was released, I upgraded right away (from 8.2.10) 
since I have a new machine on which I installed Emacs 24.5. I read 
through the release notes for anything that might give me problems and 
didn't see anything.


When I started using 8.3, I discovered that the behavior of commented 
headlines had been changed---a change with which I disagree, a change I 
could not find in the release notes, and one which forces me to alter a 
huge number of files. It seems I missed the discussion about commented 
headlines on the mailing list. This is due to my limited knowledge of 
elisp and programming in general, a gap which makes it difficult for me 
to follow the more technical discussions on the mailing list. While it 
has been explained to me that the change is a feature, I consider it to 
be a serious bug since it is not backwards compatible.


Another issue I had with 8.3 is the deletion of the 
org-latex-with-hyperref variable, something I could not find in the 
release notes (maybe I missed it). I understand that having Org insert 
\hypersetup{...} details is the most desirable situation, but I fail to 
see the harm in keeping org-latex-with-hyperref for those of us who 
needed it in the past. Yes, I figured out a fix, but this is a fix that 
forces me to stick with an outmoded way of doing things, and so I 
consider this deletion to be a bug.


I do understand that all software has bugs, and that everyone working on 
Org is doing so voluntarily (thank you so much for your wonderful work). 
But I was very surprised to find that the evaluation of table formulas 
didn't work in 8.3.1. I could see something like this happening in the 
development version, but it is somewhat mysterious to me how such a bug 
could make its way into a stable release.


I guess what I want to know, and maybe there is no answer, is how long 
should I wait before upgrading to a stable release? Org is by far the 
most important piece of software I use (I hate it when I can't use Org), 
and bugs (which I know can't be avoided) make it hard, even impossible, 
for me to get my real work done. If there is a way for me to minimize 
encountering bugs, I will appreciate a description of that way.


Scott Randby



[O] switch M-RET and C-RET in org mode with no sucess

2015-08-11 Thread Xebar Saram
Hi guys

im trying to switch between C-RET and M-RET (i use M-ret alot more but
C-RET is much more accessible for me :)) but i dont seem to have any
success in doing so

this is what i have so far

(with-eval-after-load "org"
(define-key org-mode-map (kbd "C-RET") 'org-insert-heading)
(define-key org-mode-map (kbd "M-RET") 'org-insert-heading-respect-content)
)

any ideas what im doing wrong? after reloading emacs C-RET still defaults
to org-insert-heading-respect-content

best

Z


Re: [O] Stable releases

2015-08-11 Thread Ista Zahn
On Tue, Aug 11, 2015 at 1:18 PM, Scott Randby  wrote:
> While I've used Org's development version in the past, I stopped doing that
> due to my failure to learn how to use git (no time) and other issues. Now, I
> only use the stable releases. But the latest 8.3 release doesn't seem so
> stable to me, so I'd like some clarification about what the Org maintainers
> mean by a stable release. Perhaps this is too vague, so let me explain a
> bit.

[snip]

>
> I guess what I want to know, and maybe there is no answer, is how long
> should I wait before upgrading to a stable release?

One strategy is keeping an eye on the mailing list and waiting for bug
reports to die down before upgrading.

Org is by far the most
> important piece of software I use (I hate it when I can't use Org), and bugs
> (which I know can't be avoided) make it hard, even impossible, for me to get
> my real work done. If there is a way for me to minimize encountering bugs, I
> will appreciate a description of that way.
>
> Scott Randby
>



Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-11 Thread Thomas S . Dye
Aloha Nicolas,

The attached patch is based on current maint branch.

Let me know if you have questions.

All the best,
Tom

>From e5ab2427af7095db8c7f080dc8f9457021a10544 Mon Sep 17 00:00:00 2001
From: tsdye 
Date: Tue, 11 Aug 2015 08:34:50 -1000
Subject: [PATCH] Edit date and time macros

---
 doc/org.texi | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index e9c7cf1..710f102 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10216,16 +10216,20 @@ export.
 
 @item @{@{@{date@}@}@}
 @itemx @{@{@{date(@var{FORMAT})@}@}@}
+@cindex date, macro
+This macro refers to the @code{#+DATE} keyword. @var{FORMAT} is an optional
+argument to the @code{@{@{@{date@}@}@}} macro that will be used only if
+@code{#+DATE} is a single timestamp.  @var{FORMAT} should be a format string
+understood by @code{format-time-string}.
+
 @itemx @{@{@{time(@var{FORMAT})@}@}@}
 @itemx @{@{@{modification-time(@var{FORMAT})@}@}@}
-@cindex date, macro
 @cindex time, macro
 @cindex modification time, macro
-These macros refer to the @code{#+DATE} keyword, the current date, and the
-modification time of the file being exported, respectively.  @var{FORMAT}
-should be a format string understood by @code{format-time-string}.  Note that
-@var{FORMAT} is an optional argument to the @code{@{@{@{date@}@}@}} macro,
-and that it will only be used if @code{#+DATE} is a single timestamp.
+These macros refer to the date and time when the document is exported and to
+the modification date and time of the file being exported, respectively.
+@var{FORMAT} should be a format string understood by
+@code{format-time-string}.
 
 @item @{@{@{input-file@}@}@}
 @cindex input file, macro
-- 
2.5.0


Nicolas Goaziou  writes:

> Hello,
>
> Thomas S. Dye  writes:
>
>> A second patch is attached.
>
> Thank you.
>
>> From cb30697627afacc8950ef85b839f47d48371f39b Mon Sep 17 00:00:00 2001
>> From: tsdye 
>> Date: Thu, 6 Aug 2015 12:08:34 -1000
>> Subject: [PATCH 2/2] More date and time macro edits
>
> I think the commit message is confusing ("more"?). Also, I cannot apply
> the patch on maint branch. Could you rebase it on top of that branch?
>
> Regards,

-- 
Thomas S. Dye
http://www.tsdye.com


Re: [O] A bug with expanding headlines of the sparse tree?

2015-08-11 Thread Meir Goldenberg
I do not quite understand. You wrote: "TAB discloses the entry and all
children. It also leaves the entry in an editable state." However, Task2 is
not a child of the entry being disclosed (Task1). Furthermore, by
constructing the sparse tree, I am telling org-mode that I am only
interested to see the sub-trees under the tasks marked as TODO!

On Tue, Aug 11, 2015 at 4:07 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Meir Goldenberg  writes:
>
> > I am using org-mode 8.2.10. Suppose we have this:
> >
> > * TODO Task1 [0/1]
> > SCHEDULED: <2015-08-09 Sun>
> > - [ ] Buy bread
> > * FUTURE Task2
> >
> > Now, if we do C-/ T and give TODO for the keyword, then we correctly get:
> >
> > * TODO Task1 [0/1]...
> >
> > However, if we press Tab on this line, then the whole content, including
> > next headline (the one marked FUTURE) shows up, which seems to be
> > wrong.
>
> This is to be expected. TAB discloses the entry and all children. It
> also leaves the entry in an editable state. What you suggest gives
>
>   * TODO Task1 [0/1]
>   SCHEDULED: <2015-08-09 Sun>
>   - [ ] Buy bread...
>
> which means 1. that you can't reach Task2 easily, 2. that you can't edit
> plain list comfortably.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Stable releases

2015-08-11 Thread Suvayu Ali
On Tue, Aug 11, 2015 at 02:33:18PM -0400, Ista Zahn wrote:
> On Tue, Aug 11, 2015 at 1:18 PM, Scott Randby  wrote:
> >
> > I guess what I want to know, and maybe there is no answer, is how long
> > should I wait before upgrading to a stable release?
> 
> One strategy is keeping an eye on the mailing list and waiting for bug
> reports to die down before upgrading.

I would like to add, the community always needs help, and writing code
is not the only way to do that.  From your message it seems to me you
have a rather elaborate use for Org.  It might serve as a great test
case.  If you follow the list regularly, then you could help by testing
the maint branch from time to time (or even master, up to you). 

You do not need to know how to use git, you have two options:

- simply download the tarballs from the gitweb interface (see the
  "snapshot" links, http://orgmode.org/w/org-mode.git),

- use elpa (either GNU, Org's own)

As for git, I have included the bash function I use to update Org once a
week.  If you are interested, feel free to ask me Git questions
off-list.

function update_org() {
pushd ~/build/org-mode  # my Org repo and install directory
local dorebase=$(git rev-list origin/master..master|wc -l)
git stash
git checkout master
if [[ $dorebase -gt 0 ]]; then
git pull --rebase --stat
else
git pull
fi

if [ $? == 0 ]; then
echo "+++ Check if merged successfully. +++"
echo "==> Want to continue?"
select yesorno in "Yes" "No"; do
case $yesorno in
Yes)
echo "+++ Building Org-mode $(git branch|egrep '\*')
+++";
make compile autoloads info "$@" &> log
[ $? -ne 0 ] && echo "+++ Build failed  
+++" && break;
echo "+++ Installing Info files +++";
make install-info
break;;
No)
echo "Aborting on user command.";
break;;
*)
echo "==> Choose Yes or No by typing 1 or 2."
esac
done
else
echo "Merge failed, aborting."
fi
popd
}


Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] BUG REPORT - problem with org.elc on clocking out

2015-08-11 Thread Sharon Kimble
Nicolas Goaziou  writes:

> Hello,
>
> Sharon Kimble  writes:
>
>> Yes, its still occurring even after closing and restarting emacs. In
>> fact I've just done this to check for certain, and this time it threw up
>> a debugger page, which says -
>>
>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(pos)
>> "r\302!\203\303!\202pq\210\212\214~\210b\210\304 \305 !\306>\205=\307\310 
>> \"?\205=\307\311 \"\307\312
>> \"b\210\313\314x\210\314y\210`|,\207" [pos drawer markerp marker-buffer 
>> org-element-at-point org-element-type (drawer
>> property-drawer) org-element-property :contents-begin :begin :end "
>> " nil] 4 ("/home/boudiccas/.emacs.d/elpa/org-plus-contrib-20150805/org.elc" 
>> . 462364)] 2)
>>   org-remove-empty-drawer-at("LOGBOOK" 11266)
>>   (save-excursion (beginning-of-line 0) (org-remove-empty-drawer-at 
>> "LOGBOOK" (point)))
>>   bh/remove-empty-drawer-on-clock-out()
>
> The function `bh/remove-empty-drawer-on-clock-out' needs to be modified.
>
> It should call 
>
>   (org-remove-empty-drawer-at (point))
>
> instead of
>
>   (org-remove-empty-drawer-at "LOGBOOK" (point))
>
>
> Regards,

Thanks Nick, that has completely solved the problem, and its running
cleanly and nicely again.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3


signature.asc
Description: PGP signature


[O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Matthew MacLean
Yo~!

fa5fd6351605912ec75e783cb626497b1ebe471e introduced a change where
org-babel-script-escape stopped accepting numbers. This caused an issue in
ob-ruby.el where when trying to evaluate something like "2 + 2", you would
get the message:

  `org-babel-script-escape' expects a string

This broke evaluation of Ruby code blocks.

I suspect this is not the only location where this problem might arise, so
I am submitting a patch so the function simply returns numbers if they are
passed in rather than dying. (Because numbers don't need to be escaped, and
this was the previous behaviour.)

Thanks..!

By the way, sorry if this ends up being a duplicate... I learned not so
long ago I needed to subscribe to actually post here and wasn't sure if my
last post went to /dev/null or is just awaiting moderation. (I tested to
make sure the patch still works with the most recent commit of the maint
branch.)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index e3abe97..01c4da8 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2813,34 +2813,37 @@ block but are passed literally to the \"example-block\"."
   (error "Unterminated string in `org-babel-script-escape'"))
 (apply #'string (reverse out
 
-(defun org-babel-script-escape (str &optional force)
-  "Safely convert tables into elisp lists."
-  (unless (stringp str)
-(error "`org-babel-script-escape' expects a string"))
-  (let ((escaped
-	 (cond
-	  ((and (> (length str) 2)
-		(or (and (string-equal "[" (substring str 0 1))
-			 (string-equal "]" (substring str -1)))
-		(and (string-equal "{" (substring str 0 1))
-			 (string-equal "}" (substring str -1)))
-		(and (string-equal "(" (substring str 0 1))
-			 (string-equal ")" (substring str -1)
-
-	   (concat "'" (org-babel--script-escape-inner str)))
-	  ((or force
-	   (and (> (length str) 2)
-		(or (and (string-equal "'" (substring str 0 1))
-			 (string-equal "'" (substring str -1)))
-			;; We need to pass double-quoted strings
-			;; through the backslash-twiddling bits, even
-			;; though we don't need to change their
-			;; delimiters.
-			(and (string-equal "\"" (substring str 0 1))
-			 (string-equal "\"" (substring str -1))
-	   (org-babel--script-escape-inner str))
-	  (t str
-(condition-case nil (org-babel-read escaped) (error escaped
+(defun org-babel-script-escape (val &optional force)
+  "Safely convert passed in values (including collections of
+them; tables) into elisp lists."
+  (if (numberp val)
+  val
+(unless (stringp val)
+  (error "`org-babel-script-escape' expects a string or number"))
+(let ((escaped
+	   (cond
+	((and (> (length val) 2)
+		  (or (and (string-equal "[" (substring val 0 1))
+			   (string-equal "]" (substring val -1)))
+		  (and (string-equal "{" (substring val 0 1))
+			   (string-equal "}" (substring val -1)))
+		  (and (string-equal "(" (substring val 0 1))
+			   (string-equal ")" (substring val -1)
+
+	 (concat "'" (org-babel--script-escape-inner val)))
+	((or force
+		 (and (> (length val) 2)
+		  (or (and (string-equal "'" (substring val 0 1))
+			   (string-equal "'" (substring val -1)))
+			  ;; We need to pass double-quoted strings
+			  ;; through the backslash-twiddling bits, even
+			  ;; though we don't need to change their
+			  ;; delimiters.
+			  (and (string-equal "\"" (substring val 0 1))
+			   (string-equal "\"" (substring val -1))
+	 (org-babel--script-escape-inner val))
+	(t val
+  (condition-case nil (org-babel-read escaped) (error escaped)
 
 (defun org-babel-read (cell &optional inhibit-lisp-eval)
   "Convert the string value of CELL to a number if appropriate.


Re: [O] Stable releases

2015-08-11 Thread Rasmus
Hi,

The definition of a major release is in README_maintainer:

Main releases are made whenever Org is in a state where the feature
set is consistent and we feel that the features that are implemented
is something we want to support in the future.

AFAIK, Org 8.2.10 ships with Emacs 24.5 and you can use that.

I agree that the changes you mentioned should be in ORG-NEWS.

You can help by testing the master version against your files once in a
while and let us know of breakages.

Rasmus

-- 
The Kids call him Billy the Saint




[O] helm-mode-org-set-tags adding additional tags

2015-08-11 Thread Stephen J. Barr
Hello,

I am using org-mode 8.2.10 with helm. When I am adding tags to a headline,
the first tag offers me completions of all possible tags in the file.
However, if I go back later and add additional tags, I am not offered
completion. How can I fix this?

Thanks,
Stephen


Stephen J. Barr
PhD Student, Operations Management
Dept: Information Systems and Operations Management (ISOM)
Michael G. Foster School of Business
University of Washington
Phone:  425 516 5012
Email: stev...@uw.edu
Twitter: @stevejb
Website: http://steve.planetbarr.com


[O] tags completion in a narrowed buffer

2015-08-11 Thread Stephen J. Barr
Greetings,

In my workflow I frequently narrow buffers. Within a narrowed buffer, I
would like to add additional headlines with tag completion. However, the
menu of tags offered for completion are only the tags in the narrowed
buffer. Is it possible for me to specify that tag completion should always
offer me all tags in all org-agenda-files files.

Thanks,
Stephen


Stephen J. Barr
PhD Student, Operations Management
Dept: Information Systems and Operations Management (ISOM)
Michael G. Foster School of Business
University of Washington
Phone:  425 516 5012
Email: stev...@uw.edu
Twitter: @stevejb
Website: http://steve.planetbarr.com


Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Johan Sandblom

2015-08-11 19:13 skrev Nicolas Goaziou:

Hello,

Johan Sandblom  writes:


Consider the attached orgmode file fragment, also included below.
Prior to commit 0f93638ce sums were produced in the top row. After
that commit, column view sums fail. Poor knowledge of git and elisp
prevent me from finding the actual problem, but I did manage to find
the first commit were it fails, and this hopefully helps

* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


This is fixed. Thank you.



Thank you for your quick reaction. Unfortunately it is still not 
perfect. Starting column mode with point on the headline "** bla" makes 
the column view end before headline "** bli". Am I right that this is 
unintended?


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Kyle Meyer
Matthew MacLean  wrote:
> Yo~!
>
> fa5fd6351605912ec75e783cb626497b1ebe471e introduced a change where
> org-babel-script-escape stopped accepting numbers. This caused an issue in
> ob-ruby.el where when trying to evaluate something like "2 + 2", you would
> get the message:
>
>   `org-babel-script-escape' expects a string
>
> This broke evaluation of Ruby code blocks.
>
> I suspect this is not the only location where this problem might
> arise,

Perhaps ob-ruby.el is to blame.

#+begin_src ruby
  2 + 2
#+end_src

The above snippet calls org-babel-script-escape twice: first with "4"
and then with 4.  The first one happens with the org-babel-ruby-evaluate
call (which leads to an org-babel-ruby-table-or-string call) in
org-babel-execute:ruby and the second happens with the direct call to
org-babel-ruby-table-or-string in org-babel-execute:ruby.

Is the results-params check and call to org-babel-ruby-table-or-string
in org-babel-ruby-evaluate needed?  It seems like org-babel-execute
already covers this processing.

--
Kyle



Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Kyle Meyer
Kyle Meyer  wrote:
> It seems like org-babel-execute already covers this processing.

s/org-babel-execute/org-babel-execute:ruby/

--
Kyle



Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Matthew MacLean
Yeah, my initial patch was actually for ob-ruby, though, when looking for
the change that broke it for the report, I found a change in behaviour of
the escaping function and figured that Ruby might not be the only thing
broken.

So, instead, I restored the original permissive behaviour of
org-babel-script-escape and made a patch of that instead.

On Tue, Aug 11, 2015, 4:36 PM Kyle Meyer  wrote:

> Kyle Meyer  wrote:
> > It seems like org-babel-execute already covers this processing.
>
> s/org-babel-execute/org-babel-execute:ruby/
>
> --
> Kyle
>


Re: [O] A bug with expanding headlines of the sparse tree?

2015-08-11 Thread Nicolas Goaziou
Meir Goldenberg  writes:

> I do not quite understand. You wrote: "TAB discloses the entry and all
> children. It also leaves the entry in an editable state." However, Task2 is
> not a child of the entry being disclosed (Task1).

I explained why hiding Task2 leaves entry in an uncomfortable state,
where you could edit near ellipsis.

> Furthermore, by constructing the sparse tree, I am telling org-mode
> that I am only interested to see the sub-trees under the tasks marked
> as TODO!

TAB ignores you want to keep a sparse tree. Note that it is also used to
get out of parse trees, i.e., get a normal view again.


Regards,



Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-11 Thread Nicolas Goaziou
Thomas S. Dye  writes:

> Aloha Nicolas,
>
> The attached patch is based on current maint branch.

Applied. Thank you.

Regards,



Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Nicolas Goaziou
Johan Sandblom  writes:

> Thank you for your quick reaction. Unfortunately it is still not
> perfect. Starting column mode with point on the headline "** bla"
> makes the column view end before headline "** bli". Am I right that
> this is unintended?

This is intended. According to the manual[fn:1] 

 If the cursor is somewhere inside the outline, this command
 searches the hierarchy, up from point, for a ‘:COLUMNS:’ property
 that defines a format. When one is found, the column view table is
 established for the tree starting at the entry that contains the
 ‘:COLUMNS:’ property.

Regards,

[fn:1] (info "(org) Using column view"), first command.



Re: [O] Macros or properties in source blocks

2015-08-11 Thread Charles C. Berry

On Tue, 11 Aug 2015, Gary Oberbrunner wrote:


I'd like to have either a macro or a property that controls some behavior
of an org-mode babel file:

#+PROPERTY: report_type All

and use that property inline: {{{property(report_type)}}} and in a source
block:

#+NAME: rtype
#+BEGIN_SRC emacs-lisp :results value
{{{property(report_type)}}}
#+END_SRC

And use that source block:

The report type is call_rtype()[:results raw]

But this doesn't work,


[snip]

BUT THIS DOES:

--8<---cut here---start->8---

#+NAME: rtype
#+header: :var prop=(org-entry-get (point) "report_type" t)
#+BEGIN_SRC emacs-lisp
prop
#+END_SRC

And use that source block:

The report type is call_rtype()[:results raw]

--8<---cut here---end--->8---

HTH,

Chuck



Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Kyle Meyer
Matthew MacLean  wrote:
> Yeah, my initial patch was actually for ob-ruby, though, when looking for
> the change that broke it for the report, I found a change in behaviour of
> the escaping function and figured that Ruby might not be the only thing
> broken.

Yes, that makes sense, but glancing at all lisp/ob-*.el files that use
org-babel-script-escape, ob-ruby.el seems to be the only one that makes
a double call to org-babel-script-escape, so I'd guess it is being
called with a string in all other cases.

> So, instead, I restored the original permissive behaviour of
> org-babel-script-escape and made a patch of that instead.

Given that org-babel-script-escape gives a clear error message, I'd
prefer to keep the stricter variant and fix any offending calls.

Feel free to wait to hear others' thoughts on this, but, in any case,
please use 'git format-patch' to generate a patch with a commit message
(see the contributing section of the website [1] for more information).
Also, it'd be nice to add a test that catches the original error.

Thanks

[1] http://orgmode.org/worg/org-contribute.html

--
Kyle



Re: [O] couple questions about simple todo

2015-08-11 Thread Eric Abrahamsen
scraw...@gmail.com writes:

> Hi guys,
>
> Pardon the baby-level questions.
>
> With a file that looks like this:
>
> #+startup: align nologdone showall
> #+todo: next doing finished
>
> * All to Do
> ** [2015-08-11 Tue] [1/1]
> *** finished iron the cat
>
> How can I enter the date stamp so that it is neither active nor
> inactive? I don't want a link to the agenda, and I'd like it to look
> like a heading.

My take on what you've shown here is that you've got it a bit backwards.
Apologies if you've tried many things and you settled on this on
purpose, but it looks like you're trying to organize the Org file to
look like the Agenda.

It took me a while to get used to this, too. I think you'll find the Org
tools work better if you forget about what the file itself looks like,
and just look at the Agenda. So your Org file would look like:

* All to Do [1/1]
** finished iron the cat <2015-08-11 Tue>

And the Agenda will show you everything under its proper date heading.

I've got scheduling Org files I hardly ever look at directly: todos go
in with capture, and are examined, resolved and archived via the Agenda.
It can be freeing, once you let the file itself go!

Yours,
Eric




[O] org-block-background in 8.3.1?

2015-08-11 Thread Luke Crook
I'm not sure if I still need to set "org-block-background" in 8.3.1.  

But if I do need to continue setting this, what is the new name for "org-
block-background"?

(set-face-attribute 'org-block-background nil 
:height (round (* 0.9 (face-attribute 'fixed-pitch 
:height
(set-face-attribute 'org-block nil 
:height (round (* 0.9 (face-attribute 'fixed-pitch 
:height





Re: [O] org-block-background in 8.3.1?

2015-08-11 Thread Kyle Meyer
Luke Crook  wrote:
> I'm not sure if I still need to set "org-block-background" in 8.3.1.
>
> But if I do need to continue setting this, what is the new name for "org-
> block-background"?
>
> (set-face-attribute 'org-block-background nil
> :height (round (* 0.9 (face-attribute 'fixed-pitch
> :height
> (set-face-attribute 'org-block nil
> :height (round (* 0.9 (face-attribute 'fixed-pitch
> :height

org-block-background was removed in f8b42e8 ("Don't use an overlay for
src blocks backgrounds", 2014-07-28) for performance reasons.  I'm not
aware of anything that has been introduced in its place.

--
Kyle



Re: [O] Babel error on init with 8.3.1

2015-08-11 Thread Peter Salazar
Thanks for all the help! I figured out that the problem wasn't with the
installation, but that Emacs was calling org (i.e. the built-in version)
before org-plus-contrib was being loaded. At least I think that's what the
problem was.

What I know for sure is that placing the line (add-to-list 'load-path
".emacs.d/elpa/org-plus-contrib-20150810/") at the very beginning of my
init file made that error message go away, and now Emacs and
org-plus-contrib appear to launch successfully.

However, I'm still getting errors when I do org-refile. Doing org-refile
triggers this error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  get-file-buffer(nil)
  org-find-base-buffer-visiting(nil)
  org-get-agenda-file-buffer(nil)
  org-refile-get-targets(nil (#("ferry" 0 5 (fontified t line-prefix nil
wrap-prefix #("  " 0 2 (face org-indent)) face org-level-1
  org-refile-get-location("Refile subtree \"ferry\" to" nil confirm nil)
  org-refile(nil)
  #(org-refile nil nil)
  ad-Advice-call-interactively(# org-refile)
  apply(ad-Advice-call-interactively # org-refile)
  call-interactively(org-refile)
  org-self-insert-command(1)
  #(org-self-insert-command nil nil)
  ad-Advice-call-interactively(#
org-self-insert-command nil nil)
  apply(ad-Advice-call-interactively #
(org-self-insert-command nil nil))
  call-interactively(org-self-insert-command nil nil)
  command-execute(org-self-insert-command)

I don't think this is an issue with installation, because it still happens
after I do org-reload or C-u org-reload. Does anyone know how I can debug
this?

Thanks!



On Tue, Aug 11, 2015 at 11:35 AM, Cook, Malcolm  wrote:

> What about when you try exactly per:
>
>
>
>
> http://stackoverflow.com/questions/31855904/emacs-sees-the-directory-with-the-new-org-mode-version-but-loads-the-old-versio?answertab=active#tab-top
>
>
>
> does the “confirm success” step work?
>
>
>
>
>
> *From:* Peter Salazar [mailto:cycleofs...@gmail.com]
> *Sent:* Monday, August 10, 2015 7:14 PM
>
> *To:* Cook, Malcolm 
> *Cc:* Ryan Schuetzler ; emacs-orgmode@gnu.org
> *Subject:* Re: [O] Babel error on init with 8.3.1
>
>
>
> Thanks. Tried that, but then when I launch regular Emacs with my init
> file, I still get this error:
>
> https://gist.github.com/512c4934d5351a47b2a1
>
>
>
> Any other ideas?
>
>
>
> On Mon, Aug 10, 2015 at 7:18 PM, Cook, Malcolm  wrote:
>
> Try that recipe again but without the org-reload.  That is forcing org to
> load.  You don’t WANT org loaded when you build it again inside the package
> manager.
>
>
>
> *From:* Peter Salazar [mailto:cycleofs...@gmail.com]
> *Sent:* Monday, August 10, 2015 4:30 PM
> *To:* Cook, Malcolm 
> *Cc:* Ryan Schuetzler ; emacs-orgmode@gnu.org
>
>
> *Subject:* Re: [O] Babel error on init with 8.3.1
>
>
>
> Update: the install of org-plus-contrib was eventually successful, but it
> seems that my attempt to launch a GUI version Emacs -Q didn't work.
>
>
>
> Here's what I did:
>
>
>
> $ open -a /Applications/Emacs.app --args --no-init
>
>
>
> C-u M-x org-reload
>
>
>
> package-list-packages
>
>
>
> select and delete org-plus-contrib
>
>
>
> package-install org-plus-contrib
>
>
>
> But then when I quit and launch Emacs without the --no-init argument, I
> still get:
>
>
>
> Debugger entered--Lisp error: (void-variable org-planning-line-re)
>
>   org-element--current-element(168330 element planning nil)
>
>
>
> ...which I think means org-plus-contrib was not successfully upgraded.
>
>
>
> Any thoughts? Thanks!
>
>
>
>
>
>
>
> On Mon, Aug 10, 2015 at 4:43 PM, Peter Salazar 
> wrote:
>
> I'm trying to do this for my other install of Emacs (which uses Spacemacs)
> and now I'm running into problems. I'm using GUI Emacs on Mac OSX
> (from brew install --with-cocoa --srgb emacs).
>
>
>
> When I do open -a /Applications/Emacs.app --args --no-init --eval "(progn
> (require 'package) (add-to-list 'package-archives '(\"org\" . \"
> http://orgmode.org/elpa/\";)) (package-initialize)
> (package-refresh-contents) (package-install 'org-plus-contrib))" it never
> gets pastContacting host: orgmode.org:80. It just shows that message
> indefinitely...
>
>
>
> When I try eval-ing package.el first, I get package-desc-reqs accessing a
> non-package-desc and I can't install org-plus-contrib. Any suggestions?
>
>
>
>
>
> On Mon, Aug 10, 2015 at 1:08 PM, Cook, Malcolm  wrote:
>
> Hi – here is my more detailed variation that just got upvoted at
> stackoverflow  for resolving essentially the same problem:
>
>
>
>
> http://stackoverflow.com/questions/31855904/emacs-sees-the-directory-with-the-new-org-mode-version-but-loads-the-old-versio
>
>
>
>
>
>
>
> *From:* emacs-orgmode-bounces+mec=stowers@gnu.org [mailto:
> emacs-orgmode-bounces+mec=stowers@gnu.org] *On Behalf Of *Cook,
> Malcolm
> *Sent:* Monday, August 10, 2015 9:32 AM
> *To:* 'Ryan Schuetzler' ; emacs-orgmode@gnu.org
> *Subject:* Re: [O] Babel error on init with 8.3.1
>
>
>
> When you “ updated org through the package manager in Emacs,” I believe
> you 

Re: [O] couple questions about simple todo

2015-08-11 Thread scrawler
On Wed, Aug 12, 2015 at 10:27:29AM +0800, Eric Abrahamsen wrote:
> 
> My take on what you've shown here is that you've got it a bit backwards.
> Apologies if you've tried many things and you settled on this on
> purpose, but it looks like you're trying to organize the Org file to
> look like the Agenda.
> 
> It took me a while to get used to this, too. I think you'll find the Org
> tools work better if you forget about what the file itself looks like,
> and just look at the Agenda. So your Org file would look like:
> 
> * All to Do [1/1]
> ** finished iron the cat <2015-08-11 Tue>
> 
> And the Agenda will show you everything under its proper date heading.
> 
> I've got scheduling Org files I hardly ever look at directly: todos go
> in with capture, and are examined, resolved and archived via the Agenda.
> It can be freeing, once you let the file itself go!

I think you may be on to something. I use org every day, but I've been using it 
for longer than I'd like to admit in underpowered and goofy ways. I get 
inspired by power-user setups, go for it, get swamped by complexity, throw up 
my hands.

I'm trying something new here by going as dead-simple as I can. I can always 
add stuff as the need arises.

I need to keep things reaaly easy while still doing things "the org 
way." I'll try to use an active timestamp and just try to remain calm.

Oh, and while all the property drawers and options lines and everything are 
really cool and useful, all the junk that can fill up a buffer can sure get 
ugly and distracting.

So I can avoid looking at all that?

Thanks.
-- 



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Peter Salazar
Like Fabrice, I also still process my email using the Gmail web interface.
The only reason I want email within Emacs is so I can compose replies in a
proper editor with all my keybindings. I tried Chrome's Edit with Emacs,
but it loses line breaks when it sends the output from Emacs back to Gmail.
So I prefer to write replies within Emacs.

Since I only need a small fraction of my emails to go through Emacs, I set
up mbsync to pull only my starred messages:

Channel gmail-starred
Master :gmail-remote:"[Gmail]/Starred"
Slave :gmail-local:starred
Create Both
Expunge Both
SyncState *

If this is of interest to you I can share my setup.

On Tue, Aug 11, 2015 at 8:23 AM, Peter Davis  wrote:

> Fabrice Popineau  writes:
>
> > On this thread, I will report quite a different user experience.
> > I have been a long time user of emacs and Gnus (Emacs since 1987).
> > I have been using (ding) Gnus under Windows NT in the late 90's and up
> > to about 2010.
> >
> > But now, I process my mail using the GMail browser interface.
> > The reasons are mostly due to :
> > - emacs is slow, chrome displays email more precisely and more quickly
> > - emacs is not multi-threaded, hence it may get stuck processing
> > stuff.
> > Using the browser to process mail allows me not to be disturbed when
> > I'm writing documents or programming using Emacs.
> >
> > I'll keep and eye on the solutions that have been reported here
> > though.
>
> Interesting. I use a variety of email clients, mainly browser-based ones
> (GMail, Fastmail), Thunderbird, and gnus. I keep gnus in
> the arsenal for three main reasons:
>
> 1) I can do everything quickly without having to move my hands from the
> keyboard. If there isn't already a shortcut for what I want,
> I can add one.
>
> 2) I need a decent editor for replies. I have not found a browser-based
> client that has this.
>
> 3) To bring this somewhat back on topic, I've recently discovered org
> capture, and I love the fact that I can capture a note with a
> link to a specific email message.
>
> That last feature alone is reason enough for me.  FWIW, I'm on a Mac, and
> I generally use Gnu emacs for editing, programming, etc.,
> and use Aquamacs for running gnus. This avoids any latency problems, etc.
>
> -pd
>
>
>


Re: [O] switch M-RET and C-RET in org mode with no sucess

2015-08-11 Thread Peter Salazar
Maybe try using  instead of RET? Something like this:

(define-key org-mode-map (kbd "") 'org-insert-heading)


On Tue, Aug 11, 2015 at 1:45 PM, Xebar Saram  wrote:

> Hi guys
>
> im trying to switch between C-RET and M-RET (i use M-ret alot more but
> C-RET is much more accessible for me :)) but i dont seem to have any
> success in doing so
>
> this is what i have so far
>
> (with-eval-after-load "org"
> (define-key org-mode-map (kbd "C-RET") 'org-insert-heading)
> (define-key org-mode-map (kbd "M-RET") 'org-insert-heading-respect-content)
> )
>
> any ideas what im doing wrong? after reloading emacs C-RET still defaults
> to org-insert-heading-respect-content
>
> best
>
> Z
>


Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Matthew MacLean
If the stricter definition covers everything that org-babel-escape-script
was supposed to do... I agree we should keep it.
My problem was I wasn't sure if the function got pruned of something it
needed.

But if that's not the case...

On Tue, Aug 11, 2015 at 6:52 PM, Kyle Meyer  wrote:

> Feel free to wait to hear others' thoughts on this, but, in any case,
> please use 'git format-patch' to generate a patch with a commit message
> (see the contributing section of the website [1] for more information).
> Also, it'd be nice to add a test that catches the original error.
>

...here is the git format-patch of the ob-ruby.el change!

I also created one for a test to check for basic Ruby evaluation
capabilities. It should catch errors that break evaluation like this in
ob-ruby. (I find it interesting that the session tests worked without the
double-escape change actually.)
From 07052b4ad0f51f24534c5ee2899511cfb658ae71 Mon Sep 17 00:00:00 2001
From: Archenoth 
Date: Tue, 11 Aug 2015 20:29:53 -0600
Subject: [PATCH 1/2] Removed double-escape in ob-ruby.el (In
 org-babel-ruby-evaluate)

The only time org-babel-ruby-evaluate is called is in
org-babel-execute:ruby, where its result either escaped (The double
escape) or passed in as the "scalar-form" of org-babel-result-cond which
handles the "pp" and "code" parameters. (So, places that don't need
escaping.)
---
 lisp/ob-ruby.el | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el
index 9b01dbf..0ff460e 100644
--- a/lisp/ob-ruby.el
+++ b/lisp/ob-ruby.el
@@ -201,11 +201,7 @@ return the value of the last statement in BODY, as elisp."
 			  org-babel-ruby-pp-wrapper-method
 			org-babel-ruby-wrapper-method)
 			  body (org-babel-process-file-name tmp-file 'noquote)))
-		 (let ((raw (org-babel-eval-read-file tmp-file)))
-   (if (or (member "code" result-params)
-   (member "pp" result-params))
-   raw
- (org-babel-ruby-table-or-string raw))
+		 (org-babel-eval-read-file tmp-file
 ;; comint session evaluation
 (case result-type
   (output
-- 
2.5.0

From 40864852d9f0996c4f755377a8326f2cbae417ec Mon Sep 17 00:00:00 2001
From: Archenoth 
Date: Tue, 11 Aug 2015 21:18:44 -0600
Subject: [PATCH 2/2] Add test that basic Ruby evaluation works with ob-ruby

This will also test that the string escape schenanigans are fixed.
---
 testing/lisp/test-ob-ruby.el | 17 +
 1 file changed, 17 insertions(+)

diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el
index eb5233b..576cb13 100644
--- a/testing/lisp/test-ob-ruby.el
+++ b/testing/lisp/test-ob-ruby.el
@@ -21,6 +21,23 @@
 (unless (featurep 'ob-ruby)
   (signal 'missing-test-dependency "Support for Ruby code blocks"))
 
+(ert-deftest test-ob-ruby/basic-evaluation ()
+  "Test that basic evaluation works."
+(should (equal (org-test-with-temp-text "#+begin_src ruby
+ 2 + 2
+#+end_src"
+  (org-babel-execute-maybe)
+  (substring-no-properties
+   (buffer-string)))
+		   "#+begin_src ruby
+ 2 + 2
+#+end_src
+
+#+RESULTS:
+: 4
+
+")))
+
 (ert-deftest test-ob-ruby/session-output-1 ()
 (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output
 s = \"1\"
-- 
2.5.0



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Eric Abrahamsen
Peter Salazar  writes:

> Like Fabrice, I also still process my email using the Gmail web
> interface. The only reason I want email within Emacs is so I can
> compose replies in a proper editor with all my keybindings. I tried
> Chrome's Edit with Emacs, but it loses line breaks when it sends the
> output from Emacs back to Gmail. So I prefer to write replies within
> Emacs.
>
> Since I only need a small fraction of my emails to go through Emacs, I
> set up mbsync to pull only my starred messages:
>
> Channel gmail-starred
> Master :gmail-remote:"[Gmail]/Starred" 
> Slave :gmail-local:starred
> Create Both
> Expunge Both
> SyncState *
>
> If this is of interest to you I can share my setup. 

I agree that having email accessible locally is key to making Gnus
usable. All my email is synced to local dovecot server, and Gnus
accesses that -- no lag at all. Sending messages is still a big pain,
though. I send using msmtp, and there's an add-on called msmtp-queue
that would apparently allow Gnus to hand off messages instantly, but
I've never spent the time to get it set up. I sure wish IMAP could
handle both sending and receiving messages!

E

> On Tue, Aug 11, 2015 at 8:23 AM, Peter Davis 
> wrote:
>
>
> Fabrice Popineau  writes:
>
> > On this thread, I will report quite a different user experience.
> > I have been a long time user of emacs and Gnus (Emacs since
> 1987).
> > I have been using (ding) Gnus under Windows NT in the late 90's
> and up
> > to about 2010.
> >
> > But now, I process my mail using the GMail browser interface.
> > The reasons are mostly due to :
> > - emacs is slow, chrome displays email more precisely and more
> quickly
> > - emacs is not multi-threaded, hence it may get stuck processing
> > stuff.
> > Using the browser to process mail allows me not to be disturbed
> when
> > I'm writing documents or programming using Emacs.
> >
> > I'll keep and eye on the solutions that have been reported here
> > though.
>
> Interesting. I use a variety of email clients, mainly
> browser-based ones (GMail, Fastmail), Thunderbird, and gnus. I
> keep gnus in
> the arsenal for three main reasons:
>
> 1) I can do everything quickly without having to move my hands
> from the keyboard. If there isn't already a shortcut for what I
> want,
> I can add one.
>
> 2) I need a decent editor for replies. I have not found a
> browser-based client that has this.
>
> 3) To bring this somewhat back on topic, I've recently discovered
> org capture, and I love the fact that I can capture a note with a
> link to a specific email message.
>
> That last feature alone is reason enough for me. FWIW, I'm on a
> Mac, and I generally use Gnu emacs for editing, programming, etc.,
> and use Aquamacs for running gnus. This avoids any latency
> problems, etc.
>
> -pd




Re: [O] couple questions about simple todo

2015-08-11 Thread Eric Abrahamsen
scraw...@gmail.com writes:

> On Wed, Aug 12, 2015 at 10:27:29AM +0800, Eric Abrahamsen wrote:
>> 
>> My take on what you've shown here is that you've got it a bit backwards.
>> Apologies if you've tried many things and you settled on this on
>> purpose, but it looks like you're trying to organize the Org file to
>> look like the Agenda.
>> 
>> It took me a while to get used to this, too. I think you'll find the Org
>> tools work better if you forget about what the file itself looks like,
>> and just look at the Agenda. So your Org file would look like:
>> 
>> * All to Do [1/1]
>> ** finished iron the cat <2015-08-11 Tue>
>> 
>> And the Agenda will show you everything under its proper date heading.
>> 
>> I've got scheduling Org files I hardly ever look at directly: todos go
>> in with capture, and are examined, resolved and archived via the Agenda.
>> It can be freeing, once you let the file itself go!
>
> I think you may be on to something. I use org every day, but I've been
> using it for longer than I'd like to admit in underpowered and goofy
> ways. I get inspired by power-user setups, go for it, get swamped by
> complexity, throw up my hands.
>
> I'm trying something new here by going as dead-simple as I can. I can always 
> add stuff as the need arises.
>
> I need to keep things reaaly easy while still doing things "the 
> org way." I'll try to use an active timestamp and just try to remain calm.
>
> Oh, and while all the property drawers and options lines and everything are 
> really cool and useful, all the junk that can fill up a buffer can sure get 
> ugly and distracting.
>
> So I can avoid looking at all that?

Sure, in principle you don't need that stuff at all! It depends on what
you're using Org for, but if you're really trying to start simple and
build up, then ignore properties etc for now.

Starting off simple probably means just dumping all your TODOs under one
heading. Use timestamps for events (going to the doctor), SCHEDULED for
tasks you plan to do at a certain time ("iron the cat" above should
probably have been a schedule, not a timestamp), and DEADLINE for tasks
that need to be done by a certain time.

An event should have a timestamp, but not a SCHEDULED or DEADLINE. A
task should have one or both of SCHEDULED and DEADLINE (having both
would mean "this has to be done by tomorrow morning, and I'm working on
it this afternoon").

Use two todo keywords: TODO and DONE.

Then just stay in the Agenda. Use "t" to change todo status, and ">",
"C-c C-s" and "C-c C-d" to manipulate the times. Nearly everything you
want to do can be done using Agenda commands -- read that section of the
manual a couple of times, and don't go to the file unless you have to.

Stick with that until you really start to feel the need for more
complexity. That might be more todo keywords, or maybe tag filtering. Or
customizing how things are shown in the Agenda. My guess is you'll be
able to go pretty far with just the above setup.

Good luck,
Eric




Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Kyle Meyer
Matthew MacLean  wrote:
[...]
> ...here is the git format-patch of the ob-ruby.el change!

> I also created one for a test to check for basic Ruby evaluation
> capabilities. It should catch errors that break evaluation like this in
> ob-ruby.

Thanks.  The code change looks good to me and fixes the provided test.

Please format the commit message like described here:

  http://orgmode.org/worg/org-contribute.html#orgheadline6

In addition to the formatting, the message should include "TINYCHANGE".
This may be beyond what qualifies as a tiny change if tests count toward
changed lines (Bastien or Nicolas?).  If it's acceptable as a tiny
change, please combine the two commits.  Otherwise, perhaps we can just
leave the test commit out.

> (I find it interesting that the session tests worked without the
> double-escape change actually.)

The session tests never execute a branch that calls
org-babel-ruby-table-or-string.

--
Kyle



Re: [O] fa5fd6351605912ec75e783cb62649 breaks org-babel-script-escape for ob-ruby

2015-08-11 Thread Matthew MacLean
On Tue, Aug 11, 2015 at 11:53 PM, Kyle Meyer  wrote:

> In addition to the formatting, the message should include "TINYCHANGE".
> This may be beyond what qualifies as a tiny change if tests count toward
> changed lines (Bastien or Nicolas?).  If it's acceptable as a tiny
> change, please combine the two commits.  Otherwise, perhaps we can just
> leave the test commit out.
>


Alright, done. Is this acceptable? (Provided that tests don't count towards
line count, of course)
From 7c849019341805e8814efecb11ea5bc1bd2a47e5 Mon Sep 17 00:00:00 2001
From: Archenoth 
Date: Tue, 11 Aug 2015 23:59:25 -0600
Subject: [PATCH] ob-ruby: Fix double-escaping

* lisp/ob-ruby.el: Remove second call to
  `org-babel-ruby-table-or-string' in `org-babel-ruby-evaluate'.

* testing/lisp/test-ob-ruby.el: Add test to verify
  `org-babel-execute:ruby' can evaluate Ruby code. (What the
  double-escape prevented)

I removed the escaping from `org-babel-ruby-evaluate', because the only
place `org-babel-ruby-evaluate' is ever called is in
`org-babel-execute:ruby'.

In this function, its result either escaped (Where the double escape
previously occurred) or passed in as the "scalar-form" of
`org-babel-result-cond', which handles the "pp" and "code" parameters.
(A place that doesn't need escaping.)

TINYCHANGE
---
 lisp/ob-ruby.el  |  6 +-
 testing/lisp/test-ob-ruby.el | 17 +
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el
index 9b01dbf..0ff460e 100644
--- a/lisp/ob-ruby.el
+++ b/lisp/ob-ruby.el
@@ -201,11 +201,7 @@ return the value of the last statement in BODY, as elisp."
 			  org-babel-ruby-pp-wrapper-method
 			org-babel-ruby-wrapper-method)
 			  body (org-babel-process-file-name tmp-file 'noquote)))
-		 (let ((raw (org-babel-eval-read-file tmp-file)))
-   (if (or (member "code" result-params)
-   (member "pp" result-params))
-   raw
- (org-babel-ruby-table-or-string raw))
+		 (org-babel-eval-read-file tmp-file
 ;; comint session evaluation
 (case result-type
   (output
diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el
index eb5233b..576cb13 100644
--- a/testing/lisp/test-ob-ruby.el
+++ b/testing/lisp/test-ob-ruby.el
@@ -21,6 +21,23 @@
 (unless (featurep 'ob-ruby)
   (signal 'missing-test-dependency "Support for Ruby code blocks"))

+(ert-deftest test-ob-ruby/basic-evaluation ()
+  "Test that basic evaluation works."
+(should (equal (org-test-with-temp-text "#+begin_src ruby
+ 2 + 2
+#+end_src"
+  (org-babel-execute-maybe)
+  (substring-no-properties
+   (buffer-string)))
+		   "#+begin_src ruby
+ 2 + 2
+#+end_src
+
+#+RESULTS:
+: 4
+
+")))
+
 (ert-deftest test-ob-ruby/session-output-1 ()
 (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output
 s = \"1\"
--
2.5.0


Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Johan Sandblom

2015-08-12 01:08 skrev Nicolas Goaziou:

Johan Sandblom  writes:


Thank you for your quick reaction. Unfortunately it is still not
perfect. Starting column mode with point on the headline "** bla"
makes the column view end before headline "** bli". Am I right that
this is unintended?


This is intended. According to the manual[fn:1]

 If the cursor is somewhere inside the outline, this command
 searches the hierarchy, up from point, for a ‘:COLUMNS:’ 
property
 that defines a format. When one is found, the column view table 
is

 established for the tree starting at the entry that contains the
 ‘:COLUMNS:’ property.

Regards,

[fn:1] (info "(org) Using column view"), first command.


I read that passage differently. The second-level headline ** bli is in 
the tree that starts at the first-level headline * sum. The manual does 
not state that the column view table is established for the part of the 
tree that is between the entry that contains the ´:COLUMNS:´ property 
and point. Since it does not mention partial trees at all I assumed the 
entire tree starting at the entry was intended.


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell