Re: [O] Remove the build-in orgmode

2014-06-02 Thread Brady Trainor
Shiyuan wrote:

 Hi,
 I updated Org-mode from ELPA. If I start emacs normally, M-x
 org-version does show the new version(8.2.6). But if I start emacs  with
 -Q, emacs will still run the built-in version(7.9.3). This is not
 convenient for debugging purpose. Is there anyway to remove the built-in
 version 7.9.3 completely so that even if I start emacs with -Q, emacs
 still
 use the new version 8.2.6 from ELPA.  Thanks.
 
 Shiyuan


I have 

   (setq load-path (delete /usr/share/emacs/24.3/lisp/org load-path))
   (setq load-path (delete c:/Program Files (x86)/emacs-24.3/lisp/org 
load-path))

in my notes, for when I was trying to get the most recent maint repository 
version of org working. There is a better version of these lines somewhere 
at stack exchange... here it is: http://stackoverflow.com/a/20616703/2533127

You could potentially have this in a ~/debugorg.el, and use 

emacs -q -l ~/debugorg.el

For more exploring, try =cd /usr/share/emacs/=, and =ls=. Also, try =C-h v 
load-path RET C-x o C-s org=. In other words, have Emacs describe the =load-
path= variable, switch to that window and do a search for the term org. 

(It is somewhere discouraged to remove the built-in org, but hopefully 
someone will give you steps and tips anyway. (Would it simply suffice to 
temporarily move the emacs/24.3/lisp/org directory described above?)) 


Brady






Re: [O] Remove the build-in orgmode

2014-06-02 Thread Rainer M Krug
Brady Trainor algeb...@uw.edu writes:

 Shiyuan wrote:

 Hi,
 I updated Org-mode from ELPA. If I start emacs normally, M-x
 org-version does show the new version(8.2.6). But if I start emacs  with
 -Q, emacs will still run the built-in version(7.9.3). This is not
 convenient for debugging purpose. Is there anyway to remove the built-in
 version 7.9.3 completely so that even if I start emacs with -Q, emacs
 still
 use the new version 8.2.6 from ELPA.  Thanks.
 
 Shiyuan


 I have 

(setq load-path (delete /usr/share/emacs/24.3/lisp/org load-path))
(setq load-path (delete c:/Program Files (x86)/emacs-24.3/lisp/org 
 load-path))

or do the brutal thing:

1) rename the /usr/share/emacs/24.3/lisp/org to
e.g. /usr/share/emacs/24.3/lisp/org.builtin
2) symlink your org directory with the org version you want to use to
/usr/share/emacs/24.3/lisp/org

But I don't know if this can be dine under windows.

Disadvantage: at an update of emacs, this will be overwritten!


Cheers,

Rainer


 in my notes, for when I was trying to get the most recent maint repository 
 version of org working. There is a better version of these lines somewhere 
 at stack exchange... here it is: http://stackoverflow.com/a/20616703/2533127

 You could potentially have this in a ~/debugorg.el, and use 

 emacs -q -l ~/debugorg.el

 For more exploring, try =cd /usr/share/emacs/=, and =ls=. Also, try =C-h v 
 load-path RET C-x o C-s org=. In other words, have Emacs describe the =load-
 path= variable, switch to that window and do a search for the term org. 

 (It is somewhere discouraged to remove the built-in org, but hopefully 
 someone will give you steps and tips anyway. (Would it simply suffice to 
 temporarily move the emacs/24.3/lisp/org directory described above?)) 


 Brady





-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpdb5GKNSZeW.pgp
Description: PGP signature


[O] babel and computing a number of months

2014-06-02 Thread Alan Schmitt
Hello,

