Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI

2014-12-24 Thread Nicolas Goaziou


Hello,

Sebastien Vauban 
writes:

> I just ran `org-test-run-all-tests' in my active WinNT Emacs session
> (with Org-mode release_8.3beta-677-g0497e3), and was surprised by the
> high number of failures:

You probably heavily customized Org, and many tests expect default
values for defcustoms to run properly.

I fixed the most obvious one, but there is more work to do in that area.


Regards,

-- 
Nicolas Goaziou




Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI

2014-12-24 Thread Sebastien Vauban
Hello,

Nicolas Goaziou wrote:
> Sebastien Vauban writes:
>
>> I just ran `org-test-run-all-tests' in my active WinNT Emacs session
>> (with Org-mode release_8.3beta-677-g0497e3), and was surprised by the
>> high number of failures:
>
> You probably heavily customized Org

For sure ;-)

> and many tests expect default values for defcustoms to run properly.
>
> I fixed the most obvious one, but there is more work to do in that area.

IIUC, the "top 1" problem for test failures is my customization of
`org-babel-no-eval-on-ctrl-c-ctrl-c' to `t'.

For the tests to work with that (common?) customization, should we
replace, in the tests, all calls to:

--8<---cut here---start->8---
  (org-ctrl-c-ctrl-c)
--8<---cut here---end--->8---

by:

--8<---cut here---start->8---
  (let (org-babel-no-eval-on-ctrl-c-ctrl-c)
(org-ctrl-c-ctrl-c))
--8<---cut here---end--->8---

?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI

2014-12-24 Thread Sebastien Vauban
Sebastien Vauban wrote:
> Nicolas Goaziou wrote:
>> Sebastien Vauban writes:
>>
>>> I just ran `org-test-run-all-tests' in my active WinNT Emacs session
>>> (with Org-mode release_8.3beta-677-g0497e3), and was surprised by
>>> the high number of failures:
>>
>> You probably heavily customized Org
>
> For sure ;-)
>
>> and many tests expect default values for defcustoms to run properly.
>>
>> I fixed the most obvious one, but there is more work to do in that
>> area.
>
> IIUC, the "top 1" problem for test failures is my customization of
> `org-babel-no-eval-on-ctrl-c-ctrl-c' to `t'.
>
> For the tests to work with that (common?) customization, should we
> replace, in the tests, all calls to:
>
>   (org-ctrl-c-ctrl-c)
>
> by:
>
>   (let (org-babel-no-eval-on-ctrl-c-ctrl-c)
> (org-ctrl-c-ctrl-c))
>
> ?

In fact, what would make more sense is to have
a `org-ctrl-c-ctrl-v-ctrl-e' function, no?

Or even more sense: calling `org-babel-execute-maybe' instead?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] sql can't export an empty table, gives error

2014-12-24 Thread Gary Oberbrunner
On Tue, Dec 23, 2014 at 5:34 PM, Gary Oberbrunner 
wrote:

> If you try to export this document:
>
> #+BEGIN_SRC sql :exports both
>  select 1 limit 0;
> #+END_SRC
>
> It fails to export with an error in *Messages*:
>  user-error: Empty table - created default table
> It also stops processing the document at that point.
> (That SQL code produces no output but is not a SQL error.)
>
> I'd prefer if it would just leave that empty (missing) table out, and keep
> going.  Is there any way to do that?
>

Here's a simple patch to fix this, if people are interested.

-- 
Gary


0001-Allow-empty-table-creation-on-export-rather-than-giv.patch
Description: Binary data


Re: [O] How do you use `pre-scheduled' deadline skipping with repeaters?

2014-12-24 Thread Mike McLean
On Tue, Dec 23, 2014 at 6:14 PM, Trevor Murphy 
wrote:

>
> So, yeah.  Do others use this `pre-scheduled' workflow for repeating
> deadlines?  If so, is there an obvious solution to this little nuisance
> that I'm not seeing?
>
>
I do use this style of workflow. But, where I have repeating tasks that I
want to treat this way, I clone them and don't use the repeat function.


Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI

2014-12-24 Thread Nicolas Goaziou


Sebastien Vauban 
writes:

> Or even more sense: calling `org-babel-execute-maybe' instead?

I think it would be better, yes. There is no point in testing
`org-ctrl-c-ctrl-c' in "test-ob.el".


Regards,




Re: [O] [bug, patch, ox] INCLUDE and footnotes

2014-12-24 Thread Rasmus
Hi,

Nicolas Goaziou  writes:

> I think you can push once the issues above are fixed. Thank you for the
> work.

Pushed!

