[O] Scope issue: "SCHEDULED/DEADLINE" in blocks are being evaluated (was: Recurring todos gets closed and not re-scheduled)

2016-01-17 Thread Karl Voit
Hi Marco!

* Marco Wahl  wrote:
> Hi!
>
> Karl Voit  writes:
>
>> I recently updated Org to d85ff34086e5398b7c83cf66694f3f7d09695ce8
>> (git).
>>
>> When I mark following recurring todos as done, all of them gets
>> marked as DONE and CLOSED.
>>
>> ,[ examples before being marked as DONE ]
>> | *** NEXT Test task with scheduled
>> | SCHEDULED: <2016-01-17 Sun +1w>
>> | :PROPERTIES:
>> | :CREATED:  [2016-01-15 Fri 15:06]
>> | :END:
>> |
>> | *** NEXT Test task with deadline
>
> [...]
>
>> ,[ examples after being marked as DONE ]
>> | *** DONE Test task with scheduled
>> | CLOSED: [2016-01-15 Fri 15:15] SCHEDULED: <2016-01-17 Sun +1w>
>> | :PROPERTIES:
>> | :CREATED:  [2016-01-15 Fri 15:06]
>> | :END:
>> | :LOGBOOK:
>> | - State "DONE"   from "NEXT"   [2016-01-15 Fri 15:15]
>> | :END:
>> |
>> | *** DONE Test task with deadline
>
> [...]
>
>> The previous behavior was different: recurring todos got
>> re-scheduled for the next iteration. I need this behavior back
>> otherwise recurring todos are of no use to me.
>
> [...]
>
> Possibly you faced the same issue as stated in
> http://permalink.gmane.org/gmane.emacs.orgmode/104179.
>
> This issue is fixed in the current git-version AFAICT.  It was an issue
> with the change to lexical-scoping.  I recommend you to try the new
> version.

Thanks for your pointer.

I upgraded to the most current git version and this issue is gone.
Thanks very much!

Unfortunately, this fix (or any other commit?) prevents my
non-recurring tasks to be completed when I got "DEADLINE" or
"SCHEDULED" in the body text within blocks or comments.

So I guess the new scope is too generous.

It's an edge-case but it should be fixed. When I do mark the following three
example headers as done ...

*** NEXT test with quote

#+BEGIN_QUOTE
,[ examples ]
| DEADLINE: <2016-01-31 Sun +1w>
`
#+END_QUOTE

*** NEXT test with example

#+BEGIN_EXAMPLE
,[ examples ]
| DEADLINE: <2016-01-31 Sun +1w>
`
#+END_EXAMPLE

*** NEXT test with :

: ,[ examples ]
: | DEADLINE: <2016-01-31 Sun +1w>
: `

... I get:

*** NEXT test with quote
:PROPERTIES:
:CREATED:  [2016-01-17 Sun 10:36]
:LAST_REPEAT: [2016-01-17 Sun 10:36]
:END:
:LOGBOOK:
- State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
:END:

#+BEGIN_QUOTE
,[ examples ]
| DEADLINE: <2016-02-07 Sun +1w>
`
#+END_QUOTE

*** NEXT test with example
:PROPERTIES:
:CREATED:  [2016-01-17 Sun 10:36]
:LAST_REPEAT: [2016-01-17 Sun 10:36]
:END:
:LOGBOOK:
- State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
:END:

#+BEGIN_EXAMPLE
,[ examples ]
| DEADLINE: <2016-02-07 Sun +1w>
`
#+END_EXAMPLE

*** NEXT test with :
:PROPERTIES:
:CREATED:  [2016-01-17 Sun 10:36]
:LAST_REPEAT: [2016-01-17 Sun 10:36]
:END:
:LOGBOOK:
- State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
:END:

: ,[ examples ]
: | DEADLINE: <2016-02-07 Sun +1w>
: `


-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] Losing trust in Org: stable org-mode releases and unit tests for basic functionality

2016-01-17 Thread Karl Voit
Hi!

I want to re-heat the discussion of last summer about stable
releases[1] of Org-mode:

* Scott Randby  wrote:
> While I've used Org's development version in the past, I stopped doing 
> that due to my failure to learn how to use git (no time) and other 
> issues. Now, I only use the stable releases. But the latest 8.3 release 
> doesn't seem so stable to me[...]

For Scott (I think) and for me "stable" means: save to use with my
current data without corrupting things or losing features of my
workflows.

I had several occasions where "git pull origin master" ended up in
much work for fixing my large set of Org-mode data. 

For example several times, org-todo -> DONE on recurring tasks lead
to DONE and closed tasks.