I need to work with dates for some code/scripts I'm writing in
a document making heavy usage of source blocks and babel evaluation. The
good news is that I have access to many programming languages, so the
bad news is I don't know which one to choose. The problem I want to
solve is the following: I want to compute the number of months between
march 1st, 2014, and the beginning of the current month (so right now
it's 3, but on may 31st it was 2). Is there an easy way to do it in
a babel supported language? And is there an easy way to do it in
emacs-lisp?

Thanks,

Alan



Re: [O] Remove the build-in orgmode

2014-06-02 Thread Thorsten Jolitz
Shiyuan gshy2...@gmail.com writes:

 Hi, 
 I updated Org-mode from ELPA. If I start emacs normally, M-x
 org-version does show the new version(8.2.6). But if I start emacs
 with -Q, emacs will still run the built-in version(7.9.3). This is not
 convenient for debugging purpose. Is there anyway to remove the
 built-in version 7.9.3 completely so that even if I start emacs with -
 Q, emacs still use the new version 8.2.6 from ELPA. Thanks. 

(On Archlinux) I simply trash the Org dir shipped with Emacs and put a
symlink to my git-version of Org-mode there. I was told I shouldn't do
that, but since I had many problems with mixed installs before, and no
problems at all after doing so, I stick with this apparently 'bad
habit'.

-- 
cheers,
Thorsten




Re: [O] babel and computing a number of months

2014-06-02 Thread Alexis

Alan Schmitt writes:

 I need to work with dates for some code/scripts I'm writing in a
 document making heavy usage of source blocks and babel evaluation. The
 good news is that I have access to many programming languages, so the
 bad news is I don't know which one to choose. The problem I want to
 solve is the following: I want to compute the number of months between
 march 1st, 2014, and the beginning of the current month (so right now
 it's 3, but on may 31st it was 2). Is there an easy way to do it in a
 babel supported language?

How about Perl with either DateTime::Moonpig:

https://metacpan.org/pod/DateTime::Moonpig

or Time::Piece:

https://metacpan.org/pod/Time::Piece


Alexis.



[O] Tangling with variables in R

2014-06-02 Thread Rainer M Krug
Hi

I just realized (again) that tangling with variables in R contains many
particularities.

1) it only works with non-tables, i.e. single values.

When defining the following variables:

--8---cut here---start-8---
#+NAME: YEARS
|   | year  |
|---+---|
| 1 | 1990  |
| 2 | 2000  |
#+PROPERTY: var+ YEARS=YEARS
#+PROPERTY: var+ PRESENT=2008
--8---cut here---end---8---

I get the following code in the tangled .R file:

,
| YEARS - 
read.table(/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-97151aBD/R-import-97151vpn,
|   header=TRUE,
|   row.names=1,
|   sep=\t,
|   as.is=TRUE)
| PRESENT - 2008
`

Variable transfer from tables does not work, as it is based on a
temporary file, which is not easy to distribute together with the
tangled.R file and requires manual work as the path will be different.

I consider this as a bug which should be fixed.

2) With regards to variables which are defined non-file wide, (i.e. in
properties in a subtree and variables defined per code block and
function call), these are set when they occur in the tangled code, but
they are not unset *for the next code block* or *for R code in the next
subtree* (I hope you know what I mean). They are therefore similar to
the use of a session header argument instead of non-session evaluation
of the code.

This is a (conceptually) a more complex issue, and requires some initial
thought on how this should be dealt with and how the tangled code should
relate to the executed code.

- Should the tangled .R file result in the same output as the execution in
the org file, i.e. an accompanying .R file to a exported pdf, so that
the .R file can be used to reproduce the graphs and analysis in the .pdf
exported from the .org? or

- Is tangling a completely thing to execution, and the resulting R code
in the .R file is not expected to reproduce the results in the org file?

- Finally, does tangling with variables makes sense?

My opinions are 

a) *All* variables should be transferred to the .R file. This can be
already disabled via the :no-expand header argument. Unfortunately, this
is combined with noweb expansion, and it might be useful to split these
two, i.e. to be able to only disable variable expansion but to keep
noweb (I don't use noweb so far, so it is not a problem to me as it is
now).

b) The variable assignments should be per code block / function call. So
a tangled block should look as follow:

--8---cut here---start-8---
#+NAME: YEARS
|   | year  |
|---+---|
| 1 | 1990  |
| 2 | 2000  |
#+PROPERTY: var+ YEARS=YEARS
#+PROPERTY: var+ PRESENT=2008

#+begin_src R
x - 4
cat(x^2)
#+end_src
--8---cut here---end---8---

should result in something like the following:

,
| ## # Set the variables
| YEARS - TRANSFER_TABLE()
| PRESENT - TRANSFER_VALUE()
| ## Here begins the real code
| x - 4
| cat(x^2)
| ## # Unset all variables previously set
`

but I prefer the following approach, as the result would be very
similar, only that the variables are still present afterwards which
would make debugging easier:

,
| ## # Unset all variables previously set
| ## # Set the variables
| YEARS - TRANSFER_TABLE()
| PRESENT - TRANSFER_VALUE()
| ## Here begins the real code
| x - 4
| cat(x^2)
`

This is effectively already implemented by using R environments. See [1]
and particularly [2] and [3] for how it is implemented. This does not
yet address the concern about the transfer of tables, but I will look at
this.

Apologies for a long post, but I would like to know which direction of
the tangling / variable transfer from org to R should take - I don't
want to spend a lot of time solving a problem which does not really
exist.

So - any comments? Suggestions?

Thanks,

Rainer

Footnotes: 
[1]  https://github.com/rkrug/orgmode-dev

[2]  https://github.com/rkrug/orgmode-dev/blob/R-env/lisp/ob-R.el

[3]  https://github.com/rkrug/orgmode-dev/blob/R-env/etc/R/org_functions.R

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpjRpOaCwi6_.pgp
Description: PGP signature


Re: [O] Writing .el files for org in org?

2014-06-02 Thread John Kitchin
What if we created a new directory in the repository called org which
contains these kinds of files?  It would be analogous to the lisp
directory. I don't think we need to have both ob-R.org and ob-R.el in the
repository.

For example I wrote org-ref.org, and I load it like this in my init file
(the intention here is to only tangle the org file when it is newer than
the el file or if there is no el file. for some reason my memory says that
org-babel-load-file was not doing this but that may be a faulty memory).

(if (or
 (not (file-exists-p org-ref.el))
 ( (float-time (nth 5 (file-attributes org-ref.el)))
(float-time (nth 5 (file-attributes org-ref.org)
(progn
  (org-babel-tangle-file (expand-file-name org-ref.org
starter-kit-dir))
  (load-file (expand-file-name org-ref.el starter-kit-dir)))
  (require 'org-ref))

I could see there being something like the lisp path for finding these
files, so that we could just do:

(org-require 'org-ref)

or the org-babel-load-file could be adapted to have a path to search for
files. This way there is no auto-tangling, committing, etc... just regular
version control on the source of the source.




John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Thu, May 22, 2014 at 7:04 AM, Bastien b...@gnu.org wrote:

 Rainer M Krug rai...@krugs.de writes:

  So the reason why I think it would be advantageous to have these files
  in org does not lie with the programmer familiar with emacs-lisp, but
  with somebody familiar with the other side.

 Sorry I was too terse in my previous answer: I completely agree with
 the goal you describe, but I don't think adding an .org source along
 the .el output (say e.g. ob-R.org and ob-R.el) will simplify my life
 as a maintainer: each time an ob-*.org file is changed we need to
 tangle it again... and this leads to auto-tangling, auto-committing
 considerations that I don't even want to start thinking about.

 --
  Bastien




Re: [O] Managing bibtex database using org-mode?

2014-06-02 Thread Leonard Avery Randall

Hi Vikas,
Sorry I did not reply earlier. Your original email prompted me to 
develop a more functional workflow.


I have developed a few functions that make organizing research much 
easier. I have functions that reorganize, rename, and add links to pdfs, 
search for and add links to pdfs that have been organized by other 
programs (Papers2), import notes from Skim, rename org-bibtex headlines 
to a format I find more useful (e.g. Author (year) Title), and do a few 
other things that I find convenient. The renaming functions also look up 
crossrefs, and the headline renaming function lets you know if they are 
missing. The functions are partially documented and have a few 
customizable functions so they can be set up for different systems. Also 
note that the pdf organizing system uses the conventions of my old 
research organizing tool (Papers2) but this can be modified without too 
much work. I have attached a file with the functions. The bottom of the 
file also contains the variables that I have set and hooks that I have 
added to make the functions integrate more smoothly into my set up. They 
may serve as a guide if you choose to use them.



Additionally, here is the capture template I use for bibtex entries, it 
is based largely on Richard's but it has you import more bibtex info 
during the main capture process, and uses a function to help you find 
crossrefs.


(r Reading entry
 (file+olp 
~/Google-Drive/Personal-Projects/Bib/Readinglist.org RLIST Inbox)
 ** %^{Todo state|READ|FIND|PRINT|NOTES} [#%^{Priority|A|B|C}] 
New Reading Entry %? %^{BIB_TITLE}p %^{BIB_AUTHOR}p %^{BIB_EDITOR}p 
%^{BIB_YEAR}p %^{CUSTOM_ID}p %^g

:PROPERTIES:
:BIB_BTYPE: %^{Entry 
type|book|article|inbook|bookinbook|incollection|suppbook|phdthesis|proceedings|inproceedings|booklet}

:ENTERED_ON: %U %(my-org-bibtex-crossref)
:END: :prepend t)


When I have some time I will follow up to explain how the functions work 
in more detail. In the mean time let me know if you have any questions.


All best,
Leonard

(setq-default bibtex-dialect 'biblatex)
;; setting a default bibtex-dialect makes `orb-bibtex-read' and
;; relatives work more smoothly, but I still come accross bugs.
(defcustom my-papers-directory nil
  Directory for filing papers for org-bibtex entries.
For optimal lin fuknctionality path should not contain spaces. Include trailing 
forward slash.
  :group 'my-org-bibtex
  :type  '(choice
   (const nil)
   (string)))