> However, this raises a question: why are we modifying definition at all?
> We are only interested in its new label, which we can get without
> modifying buffer (i.e. if definition is within range, modify it,
> otherwise, compute new label and store its definition).

I fixed this in the train today (going home).  I just committed it,
though, so I hope I didn't break org (the tests were running, though
before all of your re-factoring today which I just saw).

Please let me know if I did any git mistakes.  Somehow the time got skewed
up and it's behind some of your commits in cgit. . .

Cheers,
Rasmus

-- 
May the Force be with you



Re: [O] [bug, patch, ox] INCLUDE and footnotes

2014-12-24 Thread Rasmus
Hi,

Nicolas Goaziou  writes:

> You can push the patch once this is fixed.

Pushed.  See general comments in the other mail.

One funny thing I observed was that the following test fails, but only
when run via "make test", not from e.g. my "own" Emacs or emacs -q and
emacs -q -nw.

(should
   (org-test-with-temp-text
   (format "* h1\n#+INCLUDE: \"%s/examples/include.org::#ah\"" 
org-test-dir)
 (narrow-to-region (point) (point-max))
 (org-export-expand-include-keyword)
 (eq 1 (org-current-level

When running through "make test" (org-current-level) evaluate to one
(before expansion) even when narrowed (should be nil).

However, this test passes "make test":

(should
   (org-test-with-temp-text-in-file
   (format "* h1\n#+INCLUDE: \"%s/examples/include.org::#ah\"" 
org-test-dir)
 (narrow-to-region (point) (point-max))
 (org-export-expand-include-keyword)
 (eq 1 (org-current-level

If somebody knows *why* this I would appreciate an explanation.  (Can
anybody confirm the above on their system?)

Thanks,
Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers



[O] [git-101] How to push a branch and avoid merge-message? (was: [bug, patch, ox] INCLUDE and footnotes)

2014-12-24 Thread Rasmus
Hi,

Rasmus  writes:

> Please let me know if I did any git mistakes.  Somehow the time got skewed
> up and it's behind some of your commits in cgit. . .

Hmm, inspecting cgit I see that one of those persky merge messages got up
there even though it wasn't in my local git log before pushing.  Sorry!

What is my mistake:

- I wrote the patch locally in a branch called include.
- I did git pull --rebase origin master before pushing.  I then did push
  origin master from my include branch.  I did not merge it into master
  exactly to avoid this merge-message...
- I know I can get a "clean" log by doing git format-patch and then
  git am'ing them into my master.  But this is tedious.

How can I develop on branch, retain history and not get the merge message?

Thanks,
Rasmus

PS: I did some searching on the webs beforehand, but apparently not well
enough.

-- 
A clever person solves a problem. A wise person avoids it




Re: [O] [git-101] How to push a branch and avoid merge-message?

2014-12-24 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Hmm, inspecting cgit I see that one of those persky merge messages got up
> there even though it wasn't in my local git log before pushing.
> Sorry!

No worries, this is not a problem.

> What is my mistake:
>
> - I wrote the patch locally in a branch called include.
> - I did git pull --rebase origin master before pushing.  I then did push
>   origin master from my include branch.  I did not merge it into master
>   exactly to avoid this merge-message...

I usually rebase to master just before pushing (i.e., R "master" from
"include" branch).


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug, patch, ox] INCLUDE and footnotes

2014-12-24 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Pushed.  See general comments in the other mail.

Thank you.

> One funny thing I observed was that the following test fails, but only
> when run via "make test", not from e.g. my "own" Emacs or emacs -q and
> emacs -q -nw.

I don't see any failing test.

> When running through "make test" (org-current-level) evaluate to one
> (before expansion) even when narrowed (should be nil).

Why? `org-current-level' ignores narrowing.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug, patch, ox] INCLUDE and footnotes

2014-12-24 Thread Rasmus
Hi,

Nicolas Goaziou  writes:

>> When running through "make test" (org-current-level) evaluate to one
>> (before expansion) even when narrowed (should be nil).
>
> Why? `org-current-level' ignores narrowing.

Perhaps something changed recently then.  In the version I was testing
with,

(with-temp-buffer
  (org-mode)
  (insert "* h1\np1")
  (goto-char (point-max))
  (cons (org-current-level)
  (progn
(narrow-to-region (line-beginning-position)
  (line-end-position))
(or (org-current-level) "it's nil"
=> (1 . "it's nil")

But now I updated and indeed it returns (1 . 1).

—Rasmus

-- 
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!



Re: [O] [bug, patch, ox] INCLUDE and footnotes

2014-12-24 Thread Rasmus
Nicolas Goaziou  writes:

>> One funny thing I observed was that the following test fails, but only
>> when run via "make test", not from e.g. my "own" Emacs or emacs -q and
>> emacs -q -nw.
>
> I don't see any failing test.

When I use something like the attached patch, "make test" goes from
passing to failing with a fresh Org.  Why is it 1 when evaluated from a
text-file?.  Or perhaps the Magic Pixies are just angry with me. . .

—Rasmus

PS: I'll fix the test and push it.

-- 
Not everything that goes around comes back around, you know
>From e1bf99586e8e7484d34a35d24430cf5ab7b66911 Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Thu, 25 Dec 2014 02:51:15 +0100
Subject: [PATCH 3/3] make test break

---
 testing/lisp/test-ox.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 8447875..bb57118 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1027,7 +1027,7 @@ Footnotes[fn:2], foot[fn:test], digit only[3], and [fn:inline:anonymous footnote
   (buffer-string
   ;; INCLUDE assigns the relative :minlevel conditional on narrowing.
   (should
-   (org-test-with-temp-text-in-file
+   (org-test-with-temp-text
(format "* h1\n#+INCLUDE: \"%s/examples/include.org::#ah\"" org-test-dir)
  (narrow-to-region (point) (point-max))
  (org-export-expand-include-keyword)
-- 
2.2.1



Re: [O] How to make appear the "note taken" in the calendar?

2014-12-24 Thread jenia.ivlev
I don't want to use <>. Because  I typically use to set the date
when I took the note. The date [], I would like to appear in the more
granular view that the key "l", in the calendar buffer, gives you.




[O] How to display only state changes in a Logbook?

2014-12-24 Thread Yuri Niyazov
I am trying to figure out how to configure a timeline agenda view that
would show only state changes, rather than SCHEDULED or DEADLINE entries. I
customized the "Org Agenda Log Mode Items:" entry have only the "state"
checkbox on, and "closed" and "clock" are off, and that seems to imply that
only the "state" entries would show up, but, unless I am doing something
wrong, both "state" and scheduling/deadline information shows up. I am
happy to configure a custom agenda view if that's what it would take, I am
not clear on what the incantation for that would be.

Thanks!


PS This is my first time posting to the list: sorry if it doesn't follow
some conventions. I am not quite clear what they are around here - for
example, I noticed that quite a few subject lines start with [O], so did
the same, but I am unclear on what that means. I am also unclear on what
the other accepted subject line indicators are. If there's a FAQ on using
the mailing list, I missed it.


[O] Hi Rasmus. What does you branch do?

2014-12-24 Thread jenia.ivlev
Hello Rasmus.

I was to learn emacs lisp and I figured one of the ways to do it is to
read someone else's commit.
Can you please tell me what feature is your branch implementing?

Thanks in advance for your time and kind concern.
Jenia. 




Re: [O] How do you show the entires in the logbook drawer in the agenda

2014-12-24 Thread jenia.ivlev
I think it should be another version of the logging view that shows the
most recent notes. 

So if I have

* TODO Another "loggin" view in the agenda
- Note taken on [2014-12-25 Thu 01:48] \\
  Right now, this will not appear in the agenda

That node should appear in the new logging view.
Right now, only these type of entries appear:

* some node
- Note taken on CLOCK: [2014-12-25 Thu 01:48] \\
  Notice the "CLOCK".

Soe maybe, we can implement two different "logging" views.
One is the current one where "CLOCK: [date time]" appear in that logging
view, and another view where the "Note taken on [date time]" appear in
the loggin view.

What do you think?





Re: [O] How do you show the entires in the logbook drawer in the agenda

2014-12-24 Thread Eric Abrahamsen
jenia.iv...@gmail.com (jenia.ivlev) writes:

> I think it should be another version of the logging view that shows the
> most recent notes. 
>
> So if I have
>
> * TODO Another "loggin" view in the agenda
> - Note taken on [2014-12-25 Thu 01:48] \\
>   Right now, this will not appear in the agenda
>
> That node should appear in the new logging view.
> Right now, only these type of entries appear:
>
> * some node
> - Note taken on CLOCK: [2014-12-25 Thu 01:48] \\
>   Notice the "CLOCK".
>
> Soe maybe, we can implement two different "logging" views.
> One is the current one where "CLOCK: [date time]" appear in that logging
> view, and another view where the "Note taken on [date time]" appear in
> the loggin view.
>
> What do you think?

Yup, I agree. I've briefly looked through the code, and it's doable,
though it will take more work than I meant to put into this originally.
Mission creep! Plus it's Christmas -- I probably won't get to this for a
few more days...

Eric