This is quite evil behavior because I rely heavily on a reliable Org
for currently 1162 open tasks in several dozen files. When such a
bug finds its way to my system and I don't recognize it (which is
highly likely in this case), I lose important tasks and even worse:
I lose my trust in Org-mode.

The most current issue of "recurring tasks get closed"[2] is fixed
(with another scoping issue newly introduced[3]): please don't
discuss this issue or any other concrete bug/issue in this thread.

It's just an example to make my point clear:

What I am trying to raise is a discussion on whether or not there
should be a stable git branch or at east some kind of unit test set
that make sure that really basic functionality doesn't get broken
without being recognized instantly. In my humble opinion, there has
to be some kind of continuous integration tests where breaking
things rings loud whistles.

Unfortunately, I don't have time to follow all the interesting
discussions on the mailing list any more. Does this imply, I can't
use Org-mode any more?

The only alternative I can think of is using the conservative(?)
Org-mode which comes with Emacs from my current Linux distribution.
However, I remember multiple cases where those Org-mode versions
still had some bugs and the recommended solution was "upgrade to
Org-mode git commit abcdef". This is how I started with Org-mode
from git in the first place!

So: what should I do to get reliable Org-mode in future to minimize
the chances of losing tasks or my trust in Org?

[1] http://thread.gmane.org/gmane.emacs.orgmode/99881/
[2] http://thread.gmane.org/gmane.emacs.orgmode/104219
[3] http://thread.gmane.org/gmane.emacs.orgmode/104219/focus=104260

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Losing trust in Org: stable org-mode releases and unit tests for basic functionality

2016-01-17 Thread Achim Gratz
Karl Voit writes:
> I had several occasions where "git pull origin master" ended up in
> much work for fixing my large set of Org-mode data. 

That's the development branch which can introduce new features and
remove old ones at any time, you should be on maint if you want
"stable".  If you want even more stable, then don't update unless you
hit a bug that is fixed in maint.

> What I am trying to raise is a discussion on whether or not there
> should be a stable git branch or at east some kind of unit test set
> that make sure that really basic functionality doesn't get broken
> without being recognized instantly. In my humble opinion, there has
> to be some kind of continuous integration tests where breaking
> things rings loud whistles.

There already is, it's called "maint".  And if any tests fail on your
machine, then the convenience target "up2" doesn't install the resulting
Org, so you never see that broken version.

> Unfortunately, I don't have time to follow all the interesting
> discussions on the mailing list any more. Does this imply, I can't
> use Org-mode any more?

No, but I'd say you shouldn't use the development version of Org and you
shouldn't run Org directly from the Git worktree.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] backend for todo.txt format (todotxt.com)

2016-01-17 Thread Rasmus
Hi,

Stefan Huchler  writes:

> hmm then each task have to get assigned to a date I guess? Despite that
> I kind of like that solution, the name of the app is tasks btw but
> there are 2 with that name in f-droid, the right one has a green
> background and is lisensed under apache2 lisense.

It doesn't need a solution, but I think you need one of the "forked"
version since some tag is missing.  Maybe this one

https://github.com/blaa/org-caldav

IOW, ideally some more effort should be put into properly supporting pure
task syncing...

> So it should actually work, I am just not shure about if I need a
> date. I seldom (have to) force me into setting deadlines. So most of the
> time its only tasks that I do when I have time and I am in the mood.

I think you don’t need a date, but don’t expect task syncing to work
effortlessly without some effort, though I had it working somewhat before
I reset my phone by accident.

> seems to work, kind of no error. but there are no entries into the
> calendar exported.
>
>
>   (require 'org-caldav)
>   (setq org-caldav-calendars '((:calendar-id "personal"
>   :url 
> "http://myserver/owncloud/remote.php/caldav/calendars/username";
>   :files ("~/notes/organizer.org")
>   :inbox "~/notes/from-smartphone.org")))
>

I use this, which might be old syntax?  I have OwnCloud v8.1.3.

(with-eval-after-load 'org-caldav
  (setq org-caldav-url 
"https://ras...@domain.net/owncloud/remote.php/caldav/calendars/rasmus";
org-caldav-calendar-id "defaultcalendar"
org-caldav-inbox "~/documents/cal/inbox.org"
org-caldav-files '("~/documents/cal/calendar.org"
   "~/documents/cal/todo.org")
org-icalendar-timezone "Europe/Berlin"))

;; Include DEADLINE and SCHEDULED:
(with-eval-after-load 'org-caldav
  (setq org-icalendar-include-todo t
org-icalendar-use-deadline
'(event-if-todo event-if-not-todo todo-due)
org-icalendar-use-scheduled
'(event-if-todo event-if-not-todo todo-start)
org-icalendar-with-timestamps t))


Rasmus

-- 
Spil noget med Slayer!




[O] Bug: non-breaking space before formatted text breaks the formatting [8.3.2 (8.3.2-51-g713fe8-elpa @ /home/wilx/.emacs.d/elpa/org-20151221/)]

2016-01-17 Thread Václav Haisman
* Testing output with non-breaking space

This is to show issue with using Unicode’s non-breaking space character
before formatted text. Org-mode does not parse the formatting if the
non-breaking space is there.

I am using the non-breaking space character because I export some Org
documents using Pandoc into LaTeX to make a PDF. Pandoc then uses the
’~’ character in the generated LaTeX document.

** preformatted

s ~John~

s ~John~

** strike through

s +not this+

s +not this+

* configurations

Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-17 on lgw01-52, modified by Debian
Package: Org-mode version 8.3.2 (8.3.2-51-g713fe8-elpa @
/home/wilx/.emacs.d/elpa/org-20151221/)

current state:
==
(setq
 org-journal-mode-hook '(#[nil "\301\302\303\304$\207"
   [org-journal-encrypt-on org-add-hook
org-journal-encryption-hook nil t]
   5]
 (lambda nil
  (org-add-hook org-journal-encrypt-on
   (quote org-journal-encryption-hook) nil 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-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 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-latex-format-headline-function
'org-latex-format-headline-default-function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 org-journal-update-auto-mode-alist)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function
'org-html-format-headline-default-function
 org-reveal-start-hook '(org-decrypt-entry)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )




signature.asc
Description: OpenPGP digital signature


[O] lexical binding breaks org-font-lock-set-keywords-hook

2016-01-17 Thread mc
Hello, 

may I ask, how one would possibly access  and set the formerly dynamically 
bound variable 

`org-font-lock-extra-keywords'

as this is still recommended by the doc-string of 
org-font-lock-set-keywords-hook

now that org.el was switched to lexical binding by commit 1f49e9fd  01/10/2016 
01:29 AM ?

smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Scope issue: "SCHEDULED/DEADLINE" in blocks are being evaluated

2016-01-17 Thread Marco Wahl
Hi Karl!

>> Karl Voit  writes:

[...]

> Unfortunately, this fix (or any other commit?) prevents my
> non-recurring tasks to be completed when I got "DEADLINE" or
> "SCHEDULED" in the body text within blocks or comments.

> It's an edge-case but it should be fixed. When I do mark the following three
> example headers as done ...
>
> *** NEXT test with quote
>
> #+BEGIN_QUOTE
> ,[ examples ]
> | DEADLINE: <2016-01-31 Sun +1w>
> `
> #+END_QUOTE
>
>
> *** NEXT test with example
>
> #+BEGIN_EXAMPLE
> ,[ examples ]
> | DEADLINE: <2016-01-31 Sun +1w>
> `
> #+END_EXAMPLE
>
>
> *** NEXT test with :
>
> : ,[ examples ]
> : | DEADLINE: <2016-01-31 Sun +1w>
> : `

I can reproduce your statement.  Even the subtree containing just a
repeater without string DEADLINE or SCHEDULED does not get completed.

--8<---cut here---start->8---

* TODO Thing

#+BEGIN_QUOTE
<2016-01-01 Sun +1w>
#+END_QUOTE

--8<---cut here---end--->8---

I agree with you that this behavior is unfortunate.

AFAICS there is nothing yet in the documentation about this case.  This
means we can define a behavior.  What about the requirement:

Do neither touch nor take into account any date contained in any block
of an item for progressing the item.

I think this requirement could be discussed, corrected, refined and
finally be implemented.

Meanwhile you need to take care of such items and rewrite the todo
keyword manually.  Org files are still text files. ;)

BTW the documentation of `org-todo' has: "With a numeric prefix arg of
-1, cancel repeater to allow marking as DONE."

> So I guess the new scope is too generous.

I bet that this issue has been there all the time.


Best regards,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




Re: [O] Scope issue: "SCHEDULED/DEADLINE" in blocks are being evaluated

2016-01-17 Thread Rasmus
Karl Voit  writes:

> Unfortunately, this fix (or any other commit?) prevents my
> non-recurring tasks to be completed when I got "DEADLINE" or
> "SCHEDULED" in the body text within blocks or comments.

Isn't this the this feature?  The Org syntax¹ specifies:

 A planning is an element with the following pattern:

 HEADLINE
 PLANNING

 where HEADLINE is a headline element and PLANNING is a line filled with
 INFO parts, where each of them follows the pattern:

 KEYWORD: TIMESTAMP

 KEYWORD is either “DEADLINE”, “SCHEDULED” or “CLOSED”. TIMESTAMP is a
 timestamp object.

 In particular, no blank line is allowed between PLANNING and HEADLINE.

Rasmus


Footnotes: 
¹   http://orgmode.org/worg/dev/org-syntax.html#Clock,_Diary_Sexp_and_Planning

-- 
Look, it is what it is because of what it was




Re: [O] Losing trust in Org: stable org-mode releases and unit tests for basic functionality

2016-01-17 Thread Marco Wahl
Karl Voit  writes:

> So: what should I do to get reliable Org-mode in future to minimize
> the chances of losing tasks or my trust in Org?

I think Achim says the right things.

Further I think you can improve Org's reliability (and your perception
on it) by investing more energy into Org.  Obviously you already do
invest energy into Org as your contributions on this list show.  You
cold go ahead and start reading Org's code, writing tests, etc.  Each
action would give you more confidence with Org.


My 2 ct,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




Re: [O] Scope issue: "SCHEDULED/DEADLINE" in blocks are being evaluated

2016-01-17 Thread Marco Wahl
Rasmus  writes:

> Karl Voit  writes:
>
>> Unfortunately, this fix (or any other commit?) prevents my
>> non-recurring tasks to be completed when I got "DEADLINE" or
>> "SCHEDULED" in the body text within blocks or comments.
>
> Isn't this the this feature?  The Org syntax¹ specifies:
> Footnotes: 
> ¹   
> http://orgmode.org/worg/dev/org-syntax.html#Clock,_Diary_Sexp_and_Planning

IIUC the issue here is solely for dates contained within a block.

The behavior of Org for those dates (in particular when a repeater like
'+1w' is involved) on progressing the todo is unspecified AFAICS.


Best regards,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




Re: [O] backend for todo.txt format (todotxt.com)

2016-01-17 Thread Stefan Huchler
Hi,

first thanks it at least does something now.

Rasmus  writes:

> It doesn't need a solution, but I think you need one of the "forked"
> version since some tag is missing.  Maybe this one
>
> https://github.com/blaa/org-caldav

for what exactly do you think do I need such fork? for syncing tasts
without a timestamp or do you think the normal org-caldav is broken in
general, cause it works for me now except it does not sync tasks without
deadline/shedule times.


>
> IOW, ideally some more effort should be put into properly supporting
>pure
> task syncing...
>
>
> I think you don’t need a date, but don’t expect task syncing to work
> effortlessly without some effort, though I had it working somewhat before
> I reset my phone by accident.

I cant even test that at the moment because it does not sync the tasks
without timestamps.


> I use this, which might be old syntax?  I have OwnCloud v8.1.3.

I think this is a more direct approach, my version seems to be a
alternative if you open the source files in first 20 lines or so there
is a comment that says so, but your solution works, I think the second
part makes it running, with include-todo and use-deadline.

But I have to test it more, I think I stumbled over a bug, because after
my settings it should not have ascced me about google incredients, when
I tried to org-caldav-delete-org-entries.

With your settings it just deletes my 3 deadline/sheduled things and
never ask me google incredients, so it seems to me a bug.

> (with-eval-after-load 'org-caldav
>   (setq org-caldav-url 
> "https://ras...@domain.net/owncloud/remote.php/caldav/calendars/rasmus";
> org-caldav-calendar-id "defaultcalendar"
> org-caldav-inbox "~/documents/cal/inbox.org"
> org-caldav-files '("~/documents/cal/calendar.org"
>"~/documents/cal/todo.org")
> org-icalendar-timezone "Europe/Berlin"))
>
> ;; Include DEADLINE and SCHEDULED:
> (with-eval-after-load 'org-caldav
>   (setq org-icalendar-include-todo t
> org-icalendar-use-deadline
> '(event-if-todo event-if-not-todo todo-due)
> org-icalendar-use-scheduled
> '(event-if-todo event-if-not-todo todo-start)
> org-icalendar-with-timestamps t))

I think it makes sense that a kalendar can only sync appointments with
dates right? or do you think it can deal with todo items without any
dates? And if so, what part would you think I have to change.

Even if that would not be possible its nice to have this option now, to
shedule some appointments I guess, but it would not work as todolist
then.

thanks again so far!




Re: [O] Seeing Actual Emphasis in Orgmode Buffer

2016-01-17 Thread Kenneth Jacker
> What do you get?

character: o (111, #o157, #x6f)
  preferred charset: ascii (ASCII (ISO646 IRV))
   code point: 0x6F
   syntax: w which means: word
 category: .:Base, a:ASCII, l:Latin, r:Roman
  buffer code: #x6F
file code: #x6F (encoded by coding system utf-8-unix)
  display: by this font (glyph code)
x:-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1 (#x6F)

Character code properties: customize what to show
  name: LATIN SMALL LETTER O
  general-category: Ll (Letter, Lowercase)

There are text properties here:
  face (bold)
  font-lock-multiline  t
  fontifiedt
  line-prefix  [Show]
  org-emphasis t
  wrap-prefix  [Show]


​Thanks!

-Kenneth
​


[O] org-player and switch to lexical binding in org.el

2016-01-17 Thread Michael Brand
Hi all

release_8.3.3-426-g1f49e9f introduces a regression. The link

[[file:/dir/audio.mp3::0:12:34]]

results in

Debugger entered--Lisp error: (void-variable search)
  (org-player-play-file file search)
  [...]
  org-open-file("/dir/audio.mp3" nil nil "0:12:34")
  [...]

I hope it is reproducible after (require 'org-player), org-player.el
attached.

Michael


org-player.el
Description: Binary data


Re: [O] Exporting Source Blocks with Symbols

2016-01-17 Thread Michael Gauland
Just following up with my solution, in case anyone else is interested
(thanks to John Kitchin for pointing me in the right direction). First, I
should note that 'µ' exported correctly because I was using the unicode
element 'MICRO SYMBOL' instead of 'GREEK SMALL LETTER MU' (which looks the
same, but doesn't export).

The 'listings' package can only handle 8-bit characters, but you can tell it
to escape to LaTeX. The code block below adds a hook to escape the
characters I'm interested in, and adds the listing option to identify the
escape character (a symbol I've never used for anything else).

This code could certainly be improved, but it serves my needs, and may be
useful as a starting point for anyone trying to do something similar.
--Michael Gauland

#+BEGIN_SRC emacs-lisp :session :results value silent :exports none
;; Set up a filter to preserve greek symbols in code blocks
(setq org-export-filter-src-block-functions
  (list
(lambda (text backend info)
   (replace-regexp-in-string "\\([σβ]\\)" "§$\\1$§" text
   
(setq org-latex-listings-options '(("escapechar" "§")))
#+END_SRC



[O] table-of-contents with body-only for html export

2016-01-17 Thread Larrabee Strow
I'd like to get toc:t to produce an html table-of-contents with body-only
true?

Is that possible?  From what I can tell if body-only in the export, you
will never get a toc.

Thanks.

--
L. Larrabee Strow
UMBC Physics Department
Email: st...@umbc.edu
Phone: 724-288-6933


Re: [O] org-player and switch to lexical binding in org.el

2016-01-17 Thread Nicolas Goaziou
Hello,

Michael Brand  writes:

> release_8.3.3-426-g1f49e9f introduces a regression. The link
>
> [[file:/dir/audio.mp3::0:12:34]]
>
> results in
>
> Debugger entered--Lisp error: (void-variable search)
>   (org-player-play-file file search)
>   [...]
>   org-open-file("/dir/audio.mp3" nil nil "0:12:34")
>   [...]

`search' never was advertised as a dynamically scoped variable in
`org-file-apps' docstring, so "org-player" is just playing with fire
here.

I don't like the current solution either (eval with a LEXICAL argument).

I think it would be better to use un function with two arguments (file
and link-string instead). This is not backward compatible, but the
change is trivial: sexp -> (lambda (file link) sexp).

In the current case, you need to use match string:

  (add-to-list 'org-file-apps
   (cons (concat org-player-file-extensions-regexp
 "::\\([0-9]+:[0-9]+\\(:[0-9]+\\)?\\)")
 (lambda (file link)
   (org-player-play-file file (match-string 1 link)

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] table-of-contents with body-only for html export

2016-01-17 Thread Nicolas Goaziou
Hello,

Larrabee Strow  writes:

> I'd like to get toc:t to produce an html table-of-contents with body-only
> true?
>
> Is that possible?  From what I can tell if body-only in the export, you
> will never get a toc.

See #+TOC in the manual.


Regards,

-- 
Nicolas Goaziou



Re: [O] table-of-contents with body-only for html export

2016-01-17 Thread L . Larrabee Strow
Oh my, so easy, thank you.

Just FYI, what makes this work so nicely for me is that I can place the
TOC *after* and #+BEGIN_EXPORT HTML block which contains Hugo web site
generator YAML instructions, which must be at the top of the file.

So, I am now happily producing a HUGO website with org-mode HTML.
Although others try for fancier ways to do this, my simple simple
approach only requires 3 exporter commands to get it to publish (C-b h
h) and I am done.  (Hugo will process html files with YAML at the top.)

It is so nice to be able to use org-mode html output instead of
markdown, esp. tables!

Thanks again.

Larrabee

Nicolas Goaziou writes:

> Hello,
>
> Larrabee Strow  writes:
>
>> I'd like to get toc:t to produce an html table-of-contents with body-only
>> true?
>>
>> Is that possible?  From what I can tell if body-only in the export, you
>> will never get a toc.
>
> See #+TOC in the manual.
>
>
> Regards,


-- 
L. Larrabee Strow
UMBC Physics Department
Email: st...@umbc.edu
Cell: 724-288-6933



Re: [O] lexical binding breaks org-font-lock-set-keywords-hook

2016-01-17 Thread Nicolas Goaziou
Hello,

mc  writes:

> may I ask, how one would possibly access  and set the formerly dynamically 
> bound variable 
>
> `org-font-lock-extra-keywords'
>
> as this is still recommended by the doc-string of 
> org-font-lock-set-keywords-hook
>
> now that org.el was switched to lexical binding by commit 1f49e9fd
> 01/10/2016 01:29 AM ?

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-player and switch to lexical binding in org.el

2016-01-17 Thread Michael Brand
Hi Paul

It seems that this is beyond of my knowledge and I would like to ask
you as the author of org-player for help.

On Sun, Jan 17, 2016 at 9:40 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Michael Brand  writes:
>
>> release_8.3.3-426-g1f49e9f introduces a regression. The link
>>
>> [[file:/dir/audio.mp3::0:12:34]]
>>
>> results in
>>
>> Debugger entered--Lisp error: (void-variable search)
>>   (org-player-play-file file search)
>>   [...]
>>   org-open-file("/dir/audio.mp3" nil nil "0:12:34")
>>   [...]
>
> `search' never was advertised as a dynamically scoped variable in
> `org-file-apps' docstring, so "org-player" is just playing with fire
> here.
>
> I don't like the current solution either (eval with a LEXICAL argument).
>
> I think it would be better to use un function with two arguments (file
> and link-string instead). This is not backward compatible, but the
> change is trivial: sexp -> (lambda (file link) sexp).
>
> In the current case, you need to use match string:
>
>   (add-to-list 'org-file-apps
>(cons (concat org-player-file-extensions-regexp
>  "::\\([0-9]+:[0-9]+\\(:[0-9]+\\)?\\)")
>  (lambda (file link)
>(org-player-play-file file (match-string 1 link)
>
> WDYT?
>
>
> Regards,
>
> --
> Nicolas Goaziou

Michael



Re: [O] org-player and switch to lexical binding in org.el

2016-01-17 Thread Michael Brand
Hi Paul

It seems that this is beyond of my knowledge and I would like to ask
you as the author of org-player for help.


On Sun, Jan 17, 2016 at 9:40 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Michael Brand  writes:
>
>> release_8.3.3-426-g1f49e9f introduces a regression. The link
>>
>> [[file:/dir/audio.mp3::0:12:34]]
>>
>> results in
>>
>> Debugger entered--Lisp error: (void-variable search)
>>   (org-player-play-file file search)
>>   [...]
>>   org-open-file("/dir/audio.mp3" nil nil "0:12:34")
>>   [...]
>
> `search' never was advertised as a dynamically scoped variable in
> `org-file-apps' docstring, so "org-player" is just playing with fire
> here.
>
> I don't like the current solution either (eval with a LEXICAL argument).
>
> I think it would be better to use un function with two arguments (file
> and link-string instead). This is not backward compatible, but the
> change is trivial: sexp -> (lambda (file link) sexp).
>
> In the current case, you need to use match string:
>
>   (add-to-list 'org-file-apps
>(cons (concat org-player-file-extensions-regexp
>  "::\\([0-9]+:[0-9]+\\(:[0-9]+\\)?\\)")
>  (lambda (file link)
>(org-player-play-file file (match-string 1 link)
>
> WDYT?
>
>
> Regards,
>
> --
> Nicolas Goaziou

Michael



Re: [O] Scope issue: "SCHEDULED/DEADLINE" in blocks are being evaluated

2016-01-17 Thread Nicolas Goaziou
Hello,

Karl Voit  writes:

> Unfortunately, this fix (or any other commit?) prevents my
> non-recurring tasks to be completed when I got "DEADLINE" or
> "SCHEDULED" in the body text within blocks or comments.
>
> So I guess the new scope is too generous.
>
> It's an edge-case but it should be fixed. When I do mark the following three
> example headers as done ...
>
> *** NEXT test with quote
>
> #+BEGIN_QUOTE
> ,[ examples ]
> | DEADLINE: <2016-01-31 Sun +1w>
> `
> #+END_QUOTE
>
> *** NEXT test with example
>
> #+BEGIN_EXAMPLE
> ,[ examples ]
> | DEADLINE: <2016-01-31 Sun +1w>
> `
> #+END_EXAMPLE
>
> *** NEXT test with :
>
> : ,[ examples ]
> : | DEADLINE: <2016-01-31 Sun +1w>
> : `
>
> ... I get:
>
> *** NEXT test with quote
> :PROPERTIES:
> :CREATED:  [2016-01-17 Sun 10:36]
> :LAST_REPEAT: [2016-01-17 Sun 10:36]
> :END:
> :LOGBOOK:
> - State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
> :END:
> 
> #+BEGIN_QUOTE
> ,[ examples ]
> | DEADLINE: <2016-02-07 Sun +1w>
> `
> #+END_QUOTE
> 
> *** NEXT test with example
> :PROPERTIES:
> :CREATED:  [2016-01-17 Sun 10:36]
> :LAST_REPEAT: [2016-01-17 Sun 10:36]
> :END:
> :LOGBOOK:
> - State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
> :END:
> 
> #+BEGIN_EXAMPLE
> ,[ examples ]
> | DEADLINE: <2016-02-07 Sun +1w>
> `
> #+END_EXAMPLE
> 
> *** NEXT test with :
> :PROPERTIES:
> :CREATED:  [2016-01-17 Sun 10:36]
> :LAST_REPEAT: [2016-01-17 Sun 10:36]
> :END:
> :LOGBOOK:
> - State "DONE"   from "NEXT"   [2016-01-17 Sun 10:36]
> :END:
> 
> : ,[ examples ]
> : | DEADLINE: <2016-02-07 Sun +1w>
> : `

Fixed (in master only). Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: non-breaking space before formatted text breaks the formatting [8.3.2 (8.3.2-51-g713fe8-elpa @ /home/wilx/.emacs.d/elpa/org-20151221/)]

2016-01-17 Thread Nicolas Goaziou
Hello,

Václav Haisman  writes:

> * Testing output with non-breaking space
>
> This is to show issue with using Unicode’s non-breaking space character
> before formatted text. Org-mode does not parse the formatting if the
> non-breaking space is there.

Org indeed doesn't give any special meaning to Unicode's characters. For
the time being you might want to tweak `org-emphasis-regexp-components'.

> I am using the non-breaking space character because I export some Org
> documents using Pandoc into LaTeX to make a PDF. Pandoc then uses the
> ’~’ character in the generated LaTeX document.

Out of curiosity, why do you need to go through Pandoc in order to
generate LaTeX code?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: non-breaking space before formatted text breaks the formatting [8.3.2 (8.3.2-51-g713fe8-elpa @ /home/wilx/.emacs.d/elpa/org-20151221/)]

2016-01-17 Thread Václav Haisman
On 17.1.2016 22:42, Nicolas Goaziou wrote:
> Hello,
> 
> Václav Haisman  writes:
> 
>> * Testing output with non-breaking space
>>
>> This is to show issue with using Unicode’s non-breaking space character
>> before formatted text. Org-mode does not parse the formatting if the
>> non-breaking space is there.
> 
> Org indeed doesn't give any special meaning to Unicode's characters. For
> the time being you might want to tweak `org-emphasis-regexp-components'.
> 
>> I am using the non-breaking space character because I export some Org
>> documents using Pandoc into LaTeX to make a PDF. Pandoc then uses the
>> ’~’ character in the generated LaTeX document.
> 
> Out of curiosity, why do you need to go through Pandoc in order to
> generate LaTeX code?

I use the org-journal mode and each day has a different file. So I
convert all of them together into a single LaTeX file using Pandoc which
I further molest with a Perl script to produce a PDF.

-- 
VH



signature.asc
Description: OpenPGP digital signature


Re: [O] Why does evaluating a piece of Elisp code seemingly not expand a macro?

2016-01-17 Thread Marcin Borkowski

On 2016-01-15, at 11:57, Oleh Krehel  wrote:

> Marcin Borkowski  writes:
>
>> Why?
>
> Macro-expand the defun to get:
>
> (defalias 'print-answer
> #'(lambda nil
> (message
>  "The answer is %s."
>  (forty-two
>
> `lambda' is a macro that /quotes/ its body. Therefore, the body of
> `defun' is not evaluated or expanded when it's defined.

Interesting.

1. Why is lambda sharp-quoted?  I remember reading (in Artur's blog)
that it shouldn't be.

2. I always thought that macros get expanded on compilation (or defining
the function).  If I evaluate all forms I've written about outside Org
(using C-M-x, for instance), the `forty-two' macro seems to get
expanded.

In the manual (info "(elisp)Expansion"), I could find this:

--8<---cut here---start->8---
   Note that Emacs tries to expand macros when loading an uncompiled
Lisp file.  This is not always possible, but if it is, it speeds up
subsequent execution.  *Note How Programs Do Loading::.
--8<---cut here---end--->8---

Does it mean that C-M-x is different than loading?  Or C-x C-e, for that
matter?  Is this covered by the manual?  (If not, it might need
correcting.)

> You probably wanted something like this instead:
>
> (macroexpand-all
>  '(lambda nil
>(message
> "The answer is %s."
> (forty-two
> ;; =>
> ;; (function
> ;;  (lambda nil
> ;;   (message
> ;;"The answer is %s."
> ;;42)))
> 
> Which could be wrapped in a new macro:
>
> (defmacro defun-1 (name arglist &optional docstring &rest body)
>   (unless (stringp docstring)
> (setq body
>   (if body
>   (cons docstring body)
> docstring))
> (setq docstring nil))
>   (list 'defun name arglist docstring (macroexpand-all body)))
>
> The above seems to work, at least superficially:
>
> (symbol-function
>  (defun-1 print-answer ()
>(message "The answer is %s." (forty-two
> ;; =>
> ;; (lambda nil
> ;;   (message
> ;;"The answer is %s."
> ;;42))

Interesting, I will study this (but not today - it's 23:51 here, I'll
need sleep soon!)

> By the way, it might be more appropriate to ask similar questions on
> help-gnu-em...@gnu.org.

I posted this reply there, too, though in view of what I wrote above
I still think this is Org-related.

> Oleh

Best,

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



Re: [O] isearch-forward at end of entry

2016-01-17 Thread Kyle Meyer
Michael Brand  writes:

> Hi all
>
> With today's release_8.3.2-441-ga87dea3 on Emacs 24.5 and this org
> file
>
> 
> * d
>   - e
>   - f
> * g
> 
>
> when d is folded: After "M-< C-s f RET" the entry d is folded but I
> expect it to remain unfolded like after "M-< C-s e RET". Am I doing
> something wrong?

I'm not able to reproduce this with the commit you mentioned or with the
current master (531985d).  Are you still seeing this issue?

-- 
Kyle



[O] some publish html options gone

2016-01-17 Thread Manuel Koell
When I try to use `M-x customize` and search for `org-html-doctype` or
`org-html5-fancy` I don't get any match. I still have them in my custom.el
file, generated from an older emacs version (24.3). Were they removed?

Emacs: 25.1.50.2
Org: 8.3.2


[O] convert outline to .csv

2016-01-17 Thread Andrew
Example:

* Micro topic 1
** Microbes are small
** You can't see them!
*** Isn't that something?
* Micro topic 2
** I hope I like the teacher
*** She will be great!
** Micro is cool!

I'd like to convert them into a .csv file like so:

"* Micro topic 1"," "** Microbes are small", "** You can't see them!", "*** 
Isn't that something?",
"* Micro topic 2", "** I hope I like the teacher", "*** She will be great!", 
"** Micro is cool!"

Where the first column contains only top level headings (lines beginning with 
one star), and the following columns are subheadings belonging to the top 
level heading.  So for each top level heading, there is one row containing 
the top level heading and its children.  I've been messing around with a 
solution in python with regular expressions as well as macros but haven't 
gotten very far.  Any suggestions?





Re: [O] convert outline to .csv

2016-01-17 Thread briangpowell .
* Something like this might do it:

tr "\n" "\",\"" < file > newfile

sed -e "s/\",\"* /\n\",\"*/g" newfile > blah.csv

On Mon, Jan 18, 2016 at 1:44 AM, Andrew  wrote:

> Example:
>
> * Micro topic 1
> ** Microbes are small
> ** You can't see them!
> *** Isn't that something?
> * Micro topic 2
> ** I hope I like the teacher
> *** She will be great!
> ** Micro is cool!
>
> I'd like to convert them into a .csv file like so:
>
> "* Micro topic 1"," "** Microbes are small", "** You can't see them!", "***
> Isn't that something?",
> "* Micro topic 2", "** I hope I like the teacher", "*** She will be
> great!",
> "** Micro is cool!"
>
> Where the first column contains only top level headings (lines beginning
> with
> one star), and the following columns are subheadings belonging to the top
> level heading.  So for each top level heading, there is one row containing
> the top level heading and its children.  I've been messing around with a
> solution in python with regular expressions as well as macros but haven't
> gotten very far.  Any suggestions?
>
>
>
>