Re: [O] [bug] Link to filename beginning by a date opens... the agenda

2014-11-18 Thread Sebastien Vauban
Hello Nick and Nicolas,

Nicolas Goaziou wrote:
 Nick Dokos ndo...@gmail.com writes:

 And org-return-follows-link is set to t in my case.

 I was using C-c C-o instead of RET. It should now be fixed in master.
 Thanks to you both.

The face is still wrong (`org-date' instead of `org-link'), but the link
is well opened on RET.  Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Selection of TODO entry keyword with S-right arrow

2014-11-18 Thread Sebastien Vauban
Hello Nicolas,

Sebastien Vauban wrote:
 Sebastien Vauban wrote:
 Up to recently, with the following customization:

   (setq org-todo-keywords
 '((sequence NEW(n!) TODO(t!) STRT(s!) WAIT(w!) SDAY(y!)
 | DONE(d!) CANX(x!))
   (sequence QTE(q!) QTD(Q!)
 | APP(A!) REJ(R!)) 
   (sequence OPENPO(O!)
 | CLSDPO(C!

 To select the TODO state NEW or TODO for an entry which had no TODO
 keyword, I just had to `S-right' once or twice:

 1. NEW
 2. TODO

 Now, `S-right' does cycle in a new order:

 1. OPENPO
 2. CLSDPO
 3. QTE
 4. QTD
 5. APP
 6. REJ
 7. NEW
 8. TODO

 See http://screencast.com/t/FyECLZ3y.

 61a241f0dc07aef5a3a5c2bd037a197236bde2e6 is the first bad commit
 commit 61a241f0dc07aef5a3a5c2bd037a197236bde2e6
 Author: Nicolas Goaziou m...@nicolasgoaziou.fr
 Date:   Tue Oct 14 10:53:29 2014 +0200

 Rewrite setup keywords initialization

 * lisp/org-table.el (org-table-set-constants): Remove function.
 * lisp/org.el (org-set-regexps-and-options): Rewrite function.  Merge
   it with `org-set-regexps-and-options-for-tags'.
 (org-set-regexps-and-options-for-tags): Remove function
 (org--setup-collect-keywords, org--setup-process-tags): New functions.
 (org-mode): Remove `org-set-regexps-and-options-for-tags' call.
 (org-agenda-prepare-buffers): Use optimized setup for tags in all
 cases.  Improve docstring.
 (org-make-options-regexp): Make returned regexp more efficient.

 :04 04 afaa4ae741d1427954081fcbc29ee4a0363e6636 
 4a2d2634d397a45d3c9528fb1919a6e1a1315430 M  lisp

I did not see any answer from you yet on this, but I saw your commit.

I confirm this is fixed. Thank you!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Link to filename beginning by a date opens... the agenda

2014-11-18 Thread Nicolas Goaziou


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 The face is still wrong (`org-date' instead of `org-link'), but the link
 is well opened on RET.  Thanks.

Fontification has many tiny bugs like this one.  It should use the
parser instead of plain regexps.  However, this is a work that cannot be
done lightly.  I suggest to live with for the time being.


Regards,




Re: [O] [bug] Link to filename beginning by a date opens... the agenda

2014-11-18 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 The face is still wrong (`org-date' instead of `org-link'), but the
 link is well opened on RET.  Thanks.

 Fontification has many tiny bugs like this one.  It should use the
 parser instead of plain regexps.  However, this is a work that cannot
 be done lightly.  I suggest to live with for the time being.

I can live with it.  And I now you foresee to tackle them someday.

Thanks for quick fix!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: Agenda filtering by DEADLINE, SCHEDULED broken [8.3beta (release_8.3beta-575-g1dfa77 @ /home/rwl/src/org-mode/lisp/)]

2014-11-18 Thread Nicolas Goaziou
Hello,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 I'm on master, and after updating recently (to a version after the
 switch to the new property drawer syntax), some of my agenda views seem
 to be broken.

 Specifically, I cannot get any agenda views that compare a timestamp
 with the SCHEDULED and DEADLINE properties to work.  My complete config
 is below, but the relevant agenda commands are: 

 (Rw School: next 7 days tags-todo reading-lifeDEADLINE=\+1w\)
 (X. Today's exercise tags-todo EXERCISESCHEDULED=\today\)
 (X+ Tomorrow's exercise tags-todo EXERCISESCHEDULED=\tomorrow\)
 
 These all use relative timestamps, but it also seems to be broken if I
 try to build an agenda using an absolute timestamp, e.g. via 

 C-c a m SCHEDULED=2014-11-17

 I don't see any error when running these agenda commands, but the
 commands are fairly slow, and the resulting agenda view is always
 empty.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-mode pretty entities has \perp but not \parallel

2014-11-18 Thread Brady Trainor
Rasmus ras...@gmx.us writes:

 Would you be interested in providing a patch?  You would have to add it
 to org-entities.el, e.g. after the perp entity and then send the patch
 to this list.


I think this works, I did try it, with M-x org-toggle-pretty-entities. (Re: 5th 
and 6th argument: Is || a good ASCII/Latin1 representation?) 

#+BEGIN_SRC emacs-lisp
(parallel \\parallel t parallel; || || ∥)
#+END_SRC

I also tried to add something like

#+BEGIN_SRC 
(| \\\| t parallel; || || ∥)
#+END_SRC

with \\\| or \\|, but it wasn't working for me. I didn't see any 
non-alphabetical entities (name) in the variable org-entities-user, so I was 
guessing it wouldn't work with a one-line edit. 

Is the patch okay? I simply used C-x s d (C-g C-x b *Diff* RET).

--
Brady

diff -c --label /home/iam/.emacs.d/elpa/org-20141027/org-entities.el --label 
\#\buffer\ org-entities.el\ 
/home/iam/.emacs.d/elpa/org-20141027/org-entities.el 
/tmp/buffer-content-1773597i
*** /home/iam/.emacs.d/elpa/org-20141027/org-entities.el
--- #buffer org-entities.el
***
*** 394,399 
--- 394,400 
  (ang \\angle t ang; [angle] [angle] ∠)
  (angle \\angle t ang; [angle] [angle] ∠)
  (perp \\perp t perp; [up tack] [up tack] ⊥)
+ (parallel \\parallel t parallel; || || ∥)
  (sdot \\cdot t sdot; [dot] [dot] ⋅)
  (cdot \\cdot t sdot; [dot] [dot] ⋅)
  (lceil \\lceil t lceil; [left ceiling] [left ceiling] ⌈)

Diff finished.  Tue Nov 18 00:35:31 2014




Re: [O] org-mode pretty entities has \perp but not \parallel

2014-11-18 Thread Rasmus
Brady Trainor algeb...@uw.edu writes:

 Rasmus ras...@gmx.us writes:

 Would you be interested in providing a patch?  You would have to add it
 to org-entities.el, e.g. after the perp entity and then send the patch
 to this list.


 I think this works, I did try it, with M-x
 org-toggle-pretty-entities. (Re: 5th and 6th argument: Is || a good
 ASCII/Latin1 representation?)

 #+BEGIN_SRC emacs-lisp
 (parallel \\parallel t parallel; || || %)
 #+END_SRC

Except the ∥ that was somehow eaten in your snip (but OK below).

 I also tried to add something like

 #+BEGIN_SRC 
 (| \\\| t parallel; || || %)
 #+END_SRC

 with \\\| or \\|, but it wasn't working for me. I didn't see any
 non-alphabetical entities (name) in the variable org-entities-user,
 so I was guessing it wouldn't work with a one-line edit.

I think they are not the same.  I'd use $\|x\|_2$ for a norm, say.
Parallel is a relation: $a\parallel b$.

 Is the patch okay? I simply used C-x s d (C-g C-x b *Diff* RET).

If you want to go all in, which is a lot of fun, you have to submit a
TINY PATCH:

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

Otherwise, I'm happy to submit it for you (though I'm not sure if
something like this would go to maint or master...?)

—Rasmus

-- 
Need more coffee. . .




Re: [O] Recording Time - org-clock-sum

2014-11-18 Thread Fredrik Unger

Hi,

I found a bug when testing larger files.

diff --git a/.emacs b/.emacs
index 3579b7a..9bb7e8c 100644
--- a/.emacs
+++ b/.emacs
@@ -255,7 +255,7 @@
 (apply 'encode-time (org-parse-time-string te)))
 ts (if tstart (max ts tstart) ts)
 te (if tend (min te tend) te)
-tl (if ( (- te ts) 0) (append (list ts te) tl))
+tl (if ( (- te ts) 0) (append (list ts te) tl) tl)
(timeuniq (sort tl '))

 (defun org-dblock-write:rangereport (params)


keeps the list from being set to nil once a day comes that does
not account to the day.
In my simple example there were just one day.
There might be a better way, but these seems to work well for more 
complex examples as well.
It can possibly be improved for speed, but as I only use it on a per 
month basis, it is fast enough.


Fredrik Unger

On 11/18/2014 08:52 AM, Eric S Fraga wrote:

On Monday, 17 Nov 2014 at 19:31, Fredrik Unger wrote:

Hi,

I implemented a couple of functions that provide me with the
needed timestamps for my timereport [1].


Thanks for this.  Looks interesting.  I don't need this right now but I
will find it quite useful in 2.5 years' time (we need to clock our work
for a year every 3 years -- long story).  I've made a note of it.

Small point: good practice would be to name your emacs lisp code file
with a .el suffix.






[O] bug#19014: 25.0.50; Disable Org, Tbl, Text menu items that change buffer when read-only

2014-11-18 Thread Bastien
Hi Drew,

Drew Adams drew.ad...@oracle.com writes:

 There are lots of menu items in the Org menu-bar menus (Org, Tbl, Text)
 that modify the buffer but are not disabled when the buffer is
 read-only.  They should be - they are no-ops in this context.

 This is all the more important because there are still plenty of menu
 items for commands that are useful in a read-only buffer.  Disabling the
 others makes those that are available more obvious and easier to select.

Do you often turn read-only on on Org buffers?

In what circumstances would users turn read-only on in Org buffers?

 That is what we do for the Edit menu, for example.  You can use it as a
 model, here.

I understand the suggestion, I'm trying to see if this is important or
not.  Thanks in advance for your feedback.

-- 
 Bastien





Re: [O] org-mode pretty entities has \perp but not \parallel

2014-11-18 Thread Brady Trainor
Rasmus ras...@gmx.us writes:

 Brady Trainor algeb...@uw.edu writes:

[ snip ]
 #+BEGIN_SRC emacs-lisp
 (parallel \\parallel t parallel; || || %)
 #+END_SRC

 Except the ∥ that was somehow eaten in your snip (but OK below).

Hmm, not sure where that happened, I'll have to look out for that when I'm 
emailing unicode parallel lines again. :)


 I also tried to add something like

 #+BEGIN_SRC 
 (| \\\| t parallel; || || %)
 #+END_SRC

 with \\\| or \\|, but it wasn't working for me. I didn't see any
 non-alphabetical entities (name) in the variable org-entities-user,
 so I was guessing it wouldn't work with a one-line edit.

 I think they are not the same.  I'd use $\|x\|_2$ for a norm, say.
 Parallel is a relation: $a\parallel b$.

Ah yes. Now this \| makes more sense. 


 Is the patch okay? I simply used C-x s d (C-g C-x b *Diff* RET).

 If you want to go all in, which is a lot of fun, you have to submit a
 TINY PATCH:

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

 Otherwise, I'm happy to submit it for you (though I'm not sure if
 something like this would go to maint or master...?)

 —Rasmus

Yes please do submit when you have the time, though I will try to get closer to 
being setup for this when I can. (E.g., I'm currently on Elpa Org-mode... and 
my commits are mostly linear for personal files.) 



[O] How to access tables headers from within code block?

2014-11-18 Thread Andreas Hilboll

Hi,

I have a table like this

#+TBLNAME: t_tracers
| Trace gas | SCIATRAN alias |
|---+|
| O3| O3 |
| NO2   | NO2|
| HCHO  | HCHO   |
| CHOCHO| NO3|
| HONO  | OCLO   |
| BRO   | BRO|
| H2O   | H2O|
| O4| O4 |

and want to access the data from within a Python code block:

#+BEGIN_SRC python :var tracers_raw=t_tracers
return (tracers_raw)
#+END_SRC

My problem is that the table headers are apparently not passed to 
Python, as my results look like this:


#+RESULTS:
| O3 | O3   |
| NO2| NO2  |
| HCHO   | HCHO |
| CHOCHO | NO3  |
| HONO   | OCLO |
| BRO| BRO  |
| H2O| H2O  |
| O4 | O4   |

How can I access the table headers also from within the code block?

Thanks for you help,
  Andreas.



Re: [O] org-mode pretty entities has \perp but not \parallel

2014-11-18 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Otherwise, I'm happy to submit it for you (though I'm not sure if
 something like this would go to maint or master...?)

Master, please.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-contacts search case insensitive

2014-11-18 Thread Martin Gross

 I am on Org-mode version 8.3beta and my org-contacts search is case
 insensitive.


Indeed! Thank you very much.


Re: [O] How to access tables headers from within code block?

2014-11-18 Thread Sebastien Vauban
Andreas Hilboll wrote:
 I have a table like this

 #+TBLNAME: t_tracers
 | Trace gas | SCIATRAN alias |
 |---+|
 | O3| O3 |
 | NO2   | NO2|
 | HCHO  | HCHO   |
 | CHOCHO| NO3|
 | HONO  | OCLO   |
 | BRO   | BRO|
 | H2O   | H2O|
 | O4| O4 |

 and want to access the data from within a Python code block:

 #+BEGIN_SRC python :var tracers_raw=t_tracers
 return (tracers_raw)
 #+END_SRC

 My problem is that the table headers are apparently not passed to 
 Python, as my results look like this:

 #+RESULTS:
 | O3 | O3   |
 | NO2| NO2  |
 | HCHO   | HCHO |
 | CHOCHO | NO3  |
 | HONO   | OCLO |
 | BRO| BRO  |
 | H2O| H2O  |
 | O4 | O4   |

 How can I access the table headers also from within the code block?

I don't have Python, but :colnames yes should make it.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Orgmode links trouble with Emacs 24.4 on Windows 7: ShellExecute failed: ...

2014-11-18 Thread AW
hi,

I installed Emacs 24.4 on Windows 7. 

Everything works, except some of my links in orgmode. They worked under Emacs 
24.3, and they work with Emacs 24.4 under Linux.

The non-working links have a certain structure: I'm using shorcuts. I have a 
file AW-org-file.el, containing lines like:

(setq org-link-abbrev-alist
'(name . //SBS2011/path/to/folder/%s))

This file AW-org-file.el is required in my .emacs

The links in the org-files look like this:

[[name:filename]]

or

[[name:./path/down/the/folder/filename.pdf]]

With cursor on the link I do C-c C-o and get:

ShellExecute failed: Das System kann die angegebene Datei nicht finden.

(my translation: the system can not find the file).

I'd be thankful for a helping hand,

Alexander



Re: [O] Float placement in org-latex

2014-11-18 Thread Pete Ley
org-export-latex-image-default-option is just what I'm looking for, I
think. I figured making all the images smaller would do it, I just
didn't know if there was a way to do that without putting a #+ATTR_LATEX
on every image or something. Thanks!



[O] bug#19014: 25.0.50; Disable Org, Tbl, Text menu items that change buffer when read-only

2014-11-18 Thread Drew Adams
Hi Bastien,

  There are lots of menu items in the Org menu-bar menus (Org, Tbl,
  Text) that modify the buffer but are not disabled when the buffer is
  read-only.  They should be - they are no-ops in this context.
 
  This is all the more important because there are still plenty of
  menu items for commands that are useful in a read-only buffer.
  Disabling the others makes those that are available more obvious
  and easier to select.
 
 Do you often turn read-only on on Org buffers?
 In what circumstances would users turn read-only on in Org buffers?

Fair enough.  The background/context:

1. I don't use Org.  Sorry to say that.  I've read the manual cover
to cover, I am interested in Org mode, and I've heard only good things
about it, but so far I have not found much use for it wrt what I do.

I use Emacs mainly for playing with customizing it etc.  I imagine
I would try doing the same with Org, if I had more time.  I hardly
have enough time to keep up with bug fixes of my existing code and
updates required for it by changes to Emacs. ;-)

2. I was made aware of this Org menus bug only by accident.  A
Bookmark+ user asked that the bookmark annotation buffer be
optionally in Org mode by default.  I added that feature.  He then
asked for Org mode also when an annotation is just displayed, i.e.,
not for editing.  I added that feature too - the buffer is
(optionally) in Org mode, so you can navigate, show/hide, etc.,
but it is made read-only.

That's when I took a look at the menus, to see what kinds of
operations would be available for a read-only Org buffer.  And I
noticed that there are lots of menu items that clearly do not make
sense for read-only.  I filed this bug.  I think that if this bug
is fixed it will quickly let users know which operations are useful
in this context, and which operations do not modify the buffer.

 I understand the suggestion, I'm trying to see if this is important
 or not.  Thanks in advance for your feedback.

Your call.  It doesn't matter to me, personally.  I'm thinking
only of Org users - what might help them.  And you obviously are
a better judge of that.  Feel free to close the bug, if you don't
think it needs or is worth fixing.

Regards - Drew





Re: [O] Bug: Agenda filtering by DEADLINE, SCHEDULED broken [8.3beta (release_8.3beta-575-g1dfa77 @ /home/rwl/src/org-mode/lisp/)]

2014-11-18 Thread Richard Lawrence
Hi Nicolas, 

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 This should be fixed. Thank you for reporting it.

I confirm that it is fixed.  Thanks so much!

-- 
Best,
Richard

OpenPGP Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646

(See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)



Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Brett Viren
David Bjergaard davi...@duke.edu writes:

 I use org mode as a lab notebook.  I write org-src blocks to keep track
 of tasks I do at the command line, and then I copy paste them into the
 terminal.  I would really like to hit C-c C-c on the source block and
 have it executed on the remote machine.  I know that you can specify
 the remote machine according to [1], however the software I use requires
 a fairly complicated setup to get going.  

Is it just complicated, or is it also prohibitively long-running?

If just the former, you could maybe bundle the setup into some shell
script and source it in each of your sh source blocks.  Eg:

#+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
  /bin/pwd
  echo $HOSTNAME
  ls -l foo.sh
  echo ---
  cat foo.sh
  echo ---
  source ./foo.sh
  echo $FOO
#+END_SRC

#+RESULTS:
: /home/bviren
: lycastus
: -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
: ---
: export FOO=bar
: 
: ---
: bar



If the setup is purely environmental, and it takes a long time to
perform, maybe you could do the set up once and then cache the resulting
environment using the output of env.


-Brett.


pgpgZL2hLBQi4.pgp
Description: PGP signature


Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Andreas Leha
Hi Myles,

Myles English mylesengl...@gmail.com writes:
 Hi Dave,

 David Bjergaard writes:

 Hi All,

 I'm sorry if this has been covered before, I've been searching for a
 while and haven't found anything.

 I use org mode as a lab notebook.  I write org-src blocks to keep track
 of tasks I do at the command line, and then I copy paste them into the
 terminal.  I would really like to hit C-c C-c on the source block and
 have it executed on the remote machine.  I know that you can specify
 the remote machine according to [1], however the software I use requires
 a fairly complicated setup to get going.  

 Ideally what I would have is my org-src blocks and another window with
 the ssh terminal open.  Then hitting C-c C-c would execute the block
 over a shared ssh connection and I could see the results in the other
 window (quasi-interactively).  Is that possible?

 Thanks for your time!

 Dave

 Footnotes: 
 [1]  
 http://home.fnal.gov/~neilsen/notebook/orgExamples/org-examples.html#sec-16

 I had a quick go at this but get tramp errors.  I think you need a
 terminal multiplexer e.g. tmux or screen.

 In a terminal, connect using ssh (or mosh) then type 'tmux' to start a
 new session or 'tmux attach' to attach to an existing one.

 I would have thought that this should have worked, i.e. that the output
 would have showed up in the terminal and in the buffer:

 #+BEGIN_SRC sh  :prologue tmux attach :dir /my...@myhost.biz
 echo $PWD
 echo $HOSTNAME
 #+END_SRC

 Hope this is on the right track..

I hope so, too, because I would be very interested in that, i.e. running
stuff from orgmode within a (remote or not remote) tmux session.

I do not have time to play with this right now, but I think, the
prologue should not be 'tmux attach' but rather something along 'tmux
paste-buffer'

Best,
Andreas




[O] How to get remember working properly?

2014-11-18 Thread Sharon Kimble

I am using remember as well as org-capture, meaning that I have
them both setup and working, but there are two things that I'm not
sure about. This is my remember setup -

--8---cut here---start-8---
* remember
** setup remembering
#+BEGIN_SRC emacs-lisp
;;(autoload 'remember remember nil t)
(require 'remember)
;;(require 'org-capture)
(require 'org-remember)

;;(setq org-default-notes-file (concat org-directory 
~/.emacs.d/org/remember.org))
;;(define-key global-map (kbd C-c c) 'org-capture)
;;(global-set-key (kbd C-c r) 'org-remember)
#+END_SRC
[2014-11-12 Wed 19:19]

#+BEGIN_SRC emacs-lisp
(setq org-directory ~/.emacs.d/org/)
 (setq org-default-notes-file ~/.emacs.d/org/remember.org)
 (setq remember-annotation-functions '(org-remember-annotation))
 (setq remember-handler-functions '(org-remember-handler))
 (add-hook 'remember-mode-hook 'org-remember-apply-template)
 (global-set-key (kbd C-c r) 'org-remember)
;; (define-key global-map C-c r 'org-remember)
#+END_SRC
[2014-11-16 Sun 06:34]

** remember templates
#+BEGIN_SRC emacs-lisp
(setq org-remember-templates
'((Todo ?t * TODO %^{Brief Description} %^g\n%?\nAdded: %U 
~/.emacs.d/org/remember.org Tasks)
 (Journal   ?j ** %^{Head Line} %U %^g\n%i%?  
~/.emacs.d/org/journal.org) 
  (Clipboard ?c ** %^{Head Line} %U %^g\n%c\n%?  
~/.emacs.d/org/remember.org)
  (Receipt   ?r ** %^{BriefDesc} %U %^g\n%?   
~/.emacs.d/org/finances.org)
  (Book ?b ** %^{Book Title} %t :BOOK: 
\n%[~/.emacs.d/.book_template.txt]\n
 ~/org/journal.org)
  (Film ?f ** %^{Film Title} %t :FILM: 
\n%[~/.emacs.d/.film_template.txt]\n
 ~/org/journal.org)
  (Someday   ?s ** %^{Someday Heading} %U\n%?\n  
~/.emacs.d/org/someday.org)
  (Private ?p \n* %^{topic} %T \n%i%?\n ~/.emacs.d/org/privnotes.org)
  (Contact ?o \n* %^{Name} :CONTACT:\n% ~/.emacs.d/org/contact.txt]\n
   ~/org/privnotes.org)
 )
   )
#+END_SRC
;; source = http://members.optusnet.com.au/~charles57/GTD/remember.html
[2014-11-16 Sun 06:38]
** and org-mode
#+BEGIN_SRC emacs-lisp
(setq remember-annotation-functions '(org-remember-annotation))
(setq remember-handler-functions '(org-remember-handler))
(add-hook 'remember-mode-hook 'org-remember-apply-template)
#+END_SRC
[2014-11-16 Sun 08:24]

**  Remember some history
#+BEGIN_SRC emacs-lisp
;; savehist keeps track of some history
(setq savehist-additional-variables
  ;; search entries
  '(search ring regexp-search-ring)
  ;; save every minute
  savehist-autosave-interval 60
  ;; keep the home clean
  savehist-file (concat user-emacs-directory savehist))
(savehist-mode t)
#+END_SRC
[2014-11-16 Sun 16:15]

**  Remember recent files
#+BEGIN_SRC emacs-lisp
;; save recent files
(require 'recentf)
(recentf-mode 1)
(setq recentf-save-file (concat user-emacs-directory recentf)
  recentf-max-saved-items 200
  recentf-max-menu-items 20)
(recentf-mode t)
#+END_SRC
[2014-11-16 Sun 16:16]
--8---cut here---end---8---

With everything that I remember it shows it as, example only -

--8---cut here---start-8---
* peace [2014-11-18 Tue 11:30] 
Ha! Well, I don't abuse the ice-cold tone for emails and other electronic ways 
of communication, switching is
easy. And certainly some people may not get it but the Latin phrase Pax et 
bonum works as a yours truly or
a Good Bye!.
--8---cut here---end---8---

i.e. headline before the date. How do I get it the other way round
please, meaning date - headline?

Also you close the entry by C-c C-c which, in my case, calls
Tags again. How can I get it working right in this case please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.4.1.0


signature.asc
Description: PGP signature


Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Ista Zahn
On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote:
 David Bjergaard davi...@duke.edu writes:

 I use org mode as a lab notebook.  I write org-src blocks to keep track
 of tasks I do at the command line, and then I copy paste them into the
 terminal.  I would really like to hit C-c C-c on the source block and
 have it executed on the remote machine.  I know that you can specify
 the remote machine according to [1], however the software I use requires
 a fairly complicated setup to get going.

 Is it just complicated, or is it also prohibitively long-running?

 If just the former, you could maybe bundle the setup into some shell
 script and source it in each of your sh source blocks.  Eg:

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 #+RESULTS:
 : /home/bviren
 : lycastus
 : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
 : ---
 : export FOO=bar
 :
 : ---
 : bar



 If the setup is purely environmental, and it takes a long time to
 perform, maybe you could do the set up once and then cache the resulting
 environment using the output of env.

I guess I'm missing something (like why the OP want's to run a shell
in a separate window), but why not just

#+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session *shell*
  /bin/pwd
  echo $HOSTNAME
  ls -l foo.sh
  echo ---
  cat foo.sh
  echo ---
  source ./foo.sh
  echo $FOO
#+END_SRC

?

Best,
Ista


 -Brett.



Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread David Bjergaard
Ista Zahn istaz...@gmail.com writes:

 On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote:
 David Bjergaard davi...@duke.edu writes:

 I use org mode as a lab notebook.  I write org-src blocks to keep track
 of tasks I do at the command line, and then I copy paste them into the
 terminal.  I would really like to hit C-c C-c on the source block and
 have it executed on the remote machine.  I know that you can specify
 the remote machine according to [1], however the software I use requires
 a fairly complicated setup to get going.

 Is it just complicated, or is it also prohibitively long-running?

 If just the former, you could maybe bundle the setup into some shell
 script and source it in each of your sh source blocks.  Eg:

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 #+RESULTS:
 : /home/bviren
 : lycastus
 : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
 : ---
 : export FOO=bar
 :
 : ---
 : bar



 If the setup is purely environmental, and it takes a long time to
 perform, maybe you could do the set up once and then cache the resulting
 environment using the output of env.

 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session 
 *shell*
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 ?

 Best,
 Ista


 -Brett.
Hi Ista, Brett,

Thanks for the hints, I'll try these. 
Some clarification:
 If the setup is purely environmental, and it takes a long time to
 perform, maybe you could do the set up once and then cache the resulting
 environment using the output of env.
Unfortunately it takes a long time to set up, and its complicated (I
have to initialize different versions of the software depending on
which project I'm working on.) It can take up to 10 seconds to restore a
saved environment, and it takes some setting up bootstrap the
restoration command.
 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just
I want the separate window because once the environment is set up, I
also jump around a lot.  I record the pieces of shell script that are
important for reproducing results in the notebook.  The snippets are
then recycled across many sessions, and different pieces are used at
different times (some are even used with different pieces of software).

What I would like is to log into the remote machine, set up the
software, and then have a way to tell emacs to send the org-src block to
the set up environment so that I can build up the parts I need at that
moment.  

I know this is working against the grain of the literate programming
paradigm where the document and the source code are coupled, and
tangling the document produces a program that can be executed.  I'm just
wondering if its possible.  If not that's fine.  Really I'm just trying
to save myself a copy-paste (and the associated issues with it getting
recorded in my .bash_history).

Cheers,

Dave



Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Ista Zahn
On Tue, Nov 18, 2014 at 1:23 PM, David Bjergaard davi...@duke.edu wrote:
 Ista Zahn istaz...@gmail.com writes:

 On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote:
 David Bjergaard davi...@duke.edu writes:

 I use org mode as a lab notebook.  I write org-src blocks to keep track
 of tasks I do at the command line, and then I copy paste them into the
 terminal.  I would really like to hit C-c C-c on the source block and
 have it executed on the remote machine.  I know that you can specify
 the remote machine according to [1], however the software I use requires
 a fairly complicated setup to get going.

 Is it just complicated, or is it also prohibitively long-running?

 If just the former, you could maybe bundle the setup into some shell
 script and source it in each of your sh source blocks.  Eg:

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 #+RESULTS:
 : /home/bviren
 : lycastus
 : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
 : ---
 : export FOO=bar
 :
 : ---
 : bar



 If the setup is purely environmental, and it takes a long time to
 perform, maybe you could do the set up once and then cache the resulting
 environment using the output of env.

 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session 
 *shell*
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 ?

 Best,
 Ista


 -Brett.
 Hi Ista, Brett,

 Thanks for the hints, I'll try these.
 Some clarification:
 If the setup is purely environmental, and it takes a long time to
 perform, maybe you could do the set up once and then cache the resulting
 environment using the output of env.
 Unfortunately it takes a long time to set up, and its complicated (I
 have to initialize different versions of the software depending on
 which project I'm working on.) It can take up to 10 seconds to restore a
 saved environment, and it takes some setting up bootstrap the
 restoration command.
 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just
 I want the separate window because once the environment is set up, I
 also jump around a lot.

Emacs is great for jumping around a lot, another reason to run the
shell inside emacs instead of in a separate window.

I record the pieces of shell script that are
 important for reproducing results in the notebook.  The snippets are
 then recycled across many sessions, and different pieces are used at
 different times (some are even used with different pieces of software).

 What I would like is to log into the remote machine, set up the
 software, and then have a way to tell emacs to send the org-src block to
 the set up environment so that I can build up the parts I need at that
 moment.

 I know this is working against the grain of the literate programming
 paradigm where the document and the source code are coupled, and
 tangling the document produces a program that can be executed.  I'm just
 wondering if its possible.

It really does sound to me like you're just looking for the :session argument.

Best,
Ista

 If not that's fine.  Really I'm just trying
 to save myself a copy-paste (and the associated issues with it getting
 recorded in my .bash_history).

 Cheers,

 Dave



[O] babel, header arguments.

2014-11-18 Thread jenia.ivlev
Hello. I want to go through the book little schemer and take notes
interlaced with the code from the book. For this I want to use babel.

So lets say there's this function:

#+name: my-plus
#+begin_src scheme
(define my-plus
  (lambda (x y) (+ x y)))
#+end_src

And i want to call it from another source block, like so:

#+tblname: addition
| sum|
||
| #ERROR |
#+TBLFM: @2$1='(org-sbe my-plus (33 22))

As you can see, I get an error. How do I write these header-arguments
(i think they are called) to achieve calling one src-block from another.

Also, second scenario, can I somehow call my-plus from a source-block as
so:

 #+begin_src scheme
 (my-plus 3 4)
 #+end_src


Thanks very much for your help and kind concern.




Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Brett Viren
David Bjergaard davi...@duke.edu writes:

 I know this is working against the grain of the literate programming
 paradigm where the document and the source code are coupled, and
 tangling the document produces a program that can be executed.  I'm just
 wondering if its possible.  If not that's fine.  Really I'm just trying
 to save myself a copy-paste (and the associated issues with it getting
 recorded in my .bash_history).

I usually come at it from the reproducible research angle which maybe
is more relaxed than literate programming.  In any case, I find it hard
to capture all the info needed to reproduce something and so I settle
for capturing as much as easily achievable - that is when I try at all
as capturing it in an RR org doc greatly increases the time I need to do
something.

Many of the software stacks I use also take significant time to
configure the end-user environment.  10 seconds is not unheard of and it
can be minutes if the stack lives on slow network disk.

I think the approach I suggested of caching the environment should work
for you.  Unfortunately, I do not know of a trivial, general way to do
this.  The env program comes close but does not spit out a format that
is immediately consumable by the shell.  In particular, spaces in
variable values confound it.  It also lacks the export keyword.  And,
in any case is only close to sh syntax.  Any exported functions also
have to be handled properly

In your shoes, I'd probably write a small Python script that dumps the
os.environ dictionary holding the environment of the caller into a
form suitable for consumption by your shell.  You can call this dumper
in a shell code block at the top of your org file and source the result
as the first line in each subsequent shell code block.

A starting point would be something like the following, but this does
not properly handle and sh functions defined.

#!/usr/bin/env python
import os
for k,v in os.environ.items():
print 'export %s=%s' % (k,v)



Good luck!
-Brett.




pgpHzOCk2dOsk.pgp
Description: PGP signature


Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Subhan Michael Tindall


 -Original Message-
 From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
 [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
 Behalf Of David Bjergaard
 Sent: Tuesday, November 18, 2014 10:23 AM
 To: Ista Zahn
 Cc: Brett Viren; emacs-orgmode Mailinglist
 Subject: Re: [O] Executing org shell blocks on remote machine over ssh
 
 Ista Zahn istaz...@gmail.com writes:
 
  On Tue, Nov 18, 2014 at 10:43 AM, Brett Viren b...@bnl.gov wrote:
  David Bjergaard davi...@duke.edu writes:
 
  I use org mode as a lab notebook.  I write org-src blocks to keep
  track of tasks I do at the command line, and then I copy paste them
  into the terminal.  I would really like to hit C-c C-c on the
  source block and have it executed on the remote machine.  I know
  that you can specify the remote machine according to [1], however
  the software I use requires a fairly complicated setup to get going.
 
  Is it just complicated, or is it also prohibitively long-running?
 
  If just the former, you could maybe bundle the setup into some shell
  script and source it in each of your sh source blocks.  Eg:
 
  #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren
/bin/pwd
echo $HOSTNAME
ls -l foo.sh
echo ---
cat foo.sh
echo ---
source ./foo.sh
echo $FOO
  #+END_SRC
 
  #+RESULTS:
  : /home/bviren
  : lycastus
  : -rw-rw-r-- 1 bviren bviren 16 Nov 18 10:27 foo.sh
  : ---
  : export FOO=bar
  :
  : ---
  : bar
 
 
 
  If the setup is purely environmental, and it takes a long time to
  perform, maybe you could do the set up once and then cache the
  resulting environment using the output of env.
 
  I guess I'm missing something (like why the OP want's to run a shell
  in a separate window), but why not just
 
  #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session
 *shell*
/bin/pwd
echo $HOSTNAME
ls -l foo.sh
echo ---
cat foo.sh
echo ---
source ./foo.sh
echo $FOO
  #+END_SRC
 
  ?
 
  Best,
  Ista
 
 
  -Brett.
 Hi Ista, Brett,
 
 Thanks for the hints, I'll try these.
 Some clarification:
  If the setup is purely environmental, and it takes a long time to
  perform, maybe you could do the set up once and then cache the
  resulting environment using the output of env.
 Unfortunately it takes a long time to set up, and its complicated (I have to
 initialize different versions of the software depending on which project I'm
 working on.) It can take up to 10 seconds to restore a saved environment,
 and it takes some setting up bootstrap the restoration command.
  I guess I'm missing something (like why the OP want's to run a shell
  in a separate window), but why not just
 I want the separate window because once the environment is set up, I also
 jump around a lot.  I record the pieces of shell script that are important for
 reproducing results in the notebook.  The snippets are then recycled across
 many sessions, and different pieces are used at different times (some are
 even used with different pieces of software).
 
 What I would like is to log into the remote machine, set up the software, and
 then have a way to tell emacs to send the org-src block to the set up
 environment so that I can build up the parts I need at that moment.
 
 I know this is working against the grain of the literate programming
 paradigm where the document and the source code are coupled, and
 tangling the document produces a program that can be executed.  I'm just
 wondering if its possible.  If not that's fine.  Really I'm just trying to 
 save
 myself a copy-paste (and the associated issues with it getting recorded in my
 .bash_history).
 
 Cheers,
 
 Dave

It's been quite a while since I used one (or even did much shell programming), 
so my details are a bit fuzzy. But, I think your solution is in Unix (I'm 
assuming that's what your using), not emacs itself.

Take a look at the concept of 'named pipes'

If you've got a shared file system or can remote mount, a process like this 
would probably work:

Create 2 named pipes
One you can write to on system A (eg. my_sys_a_pipe), with a small script on 
system B that reads my_sys_a_pipe and executes the commands it grabs
Second named pipe is created and stdout on system B is redirected to it, then 
system A listens to it  feeds what is received to stdout (my_sys_b_pipe)

Echo my list of commands  my_sys_a_pipe
echo  my_sys_b_pipe  (see below, probably want a loop here)

You probably also need to include a tag of some sort (echo sys_b_done or 
similar) as the last command and then run a read/echo loop on my_sys_b_pipe to 
terminate the driver script and make sure it returns to emacs.

Hopefully this isn't too confusing, unfortunately I don't have time to go back 
and look up my syntax, but I think conceptually it might get you down the road

This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, 

Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Brady Trainor
Ista Zahn istaz...@gmail.com writes:

[snip]
 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session 
 *shell*
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

Tangentially related... 

*term* looks nice too (M-x term instead of M-x shell). This `term' is like a 
more literal terminal embedded in Emacs. Even key-bindings are hijacked. 
(Amusingly, readline utility gives bash some Emacs-like key-bindings.) In a 
stackoverflow question, it is pointed out that *term* versus *shell*, you miss 
out on features like isearch (C-s, C-r etc.). Then, switching around a lot is 
hindered, since C-x o (other-window) is hijacked (but the suggested windmove 
binding still works). 

--
Brady




Re: [O] Long table with NAME but no CAPTION

2014-11-18 Thread Nicolas Goaziou
Hello,

presn...@member.fsf.org writes:

 So my sugggestion would be for org's latex export to produce no \label{}
 (and hence no \\) when the table has no caption, or at least I would
 prefer to have this as an option.  Is there some way to achieve this?

You can use a table filter to remove \label and \\ from longtables. See
(info (org) Advanced configuration)

 Perhaps I should also file a bug report with the author/maintainer of
 longtable, David Carlisle?

Probably.

 One more minor comment: I notice that org-mode's latex export puts the
 \label{} inside the argument of the \caption{} command.  This seems
 unusual to me.

It isn't wrong, though.


Regards,

-- 
Nicolas Goaziou



Re: [O] Issue with multiline string variable for JavaScript source code blocks

2014-11-18 Thread Nicolas Goaziou
Hello,

Peter Moresi peter.mor...@gmail.com writes:

 I'm found a bug in ob-js.el when passing multi-line strings into a
 JavaScript source code blocks.

Thanks for your report.

 The attached org file describes the problem and fix that I'm using to work
 around the issue.

Would you mind providing a patch for that? See 

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

if you're interested.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug (regression) in org-replace-disputed-keys. Bisected.

2014-11-18 Thread Nicolas Goaziou
Hello,

Miro Bezjak bezjak.m...@gmail.com writes:

 I rather like that `org-read-date` takes over windmove keys during the
 second or two that I'm using it. By reverting this, I guess I'll have
 to copy and paste the whole `defvar` just to add
 `(org-replace-disputed-keys nil)`.

I fail to see why you would need to copy the whole defvar. Just override
the bindings you need with 

  (define-key org-read-date-minibuffer-local-map ...)


Regards,

-- 
Nicolas Goaziou



Re: [O] Orgmode links trouble with Emacs 24.4 on Windows 7: ShellExecute failed: ...

2014-11-18 Thread Nicolas Goaziou
Hello,

AW alexander.will...@t-online.de writes:

 I installed Emacs 24.4 on Windows 7. 

 Everything works, except some of my links in orgmode. They worked under Emacs 
 24.3, and they work with Emacs 24.4 under Linux.

 The non-working links have a certain structure: I'm using shorcuts. I have a 
 file AW-org-file.el, containing lines like:

 (setq org-link-abbrev-alist
 '(name . //SBS2011/path/to/folder/%s))

It should be

  (setq org-link-abbrev-alist '((name . //SBS2011/path/to/folder/%s)))

 The links in the org-files look like this:

 [[name:filename]]

 or

 [[name:./path/down/the/folder/filename.pdf]]

Use 

  M-: (org-element-property :path (org-element-context))

with point on each of them. Is the path a valid (according to Windows)
file name?


Regards,

-- 
Nicolas Goaziou



Re: [O] cannot get an agenda showing logged todos, scheduled todos and clockcheck items at the same time

2014-11-18 Thread Rainer Stengele
Am 17.11.2014 10:03, schrieb Brady Trainor:
 Hello, 

 Rainer Stengele rainer.steng...@online.de writes:

(agenda todays agenda
(
 (org-agenda-span 'day)
 (org-agenda-log-mode 'clockcheck)
 (org-agenda-start-with-log-mode t)
 (org-agenda-overriding-header Today's Agenda)))
 I am not using this, so I won't be able to test it but... I did google 
 clockcheck and check some of your variables. 

 If I execute M-x apropos RET org agenda log mode RET, it appears this is a 
 command not a variable, at least in my org-mode version 8.2.10.

 A few lines down (in the apropos findings) I see `org-agenda-log-mode-items', 
 which I think it should be a list, so for example

 #+BEGIN_SRC emacs-lisp
 (org-agenda-log-mode-items '(closed clock state))
 #+END_SRC

 Consider your thread http://thread.gmane.org/gmane.emacs.orgmode/74599 from 
 July. There, Sebastien Vauban suggested the variable assignment

 #+BEGIN_SRC emacs-lisp
 (org-agenda-log-mode 'clockcheck)
 #+END_SRC

 Perhaps this is what you meant above. Or Mike McLean suggests, 

 #+BEGIN_SRC emacs-lisp
 (org-agenda-show-log 'clockcheck)
 #+END_SRC

 Then, at the end of the thread, Carsten Dominick advises against using these, 
 and suggest instead to use these in the global section of your custom 
 command. 

 #+BEGIN_SRC 
 (org-agenda-start-with-log-mode 'clockcheck)
 (org-agenda-start-with-clockreport-mode t)
 #+END_SRC

 In summary, maybe you should have this:

 #+BEGIN_SRC emacs-lisp
 (setq org-agenda-custom-commands
   '((Z todays agenda
  ((agenda ))
  ((org-agenda-span 'day)
   (org-agenda-start-with-log-mode 'clockcheck)
   (org-agenda-start-with-clockreport-mode t)
   (org-agenda-log-mode-items '(closed clock state))
   (org-agenda-overriding-header Today's Agenda)
 #+END_SRC

 Further, I shifted some of the terms around. Note the `agenda' block usually 
 takes the empty string, but it seems you gave it the name of the command. 

 HTH

 --
 Brady

 Thank you.
 Regards, Rainer
Thanks Brady,

I tried what you suggested but same result: it only shows clockcheck entries 
without the scheduled todos.
I cannot get both to display at the same time.

Anybody have an idea?
Thank you,
Rainer



Re: [O] Executing org shell blocks on remote machine over ssh

2014-11-18 Thread Andreas Leha
Hi all,

Brady Trainor algeb...@uw.edu writes:
 Ista Zahn istaz...@gmail.com writes:

 [snip]
 I guess I'm missing something (like why the OP want's to run a shell
 in a separate window), but why not just

 #+BEGIN_SRC sh :results output :dir /ssh:lycastus:/home/bviren :session 
 *shell*
   /bin/pwd
   echo $HOSTNAME
   ls -l foo.sh
   echo ---
   cat foo.sh
   echo ---
   source ./foo.sh
   echo $FOO
 #+END_SRC

 Tangentially related... 

 *term* looks nice too (M-x term instead of M-x shell). This `term' is
 like a more literal terminal embedded in Emacs. Even key-bindings are
 hijacked. (Amusingly, readline utility gives bash some Emacs-like
 key-bindings.) In a stackoverflow question, it is pointed out that
 *term* versus *shell*, you miss out on features like isearch (C-s, C-r
 etc.). Then, switching around a lot is hindered, since C-x o
 (other-window) is hijacked (but the suggested windmove binding still
 works).

Well, if the code to be executed remotely is long running, I do not want
to assume the connection to last during the full execution of that code.
Hence, I am interested in sending code to a running tmux session.

One possibility is to have tmux attached from withing emacs' term.  This
might not work too well, unfortunately.  For instance, ess is currently
not able to talk properly to an R session running inside tmux inside
term (which is why I've given up on that idea for now).

Regards,
Andreas




Re: [O] Issue with multiline string variable for JavaScript source code blocks

2014-11-18 Thread Peter Moresi
Sure, the patch is attached.​
From 2c8214a8e45a6368c709ae26d6d20c7458ebe0dd Mon Sep 17 00:00:00 2001
From: Peter Moresi peter.mor...@pnmac.com
Date: Tue, 18 Nov 2014 15:58:17 -0800
Subject: [PATCH] Fix problem passing multiline variables into JS source code
 block

---
 lisp/ob-js.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-js.el b/lisp/ob-js.el
index 47355b3..1a95216 100644
--- a/lisp/ob-js.el
+++ b/lisp/ob-js.el
@@ -114,7 +114,7 @@ Convert an elisp value into a string of js source code
 specifying a variable of the same value.
   (if (listp var)
   (concat [ (mapconcat #'org-babel-js-var-to-js var , ) ])
-(format %S var)))
+(replace-regexp-in-string \n n (format %S var
 
 (defun org-babel-prep-session:js (session params)
   Prepare SESSION according to the header arguments specified in PARAMS.
-- 
1.7.10.4



[O] Undocumented command: org-table-blank-field (C-c SPC)

2014-11-18 Thread Vicente Vera
Hello. I was browsing Emacs StackExchange and found this question:
https://emacs.stackexchange.com/questions/15/how-to-clear-a-cell-in-an-org-mode-table.
One of the answers mentions the org-table-blank-field command and that
For some reason it's missing from the manual.. I'm using Org
release_8.3beta-580-g787733 and yes, it is not mentioned in the Tables
section, nor in the indexes.
It might be a good idea to document this.
I would do it myself but haven't got my head around submiting patches,
filling papers (although is not always necessary?), but I might, if
nobody has the time. I don't want this message to be understood as a
demand.



[O] Org-edu-HTML

2014-11-18 Thread Marcin Borkowski
Hi all,

as I mentioned some time ago, I started working on a custom exporter
from Org to HTML for educational materials.  My vision is that there
will be (some kind) of syntax in Org (most probably, I'm going to
(ab)use the existing syntax) for specifying various kinds of exercises.

The project page is on GitHub: https://github.com/mbork/org-edu-html .
It is currently in a *very* early stage, when it should be consider more
of a proof-of-concept rather than anything useful.  The only thing that
(kind of) works is SCT (single choice tests).

The design goals are:

- simplicity: users should be able to leverage Org's syntax and editing
  to quickly create educational materials (most of what is needed is
  provided by Org itself – the only thing that is lacking is activities
  like choice tests, cloze tests and other types).

- configurability: the result should be clearly separated into HTML
  (with all the content), JS/jQuery script responsible for executing
  tests (if possible, completely generic – all the content and markup,
  like which answer is correct, will be in the HTML), and CSS
  responsible for visual presentation.  Currently, there is *no* CSS
  whatsoever, so it looks rather plain; I plan to create a default,
  non-appalling theme.  (The problem is that I'm rather new to the CSS
  and JS/jQuery parts, so I'm learning while coding – this means that
  it's not a fast process.  But I'm patient.)

  A side effect of putting everything in HTML is that C-u in the browser
  will reveal all the correct answers.  I consider this a feature, not a
  bug, since the aim of the tests is not to grade, but teach.  AFAIU the
  web (though I may well be mistaken), there is no way to overcome this
  problem with HTML and JS alone.

- two backends: I plan to create also a LaTeX variant, so that it would
  be easy for users to create printed copies for e.g. exams, with
  the choice tests, cloze tests etc. typeset nicely.  Again, the LaTeX
  exporter would do the bulk of the job.

- hopefully, a SCORM exporter, so that the users will be able to put
  everything in an LMS of their choice.  (This is the main reason I
  started hacking the org-one-to-many project, which is currently
  dormant – but I will come back to it one day.)

As of now, the project just has everything in one directory, together
with the example Org file (jQuery v2.1.1 minified also needs to be
present there, or the variable org-edu-html-jquery-address should be set
accordingly).  If anyone is interested in such a project, any feedback
(like bug reports/feature suggestions) is welcome.  I would especially
like to hear about what syntax might be a good idea on the Org side.
Currently, for the choice tests I abused lists with checkboxes (which
mark the correct answers).  Also, any comments on the quality of the
code (both on the Elisp and jQuery sides) are more than welcome – while
I feel quite confident writing (at least simple) Elisp functions (though
have yet much to learn from more experienced hackers), my jQuery experience
is next to none.  And last but not least, I'm curious whether there is
any demand for such a thing (I assume yes, since many Org users come
from academia).

Thank you for your attention;-)

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



[O] PATCH: Add JISON to ORG-Babel Supported Languages

2014-11-18 Thread Peter Moresi
Hi,

I'm spending a lot of time in org-mode doing literate programming and it
does most everything that I need.

However, it did not support the jison
http://zaach.github.io/jison/try/ compiler
generator.  So I added it by copying ob-dot.el and making some minor
changes. I also wrote instructions that more or less follow the same
outline as the dot documentation
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html.

If this patch is added to org-mode then org-babel will have a language for
making new languages.

Thanks,

Peter


org-babel-jison.org
Description: Binary data


0001-Add-jison-support-in-org-babel.patch
Description: Binary data


[O] clock gone error, fixing it issues, and K does not clock out

2014-11-18 Thread Samuel Wales
maint.

when i am clocking something, when i clock out, it says byte-code:
Clock start time is gone.

the only way i have found to deal with it is to cancel.  messages says:
Clock gone, cancel the timer anyway.
Clock canceled
No active clock.

then i have to start the clock again.  it offers me a lot of options.
i choose K.

but contrary to the docstring, the clock is still running.  so i have
to clock out.

but that leaves a zero-length clock entry, so i have to kill it.

maybe this is pebcak, but if so, i don't know where within that conduit.

i'm kind of amazed that heavy clockers haven't been all over these
issues on the list before.  is it just me?

thanks.

samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] How to get remember working properly?

2014-11-18 Thread Richard Lawrence
Hi Sharon,

Sharon Kimble boudic...@skimble.plus.com writes:

 #+BEGIN_SRC emacs-lisp
 (setq org-remember-templates
 '((Todo ?t * TODO %^{Brief Description} %^g\n%?\nAdded: %U 
 ~/.emacs.d/org/remember.org Tasks)
  (Journal   ?j ** %^{Head Line} %U %^g\n%i%?  
 ~/.emacs.d/org/journal.org) 
   (Clipboard ?c ** %^{Head Line} %U %^g\n%c\n%?  
 ~/.emacs.d/org/remember.org)
   (Receipt   ?r ** %^{BriefDesc} %U %^g\n%?   
 ~/.emacs.d/org/finances.org)
   (Book ?b ** %^{Book Title} %t :BOOK: 
 \n%[~/.emacs.d/.book_template.txt]\n
  ~/org/journal.org)
   (Film ?f ** %^{Film Title} %t :FILM: 
 \n%[~/.emacs.d/.film_template.txt]\n
  ~/org/journal.org)
   (Someday   ?s ** %^{Someday Heading} %U\n%?\n  
 ~/.emacs.d/org/someday.org)
   (Private ?p \n* %^{topic} %T \n%i%?\n 
 ~/.emacs.d/org/privnotes.org)
   (Contact ?o \n* %^{Name} :CONTACT:\n% ~/.emacs.d/org/contact.txt]\n
~/org/privnotes.org)
  )
)
 #+END_SRC

 With everything that I remember it shows it as, example only -

 * peace [2014-11-18 Tue 11:30] 

 i.e. headline before the date. How do I get it the other way round
 please, meaning date - headline?

I think all you need to do here is move the %U in your templates
before the %^{ ... } that represents where you type in the headline.

For example, the Journal template becomes:

  (Journal   ?j ** %U %^{Head Line} %^g\n%i%?  
~/.emacs.d/org/journal.org) 
  
See the section on Template Expansion in the Capture section of the
manual for an explanation of what's going on here.

 Also you close the entry by C-c C-c which, in my case, calls
 Tags again. How can I get it working right in this case please?

Not sure about this -- I don't use remember -- but a good place to start
is to do C-h k C-c C-c in your capture buffer; this will tell you which
function is bound to C-c C-c.  If it's not what you expect, the next
step is to figure out what it should be bound to and set the appropriate
function in the relevant keymap.

Best,
Richard




[O] Bug: wrong type error on load-file in org-babel-load-file when there's nothing to be tangled [8.3beta (release_8.3beta-580-g787733.dirty @ /usr/local/share/emacs/24.4/lisp/org/)]

2014-11-18 Thread Enzo Chi
--text follows this line--


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


(org-babel-load-file) When there's nothing to be tangle, 'exported-file'
will be set to nil. That would cause type error for load-file function.

I have created a patch for it. By adding extra check on exported-file
before compile/load it. But I don't know where should I send it.


Emacs  : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2014-10-23 on ubuntuBMDSyn
Package: Org-mode version 8.3beta (release_8.3beta-580-g787733.dirty @
/usr/local/share/emacs/24.4/lisp/org/)

current state:
==
(setq
 org-src-lang-modes '((dot . graphviz-dot) (ocaml . tuareg) (elisp .
emacs-lisp) (ditaa . artist)
  (asymptote . asy) (dot . fundamental) (sqlite .
sql) (calc . fundamental) (C . c)
  (cpp . c++) (C++ . c++) (screen . shell-script)
(shell . sh) (bash . sh))
 org-export-backends '(ascii beamer html icalendar latex odt org)
 org-agenda-tags-todo-honor-ignore-options t
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-clock-history-length 23
 org-occur-hook '(org-first-headline-recenter)
 org-src-tab-acts-natively t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-clock-into-drawer t
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-highlight-latex-and-related '(latex script entities)
 org-agenda-custom-commands '((N Notes tags NOTE
   ((org-agenda-overriding-header Notes)
(org-tags-match-list-sublevels t)))
  (h Habits tags-todo STYLE=\habit\
   ((org-agenda-overriding-header Habits)
(org-agenda-sorting-strategy (quote
(todo-state-down effort-up category-keep
   )
  (  Agenda
   ((agenda  nil)
(tags REFILE
 ((org-agenda-overriding-header Tasks to
Refile)
  (org-tags-match-list-sublevels nil))
 )
(tags-todo -CANCELLED/!
 ((org-agenda-overriding-header Stuck
Projects)
  (org-agenda-skip-function (quote
bh/skip-non-stuck-projects))
  (org-agenda-sorting-strategy (quote
(category-keep
 )
(tags-todo -HOLD-CANCELLED/!
 ((org-agenda-overriding-header Projects)
  (org-agenda-skip-function (quote
bh/skip-non-projects))
  (org-tags-match-list-sublevels (quote
indented))
  (org-agenda-sorting-strategy (quote
(category-keep
 )
(tags-todo -CANCELLED/!NEXT
 ((org-agenda-overriding-header
   (concat Project Next Tasks
(if
bh/hide-scheduled-and-waiting-next-tasks 
  (including WAITING and SCHEDULED
tasks))
)
   )
  (org-agenda-skip-function (quote
bh/skip-projects-and-habits-and-single-tasks))
  (org-tags-match-list-sublevels t)
  (org-agenda-todo-ignore-scheduled
bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-deadlines
bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-todo-ignore-with-date
bh/hide-scheduled-and-waiting-next-tasks)
  (org-agenda-sorting-strategy (quote
(todo-state-down effort-up category-keep
 )
(tags-todo
-REFILE-CANCELLED-WAITING-HOLD/!
 ((org-agenda-overriding-header
   (concat Project Subtasks
(if
bh/hide-scheduled-and-waiting-next-tasks 
  (including WAITING and SCHEDULED