Re: [O] Problem with J Source Code Blocks in Org Mode

2017-12-12 Thread Bill Harris
Nicolas,

Thanks for the idea.  It turns out I also got a suggestion on the J General
list, and that one worked.  See
http://jsoftware.com/pipermail/general/2017-December/037375.html.

Bill


[O] Problem with J Source Code Blocks in Org Mode

2017-12-10 Thread Bill Harris
I recently tried to set up J as described in http://orgmode.org/worg/
org-contrib/babel/languages/ob-doc-J.html, starting by loading j-mode from
stable melpa, but I get an org-babel error output when I try to execute a J
source code block: "/bin/bash: jconsole: command not found".

That makes it sound as if orgmode requires something besides setting
j-console-cmd, which I had done:

 -console-cmd is a variable defined in ‘j-console.el’.
Its value is "ijconsole"
Original value was "jconsole"

Documentation:
Name of the executable used for the J REPL session

You can customize this variable.

Looking at ob-J.el, I see

(defcustom org-babel-J-command "jconsole"
  "Command to call J."
  :group 'org-babel
  :version "26.1"
  :package-version '(Org . "9.0")
  :type 'string)

and

(defun org-babel-J-eval-string (str)
  "Sends STR to the `j-console-cmd' session and executes it."
  (let ((session (j-console-ensure-session)))
(with-current-buffer (process-buffer session)
  (goto-char (point-max))
  (insert (format "\n%s\n" str))
  (let ((beg (point)))
(comint-send-input)
(sit-for .1)
(buffer-substring-no-properties
beg (point-max))

Tips?

Thanks,

Bill

PS: I'm running Emacs v25.1.1 and org mode 9.1.3.  There's a bit more info
at http://jsoftware.com/pipermail/general/2017-December/037363.html.
-- 
Bill Harris


[O] How do I make org-mode columnview show all file results?

2014-03-12 Thread Bill Harris
I'm trying to create a set of files that describe project data and have a
column view block in a summary file, but the columnview is only picking up
one project, and I need it to pick up all.

P1.org and P2.org are two sample project files, and MasterP.org is the
summary file.

P1.org:

#+COLUMNS: %15PROJ(Project) %35ITEM(Task) %Start %End %8Effort{+} %TODO

* Tasks
  :PROPERTIES:
  :ID:   simple
  :PROJ: P1
  :END:

** TODO Phase 1 :testbed:
   :PROPERTIES:
   :End:  [2014-03-19 Wed]
   :Start:[2014-03-11 Tue]
   :END:
** TODO Phase 2 :testbed:
   :PROPERTIES:
   :Start:[2014-03-20 Tue]
   :Effort:   32h
   :End:  [2014-04-01 Tue]
   :END:
** TODO Phase 3 :testbed:
   :PROPERTIES:
   :Start:[2014-04-02 Fri]
   :Effort:   20h
   :End:  [2014-04-11 Fri]
   :END:

P2.org:

#+COLUMNS: %15PROJ(Project) %35ITEM(Task) %Start %End %8Effort{+} %TODO

* Tasks
  :PROPERTIES:
  :ID:   simple
  :PROJ: P2
  :END:

** TODO Phase A :testbed:
   :PROPERTIES:
   :Start:[2014-03-24 Mon]
   :Effort:   10h
   :End:  [2014-03-24 Mon]
   :END:
** TODO Phase B :testbed:
   :PROPERTIES:
   :Start:[2014-04-23 Wed]
   :Effort:   10h
   :End:  [2014-04-23 Wed]
   :END:

** TODO Phase C :testbed:
   :PROPERTIES:
   :Start:[2014-05-13 Tue]
   :Effort:   10h
   :End:  [2014-05-13 Tue]
   :END:

MasterP.org:

When I execute MasterP.org with C-c C-c, I get:

#+COLUMNS: %15PROJ(Project) %35ITEM(Task) %Start %End %8Effort{+} %TODO

* Table
#+BEGIN: columnview :hlines 1 :id simple
| Project | Task | Start| End
| Effort | TODO |
|-+--+--+--++--|
| P2  | * Tasks  |  |
| 30.0   |  |
| | ** Phase A :testbed: | [2014-03-24 Mon] | [2014-03-24 Mon]
| 10h| TODO |
| | ** Phase B :testbed: | [2014-04-23 Wed] | [2014-04-23 Wed]
| 10h| TODO |
| | ** Phase C :testbed: | [2014-05-13 Tue] | [2014-05-13 Tue]
| 10h| TODO |
#+END:

I want to see the data for P1, too, with the total effort at least being
summed by project. If I could also get the total effort across projects, so
much the better!

What do I need to change?

I discovered it works if I have unique :id entries for P1.org and P2.org
and then create two tables in MasterP.org. While that could work, it does
lead to two refinements to the question: how can I merge the two tables,
and is there a way to do it without distinct :id entries?

Thanks,

Bill

-- 
Bill Harris
http://facilitatedsystems.com/weblog/


Re: [Orgmode] File-level execute permissions?

2010-09-28 Thread Bill Harris
Eric Schulte schulte.e...@gmail.com writes:

 Yes, you'll need to pull a copy of Org-mode from the git repository,
 anything pulled after the date of my last message will work.

Eric,

Thanks,

Bill
-- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] File-level execute permissions?

2010-09-27 Thread Bill Harris
Eric Schulte schulte.e...@gmail.com writes:

 The `org-confirm-babel-evaluate' variable can be set to a function which
 can query the user to confirm code block evaluation.  The following code
 does two things.
 1) it creates and maintains a list of the files that the user has said
are safe for evaluation (this list will need to be rebuilt every time
you re-start Emacs)
 2) it shows the language and body of the code block to the user when
querying for evaluation

Eric,

That sounds like what I was seeking.  Thanks!

 Note: the above requires that you pull down the latest version of
 Org-mode.

I've got 7.01h.  I presume you mean something newer than that?  

Bill
-- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] File-level execute permissions?

2010-09-25 Thread Bill Harris
Noorul Islam noo...@noorul.com writes:

 How about setting `org-confirm-babel-evaluate' to nil

Noorul,

Thank you for the suggestion.  Setting that to nil, according to the
documentation, prevents _any_ confirmation requests in any file, at
least as best as I can tell.  I don't really want that.  

What I want is to have to confirm once at the first code block in an org
file and then have the rest go without confirmation.  Since I don't see
the code blocks anyway when I get asked for confirmation, I'm not sure
there's a lot of benefit to a confirmation request on each block, but I
do want a reminder that there is one or more code blocks in a file
before I blithely execute the entire thing.

Bill
-- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] File-level execute permissions?

2010-09-24 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I understand at least the obvious risks in executing source code blocks
inside an unknown org file, but, when I created the org file myself, it
would be nice to be able to export the file without confirming execution
20+ times.  

Is there a header element I can set that asks one time for the entire
file (or session, perhaps) for execute permission?  I think that would
be safer than blindly turning on permission, for I'd at least get one
opportunity to abort exporting if I was surprised by the existence of
src blocks.

Thanks,

Bill
- -- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyco4sACgkQ3J3HaQTDvd/80wCfQgv/OSZ7XbH6U2c3F9TbRiMw
G4UAnRSDTxpprkuBhpBRukq9+Qxj3Mmm
=lmZG
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] SQLite in 7.01h?

2010-09-18 Thread Bill Harris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm probably just missing it, but I didn't see anything in the manual,
the FAQ, the mailing list, or from a Google search.

I rediscovered org-mode this week; I had used much earlier versions some
years ago, but org-babel really attracted my attention.  

I've gotten v 7.01h to work on Debian Stable and XP for R, elisp, and
sh, but I can't figure out how to make it work for SQLite.  I did enable
SQLite as one of the languages, but, when I execute the following
section, I get No org-babel-execute function for Sqlite!:

#+BEGIN_SRC Sqlite 
  sqlite3 sqlite/db.sqlite
  select * from table;
#+END_SRC

(The org-mode file is in a directory with a subdirectory called sqlite,
and the database is there.)

I did a similar thing for R, and it works:

#+BEGIN_SRC R
  3 + 4
#+END_SRC

#+results:
: 7

I'm running this test with GNU Emacs 22.2.1 on Debian Stable; I'm
running sqlite3 version 3.5.9.

What am I missing?  Can you give me an example SQLite source code block
that works?

Thanks,

Bill
- -- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyVBacACgkQ3J3HaQTDvd8avQCfVQ4gMOXMjEHRqrETLJG+pmrt
OW4AnR1Kbh7wHEV+qZuSJOfeKGUCSMv+
=DPVV
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] SQLite in 7.01h?

2010-09-18 Thread Bill Harris
Bill Harris bill_har...@facilitatedsystems.com writes:

 I've gotten v 7.01h to work on Debian Stable and XP for R, elisp, and
 sh, but I can't figure out how to make it work for SQLite.  I did enable
 SQLite as one of the languages, but, when I execute the following
 section, I get No org-babel-execute function for Sqlite!:

 #+BEGIN_SRC Sqlite 
   sqlite3 sqlite/db.sqlite
   select * from table;
 #+END_SRC

I found a workaround

#+begin_src sh :results replace
  sqlite3 sqlite/db.sqlite 'select * from table;'
#+end_src

but it would surely be nice to be able to use the SQLite connection
directly.

Bill
-- 
Bill Harris  http://makingsense.facilitatedsystems.com/
Facilitated Systems  Everett, WA 98208 USA
http://www.facilitatedsystems.com/   phone: +1 425 374-1845

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode