Re: [O] Problem with org-agenda-clockreport-mode and tag-filtered view in agenda

2014-11-26 Thread Sebastien Vauban
Dear Benoit,

 PROBLEM: Agenda clock report mode does not take into consideration filtered
 view anymore (C-u R in agenda view).

 It's behavior changed somewhere between version 8.2.4 (for which it works)
 and version 8.2.10 (for which it doesn't work anymore).
 Is it a bug or is it intentional?

 I intensively use clock report with filtered views, so it has become quite
 problematic for me.

IMHO, the best way you can help to try and get the problem fixed is to
find the problematic commit.

In order to do, use the Git version of org-mode, and play a couple of
minutes with `git bisect':

#+begin_src sh
git bisect start BAD-COMMIT GOOD-COMMIT
#+end_src

Test...

If good:

#+begin_src sh
git bisect good
#+end_src

If bad:

#+begin_src sh
git bisect bad
#+end_src

And after a few more steps like that, git bisect will eventually find
a first bad commit:

#+begin_src sh
git bisect bad
2ddcca36c8bcfa251724fe342c8327451988be0d is the first bad commit
#+end_src

Send it to the list (and put the author of the commit in Cc).

Then use git bisect reset to go back to the branch we were in before
we started bisecting:

#+begin_src sh
git bisect reset
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [PATCH] org-eww.el: Fix org-store-link for eww-mode

2014-11-26 Thread Marco Wahl
Hello!

Find a small fix to keep up with the eww evolvement.

I'll try to push the patch immediately since it is so small, resides in
contrib and already helps me.


But of course any comments are welcome, as always, thanks.
-- 
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2
From 00500afb8ced99ccaf9334ca183bc572bb6ae29a Mon Sep 17 00:00:00 2001
From: Marco Wahl marcowahls...@gmail.com
Date: Wed, 26 Nov 2014 10:38:43 +0100
Subject: [PATCH] org-eww.el: Fix org-store-link for eww-mode

* contrib/lisp/org-eww.el (org-eww-store-link): Depending on the Emacs
  version use the appropriate interface to store the url of an
  eww-mode buffer.

This patch fixes the org-store-link feature for eww-mode buffers for
Emacs 25.
---
 contrib/lisp/org-eww.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-eww.el b/contrib/lisp/org-eww.el
index 26a1e09..08dac11 100644
--- a/contrib/lisp/org-eww.el
+++ b/contrib/lisp/org-eww.el
@@ -54,9 +54,14 @@
   (when (eq major-mode 'eww-mode)
 (org-store-link-props
  :type eww
- :link eww-current-url
+ :link (if ( emacs-major-version 25)
+	   eww-current-url
+	 (eww-current-url))
  :url (url-view-url t)
- :description (or eww-current-title eww-current-url
+ :description (if ( emacs-major-version 25)
+		  (or eww-current-title eww-current-url)
+		(or (plist-get eww-data :title)
+			  (eww-current-url))
 
 
 ;; Some auxiliary functions concerning links in eww buffers
-- 
2.1.3



[O] Customizing Timestamps in html Export.

2014-11-26 Thread Ian Barton
I can't work out how to do this. I want to customize the format of 
timestamps when I publish a project to html. There seem to be various 
variables, such as org-html-metadata-timestamp-format, which customize 
the format in pre and postambles and when using the DATE: buffer option, 
but nothing that affects the format of timestamps in the body text.


The nearest I can find is org-time-stamp-custom-formats, which works if 
org-display-custom-times is set. However, I am happy with the default 
when I am working in an org buffer and only want to customize the html 
exported timestamp.


Ian.



Re: [O] [PATCH] Improve success message from org-remove-file.

2014-11-26 Thread Nicolas Goaziou
Karl Fogel kfo...@red-bean.com writes:

 I didn't include TINYCHANGE on purpose.  The guidelines say:

   | If the change is a minor change made by a committer without
   | copyright assignment to the FSF, the commit message should also
   | contain the cookie TINYCHANGE (anywhere in the message). When we
   | later produce the ChangeLog file for Emacs, the change will be
   | marked appropriately.

 However, I *do* have copyright assignment on file with the FSF (for
 Emacs), so I interpreted the above as meaning I shouldn't include
 TINYCHANGE.  What is the right thing to do here?

Nothing. I didn't know you had copyright assignment. I updated
contributors list accordingly.

Regards,



Re: [O] Including files, a question

2014-11-26 Thread Nicolas Goaziou
Hello,

Samuel W Flint swfl...@flintfam.org writes:

 When including org files, is there a way to ignore the #+TITLE:
 directives, and such?  I have several separate org files, which contain
 different things, which can be kept separate, but would also be nice
 together, and would like to only have a single title.

 Is there any way to do this?

You can skip the first lines of an included file with :lines argument.
See

  (info (org) Include files)

Regards,

-- 
Nicolas Goaziou



Re: [O] Extending the Org syntax by a custom exporter - how to do it?

2014-11-26 Thread Nicolas Goaziou
Hello,

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Now that I actually started work on my exporter, I'd like to investigate
 this further.  The thing is, I'm not sure where to start.  First of all,
 I have a bit old Org-mode (without latex-math-blocks); I guess I'll just
 have to update it (I'll try to do an Elpa update in a minute).  But my
 question is:

 1. Is it a good idea to instrument `org-latex--wrap-latex-math-block'
 for Edebug to learn what's happening?

Possibly, but you need to start out with a tiny document and have
`print-level' and `print-length' set to nil.

Anyway, it is a straightforward function: it looks for a math-related
object in the parse tree. When it finds one (which needs to be checked
first as type is an insufficient information), it inserts an empty
pseudo object before it. Then, it moves the math-related object, and
every contiguous math-related objects, within that pseudo object.

 2. Is there any other (possibly simpler) instance of pseudo-blocks I
 could study?  It seems to me (from the docstring) that latex-math-blocks
 are a bit tricky; what I'm interested in is more like creating a new
 element similar to e.g. italics.

A slightly simpler example can be found in
`org-latex--wrap-latex-matrices' (I think you'll need to study
development version). There is also
`org-export--remove-uninterpreted-data-1' in ox.el.

Anyway, an example of what you're trying to achieve would help.

 Also, if (when?) I get it, I'm going to describe the process of adding
 a pseudo-object somewhere (I consider my blog, or maybe I could upload
 it to Worg?), so that other people can learn it easier.

I have a TODO to document it at

http://orgmode.org/worg/dev/org-element-api.html

and add a short note on how to use them at

 http://orgmode.org/worg/dev/org-export-reference.html

However, I have the feeling that the UI is not complete yet. For
example, at the moment, pseudo-objects are mostly wrapped around
existing objects, so a function `org-element-wrap' (with DATUM START END
as arguments, assuming that START and END are siblings) may be
implemented.

Anyway, feel free to document it in the official references. We can
always update it later.


Regards,

-- 
Nicolas Goaziou



[O] How to view everything DONE today?

2014-11-26 Thread Sascha Ziemann
Hi,

I tried to get a list of all items done today. I tried to open the agenda
view but is does not show anything. What is the right command to see the
items done today?

Regards,
Sascha


Re: [O] [RFC] Change property drawer syntax

2014-11-26 Thread Sebastien Vauban


Hello Nicoalas,

Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 I've done that but, now, it does not support anymore the structure I had
 in all my Org files:

 ** TODO Show typical Org entry
SCHEDULED: 2014-11-08 Sat
:LOGBOOK:
CLOCK: [2014-11-11 Tue 12:35]--[2014-11-11 Tue 14:19] =  1:44
:END:

 I have the planning lines and the drawers indented at the level of the
 entry.

 On the other hand, the body text of the entry always begins at
 column 0.  This makes a clear distinction between meta-stuff and the
 contents of the entry itself.

 This distinction is not known by Org. 

 Meta-stuff is stuff bound to a headline: planning info and, now,
 properties drawer. OTOH, a LOGBOOK drawer is a regular drawer, which can
 be inserted anywhere within the section. As such, it belong to the body
 of the section.

Would it be a problem to bind the LOGBOOK drawer to the headline as
well (like you did for the PROPERTIES drawer)?

 Now, with `org-adapt-indentation' set to `t', the whole block moves to
 the right when demoting, and to the left when promoting.

 When demoting, everything, i.e., meta-stuff and body, is moved to the
 right. When promoting, meta-stuff is moved unconditionally (due to
 `org-adapt-indentation'), but line beginning at column 0 prevents the
 body from being moved.

 `org-adapt-indentation' is really useful if you indent everything, e.g.,
 using C-j to start new lines. Here you are using something in-between.

Did not know I wasn't conforming to the common habits...

From what I've seen,

- Planning info and drawers are typically indented (see Worg, the
  Org-mode manual and http://doc.norang.ca/org-mode.html for different
  types of drawers, sometimes including the PROPERTIES one), what makes
  those info stand out from the notes themselves.

- Body text is often not indented (see Worg files themselves), which is
  much easier for diffing different versions of the same file).

 I suggest to keep `org-adapt-indentation' to nil

OK.

 and fix meta stuff and logbook by indentation by hand, using
 `org-after-demote-entry-hook' and `org-after-promote-entry-hook'.

That could do it when promoting or demoting entries.  But that's not
sufficient: now, whenever logging a state change (from TODO to DONE, for
example), a drawer gets created in column 0, instead of at the right
indentation level of the headline.

The same kind of problems occurred with a repeating timestamp:

--8---cut here---start-8---
** TODO Noter les index de consommation
   DEADLINE: 2014-11-23 Sun 20:00 ++7d -0d
   :PROPERTIES:
   :LAST_REPEAT: [2014-11-25 Tue 16:46]
   :END:
   :LOGBOOK:
   (...)
   - State DONE   from TODO   [2014-11-17 Mon 13:36]
   :END:
--8---cut here---end---8---

became (after C-c C-t d):

--8---cut here---start-8---
** TODO Noter les index de consommation
DEADLINE: 2014-11-30 Sun 20:00 ++7d -0d
   :PROPERTIES:
   :LAST_REPEAT: [2014-11-25 Tue 16:46]
   :END:
   :LOGBOOK:
   (...)
   - State DONE   from TODO   [2014-11-17 Mon 13:36]
   - State DONE   from TODO   [2014-11-25 Tue 16:46]
   :END:
--8---cut here---end---8---

^ DEADLINE in column 0.

Am I missing something?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [RFC] Change property drawer syntax

2014-11-26 Thread Sebastien Vauban
Nicolas,

Sebastien Vauban wrote:
 Sebastien Vauban wrote:
 After heavy testing (on all my Org files, I mean) of the function
 `org-repair-property-drawers', it works perfectly except for the
 following corner-case (when there are Org properties in quote
 blocks).

 I did not retest (yet) the same thing in #+begin/end_src blocks...

 I confirm the problem is the same if Org properties are enclosed in
 a #+begin/end_src block such as:

 ** Sectionnement

 Exemple de section avec un titre court pour LaTeX :

 #+begin_src org
 ,* Ceci est un titre de section assez long
   :PROPERTIES:
   :ALT_TITLE: Ceci est un titre court
   :END:
 #+end_src

 Upon execution of the repair function, that entry will be wrongly
 converted.

Do you experience the same problem as me?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Extending the Org syntax by a custom exporter - how to do it?

2014-11-26 Thread John Kitchin
I played around with this a little. Here is a minimal kind of example
with a custom exporter that handles quiz blocks separately. The quiz
block can have some attributes defined that get used in rendering the
HTML. Is this along the lines of what you are trying to do? 

* A custom type

#+BEGIN_EXAMPLE
Example text in a block to make sure it gets handled
#+END_EXAMPLE

Some instructions for the quiz.

#+ATTR_quiz: :points 5 :correct-answer A
#+BEGIN_quiz
test quiz
- [ ] answer A
- [ ] answer B
#+END_quiz


#+BEGIN_SRC emacs-lisp :exports none
(defun my-org-html-export-block (export-block contents info)
  Transcode a EXPORT-BLOCK element from Org to HTML.
CONTENTS is nil.  INFO is a plist used as a communication
channel. QUIZ blocks are handled separately.

  (cond
   ;; handle our special quiz block
   ((string= (org-element-property :type export-block) QUIZ)

(format
 bgot it:/b %s points, correct answer = %s 
br
You would have to parse the body to generate your html here.
br
pre%s/pre
 (plist-get 
  (read (format %s (org-element-property :attr_quiz export-block)))
 :points)
 (plist-get 
  (read (format %s (org-element-property :attr_quiz export-block)))
 :correct-answer)
 (org-element-property :value export-block)
 ))
   ;; handle every other kind of block
   (t
(org-html-export-block (export-block contents info)

(org-export-define-derived-backend 'my-html 'html
  :translate-alist '((export-block . my-org-html-export-block))
  ;; quiz blocks will not be parsed, they are handled directly in 
org-html-export-block.
  :export-block quiz
)


(browse-url (org-export-to-file 'my-html custom-element.html))
#+END_SRC

#+RESULTS:
: #process open custom-element.html






John Kitchin jkitc...@andrew.cmu.edu writes:

 Could you remind us of what you are trying to do? It seems like you may
 not necessarily need custom elements (although that could be
 useful). For example, you can put a lot of information in properties of
 a headline.

 You might be interested in this:

 http://kitchingroup.cheme.cmu.edu/blog/2014/11/23/Machine-gradable-quizzes-in-emacs+org-modex/

 I recently used this is in my class of 58 students (who all used emacs
 and org-mode to take a quiz!).


 Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Hello there,

 this is close to necromancy, but let me revive this old thread.

 On 2014-03-16, at 11:16, Nicolas Goaziou wrote:

 Another, more advanced option, is to use a parse tree filter to create
 pseudo-types, i.e., element or object types that don't exist in regular
 Org syntax. See `math-block' type in ox-latex.el, in particular
 `org-latex-math-block-tree-filter'.

 Now that I actually started work on my exporter, I'd like to investigate
 this further.  The thing is, I'm not sure where to start.  First of all,
 I have a bit old Org-mode (without latex-math-blocks); I guess I'll just
 have to update it (I'll try to do an Elpa update in a minute).  But my
 question is:

 1. Is it a good idea to instrument `org-latex--wrap-latex-math-block'
 for Edebug to learn what's happening?

 2. Is there any other (possibly simpler) instance of pseudo-blocks I
 could study?  It seems to me (from the docstring) that latex-math-blocks
 are a bit tricky; what I'm interested in is more like creating a new
 element similar to e.g. italics.

 (Reagrdless of the answer, I'll try with Edebug, but I'm a bit afraid
 that I won't understand what's going on).

 Also, if (when?) I get it, I'm going to describe the process of adding
 a pseudo-object somewhere (I consider my blog, or maybe I could upload
 it to Worg?), so that other people can learn it easier.  But for now, I
 might need help.

 Best,

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



[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-11-26 Thread Eli Zaretskii
 From: Sebastien Vauban sva-n...@mygooglest.com
 Cc: 18...@debbugs.gnu.org
 Date: Wed, 26 Nov 2014 14:11:31 +0100
 
 Lisp Backtrace:
 line-end-position (0x88ccb0)
 back-to-indentation (0x88cdf8)
 current-left-margin (0x88cf60)
 move-to-left-margin (0x88d0b8)
 0x126b2a8 PVEC_COMPILED
 funcall (0x88d220)
 with-no-warnings (0x88d36c)
 setq (0x88d41c)
 if (0x88d4ac)
 let (0x88d5cc)
 ad-Advice-forward-paragraph (0x88d7b0)
 apply (0x88d7ac)
 forward-paragraph (0x88d908)
 0x126b380 PVEC_COMPILED
 funcall (0x88da60)
 with-no-warnings (0x88dbac)
 setq (0x88dc5c)
 if (0x88dcec)
 let (0x88de0c)
 ad-Advice-backward-paragraph (0x88dff0)
 apply (0x88dfec)
 backward-paragraph (0x88e15c)
 0x67a1070 PVEC_COMPILED
 funcall (0x88e2d0)
 syntax-ppss (0x88e58c)
 sp-get-quoted-string-bounds (0x88e6e8)
 sp--get-string-or-comment-bounds (0x88e838)
 sp-get-paired-expression (0x88e9b8)
 sp-get-expression (0x88eb18)
 sp-get-sexp (0x88ec78)
 sp-get-thing (0x88edd8)
 0x5b38338 PVEC_COMPILED
 sp-show--pair-function (0x88f14c)
 apply (0x88f148)
 byte-code (0x88f260)
 timer-event-handler (0x88f49c)
 (gdb)
 --8---cut here---end---8---
 
 Does it help this time?

Maybe.  This backtrace looks very different from the last one.

What time fired here, and what function was it supposed to run?  And
how is that timer related to your LOGBOOK drawer?





Re: [O] How to view everything DONE today?

2014-11-26 Thread Richard Lawrence
Hi Sascha,

Sascha Ziemann cev...@gmail.com writes:

 I tried to get a list of all items done today. I tried to open the agenda
 view but is does not show anything. What is the right command to see the
 items done today?

If you use logging, one way to do this is to press l in the agenda, to
turn on log mode.  This will show you all the tasks you worked on,
including the ones that you marked done.

I'm not sure if this is possible without logging, since your org files
won't record when tasks were marked done.  You can turn on logging with
a line like

#+STARTUP: logdone

in the preamble of an org file to turn logging on for that file, or

(setq org-log-done 'time) 

in your .emacs, to turn it on globally.

To keep things neat, you might also want to use

#+STARTUP: logdrawer

or 

(setq org-log-into-drawer t)

so your logs go in a LOGBOOK drawer.

Hope that helps!

Best,
Richard




[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-11-26 Thread Glenn Morris
Eli Zaretskii wrote:

 sp-show--pair-function (0x88f14c)
[...]
 Maybe.  This backtrace looks very different from the last one.

It indeed appears to be from smartparens, which is not part of Emacs.





[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-11-26 Thread Eli Zaretskii
 From: Glenn Morris r...@gnu.org
 Cc: Sebastien Vauban sva-n...@mygooglest.com,  18...@debbugs.gnu.org
 Date: Wed, 26 Nov 2014 11:53:03 -0500
 
 Eli Zaretskii wrote:
 
  sp-show--pair-function (0x88f14c)
 [...]
  Maybe.  This backtrace looks very different from the last one.
 
 It indeed appears to be from smartparens, which is not part of Emacs.

Perhaps that package is the one that infloops, and the fact that it
happens on a closing bracket character seems to point that way.





Re: [O] [Patch] org-display-inline-images: Add support for remote images

2014-11-26 Thread Kit-Yan Choi
Thank you!  These are interesting ideas!  For both of these suggestions, I
think I will need a look-up table using the remote file paths as keys, the
local copy paths as values.

But is it theoretically possible to have two remote file paths sharing the
same local copy file name?  i.e. `make-temp-file' generates the same
temporary file name for two separate calls?
If such a situation occurs, then: (1) the local copy of one remote image
will be overwritten by another (2) it is wrong to try to update the local
copy based on the time stamp of a wrong remote file.

As far as org-mode is concerned, and assuming the current stable version of
tramp, I think there are two options (1) the current approach which
preserves the path of the remote file and therefore avoid unnecessary
downloads; however we forgo the capability of compression that tramp's
file-local-copy offers, (2) use `file-local-copy' but risk overwriting
(albeit unlikely) downloaded local copy; this is possible with or with out
a look-up table for reusing files.

And yes, for those who prefer seeing an empty box instead of downloading
remote images for display, I will add an option for turning this
functionality ON/OFF, default off maybe.

Thanks,
Kit


On Tue, Nov 25, 2014 at 12:04 PM, Michael Albinus michael.albi...@gmx.de
wrote:

 Kit-Yan Choi k...@kychoi.org writes:

  Michael,

 Hi Kit,

  Thanks for the suggestion. Indeed `file-local-copy' would have made
  the code cleaner. Yet `file-local-copy' generates a new filename each
  time it's run. But I wanted to allow the code to check whether the
  remote image has already been fetched before and so skip unnecessary
  file transfer, which takes time (think of it like rsync -a).
  Therefore I wanted to preserve the remote path under a temporary
  directory.

 After first retrieval via file-local-copy, you could cache this
 information somewhere for later use.

 Or you could write a ticket towards Tramp, that file-local-copy shall
 remember that a file was downloaded already, and should offer that file
 for reuse.

 Note: I'm the Tramp maintainer :-)

  Best,
  Kit

 Best regards, Michael.



[O] Large LaTeX project in single file or using publishing

2014-11-26 Thread Jacob Gerlach
Hello list,

I'm starting writing my thesis, for which I hope to remain in org-mode
rather than regular LaTeX.

I am working on adapting a thesis LaTeX template into org-mode. The
template is set up with a main.tex having several individual files
(chapters, appendices, etc) \include'd.

I believe that I could parallel this using org's publishing mechanism. An
alternate approach would be to use one single file, since I can simply fold
chapters to focus my workflow.

My first concern is losing the ability to use internal links if I use
separate files. Another thought is compilation time if I use one file and
must always run pdflatex over the entire document. I'm sure there are
pitfalls either way that I'm not yet aware of.

Any input or advice you can provide would be greatly appreciated.

Regards,
Jake


Re: [O] Problem with org-agenda-clockreport-mode and tag-filtered view in agenda

2014-11-26 Thread Benoit Bidoggia
Dear Seb,

Thanks for the piece of advice. I'll do that asap.
I first need though to configure for the git version (now I'm using the
emacs package version).
I'll post on the list again when I find the problematic commit.

Thanks again, best regads.
Benoît


On Wed, Nov 26, 2014 at 9:46 AM, Sebastien Vauban sva-n...@mygooglest.com
wrote:

 Dear Benoit,

  PROBLEM: Agenda clock report mode does not take into consideration
 filtered
  view anymore (C-u R in agenda view).
 
  It's behavior changed somewhere between version 8.2.4 (for which it
 works)
  and version 8.2.10 (for which it doesn't work anymore).
  Is it a bug or is it intentional?
 
  I intensively use clock report with filtered views, so it has become
 quite
  problematic for me.

 IMHO, the best way you can help to try and get the problem fixed is to
 find the problematic commit.

 In order to do, use the Git version of org-mode, and play a couple of
 minutes with `git bisect':

 #+begin_src sh
 git bisect start BAD-COMMIT GOOD-COMMIT
 #+end_src

 Test...

 If good:

 #+begin_src sh
 git bisect good
 #+end_src

 If bad:

 #+begin_src sh
 git bisect bad
 #+end_src

 And after a few more steps like that, git bisect will eventually find
 a first bad commit:

 #+begin_src sh
 git bisect bad
 2ddcca36c8bcfa251724fe342c8327451988be0d is the first bad commit
 #+end_src

 Send it to the list (and put the author of the commit in Cc).

 Then use git bisect reset to go back to the branch we were in before
 we started bisecting:

 #+begin_src sh
 git bisect reset
 #+end_src

 Best regards,
   Seb

 --
 Sebastien Vauban





Re: [O] Problem with org-agenda-clockreport-mode and tag-filtered view in agenda

2014-11-26 Thread Sebastien Vauban
Benoit Bidoggia wrote:
 Thanks for the piece of advice. I'll do that asap.
 I first need though to configure for the git version (now I'm using the
 emacs package version).

The following should do it -- if place right at the start of your .emacs
file (before any ELPA package initialization).

--8---cut here---start-8---
(add-to-list 'load-path /path/to/org-mode/lisp) ; --- update!

;; getting started
(add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)\\' . 
org-mode))
(require 'org-loaddefs)
--8---cut here---end---8---

 I'll post on the list again when I find the problematic commit.

Good.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Large LaTeX project in single file or using publishing

2014-11-26 Thread Scott Randby
On Wed, Nov 26, 2014 at 2:00 PM, Jacob Gerlach jacobgerl...@gmail.com wrote:
 Hello list,

 I'm starting writing my thesis, for which I hope to remain in org-mode
 rather than regular LaTeX.

 I am working on adapting a thesis LaTeX template into org-mode. The template
 is set up with a main.tex having several individual files (chapters,
 appendices, etc) \include'd.

 I believe that I could parallel this using org's publishing mechanism. An
 alternate approach would be to use one single file, since I can simply fold
 chapters to focus my workflow.

 My first concern is losing the ability to use internal links if I use
 separate files. Another thought is compilation time if I use one file and
 must always run pdflatex over the entire document. I'm sure there are
 pitfalls either way that I'm not yet aware of.

You don't have to compile the whole document every time. You can
export a subtree: C-c C-e, C-s changes the export scope.

Scott Randby


 Any input or advice you can provide would be greatly appreciated.

 Regards,
 Jake



Re: [O] How to view everything DONE today?

2014-11-26 Thread John Kitchin
I am not sure how to do this through the agenda, but here is a way to
find headlines in the current file that were closed today. You could
wrap this in a loop over the files in your agenda list. It is a little
clumsy on the time comparisons but it works ;)

* Getting items done today

** DONE item 1
   CLOSED: [2014-11-26 Wed 13:09] DEADLINE: 2014-11-26 Wed



** DONE item 2
   CLOSED: [2014-11-25 Tue 13:09] DEADLINE: 2014-11-26 Wed


** Mapping entries to find what closed today.

First, we look at a timestamp comparison function. 
#+BEGIN_SRC emacs-lisp
(org-time= 2014-11-26 Wed 2014-11-26 Wed)
#+END_SRC

#+RESULTS:
: t

#+BEGIN_SRC emacs-lisp
(org-map-entries
  (lambda ()
(let* ((closed (org-entry-get (point) CLOSED))
   (today (format-time-string %Y-%m-%d)))
  (when closed
(when
(org-time=
 today
 (let ((parts (org-parse-time-string closed)))
   (format %s-%s-%s
   (nth 5 parts) ; year
   (nth 4 parts) ; month
   (nth 3 parts) ; day
   )))
  (message-box Found a closed task: %s
   (org-heading-components)))
 
#+END_SRC

#+RESULTS:
| nil | Found a closed task: (2 2 DONE nil item 1 nil) | nil | nil |




Sascha Ziemann cev...@gmail.com writes:

 Hi,

 I tried to get a list of all items done today. I tried to open the
 agenda view but is does not show anything. What is the right command
 to see the items done today?

 Regards,
 Sascha


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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-26 Thread Thomas S. Dye
Aloha Jake,

In my experience, the one file approach is easiest with Org mode.  I've
written a book in Org mode using this approach and found it to be quite
comfortable.  Compilation time wasn't ever a big deal for me, but this
will depend on your patience obviously.

I don't think there are any real pitfalls, where you run into a
situation that can't be remedied.  The various LaTeX constructs in Org
mode let you apply LaTeX solutions at several scales, from snippets to
blocks, and these work well in my experience.

We use LaTeX at work and it would be easy for me to do my writing
outside work in LaTeX, but I now do all my outside work in Org mode.
The combination of Babel and the new exporter, along with the
integration of tools such as ebib, make this a congenial document
preparation environment.

hth,
Tom

Jacob Gerlach jacobgerl...@gmail.com writes:

 Hello list,

 I'm starting writing my thesis, for which I hope to remain in org-mode
 rather than regular LaTeX.

 I am working on adapting a thesis LaTeX template into org-mode. The
 template is set up with a main.tex having several individual files
 (chapters, appendices, etc) \include'd.

 I believe that I could parallel this using org's publishing mechanism. An
 alternate approach would be to use one single file, since I can simply fold
 chapters to focus my workflow.

 My first concern is losing the ability to use internal links if I use
 separate files. Another thought is compilation time if I use one file and
 must always run pdflatex over the entire document. I'm sure there are
 pitfalls either way that I'm not yet aware of.

 Any input or advice you can provide would be greatly appreciated.

 Regards,
 Jake
 Hello list,

 I'm starting writing my thesis, for which I hope to remain in org-mode
 rather than regular LaTeX.

 I am working on adapting a thesis LaTeX template into org-mode. The
 template is set up with a main.tex having several individual files
 (chapters, appendices, etc) \include'd.

 I believe that I could parallel this using org's publishing mechanism.
 An alternate approach would be to use one single file, since I can
 simply fold chapters to focus my workflow.

 My first concern is losing the ability to use internal links if I use
 separate files. Another thought is compilation time if I use one file
 and must always run pdflatex over the entire document. I'm sure there
 are pitfalls either way that I'm not yet aware of.

 Any input or advice you can provide would be greatly appreciated.

 Regards,
 Jake


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



Re: [O] [RFC] Change property drawer syntax

2014-11-26 Thread Nicolas Goaziou


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

 ** Sectionnement

 Exemple de section avec un titre court pour LaTeX :

 #+begin_src org
 ,* Ceci est un titre de section assez long
   :PROPERTIES:
   :ALT_TITLE: Ceci est un titre court
   :END:
 #+end_src

 Upon execution of the repair function, that entry will be wrongly
 converted.

 Do you experience the same problem as me?

I do. I even sent you an updated revision of the repair function a few
days ago, but, apparently, it never reached its destination. This is not
the first time. Here it is again

  (defun org-repair-property-drawers ()
Fix properties drawers in current buffer.
  Ignore non Org buffers.
(when (eq major-mode 'org-mode)
  (org-with-wide-buffer
   (goto-char (point-min))
   (let ((case-fold-search t)
 (inline-re (and (featurep 'org-inlinetask)
 (concat (org-inlinetask-outline-regexp)
 END[ \t]*$
 (org-map-entries
  (lambda ()
(unless (and inline-re (org-looking-at-p inline-re))
  (save-excursion
(let ((end (save-excursion (outline-next-heading) (point
  (forward-line)
  (when (org-looking-at-p org-planning-line-re) (forward-line))
  (when (and ( (point) end)
 (not (org-looking-at-p org-property-drawer-re))
 (save-excursion
   (and (re-search-forward org-property-drawer-re 
end t)
(eq (org-element-type
 (save-match-data 
(org-element-at-point)))
'drawer
(insert (delete-and-extract-region
 (match-beginning 0)
 (min (1+ (match-end 0)) end)))
(unless (bolp) (insert \n

Regards,

-- 
Nicolas Goaziou




Re: [O] M-RET vs C-RET

2014-11-26 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 I don't have a grand vision, but, ideally, I'd want M-RET to do the
 right thing, which is my book is often create an element similar to
 element at point, and is certainly not but my #+begin_src emacs-lisp
 code on a headline.  I agree the logical action is to the eye of the
 beholder.  To me, some elements have a very clear-cut next logical
 thing (item, headline, white space (headline), some keywords, maybe
 tables), others don't (e.g. src-blocks and export blocks.).  IMO, we can
 disable most of element-actions (literately keywords and tables) out of
 the box, much like e.g. `scroll-left'.

It would be nice to have complete specifications of do the right
thing.

Also, it is important to have a way to insert a headline whatever is
around, and one to insert a headline at the end of the current section
or even great-parent.

Currently C-RET is sub-optimal since it is equivalent to C-u M-RET. It
might be possible to re-define both M-RET and C-RET so they can cover
all use-cases in a predictable, and meaningful, fashion.

 Here's another of my pet-griefs
 - a
 - b

 | → M-RET will give me an itme 
 | → M-RET will give me a headline

 Why is the behavior a function of amount of whitespace/newlines to
 nearest element?  This makes not sense to me and goes against what I
 want, namely act in accordance to element at point. . .

Blank lines belong to the element at point above.

In particular, number of blank lines is meaningful in plain lists and
footnote definitions (2 blank lines mark the end of the element). In the
first line, you're still in the list, in the next one, you're not
anymore, hence the behaviour.

Think about

  - a

  - b

  |


Regards,



Re: [O] M-RET vs C-RET

2014-11-26 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 I don't have a grand vision, but, ideally, I'd want M-RET to do the
 right thing, which is my book is often create an element similar to
 element at point, and is certainly not but my #+begin_src emacs-lisp
 code on a headline.  I agree the logical action is to the eye of the
 beholder.  To me, some elements have a very clear-cut next logical
 thing (item, headline, white space (headline), some keywords, maybe
 tables), others don't (e.g. src-blocks and export blocks.).  IMO, we can
 disable most of element-actions (literately keywords and tables) out of
 the box, much like e.g. `scroll-left'.

 It would be nice to have complete specifications of do the right
 thing.

I agree.

Some quick thoughts:

babel-call → maybe insert new call line?
comment → new commented line?
Drawer, property-drawer → insert new drawer template?
fixed-width → clone :
headline → `org-insert-headline'
inlinetask → insert new inlinetask? 
item → `org-insert-headline'
keyword → `org-insert-keyword' but doesn't cover all keywords...
paragraph → `org-insert-headline'
plain-list → `org-insert-headline'
table-row → what it does now

No clue:

center-block → 
clock →
comment-block → 
diary-sexp →
dynamic-block → 
example-block → 
export-block → 
horizontal-rule →
latex-environment →
node-property →
planning → 
quote-block → 
special-block →
src-block →
table →
verse-block → 

I agree that if there exited a list of rights things to do, and it was
implemented, it may not be optimal to put it on M-RET [I'm not
sure]. . .

 Also, it is important to have a way to insert a headline whatever is
 around, and one to insert a headline at the end of the current section
 or even great-parent.

For the two latter: I only learned about the current possibility of
doing this reading the docstring of `org-insert-headline'.  I haven't
used it, and I don't think it's immediately helpful to me, but who
knows.

 Currently C-RET is sub-optimal since it is equivalent to C-u M-RET. It
 might be possible to re-define both M-RET and C-RET so they can cover
 all use-cases in a predictable, and meaningful, fashion.

Would be cool.

 Here's another of my pet-griefs
 - a
 - b

 | → M-RET will give me an itme 
 | → M-RET will give me a headline

 Why is the behavior a function of amount of whitespace/newlines to
 nearest element?  This makes not sense to me and goes against what I
 want, namely act in accordance to element at point. . .

 Blank lines belong to the element at point above.

 In particular, number of blank lines is meaningful in plain lists and
 footnote definitions (2 blank lines mark the end of the element). In
 the first line, you're still in the list, in the next one, you're not
 anymore, hence the behaviour.

 Think about

   - a

   - b

/I/ know why it does what it does.  But how about the guy who's been
using Org for five minutes?  Even knowing the technical/syntax reason, I
do not find this to be predictable, and meaningful—especially in my
initial example, less so when separating items by two lines.

Cheers,
Rasmus

-- 
Don't panic!!!








[O] Can special blocks be nested?

2014-11-26 Thread Marcin Borkowski
Hello list,

this seems to work when exporting:

#+BEGIN_BLOCK1
Lorem ipsum
#+BEGIN_BLOCK2
dolor sit amet
#+END_BLOCK2
#+END_BLOCK1

but font locking does not (the inner block begin/end markers are not
colorized properly).

Is this construction legal?  May I depend on it being exported
correctly, or is it just an undefined behavior or something like that?

TIA,

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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-26 Thread Marcin Borkowski

On 2014-11-26, at 20:00, Jacob Gerlach wrote:

 Hello list,

 I'm starting writing my thesis, for which I hope to remain in org-mode
 rather than regular LaTeX.

Personally, I never really got that; I much prefer writing in LaTeX.
(That said, I've been using LaTeX for almost 15 years now, and plain TeX
for, like, two decades, with heavy hacking on both, and am currently
writing a (yet another, though hopefully unique;-)) book on LaTeX so I'm
rather biased.)

OTOH, I never really bought the idea of dividing my LaTeX project into
several files.  The only reasons I can come up with are:

1. Compilation time.  Nowadays almost non-issue, especially that you can
C-c C-r a region (or a previously, specially marked (with region and
then C-c C-t C-r) fragment of the LaTeX file) in AUCTeX.  (As said by
others, you can do a similar thing in Org-mode.)

2. Collaboration and editing issues.  Nowadays a non-issue with modern,
distributed CVSs with good merging capabilities (like Git or Mercurial).

3. Efficiency of editing (font-lock, for instance).  Nowadays a
non-issue due to the speed of today's machines (oh, ye olde times;-),
when my first PC had a 40 MHz clock, 4 MB of RAM and 170 MB (!)
HDD... and before that I had a C-64, with 64 kB RAM and 1 MHz processor
- and I did some *real work* with that!)

So, basically, I'd advise going with one big file.  There are several
advantages to that - the main (for me, at least) being the ease of
navigation between various parts of the project.

That said, I'm just wondering whether there is something in Emacs which
would combine several files (possibly in different languages) into one
buffer (maybe even in Org-mode), where C-x C-s would save each part into
its own file etc.  Just thinking.  (Babel/tangling probably comes
close.)

 I am working on adapting a thesis LaTeX template into org-mode. The
 template is set up with a main.tex having several individual files
 (chapters, appendices, etc) \include'd.

Is that required in any way?  I'd be surprised if it was.

 I believe that I could parallel this using org's publishing mechanism. An
 alternate approach would be to use one single file, since I can simply fold
 chapters to focus my workflow.

Yes.  (FYI: you can also fold things in AUCTeX.)

 My first concern is losing the ability to use internal links if I use
 separate files. Another thought is compilation time if I use one file and
 must always run pdflatex over the entire document. I'm sure there are
 pitfalls either way that I'm not yet aware of.

This is maybe only distantly related, but shameless plug:
https://github.com/mbork/org-one-to-many.  (The project is currently
dormant, since I'm working on a few other things, but I'm going to
revisit it within a few weeks/months.  Feature requests/bug reports are
welcome.)

 Any input or advice you can provide would be greatly appreciated.

Just my 2 cents: I'd go for LaTeX if heavy math typesetting is involved
(then amsmath!), maybe for Org otherwise, check whether the template
imposes a many-file structure (which it probably doesn't), and keep
everything in one file.

 Regards,
 Jake

Hth,

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