(defcustom my-temp-pdf-dir nil
  Default directory used by `my-org-refile-supplements' to
search for pdfs. Include trailing forward slash.
  :group 'my-org-bibtex
  :type  '(choice
   (const nil)
   (string)))
(defcustom my-miscellaneous-file-dir nil
  Directory used-by `my-org-refile-pdf' to refile supplements not associated 
with org-bibtex entries. Include trailing forward slash.
  :group 'my-org-bibtex
  :type  '(choice
   (const nil)
   (string)))
(defcustom my-org-bibtex-rename-entry-searches-for-link t
  Determines if `my-org-bibtex-rename-entry' and 
`my-org-bibtex-header-replacer' look for and insert links using 
`my-org-bibtex-insert-link'
  :group 'my-org-bibtex
  :type 'boolean)
(defcustom my-default-skim-notes-dir nil
  Default directory used-by `my-org-bibtex-capture-skim-notes'
  :group 'my-org-bibtex
  :type  '(choice
   (const nil)
   (string)))
(defcustom my-org-bibtex-standard-cite-command \\cite
  Citation Command used by `my-org-refile-skim-notes'
  :type 'string
  :group 'my-org-bibtex)
(defun my-org-bibtex-header-replacer ()
  Replaces headers of all bibtex files in buffer using 
`my-org-bibtex-header-replacer'.
  (interactive)
  (let
  ((TYPE (concat org-bibtex-prefix org-bibtex-type-property-name)))
(save-excursion
  (goto-char (point-max))
  (while (not (or (org-before-first-heading-p) (= (point) (point-min
(backward-char 1)
(re-search-backward org-outline-regexp-bol nil t)
(when (org-entry-get (point) TYPE)
  (my-org-bibtex-rename-entry))

(defun my-org-bibtex-rename-entry ()
  Replaces header of bibtex entry to the format  Author (year) Title.
 If `my-org-bibtex-rename-entry-searches-for-link' is non-nil it also looks for 
associated file and inserts link using `my-org-bibtex-insert-link'
  (interactive)
  (let ((TYPE (concat org-bibtex-prefix org-bibtex-type-property-name))
(CROSSREF (concat org-bibtex-prefix CROSSREF))
(AUTHOR (concat org-bibtex-prefix AUTHOR))
(EDITOR (concat org-bibtex-prefix EDITOR))
(YEAR (concat org-bibtex-prefix YEAR))
(DATE (concat org-bibtex-prefix DATE))
(TITLE (concat org-bibtex-prefix TITLE)))
(save-excursion
  (unless (looking-at org-outline-regexp-bol)
(re-search-backward org-outline-regexp-bol))
  (let* ((content (nth 4 (org-heading-components)))
 (tags (nth 5 (org-heading-components)))
 (crossref (org-entry-get (point) 

Re: [O] Standard skipping conditions have no effect

2014-06-02 Thread Bastien
Hi Thomas,

thanks for this bug report.

Can you try the attached patch and report if it works for you?

There are still some glitches with the customization types I want
to check before applying the patch.

Thanks in advance,

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 84b75a9..2833fca 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -390,32 +390,36 @@ the daily/weekly agenda, see `org-agenda-skip-function'.)
 			   (repeat :inline t :tag Conditions for skipping
    (choice
 :tag Condition type
-(list :tag Regexp matches :inline t (const :format  regexp) (regexp))
-(list :tag Regexp does not match :inline t (const :format  notregexp) (regexp))
+(list :tag Regexp matches :inline t
+	  (const :format  'regexp)
+	  (regexp))
+(list :tag Regexp does not match :inline t
+	  (const :format  'notregexp)
+	  (regexp))
 (list :tag TODO state is :inline t
-	  (const todo)
+	  (const 'todo)
 	  (choice
-	   (const :tag any not-done state todo)
-	   (const :tag any done state done)
-	   (const :tag any state any)
+	   (const :tag Any not-done state 'todo)
+	   (const :tag Any done state 'done)
+	   (const :tag Any state 'any)
 	   (list :tag Keyword list
 		 (const :format  quote)
 		 (repeat (string :tag Keyword)
 (list :tag TODO state is not :inline t
-	  (const nottodo)
+	  (const 'nottodo)
 	  (choice
-	   (const :tag any not-done state todo)
-	   (const :tag any done state done)
-	   (const :tag any state any)
+	   (const :tag Any not-done state 'todo)
+	   (const :tag Any done state 'done)
+	   (const :tag Any state 'any)
 	   (list :tag Keyword list
 		 (const :format  quote)
 		 (repeat (string :tag Keyword)
-(const :tag scheduled scheduled)
-(const :tag not scheduled notscheduled)
-(const :tag deadline deadline)
-(const :tag no deadline notdeadline)
-(const :tag timestamp timestamp)
-(const :tag no timestamp nottimestamp))
+(const :tag scheduled 'scheduled)
+(const :tag not scheduled 'notscheduled)
+(const :tag deadline 'deadline)
+(const :tag no deadline 'notdeadline)
+(const :tag timestamp 'timestamp)
+(const :tag no timestamp 'nottimestamp))
 		   (list :tag Non-standard skipping condition
 			 :value (org-agenda-skip-function)
 			 (const org-agenda-skip-function)

-- 
 Bastien


Re: [O] DTD prohibited

2014-06-02 Thread Bastien
Hi Alexander,

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

 Now, Word no longer can open the html-documents produced by orgmode. The 
 error 
 message is (translated from German): DTD prohibited.

You may want to customize `org-html-doctype' but you probably need to
digg further to know what DTD is prohibited exactly.

HTH,

-- 
 Bastien



Re: [O] Tests do not work

2014-06-02 Thread Bastien
Hi,

Cecil Westerhof cldwester...@gmail.com writes:

 ​Exactly: when there are no tests, there should be no ‘make test’.

I'd rather add the tests to the Org archives.

Achim, if you have time to do this, great.  Otherwise I will have a
look myself later on this week.

Thanks,

-- 
 Bastien



Re: [O] babel and computing a number of months

2014-06-02 Thread Alan Schmitt
On 2014-06-02 10:13, Alexis flexibe...@gmail.com writes:

 Alan Schmitt writes:

 I need to work with dates for some code/scripts I'm writing in a
 document making heavy usage of source blocks and babel evaluation. The
 good news is that I have access to many programming languages, so the
 bad news is I don't know which one to choose. The problem I want to
 solve is the following: I want to compute the number of months between
 march 1st, 2014, and the beginning of the current month (so right now
 it's 3, but on may 31st it was 2). Is there an easy way to do it in a
 babel supported language?

 How about Perl with either DateTime::Moonpig:

 https://metacpan.org/pod/DateTime::Moonpig

 or Time::Piece:

 https://metacpan.org/pod/Time::Piece

Thank you for the suggestion. I finally did a very hackish simple
solution:
#+begin_src emacs-lisp
(defun nbmonthssince (year month)
  (let* ((tm (decode-time))
 (cmonth (nth 4 tm))
 (cyear (nth 5 tm)))
 (+ (* 12 (- cyear year)) (- cmonth month
#+end_src

Alan



Re: [O] Tests do not work

2014-06-02 Thread Cecil Westerhof
2014-06-02 13:36 GMT+02:00 Bastien b...@gnu.org:

 Hi,

 Cecil Westerhof cldwester...@gmail.com writes:

  ​Exactly: when there are no tests, there should be no ‘make test’.

 I'd rather add the tests to the Org archives.


​That would be of-course a better solution. :-D

-- 
Cecil Westerhof


Re: [O] Moving footnotes

2014-06-02 Thread Leonard Avery Randall

Hi Bastien and Nicolas,
Thanks for the work. I do think the footnote transformation function 
looks useful, though for now I think I will stick with defining the 
footnotes at the end of each section and re-sorting the footnotes before 
refile. I still think it would be useful to have org-refile move 
footnotes by default. If I have some time soon I will look at what might 
be required to do this effectively. I may ask the two of you for help as 
I am still familiarizing myself with the org mode code.

All best,
Leonard



Re: [O] (org-insert-headline '(4)) should insert new headline before point

2014-06-02 Thread Leonard Avery Randall

Thanks!
All best,
Leonard


Bastien mailto:b...@gnu.org
May 21, 2014 at 2:43 AM
Hi Leonard,

I followed your directions and added another fix.

Things should be okay now, let me know if not.

Thanks,

Leonard Randall mailto:leonard.a.rand...@gmail.com
May 4, 2014 at 3:37 AM
Hi Bastien,

Just to follow up on the error, reverting commit 0ca4092 fixes the bug 
that I mentioned in my last email and reverting the fourth hunk of 
commit b8c85a1 should fix the bug that you tried to fix with that 
commit.  Carsten had added an 'unless (bolp)' condition to the 
function that controls inserting new lines outside of headlines to 
avoid deleting whitespace. However, so far as I can tell, the other 
measures Carsten put in place with that commit made adding this 
condition unnecessary. Outside of the contexts where it produces the 
first bug I mentioned it does not seem to affect headline insertion 
behaviour.


Anyway, reverting those commits should get headline insertion to work 
as advertised.


All best

Leonard

Leonard Randall mailto:leonard.a.rand...@gmail.com
April 30, 2014 at 6:03 PM

Hi Bastien,
Thanks for the fix, and sorry to be the bearer of bad news, but there 
seems to be a new issue. Now, if you press M-RET in a lower level tree 
anywhere but in the headline, it will produce a new first level 
headline. So, given buffer contents as in example (a), if i press 
M-Ret at the end of `two', I get (b)  which is what I would expect, 
but if i press RET, then M-RET, I get (c) which is certainly not what 
I would expect.


--example-a--
* Level one

** Level two
--end-example-a--

--example b--
* Level one

** Level two

**
--end-example-b--

example-c--
* Level one

** Level two

*
end-example-c-

Thanks again.

All best,
Leonard
Bastien mailto:b...@gnu.org
April 30, 2014 at 9:44 AM
Hi Leonard,

Okay, I see now and this is fixed -- thanks for your patience,

Leonard Randall mailto:leonard.a.rand...@gmail.com
April 30, 2014 at 8:12 AM




I'm having a hard time finding out what you *did* exactly -- can you
describe the way to reproduce the bug from an empty buffer, step by
step?


Sorry, I should have been more explicit about what I was doing. Step 
by step instructions would look something like this.


 If I type the following commands,

1. emacs -q -l ~/minimal-init.el
2. C-x C-f ~/test.org http://test.org RET
3. bla
4. C-a
5. M-RET
6. C-e
7. RET
8. bla bla
9. C-a
10. M-RET

I get:
begin-example---
* bla
*
bla bla
end-example---

If I perform the same commands without loading the minimal init file 
(Minimal-init just adds the most recent version org-mode to the load 
path, and says to debug on error), I get this


begin example---

* bla
* bla bla
end-example---

It adds a new line before the first headline, but otherwise it acts as 
expected. I am not sure if it makes any difference. But I am running 
the the Homebrew version of emacs 24.3.1 on OS X Mavericks.


All best,
Leonard


Re: [O] Standard skipping conditions have no effect

2014-06-02 Thread Thomas Morgan
Hi, Bastien, 

This works for me -- thanks!

Best,

Thomas



Re: [O] problems while editing in org-columns mode

2014-06-02 Thread Bastien
Hi Andrea,

Andrea Rossetti andrea.rosse...@gmail.com writes:

 Bastien b...@gnu.org writes:

 Let me know if it works for you, 

   - 3) FAIL: when using org-set-property or org-set-property-and-value
interactively, tab autocompletion for the Property:  prompt
can't find the name of property X if the old value of X was an
empty/whitespace string
   
   - 4) FAIL: org-delete-property (M-x org-delete-property) commands
skips/ignores a property name if the value is
empty/whitespace string

This should be fixed now in maint, thanks for the detailed tests and
the suggested fix!

-- 
 Bastien



Re: [O] Writing .el files for org in org?

2014-06-02 Thread Rainer M Krug
John Kitchin jkitc...@andrew.cmu.edu writes:

 What if we created a new directory in the repository called org which
 contains these kinds of files?  It would be analogous to the lisp
 directory. I don't think we need to have both ob-R.org and ob-R.el in the
 repository.

I think that would be a very good idea for certain modules like your
org-ref and ob-R I am working on.



 For example I wrote org-ref.org, and I load it like this in my init file
 (the intention here is to only tangle the org file when it is newer than
 the el file or if there is no el file. for some reason my memory says that
 org-babel-load-file was not doing this but that may be a faulty memory).

 (if (or
  (not (file-exists-p org-ref.el))
  ( (float-time (nth 5 (file-attributes org-ref.el)))
 (float-time (nth 5 (file-attributes org-ref.org)
 (progn
   (org-babel-tangle-file (expand-file-name org-ref.org
 starter-kit-dir))
   (load-file (expand-file-name org-ref.el starter-kit-dir)))
   (require 'org-ref))

Isn't the already existing org-babel-load-file doing exactly that?
It is robust as it is used by many to load emacs.org, and it can also
compile the file.


 I could see there being something like the lisp path for finding these
 files, so that we could just do:

 (org-require 'org-ref)

 or the org-babel-load-file could be adapted to have a path to search for
 files. 

OK - this sounds like a good approach.

Thinking about it, I don't know if it is a good idea to change the
installed files or add new ones, as this might (will?) cause access
right problems. I would rather suggest to tangle the org file into a
temporary file and then load it from there. Therefore, write access is
not required for the installation (which is safer).

So this would mean a rewrite of the org-babel-load-file function, or
just add a third optional argument for the path of the .el and/or .elc
file.

 This way there is no auto-tangling, committing, etc... just regular
 version control on the source of the source.

That would be great, and I would convert the existing ob-R.el immediately.

Cheers,

Rainer





 John

 ---
 John Kitchin
 Associate Professor
 Doherty Hall A207F
 Department of Chemical Engineering
 Carnegie Mellon University
 Pittsburgh, PA 15213
 412-268-7803
 http://kitchingroup.cheme.cmu.edu



 On Thu, May 22, 2014 at 7:04 AM, Bastien b...@gnu.org wrote:

 Rainer M Krug rai...@krugs.de writes:

  So the reason why I think it would be advantageous to have these files
  in org does not lie with the programmer familiar with emacs-lisp, but
  with somebody familiar with the other side.

 Sorry I was too terse in my previous answer: I completely agree with
 the goal you describe, but I don't think adding an .org source along
 the .el output (say e.g. ob-R.org and ob-R.el) will simplify my life
 as a maintainer: each time an ob-*.org file is changed we need to
 tangle it again... and this leads to auto-tangling, auto-committing
 considerations that I don't even want to start thinking about.

 --
  Bastien



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgp2HBVtHtrah.pgp
Description: PGP signature


Re: [O] An org password manager

2014-06-02 Thread Jorge A. Alfaro-Murillo
Bastien b...@gnu.org writes:

 This is now in contrib/lisp/ - thanks!

Great! Thanks a lot.




Re: [O] Standard skipping conditions have no effect

2014-06-02 Thread Bastien
Hi Thomas,

Thomas Morgan t...@ziiuu.com writes:

 This works for me -- thanks!

Applied, thanks, I'll keep an eye on the other problems I found.

-- 
 Bastien



Re: [O] Patch for testing `org-open-at-point'

2014-06-02 Thread Achim Gratz
Bastien writes:
 Achim Gratz strom...@nexgo.de writes:
 Shouldn't the test check that the desired target is actually
 reached?

 That would be too complicated.  Checking that `org-open-at-point'
 does not throw an error is enough IMO.

I don't think so.  Implemented a check for that in 8e72c8fcfa.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] How to include an extra css when export html

2014-06-02 Thread John Hendy
Assuming Org = 8.0, I use this:

#+html_head: link rel=stylesheet type=text/css href=path-to-css /

Stackoverflow from googling orgmode 8.0 css
- 
http://stackoverflow.com/questions/16453427/cant-get-emacs-org-mode-to-use-my-css-file

And Org-mode manual from googling orgmode css html
- http://orgmode.org/manual/CSS-support.html


Best regards,
John

On Mon, Jun 2, 2014 at 2:17 PM, loochao maillist
loochao.maill...@gmail.com wrote:
 Dear list,

 I'm trying to include my own css when using org-html-export-as-html.

 I tried to have

 # Local Variables:
 # org-export-html-style-extra: link rel=\stylesheet\ type=\text/css\
 href=\my-css-path /
 # End:

 and
 #+HTML_INCLUDE_STYLE: my-css-path

 But none of above work, is there any suggestion?

 Thanks,

 Chao



Re: [O] Tests do not work

2014-06-02 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 Bastien writes:
 I'd rather add the tests to the Org archives.

 Done.

Thanks!

-- 
 Bastien



[O] how to use :options-alist in org-export-define-derived-backend ?

2014-06-02 Thread Nicolas Richard
Hello,

I'm trying to play with the exporter but I'd like my back-end to have no
toc by default. I tried

(org-export-define-derived-backend 'mytest 'html
  :translate-alist
  ;; don't use the template, concentrate on the toc.
  (list (cons 'template (lambda (a _) a))) 
  :options-alist
  '((:with-toc nil toc nil)))

IIUC, the last nil up there should be the default value for :with-toc.
Unfortunately, exporting like this:

(with-temp-buffer
  (insert * foo\n** bar\nsome content)
  (org-export-to-buffer 'mytest *test*)
  (pop-to-buffer *test*))

will show a table of contents. Setting org-export-with-toc to nil works
as expected though :

(let ((org-export-with-toc))
  (with-temp-buffer
(insert * foo\n** bar\nsome content)
(org-export-to-buffer 'mytest *test*)
(pop-to-buffer *test*)))

What am I doing wrong ?

Thanks

-- 
Nico.



Re: [O] LaTex export questions

2014-06-02 Thread Alan Tyree
Thanks for the kind words, Martin. I hope you stay inspired since making a
few homemade paperbacks sounds like something I'd like to try.

Cheers,
Alan


On 31 May 2014 17:25, Martin Schöön martin.sch...@gmail.com wrote:

 On 28 May 2014 06:31, Alan Tyree typh...@aanet.com.au wrote:

 Hi Steven,
 You want to learn more about LaTeX, but it's not too much.

 I wrote a little book called Self-publishing with LyX that will help you
 set up the title page as well as some of your other problems. This is not a
 sales pitch -- it's free :-).

  Self-publishing with LyX
 ISBN: 978-0-9803-3242-1
 http://www.lulu.com/content/1085870

 Cheers,
 Alan


 I half-way through your book and it is a good read! I am a long-time LyX
 fan so you are preaching for the choir ad far as I am concerned :-)

 Now I feel tempted (inspired) to  create a small DIY book binding
 introduction. I have experimented with this a bit and find you can do
 decent paperbacks with very limited resources.

 --
 Martin Schöön

 http://hem.bredband.net/b262106/index.html




-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206


[O] copying files in the links while exporting to html

2014-06-02 Thread zhenjiang zech xu
Hi orgmoders,

Is there any existing function to copy files in the external links to a
specified location when exporting .org file to html? I know org-publish has
functionality to copy files with certain suffices on defined project, but
my need is to export single file or single subtree in the buffer.

For example, when I export the following subtree, it would be lovely to
copy the spam.png to the path I set up.
* foo
  [[file:spam.png]]

If there is no function ready to do that, what is the easiest easy to
implement it? any point to the right direction is appreciated.

Thanks,
Zhenjiang


Re: [O] DTD prohibited

2014-06-02 Thread James Harkins
Bastien bzg at gnu.org writes:

 
 Hi Alexander,
 
 AW alexander.willand at t-online.de writes:
 
  Now, Word no longer can open the html-documents produced by orgmode. The 
error 
  message is (translated from German): DTD prohibited.
 
 You may want to customize `org-html-doctype' but you probably need to
 digg further to know what DTD is prohibited exactly.

Apparently, all of them:

http://en.m.wikipedia.org/wiki/Document_Type_Definition

Under Security:

~~
An XML DTD can be used to create a denial of service (DoS) attack by defining 
nested entities that expand exponentially, or by sending the XML parser to an 
external resource that never returns.[10]

For this reason, .NET Framework provides a property that allows prohibiting or 
skipping DTD parsing, [10] and recent versions of Microsoft Office 
applications (Microsoft Office 2010 and higher) refuse to open XML files that 
contain DTD declarations.
~~

So, if org ODT export now depends on a DTD, then we'd have to say that we 
don't support exported files that open in MS Word.

hjh




Re: [O] copying files in the links while exporting to html

2014-06-02 Thread John Kitchin
there is no builtin way to do this that I know of. I do this in publishing
blogposts from org-mode. i use a filter on links that does this. The
copying code is here:

https://github.com/jkitchin/jmax/blob/master/user/blogofile.el#L115

the results of that code can be seen at http://kitchingroup.cheme.cmu.edu.
I wrote about doing some of this here:
http://kitchingroup.cheme.cmu.edu/blog/2013/09/28/Changing-links-to-files-so-they-work-in-a-blog/

It may not be what you want, but it might help you build your code. I hope
it helps!

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Mon, Jun 2, 2014 at 7:23 PM, zhenjiang zech xu zhenjiang...@gmail.com
wrote:

 Hi orgmoders,

 Is there any existing function to copy files in the external links to a
 specified location when exporting .org file to html? I know org-publish has
 functionality to copy files with certain suffices on defined project, but
 my need is to export single file or single subtree in the buffer.

 For example, when I export the following subtree, it would be lovely to
 copy the spam.png to the path I set up.
 * foo
   [[file:spam.png]]

 If there is no function ready to do that, what is the easiest easy to
 implement it? any point to the right direction is appreciated.

 Thanks,
 Zhenjiang