Re: [O] Just sharing another orgmode use: usability tests

2017-08-02 Thread Eduardo Mercovich

Hi Karl.

+ automatic task clocking, including automated time stamping of 
every observation.



You seem to use headings for any events.
If list items does the trick as well, you can take a look at 
timers
for doing the clocking thing: 
http://orgmode.org/manual/Timers.html


Totally agree, that's exactly what I use now. :)
Lists are used inside each task, at 1 item per (short) 
observation. 

+ observation tagging (there are repeating patterns of use or 
interaction problems or sources that you could catch on the 
fly, so any observation could be related to those common 
issues).


You already mentioned templates. I'd go with yasnippets for that 
as well.


Sorry I wasn't clear, I meant more the use of tags related to 
common observed patterns mark and select after (with sparse tree) 
those in which that pattern or issue is relevant. Great to group 
things (tasks, observations, etc.) related to the same issue. 

+ automatic filling of User/task-results-and-time matrix (the 
most fundamental metric of usability tests).



Wow, this would be great.


Yes, but for that I have to learn Lisp. ;)
I'm starting with "An Introduction To Programming in Emacs Lisp" 
by Robert J. Chassell. Just minutes a week sadly, but this is what 
I can do now. :)


In the document structure we have: 
* Users,

** Pre-task interview
** tasks (with TODO states as indicators of success|failure|so-so; 
  maybe we can use properties).

- each one with one or more timer entry
- so total task time is the last item timer value,
** Post-task interview

To make the User/task-results-and-time matrix we'll have to walk 
the hierarchy and get for each User the sequence of tasks, and of 
each, the success (or not), time and tag (issue) related and put 
that in the results matrix. 

Since I couldn't find other references about orgmode used for 
usability, I am organizing an informal workshop to share this 
experience next week with 10 people or so from the usability 
community in Buenos Aires.
If someone is interested, we can arrange another in English after 
this 1st one. ;)


Best regards... 



--
eduardo mercovich

Donde se cruzan tus talentos 
con las necesidades del mundo, 
ahí está tu vocación. 
(Anónimo)




Re: [O] Happily exporting LaTeX, now want to export to text and HTML, can't figure how to handle latex markup

2017-08-02 Thread Jeremie Juste


Hello 

>
> Putting together a macro seems like the best option.  Recall that you
> can use elisp in macros by placing it between `(eval’ and `)', so the
> following emits “def’ in all but latex exports and “abc” for latex.
>


Yes I found this nice piece of code  

It switches to svg if backend is html and to raw latex if backend is
latex. You only have to tweak it your needs.

#+header: :file (by-backend (html "tree.svg") (t 'nil))
#+header: :imagemagick
#+header: :results (by-backend (pdf "latex") (t "raw"))
#+begin_src latex
  \usetikzlibrary{trees}
  \begin{tikzpicture}
\node [circle, draw, fill=red!20] at (0,0) {1}
child { node [circle, draw, fill=blue!30] {2}
  child { node [circle, draw, fill=green!30] {3} }
  child { node [circle, draw, fill=yellow!30] {4} }};
  \end{tikzpicture}
#+end_src

* COMMENT setup
#+begin_src emacs-lisp :results silent
  (setq org-babel-latex-htlatex "htlatex")
  (defmacro by-backend ( body)
`(case (if (boundp 'backend) (org-export-backend-name backend) nil) ,@body))
#+end_src

The reference 
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html


Best regards

Jeremie



Re: [O] setting local variables

2017-08-02 Thread Eric Abrahamsen
Kaushal Modi  writes:

> On Wed, Aug 2, 2017, 5:54 PM Eric Abrahamsen  wrote:
>
>  I'm trying to locally set `sentence-end-double-space' to t, to conform
>  to the Emacs manual style. If I set it at the top of the file with:
>
>  -*- sentence-end-double-space: t -*-
>
> It should be the very first line and prefixed with Org comment characters "# 
> ".

Bah, I should have known that -- I wasn't adding the comment character.
Thanks for setting me straight!

Eric




Re: [O] Slow usage of capture templates

2017-08-02 Thread Tim Cross

Probably no real help, but win10 is (or soon will be) bundling in bash
shell, which may address many of the reasons to use Cygwin. From posts
I've seen on a number of lists, I would not be surprised to see cygwin
slowly decline into obscurity. I see little interest in the emacs devel
list for cygwin since the native windows version has matured (and it has
been suggested, is the largest emacs user base).

Having bash, a native emacs and even a 'better' system shell in
powershell (better than bat scripts and VB that is), at some point, you
will likely have to switch and I can say, it is much less distasteful
than it was (I've been using Linux since 1993 and Emacs since 97 and am
also forced to run windows at work).

Alternatively, do what I actually do - run vmware and Linux as a
virtual - technically, I'm running the work SOE and within policy! When
I absolutely have to do things in windows, I use native Emacs and a
small amount of powershell, but plan to use the bash shell once I find
time to sort it all out. 

Tim

Johan Ekh writes:

> Thanks Adam
>
> I've tried the native windows version and it does not have this problem.
> But I'm an old school Linux user that is forced to use windows at work.
> I've managed to set up Cygwin and it works quite well, in fact I think
> Emacs is working very well except for the issue in this post. Not slow.
> Thanks anyway. / Johan
>
> On Wed, Aug 2, 2017 at 12:55 PM, Adam Porter  wrote:
>
>> This isn't much help, but the best suggestion I have is to try the
>> non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
>> is inherently slow compared to Linux builds for some reason.  It takes
>> probably 10-20 times as long to startup, and everything I do it in it is
>> slow compared to in Linux.  Maybe the native Windows build will perform
>> better.
>>
>>
>>


-- 
Tim Cross



Re: [O] setting local variables

2017-08-02 Thread Kaushal Modi
On Wed, Aug 2, 2017, 5:54 PM Eric Abrahamsen 
wrote:

>
> I'm trying to locally set `sentence-end-double-space' to t, to conform
> to the Emacs manual style. If I set it at the top of the file with:
>
> -*- sentence-end-double-space: t -*-
>

It should be the very first line and prefixed with Org comment characters
"# ".

That line appears in the exported *.texi/*.info files (which I don't
> think it should!).
>

May be you missed out the "# "?

How do you all set local variables in Org files to be exported?
>

I put this at the bottom of each Org file and it works well:


=
* Footnotes
* COMMENT Local Variables :ARCHIVE:
# Local Variables:
# fill-column: 70
# eval: (auto-fill-mode 1)
# End:
=

(Pre-adding empty Footnotes section too so that if I add footnotes, the
file-end comments don't end up in Footnotes.)

> --

Kaushal Modi


[O] setting local variables

2017-08-02 Thread Eric Abrahamsen
Hi there,

I'm writing an Emacs manual in Org, using
https://github.com/tarsius/ox-texinfo-plus to make things a bit easier.

I'm trying to locally set `sentence-end-double-space' to t, to conform
to the Emacs manual style. If I set it at the top of the file with:

-*- sentence-end-double-space: t -*-

That line appears in the exported *.texi/*.info files (which I don't
think it should!).

I'm not able to set it at the bottom of the file, either, with a "Local
Variables:" section, as the Org comment syntax isn't recognized by
emacs (or maybe it's the indentation?), and the elisp comment syntax is
exported literally.

How do you all set local variables in Org files to be exported?

Thanks,
Eric




Re: [O] Determine min/max values in a table

2017-08-02 Thread Thierry Banel
Le 02/08/2017 14:07, Karl Voit a écrit :
> Hi!
>
> How can I determine minimum and/or maximum value of a table?
>
> Here is my example:
>
> #+NAME: myvalues
> | Values |
> ||
> |  4 |
> |  2 |
> |  3 |
> |  7 |
> |  5 |
> |  6 |
>
> | Min| Max| Average | First | Last |
> |++-+---+--|
> | #ERROR | #ERROR | 4.5 | 4 |6 |
> #+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max 
> (remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)
>
> My goal is to get min==2 in the first column and max==7 in the
> second.
>

Alternatively you have the orgtbl-aggregate package available on Melpa.

#+BEGIN: aggregate :table "myvalues" :cols "min(Values) max(Values)
mean(Values)"
| min(Values) | max(Values) | mean(Values) |
|-+-+--|
|   2 |   7 |  4.5 |
#+END:




Re: [O] [PATCH] ob-vala.el: Add Vala support to Babel

2017-08-02 Thread Christian Garbs
Hi,

On Wed, Aug 02, 2017 at 12:03:50AM +0200, Nicolas Goaziou wrote:
> Christian Garbs  writes:

> > Some of your proposed changes apply to ob-C.el as well.  I could
> > prepare a different patch for that (under which topic?),
> 
> Depending on the size of the changes, it could be "Tiny changes", "Small
> refactoring"...

I'll have a look at it if time permits.  I should probably write some
documentation for ob-vala first.

> (BTW, would you want to write some for "ob-vala.el"?).

Oooh, I like testing!  After having I short look at the ob-C tests I
think I should be able to come up with some similar test cases.

> Could you provide an ORG-NEWS entry about the new file?

Yes, I'll try that, too.

The next iteration of the patch should include ob-vala.el itself, some
tests and an ORG-NEWS entry.


Regarding the lexical-binding:  How can I check if byte-compiling is
successful?

Regards,
Christian
-- 
Christian.Garbshttps://www.cgarbs.de

Murphy's Laws of Combat:
21. Friendly fire isn't.



[O] [PATCH] org.el: Allow tags without keys in customization

2017-08-02 Thread Allen Li
* lisp/org.el (org-tag-alist, org-tag-persistent-alist):
Add non-keyed tag type.
---
 lisp/org.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 335d6c48a..28b206d99 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3456,8 +3456,10 @@ See also `org-tag-persistent-alist' to sidestep
this behavior."
   :group 'org-tags
   :type '(repeat
   (choice
-   (cons   (string:tag "Tag name")
-   (character :tag "Access char"))
+   (cons :tag "Tag with key"
+ (string:tag "Tag name")
+ (character :tag "Access char"))
+   (list :tag "Tag" (string :tag "Tag name"))
(const :tag "Start radio group" (:startgroup))
(const :tag "Start tag group, non distinct" (:startgrouptag))
(const :tag "Group tags delimiter" (:grouptags))
@@ -3489,8 +3491,10 @@ on a per-file basis, insert anywhere in the file:
   :group 'org-tags
   :type '(repeat
   (choice
-   (cons (string:tag "Tag name")
+   (cons :tag "Tag with key"
+ (string:tag "Tag name")
  (character :tag "Access char"))
+   (list :tag "Tag" (string :tag "Tag name"))
(const :tag "Start radio group" (:startgroup))
(const :tag "Start tag group, non distinct" (:startgrouptag))
(const :tag "Group tags delimiter" (:grouptags))
-- 
2.14.0.rc1.383.gd1ce394fe2-goog



[O] Bug: org-tag-alist defcustom does not allow ("tag") [9.0.9 (9.0.9-40-gb7fdc3-elpaplus @ elpa/org-plus-contrib-20170710/)]

2017-08-02 Thread Allen Li
`org-tag-alist' and `org-tag-persistent-alist' defcustom types are not
set up to accept non-cons cell tags like ("tag").

Emacs  : GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8),
modified by Debian
Package: Org mode version 9.0.9 (9.0.9-40-gb7fdc3-elpaplus @
elpa/org-plus-contrib-20170710/)



Re: [O] Finding calc/elisp methods

2017-08-02 Thread Adonay Felipe Nogueira
Hi, you can find such information in the Calc Mode info pages:

[[info:calc]]

Avoid the commands between parenthesis which start with "calc-" because
these are actually Emacs Lisp procedures --- if you would really need to
use such, you would have to write the formula as a Emacs Lisp notation
and as far as I know, we can't mix Emacs Lisp procedures together with
Calc commands in the same formula, like so:

vmax([2, 3, '(max 2 4)])

The example above would cause an error. 'max is a "native" Emacs Lisp
procedure that would return the maximum value from the values given.

Happy hacking! :)

-- 
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
  GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
  que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
  aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
  /software/ livre. Favor entrar em contato em caso de dúvida.



Re: [O] Finding calc/elisp methods

2017-08-02 Thread Nick Dokos
Karl Voit  writes:

> ...
> Leslie helped here by mentioning vmin/vmax which is that obvious
> that I do feel embarrassed now ;-)
>
> #+TBLFM: 
> @2$1=vmin(remote(myvalues,@2$1..@>$1))::@2$2=vmax(remote(myvalues,@2$1..@>$1))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)
>
> However, let's make this thread a valuable one by adding a question:
> how does somebody find such things? Is there a source of information
> where I could find calc methods by "apropos" method together with
> elisp methods?
>
> "M-h a minimum" returns only calc-find-minimum which is hardly of
> any help in this case. "apropos-documentation" returns more results
> but still lacks "vmin".
>
> What is your method of choice to find answers to those kind of
> questions? At least my internet search engine of choice did not help
> me in the first place.

A long time ago, I struggled with this question and I don't know
of a satisfying answer. For a while, I went directly to the
following info node and looked around:

(info "(calc) Matrix Functions")

Now I just remember the initial "v" :-)

But there are other calc functions that are useful as well, so this
will certainly not suffice in general. But it's a start.

-- 
Nick




Re: [O] Happily exporting LaTeX, now want to export to text and HTML, can't figure how to handle latex markup

2017-08-02 Thread Berry, Charles

> On Aug 1, 2017, at 10:20 PM, Grant Rettke  wrote:
> 
> Good morning,
> 
> I'm happily exporting an Org-Mode document to LaTeX using the nifty
> `letterine' package. An example is attached. Writing using it has been
> so fun that naturally now I want to export it both to text and HTML.
> My source document looks like this for reference and all of this works
> fine:
> 
>> start
> #+TITLE: A Poem Title
> #+AUTHOR:
> #+DATE:
> #+OPTIONS: num:nil
> #+LATEX: \pagenumbering{gobble}
> 
> #+BEGIN_CENTER
> @@latex:\lettrine[lines=1]{T}{this}@@ is line 1.
> 
> @@latex:\lettrine[lines=1]{H}{ere}@@ is line 2.
> 
> @@latex:\lettrine[lines=1]{O}{ver}@@ there is line 3.
> #+END_CENTER
>> end
> 
> Now I'm left be wondering how I can using a single document and export
> it correctly to LaTeX, HTML and text. Here are some ideas I came up
> with:
> 
> - Write the same line two times, one for each exporter. Redundant but
> it would work.
> - Use a source block that takes a line of text, checks the type of
> exporter running, and returns an appropriate markup then on export it
> works right.
> - Maybe there is a macro for this?

Putting together a macro seems like the best option.  Recall that you can use 
elisp in macros by placing it between `(eval’ and `)', so the following emits 
“def’ in all but latex exports and “abc” for latex.

#+BEGIN_SRC emacs-lisp
(defun foo (a b) (if (eq 'latex org-export-current-backend) a b))
#+END_SRC


#+MACRO: bar (eval (foo $1 $2))


{{{bar("abc" "def")}}}

HTH,

Chuck



[O] run bash sessions without config files

2017-08-02 Thread Tyler Smith
Hi,

I use shell-mode a lot, and have a very complex prompt, coloured with
escape codes and lots of bells and whistles. This appears to confuse
org-babel when I'm running code blocks in a session, similar to what's
described here:

https://emacs.stackexchange.com/questions/19735/emacs-freezes-with-any-org-babel-snippet-using-session

Is it possible to configure org-babel to ignore any customization files,
such as .emacs.d/init_bash.el and .bashrc?

As a workaround, I redefine PS1 and PS2 at the top of my org buffer,
which fixes the problem temporarily. I'd like a permanent fix if
possible.

Best,

Tyler

-- 
plantarum.ca



[O] refile workflow -- move to same heading in different file?

2017-08-02 Thread Raymond Zeitler
How do I customize org to refile from one file to another?  I am baffled
that org-refile is not set up to do this out-of-the-box.

 

versions:

Org mode version 9.0.9 (9.0.9-30-g796a78-elpa @
c:/Users/rayz/AppData/Roaming/RZHOME/.emacs.d/elpa/org-20170703/)

GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24

Windows 7 SP1

user is a member of the local administrator group

 

Details.

C-c C-w cannot seem to recognize any of my agenda files, even though
org-refile-targets is set to (in custom-set-variables):

(org-refile-targets (quote ((org-agenda-files :regexp . "Tasks"

 

Suppose org-agenda-files contains "~/proj1.org" "~/proj2.org" "~/proj3.org"
"~/todo.org".

 

My expectation is that when I press C-c C-w with point on a subheading of
Tasks in todo.org, I can specify, say proj1.org and get the subheading moved
to proj1.org under Tasks.  However, org-refile responds [No Match], even if
I provide the file as ~/proj1.org.  And Emacs is visiting proj1.org in
another buffer.

 

So I now do this manually:

 

Visit todo.org

For Each subheading of Tasks related to proj1.

Place point at the start of subheading

Invoke set-mark-command at end of subheading

; and BTW this is very tricky business, I guess due to narrowing

kill

switch buffer to proj1.org

place point as close to column 1 under the Tasks line

; again very tricky business

yank

switch buffer back to todo.org

Next

 

(Sorry for posting pseudocode that resembles Vi$ual Ba$ic!  The org-babel
question for *that* is in queue.)

 

- Ray



Re: [O] Just sharing another orgmode use: usability tests

2017-08-02 Thread Karl Voit
* Eduardo Mercovich  wrote:
>
> + automatic task clocking, including automated time stamping of 
> every observation. 

You seem to use headings for any events.

If list items does the trick as well, you can take a look at timers
for doing the clocking thing: http://orgmode.org/manual/Timers.html

> + observation tagging (there are repeating patterns of use or 
> interaction problems or sources that you could cath on the fly, so 
> any observation could be related to those common issues). 

You already mentioned templates. I'd go with yasnippets for that as
well.

> + automatic filling of User/task-results-and-time matrix (the most 
> fundamental metric of usability tests). 

Wow, this would be great.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Finding calc/elisp methods (was: Determine min/max values in a table)

2017-08-02 Thread Karl Voit
Hi,

* Karl Voit  wrote:
>
> How can I determine minimum and/or maximum value of a table?
>
> Here is my example:
>
> #+NAME: myvalues
>| Values |
>||
>|  4 |
>|  2 |
>|  3 |
>|  7 |
>|  5 |
>|  6 |
>
>| Min| Max| Average | First | Last |
>|++-+---+--|
>| #ERROR | #ERROR | 4.5 | 4 |6 |
> #+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max 
> (remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)
>
> My goal is to get min==2 in the first column and max==7 in the
> second.

Leslie helped here by mentioning vmin/vmax which is that obvious
that I do feel embarrassed now ;-)

#+TBLFM: 
@2$1=vmin(remote(myvalues,@2$1..@>$1))::@2$2=vmax(remote(myvalues,@2$1..@>$1))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)

However, let's make this thread a valuable one by adding a question:
how does somebody find such things? Is there a source of information
where I could find calc methods by "apropos" method together with
elisp methods?

"M-h a minimum" returns only calc-find-minimum which is hardly of
any help in this case. "apropos-documentation" returns more results
but still lacks "vmin".

What is your method of choice to find answers to those kind of
questions? At least my internet search engine of choice did not help
me in the first place.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Slow usage of capture templates

2017-08-02 Thread Johan Ekh
Thanks Adam

I've tried the native windows version and it does not have this problem.
But I'm an old school Linux user that is forced to use windows at work.
I've managed to set up Cygwin and it works quite well, in fact I think
Emacs is working very well except for the issue in this post. Not slow.
Thanks anyway. / Johan

On Wed, Aug 2, 2017 at 12:55 PM, Adam Porter  wrote:

> This isn't much help, but the best suggestion I have is to try the
> non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
> is inherently slow compared to Linux builds for some reason.  It takes
> probably 10-20 times as long to startup, and everything I do it in it is
> slow compared to in Linux.  Maybe the native Windows build will perform
> better.
>
>
>


[O] Bug: Wrong type argument: integer-or-marker-p, nil on refile

2017-08-02 Thread Michaël Cadilhac
Hi there everyone;

Here's the ECM.

init.el:
(require 'org)
(setq org-refile-use-outline-path (quote file))

Now open an Org file, say foo.org, and type C-u C-c C-w foo.org/ RET
At org.el:11832, pos is nil.

Cheers;
M.



[O] Determine min/max values in a table

2017-08-02 Thread Karl Voit
Hi!

How can I determine minimum and/or maximum value of a table?

Here is my example:

#+NAME: myvalues
| Values |
||
|  4 |
|  2 |
|  3 |
|  7 |
|  5 |
|  6 |

| Min| Max| Average | First | Last |
|++-+---+--|
| #ERROR | #ERROR | 4.5 | 4 |6 |
#+TBLFM: @2$1='(min (remote(myvalues,@2$1..@>$1)))::@2$2='(max 
(remote(myvalues,@2$1..@>$1)))::@2$3=vmean(remote(myvalues,@2$1..@>$1))::@2$4=remote(myvalues,@2$1)::@2$5=remote(myvalues,@>$1)

My goal is to get min==2 in the first column and max==7 in the
second.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] exporting org to latex, execute matlab before exporting

2017-08-02 Thread Uwe Brauer
Hello

Take the following example

* Test section

This is a test
#+begin_src matlab :results output latex :exports results
X=[1,2,3,4,5,6,7];
p=[1/7 1/7 1/7 1/7 1/7 1/7 1/7];
E=X*p';
x2=X.*X;
E2=x2*p';
V=E2-E^2;
disp('\begin{align}')
fprintf('E[X]&=%g \n', E)
fprintf('E^2[X]&=%g\n', E2)
fprintf('V[X]&=%g\n', V)
disp('\end{align}')
#+end_src

Executing the src block leads

#+RESULTS:
#+BEGIN_EXPORT latex
\begin{align}
E[X]&=4\\ 
E^2[X]&=20\\
V[X]&=4
\end{align}
#+END_EXPORT

Which is what I want. When I convert the org file to latex I am again
asked to execute the src block, which I don't want since it is already
executed. How can I avoid this question, without deleting the src block.
This is important if I have a lot of blocks which I already have
executed, and want to export the file without denying is executing every
time I am asked.

Thanks

Uwe Brauer 




[O] problem running certain matlab code

2017-08-02 Thread Uwe Brauer


Hello

Using GNU emacs 26 and the latest orgmode (git), I have problem
executing the followting matlab code
clear all
C =[   7 ,  8 ,  9 , 10 ]
latexarray(C,'format','%3.3f')

I can execute the matlab code in a matlab shell or
in an emacs matlab shell as provided by by matlab.el.
Latexarray is a 3rd party m file found in the matlab website.

But when I run the code in 

#+begin_src matlab :results output latex :exports results
clear all
C =[   7 ,  8 ,  9 , 10 ]
latexarray(C,'format','%3.3f')
#+end_src

I obtain 
#+RESULTS:
#+BEGIN_EXPORT latex

C =

 7 8 910

Warning: This implementation of uiputfile has been deprecated and is no longer
supported.
> In uitools/private/uiputfile_deprecated at 105
  In uiputfile at 112
  In latexarray>subfunction_options at 207
  In latexarray at 91
??? Error using ==> fprintf
Invalid file identifier.  Use fopen to generate a valid file identifier.

Error in ==> latexarray at 144
fprintf(fid,'%s\n',['\[\begin{array}{',col,'}']);


#+END_EXPORT


What shall I do? I don't understand that orgmode is nitpicking here
while matlab is not.

Thanks

Uwe Brauer 




Re: [O] Slow usage of capture templates

2017-08-02 Thread Adam Porter
This isn't much help, but the best suggestion I have is to try the
non-Cygwin, native Windows build.  I use the Cygwin build myself, but it
is inherently slow compared to Linux builds for some reason.  It takes
probably 10-20 times as long to startup, and everything I do it in it is
slow compared to in Linux.  Maybe the native Windows build will perform
better.




[O] [feature-request] make org-quote-csv-field customizable

2017-08-02 Thread Thomas von Dein
Hello,

currently when exporting a table to CSV, fields are quoted automatically
if they contain a comma or a quote character. The regexp for this
determination is hard-coded in 'org-quote-csv-field.

This is good for most use cases. However, if you want to import such a
CSV with MS Excel then some unquoted fields will be automatically
converted by Excel into another format.

An example is a field containing 192.168.10.233. 'org-quote-csv-field
doesn't quote it, but Excel - for reasons I cannot fathom - considers
this a number (it doesn't do this when the last octet is below 233
though) and converts it to 19216810233 - which is wrong.

I wrote the following code to circumvent this Excel bug:

(defun tvd-org-quote-csv-field (s)
  "Quote every field and precede it with = to disable excel automatisms."
  (if (string-match "." s)
  (concat "=\"" (mapconcat 'identity
   (split-string s "\"") "\"\"") "\"")
s))

(defun table-to-excel ()
  "export current org table to CSV format suitable for MS Excel."
  (interactive)
  ;; quote everything, map temporarily 'org-quote-csv-field
  ;; to my version
  (cl-letf (((symbol-function 'org-quote-csv-field)
 #'tvd-org-quote-csv-field))
   (org-table-export "/tmp/ex.csv" "orgtbl-to-csv")))

To make this customizable, it would be good to have a variable which
contains the regex to determine what to quote. A parameter to
org-table-export would be an even better solution.


best regards, and thanks for this great module!
Tom



Re: [O] Slow usage of capture templates

2017-08-02 Thread Johan Ekh
Hi again,
I googled and found this.

(setq
  x-select-enable-clipboard nil
  x-select-enable-primary t)

It improves the situation but capture is still painfully slow.

Any ideas? / Johan



On Wed, Aug 2, 2017 at 9:10 AM, Johan Ekh  wrote:

> Hi, thanks,
> but I have 25.2.1 so that will not solve it for me. I'm using several
> platforms, including Linux, Windows and Cygwin. Only seen this problem n
> Cygwin, which of course is the platform I need to use at work...
>
> On Wed, Aug 2, 2017 at 8:51 AM, Nicolas Goaziou 
> wrote:
>
>> Hello,
>>
>> Johan Ekh  writes:
>>
>> > Hi again, I tried with elp-instrument-package, see the results below.
>> Seems
>> > like function "org-get-x-clipboard" is taking a long time. CPU usage is
>> > 100% for the process "emacs-X11" during this time.
>>
>> I also encountered this problem (even though I do not use Windows). It
>> disappeared when I switched to Emacs 25.2.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] Bug: Git repository doesn't ignore contributed lisp/*.el files [9.0.9 (release_9.0.9-690-g27e5be @ /home/cassou/.emacs.d/lib/org/lisp/)]

2017-08-02 Thread Nicolas Goaziou
Hello,

Damien Cassou  writes:

> I've just cloned the repository and ran this command:
>
> make compile autoloads info ORG_ADD_CONTRIB="org-notmuch"
>
> Now, the lisp/ directory contains both org-notmuch.el and
> org-notmuch.elc. My problem is that the former is not ignored by git and
> my repository is now dirty. Would it be possible to make git ignore all
> lisp/*.el files for files that come from contrib/lisp? Thanks

Not really an answer to your request, but, OOC, is there any reason to
move "org-notemuch.el" within "lisp/"?

Regards,

-- 
Nicolas Goaziou



Re: [O] Slow usage of capture templates

2017-08-02 Thread Johan Ekh
Hi, thanks,
but I have 25.2.1 so that will not solve it for me. I'm using several
platforms, including Linux, Windows and Cygwin. Only seen this problem n
Cygwin, which of course is the platform I need to use at work...

On Wed, Aug 2, 2017 at 8:51 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Johan Ekh  writes:
>
> > Hi again, I tried with elp-instrument-package, see the results below.
> Seems
> > like function "org-get-x-clipboard" is taking a long time. CPU usage is
> > 100% for the process "emacs-X11" during this time.
>
> I also encountered this problem (even though I do not use Windows). It
> disappeared when I switched to Emacs 25.2.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Slow usage of capture templates

2017-08-02 Thread Nicolas Goaziou
Hello,

Johan Ekh  writes:

> Hi again, I tried with elp-instrument-package, see the results below. Seems
> like function "org-get-x-clipboard" is taking a long time. CPU usage is
> 100% for the process "emacs-X11" during this time.

I also encountered this problem (even though I do not use Windows). It
disappeared when I switched to Emacs 25.2.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Support for 'using namespace *' in ob-C.el

2017-08-02 Thread Nicolas Goaziou
Hello,

Jay Kamat  writes:

> Sorry for bumping this, but could you apply the patch I made to update
> worg for documentation as well (or provide feedback)? I'd like that to
> stay updated as well if possible.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Slow usage of capture templates

2017-08-02 Thread Johan Ekh
Hi again, I tried with elp-instrument-package, see the results below. Seems
like function "org-get-x-clipboard" is taking a long time. CPU usage is
100% for the process "emacs-X11" during this time.

Does anyone have a clue what I should do?

BR / Johan



[image: Inline image 1]

On Wed, Jan 4, 2017 at 4:35 PM, Nick Dokos  wrote:

> Johan Ekh  writes:
>
> > Hi all
> >
> > I'm on Windows 10 with Cygwin-X and running Emacs 25.1.1 installed with
> Cygwin installer. Org-mode version is 9.0 installed from Elpa.
> >
> > I am experiencing very slow usage of my capture templates. When I hit
> C-c c my different templates show up but when I select one of them nothing
> happens for a long time then after 30-60
> > seconds it suddenly works as usual. This happens every time regardless
> of which template I select.
> >
> > When I start emacs without X, i.e. with the -nw flag, my capture
> templates works fast as usual.
> >
> > Does anyone know what I need to do?
> >
> > BR / Johan
> >
>
> First step is to probably profile org and see where time is spent:
>
> M-x elp-instrument package RET org RET
> ... then try a capture ...
> M-x elp-results
>
> Second step is to bring up a terminal and run htop in it, then try a
> capture and see if
> some process (maybe emacs, maybe something else) jumps up in CPU usage.
>
> Also try with a minimal org file and no other customizations: it may be
> that something
> in your configuration causes it (unless others can see the same slowness
> on similar systems).
>
> This kind of problem may take a long time to debug, so it's important not
> to get discouraged.
>
> --
> Nick
>
>
>