Re: [O] Revealing when following file:NAME::LINENO

2013-11-15 Thread François Pinard
François Pinard  writes:

> Bastien  writes:

>> François Pinard  writes:

>>> Whenever one follows an Org link of the form file:NAME::LINENO, let me
>>> suggest that the found line be "org-revealed" automatically.  In my
>>> opinion, this would be convenient for most people using such forms.

>> Actually I think this is a good idea -- I pushed this change in
>> master.

> Wow, thanks!  I'll fetch a recent Org and try!  François

And Tadam! it works! :-)

François

P.S. Yet, only once removed that older Org spuriously installed in
~/.emacs.d/elpa/ by some third party.  Grrr! :-)



Re: [O] Repeaters in plain timestamps

2013-11-15 Thread François Pinard
Hi, Org people.

Merely revisiting the Org mailing list after many days.  Gosh!  That
list is fairly active! :-)

Quoting an earlier message of mine:

> The manual, section "8.3.2 Repeated tasks", says:

>Some tasks need to be repeated again and again.  Org mode helps to
>organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED,
>or plain timestamp.

> Examples and directions given in the page are related to DEADLINE, and
> a few words suggest that SCHEDULED works the same.  But the page does
> not say how one may handle repeaters with plain timestamps.  I merely
> would like to update them so they show the date for the next
> iteration, a bit like command "t d" already does on a DEADLINE
> repeater.

For what it may be worth, I kludged this code for bumping the following
repeated timestamps on the current line.  I stole most of the code, and
did not write much myself:


(defun fp-org-bump-timestamp ()
  ;; Adapted from (org.el) org-auto-repeat-maybe.
  (interactive)
  (save-excursion
(beginning-of-line)
(when (re-search-forward org-ts-regexp (line-end-position) t)
  (let ((ts (match-string 1))
(whata '(("h" . hour) ("d" . day) ("m" . month) ("y" . year)))
n time)
(when (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([hdwmy]\\)" ts)
  (setq n (string-to-number (match-string 2 ts))
what (match-string 3 ts))
  (if (equal what "w") (setq n (* n 7) what "d"))
  (if (and (equal what "h")
   (not (string-match "[0-9]\\{1,2\\}:[0-9]\\{2\\}" ts)))
  (user-error "Cannot repeat in Repeat in %d hour(s) because no 
hour has been set" n))
  ;; Preparation, see if we need to modify the start date for the change
  (when (match-end 1)
(setq time (save-match-data (org-time-string-to-time ts)))
(cond
 ((equal (match-string 1 ts) ".")
  ;; Shift starting date to today
  (org-timestamp-change
   (- (org-today) (time-to-days time))
   'day))
 ((equal (match-string 1 ts) "+")
  (let ((nshiftmax 10) (nshift 0))
(while (or (= nshift 0)
   (<= (time-to-days time)
   (time-to-days (current-time
  (when (= (incf nshift) nshiftmax)
(or (y-or-n-p (message "%d repeater intervals were not 
enough to shift date past today.  Continue? " nshift))
(error "Abort")))
  (org-timestamp-change n (cdr (assoc what whata)))
  (org-at-timestamp-p t)
  (setq ts (match-string 1))
  (setq time (save-match-data (org-time-string-to-time ts)
  (org-timestamp-change (- n) (cdr (assoc what whata)))
  ;; rematch, so that we have everything in place for the real shift
  (org-at-timestamp-p t)
  (setq ts (match-string 1))
  (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([hdwmy]\\)" ts
  (org-timestamp-change n (cdr (assoc what whata)) nil t))



Re: [O] Revealing when following file:NAME::LINENO

2013-11-15 Thread François Pinard
Bastien  writes:

> François Pinard  writes:

>> Whenever one follows an Org link of the form file:NAME::LINENO, let me
>> suggest that the found line be "org-revealed" automatically.  In my
>> opinion, this would be convenient for most people using such forms.

> Actually I think this is a good idea -- I pushed this change in
> master.

Wow, thanks!  I'll fetch a recent Org and try!  François



Re: [O] [Exporter] How to extract timestamp from headline's title?

2013-11-15 Thread Thorsten Jolitz
Nicolas Goaziou  writes:

Hello,

> Thorsten Jolitz  writes:
>
>> when writing an exporter backend, I wonder what is the canonical way to
>> extract the (optional) timestamp element from a headline's :title
>> attribute (which holds a secondary string)?
>>
>> I could do something like this to extract the timestamp from the headline
>>
>> #+begin_src emacs-lisp
>>   (let ((ttl (org-element-property :title headline)))
>> (and (> (length ttl) 1)
>>  (car (last ttl
>> #+end_src
>>
>> but I hope there is a more straight-forward and reliable way to do
>> this?
>
> You can map over a secondary string. E.g.:
>
>  (org-element-map (org-element-property :title headline) 'timestamp
>  'identity)

I knew there must be a better way to do this - thanks for the tip!

-- 
cheers,
Thorsten




Re: [O] [bug] ox-org.el subtree export appears broken

2013-11-15 Thread Nicolas Goaziou
Hello,

Eric Schulte  writes:

> Hmmm, I don't have a strong intuition here.  I'm tempted to say that
> whatever the HTML export engine does would be a good starting place,
> plus any keyword explicitly set in subtree properties.  I feel like this
> decision must have already been made in some other Org-mode function, so
> copying those decisions would be the best bet.

ox-org backend should now behave a bit more like regular export
back-ends (e.g. it can be affected with date:t option).

Just let me know if the change is sufficient.

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Lisp code blocks fail

2013-11-15 Thread Thomas S. Dye
Hi Eric,

An edebug adventure :)

AFAICT, the error is thrown by this call to a macro:
(org-babel-result-cond ("replace") (car result)), where result has been
set to "2" by the long (funcall) in (let).

Specifically, (org-babel-lisp-vector-to-list "2") appears to trigger the
(error)--at least that is the last code line edebug stops at before
getting to the (error) line. The modeline says Result: "2" just before
the error.

Does this help?

Tom

Eric Schulte  writes:

> Hi Tom,
>
> That example works for me.  Perhaps you could edebug (C-u C-M-x) the
> `org-babel-execute:lisp' function and then run that code block again to
> see at which statement the error is thrown.
>
> I'm not sure what the problem could be.
>
> Best,
>
> t...@tsdye.com (Thomas S. Dye) writes:
>
>> Hi Eric,
>>
>> #+begin_src lisp
>> (+ 1 1)
>> #+end_src
>>
>> Debugger entered--Lisp error: (wrong-type-argument listp "2")
>>   byte-code("\211A@)\207" [result x] 2)
>>   org-babel-execute:lisp("(+ 1 1)" ((:comments . "") (:shebang . "")
>> (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no")
>> (:exports . "code") (:results . "replace") (:session . "none")
>> (:hlines . "no") (:result-type . value) (:result-params "replace")
>> (:rowname-names) (:colname-names)))
>>   org-babel-execute-src-block(nil)
>>   org-babel-execute-src-block-maybe()
>>   org-babel-execute-maybe()
>>   org-babel-execute-safely-maybe()
>>   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
>>   org-ctrl-c-ctrl-c(nil)
>>   ad-Orig-call-interactively(org-ctrl-c-ctrl-c nil nil)
>>   (with-no-warnings (ad-Orig-call-interactively function record-flag keys))
>>   (setq ad-return-value (with-no-warnings
>> (ad-Orig-call-interactively function record-flag keys)))
>>   (let ((ido-ubiquitous-next-override
>> (ido-ubiquitous-get-command-override function))) (setq ad-return-value
>> (with-no-warnings (ad-Orig-call-interactively function record-flag
>> keys
>>   (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
>> function) (setq ad-return-value (with-no-warnings
>> (ad-Orig-call-interactively function record-flag keys
>>   (let (ad-return-value) (ido-ubiquitous-with-override
>> (ido-ubiquitous-get-command-override function) (setq ad-return-value
>> (with-no-warnings (ad-Orig-call-interactively function record-flag
>> keys ad-return-value)
>>   call-interactively(org-ctrl-c-ctrl-c nil nil)
>>
>> Org-mode version 8.2.3b (release_8.2.3b-200-gb6522a @
>> /Users/dk/.emacs.d/src/org-mode/lisp/)
>>
>> All the best,
>> Tom
>>
>> Eric Schulte  writes:
>>
>>> Hi Tom,
>>>
>>> Could you provide a minimal example?  I'm unable to debug from the stack
>>> trace alone.

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] org-mouse

2013-11-15 Thread Kenneth Jacker
  >> Do I need something else?

  nd> No, evaling the require should be enough.

OK.

  nd> Try clicking button-1 on an asterisk of a heading in an org file:
  nd> does it fold the item? If so, it's working :-)

Yes, that does!  Guess I was clicking in the inactive areas of the heading.


Thanks for your help!

  -Kenneth



Re: [O] org-mouse: solved

2013-11-15 Thread Kenneth Jacker
  rs> I needed to configure variable org-mouse-features

Ah, the other part that I didn't know about ... ;-)


Thanks to all for the help,

  -Kenneth



Re: [O] [Exporter] How to extract timestamp from headline's title?

2013-11-15 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz  writes:

> when writing an exporter backend, I wonder what is the canonical way to
> extract the (optional) timestamp element from a headline's :title
> attribute (which holds a secondary string)?
>
> I could do something like this to extract the timestamp from the headline
>
> #+begin_src emacs-lisp
>   (let ((ttl (org-element-property :title headline)))
> (and (> (length ttl) 1)
>  (car (last ttl
> #+end_src
>
> but I hope there is a more straight-forward and reliable way to do
> this?

You can map over a secondary string. E.g.:

 (org-element-map (org-element-property :title headline) 'timestamp
 'identity)


Regards,

-- 
Nicolas Goaziou



[O] [Exporter] How to extract timestamp from headline's title?

2013-11-15 Thread Thorsten Jolitz

Hi List, 

when writing an exporter backend, I wonder what is the canonical way to
extract the (optional) timestamp element from a headline's :title
attribute (which holds a secondary string)?

I could do something like this to extract the timestamp from the headline

#+begin_src emacs-lisp
  (let ((ttl (org-element-property :title headline)))
(and (> (length ttl) 1)
 (car (last ttl
#+end_src

but I hope there is a more straight-forward and reliable way to do this?

-- 
cheers,
Thorsten




Re: [O] How to filter on files

2013-11-15 Thread Bastien
Rene  writes:

> I'd have loved though to be able to switch from one view (home+office view)
> to another (office view) without having to reconstruct the whole
> agenda.

Maybe the `org-agenda-sticky' option can help there?

-- 
 Bastien



Re: [O] How to filter on files

2013-11-15 Thread Rene
Bastien  gnu.org> writes:

> Rene  yahoo.com> writes:
> 
> > But once in a while I'd like to dynamically narrow down my list of agenda
> > entries to either one of these files.  I tried to play with
> > org-agenda-filter-by-tag or org-agenda-filter-by-category but to no
> > avail.
> 
> Use a #+CATEGORY: property on top of each file, then use < in the
> agenda to filter by the category the cursor is on.

I do already have first level headlines each with its own CATEGORY in which
I refile my tasks.  Therefore the #+CATEGORY: property on top of the file
does not appear in the agenda view unfortunately.

> > Is there some kind of "org-agenda-filter-by-file" piece of code
> > somewhere?
> 
> No, but you can have a category per file and filter per category,
> which does the same.  Always, you can narrow down the scope of the
> agenda *before* creating the agenda, with C-c a < [yourkey] -- the
> < means to narrow down to the current buffer.

It does work.  Thanks.

I'd have loved though to be able to switch from one view (home+office view)
to another (office view) without having to reconstruct the whole agenda.

--
rene




Re: [O] adapted org-flag-drawer to hide newlines of consecutive drawers to save lines

2013-11-15 Thread Bastien
Nicolas Goaziou  writes:

> The only reliable way to know if it is cache related is to try with
> `org-element-use-cache' set to nil.

Right, I'll try this for a while if I'm hit again by the bug.

-- 
 Bastien



Re: [O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> Glenn Morris  writes:
>
>> "Sebastien Vauban" wrote:
>>
>>> But I wonder: how can you now reproduce it (and not before)?
>>
>> Because I downloaded a snapshot of Org.
>> Your problem is not with code that is in Emacs current trunk.
>
> Using Glenn's reproducer, I bisected it - another one for Nicolas's
> TODO list, proving once again that no good deed goes unpunished :-)
>
> 0cecf32a0ae559266555b96668dc305710366c96 is the first bad commit
> commit 0cecf32a0ae559266555b96668dc305710366c96
> Author: Nicolas Goaziou 
> Date:   Sun Oct 27 11:09:17 2013 +0100

Well. The only thing related to load/autoload I can think of is calling
`org-element-cache-reset' in `org-mode' and `org-set-modules'.

Could you try to replace these calls with

  (when (fboundp 'org-element-cache-reset) (org-element-cache-reset))

and test again?


Regards,

-- 
Nicolas Goaziou



Re: [O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Nick Dokos
Glenn Morris  writes:

> "Sebastien Vauban" wrote:
>
>> But I wonder: how can you now reproduce it (and not before)?
>
> Because I downloaded a snapshot of Org.
> Your problem is not with code that is in Emacs current trunk.

Using Glenn's reproducer, I bisected it - another one for Nicolas's
TODO list, proving once again that no good deed goes unpunished :-)

0cecf32a0ae559266555b96668dc305710366c96 is the first bad commit
commit 0cecf32a0ae559266555b96668dc305710366c96
Author: Nicolas Goaziou 
Date:   Sun Oct 27 11:09:17 2013 +0100

org-element: Implement caching for dynamic parser

* lisp/org-element.el (org-element-use-cache, org-element--cache,
org-element--cache-sync-idle-time,
org-element--cache-merge-changes-threshold, org-element--cache-status,
org-element--cache-opening-line, org-element--cache-closing-line): New
variables.
(org-element-cache-reset, org-element--cache-pending-changes-p,
org-element--cache-push-change, org-element--cache-cancel-changes,
org-element--cache-get-key, org-element-cache-get,
org-element-cache-put, org-element--shift-positions,
org-element--cache-before-change, org-element--cache-record-change,
org-element--cache-sync): New functions.
(org-element-at-point, org-element-context): Use cache when possible.
* lisp/org.el (org-mode, org-set-modules): Reset cache.
* lisp/org-footnote.el (org-footnote-section): Reset cache.
* testing/lisp/test-org-element.el: Update tests.

This patch gives a boost to `org-element-at-point' and, to a lesser
extent, to `org-element-context'.

:04 04 d1c8eb78998a7fd1266ff2fb2748842dba4ea3b9 
d7f65666fe694ec51132833e45061a38d1a1bb3f M  lisp
:04 04 ed2b1f509358abd49f10431abb6b933ae4c505de 
fa669197f78a08839d14a35f4906826c69233626 M  testing




Re: [O] links to attachments don't export anymore

2013-11-15 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> Hello,
>
> Thomas Holst  writes:
>
>> · Myles English  wrote:
>>
>> [ ... snip ... ]
>>> It was possible to insert a link to an attachment like this:
>>>
>>> [[att:FigureA.jpg]]
>>>
>>> and clicking on it would show the file (still works), and it would show
>>> up in the exported document (no longer happens).
>> [ ... snip ... ]
>>
>> since I like this feature I'd like to give this thread a bump. With git
>> bisecting I found that commit:
>>
>> 026b99ecb86e08f4fdc7b45ee2bfa1d4c84a37f6 is the first bad commit
>> commit 026b99ecb86e08f4fdc7b45ee2bfa1d4c84a37f6
>> Author: Nicolas Goaziou 
>> Date:   Fri Aug 30 13:29:51 2013 +0200
>
> Since I have been proven guilty, let me add it to my TODO list.

Actually, this could solved by widening the buffer before expanding the
link in `org-element-link-parser'.

Though, I'm surprised that neither `org-id-get', `org-entry-get' nor, at
the most basic level, `org-entry-properties' remove narrowing before
computing their return value.

Is there any reason for this? AFAICT, it would be better to wrap them
with a `org-with-wide-buffer' macro.

Cc'ing Carsten before patching blindly.


Regards,

-- 
Nicolas Goaziou



Re: [O] Implementing Reproducible Research

2013-11-15 Thread Thomas S. Dye
Aloha Christophe,

Thanks for spotting this. I don't know if anyone has written a chapter
presenting org. I haven't seen anything on the ML.

All the best,
Tom

Christophe Pouzat  writes:

> Hi all,
>
> I've just seen that a book, Implementing Reproducible
> Research,
> edited by V. Stodden, F. Leisch and R. Peng is coming out next year from
> CRC. I was wondering if anyone has written a chapter  presenting org for
> it. Any clue?
>
> Christophe
>
> -- 
> A Master Carpenter has many tools and is expert with most of them. If you
> only know how to use a hammer, every problem starts to look like a nail.
> Stay away from that trap.
>
> Richard B Johnson.
>
> --
>
> Christophe Pouzat
> MAP5 - Mathématiques Appliquées à Paris 5
> CNRS UMR 8145
> 45, rue des Saints-Pères
> 75006 PARIS
> France
>
> tel: +33142863828
> mobile: +33662941034
> web: http://xtof.disque.math.cnrs.fr
> Hi all,
>
> I've just seen that a book, Implementing Reproducible Research, edited
> by V. Stodden, F. Leisch and R. Peng is coming out next year from CRC.
> I was wondering if anyone has written a chapter presenting org for it.
> Any clue?
>
> Christophe

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



Re: [O] adapted org-flag-drawer to hide newlines of consecutive drawers to save lines

2013-11-15 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> If M-x org-element-cache-reset RET always solve such problems, then my
> problems was not related to the cache, as org-element-cache-reset did
> not solve it.

The only reliable way to know if it is cache related is to try with
`org-element-use-cache' set to nil.


Regards,

-- 
Nicolas Goaziou



[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Glenn Morris
"Sebastien Vauban" wrote:

> But I wonder: how can you now reproduce it (and not before)?

Because I downloaded a snapshot of Org.
Your problem is not with code that is in Emacs current trunk.





Re: [O] links to attachments don't export anymore

2013-11-15 Thread Nicolas Goaziou
Hello,

Thomas Holst  writes:

> · Myles English  wrote:
>
> [ ... snip ... ]
>> It was possible to insert a link to an attachment like this:
>>
>> [[att:FigureA.jpg]]
>>
>> and clicking on it would show the file (still works), and it would show
>> up in the exported document (no longer happens).
> [ ... snip ... ]
>
> since I like this feature I'd like to give this thread a bump. With git
> bisecting I found that commit:
>
> 026b99ecb86e08f4fdc7b45ee2bfa1d4c84a37f6 is the first bad commit
> commit 026b99ecb86e08f4fdc7b45ee2bfa1d4c84a37f6
> Author: Nicolas Goaziou 
> Date:   Fri Aug 30 13:29:51 2013 +0200

Since I have been proven guilty, let me add it to my TODO list.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to filter on files

2013-11-15 Thread Bastien
Hi Rene,

Rene  writes:

> But once in a while I'd like to dynamically narrow down my list of agenda
> entries to either one of these files.  I tried to play with
> org-agenda-filter-by-tag or org-agenda-filter-by-category but to no
> avail.

Use a #+CATEGORY: property on top of each file, then use < in the
agenda to filter by the category the cursor is on.
 
> Is there some kind of "org-agenda-filter-by-file" piece of code
> somewhere?

No, but you can have a category per file and filter per category,
which does the same.  Always, you can narrow down the scope of the
agenda *before* creating the agenda, with C-c a < [yourkey] -- the
< means to narrow down to the current buffer.

Hope this helps,

-- 
 Bastien



[O] How to filter on files

2013-11-15 Thread Rene
Bastien  gnu.org> writes:

> Maybe show us your config and tell us what do you expect and what
> do you get instead, that will surely be faster.

You're right.

I basically have 2 org files (home.org and office.org) where my tasks and
appointments are stored.

Most of the time I like to have all those tasks and appointments displayed
in my agenda view (both office and home items).

But once in a while I'd like to dynamically narrow down my list of agenda
entries to either one of these files.  I tried to play with
org-agenda-filter-by-tag or org-agenda-filter-by-category but to no avail.

Is there some kind of "org-agenda-filter-by-file" piece of code somewhere?

--
rene




[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Eli Zaretskii
> From: "Sebastien Vauban" 
> Cc: Sebastien Vauban ,  michael_heerde...@web.de,  
> 15...@debbugs.gnu.org
> Date: Fri, 15 Nov 2013 14:01:10 +0100
> 
> What's weird is that I only saw once "org", but still have the code block
> executed twice in Emacs.

That probably means that some Lisp does the equivalent of
eval-after-load somewhere.





[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Sebastien Vauban
Stefan Monnier wrote:
> BTW, it's probably easier to debug this in Elisp.
> You can start with
>
> (add-hook 'after-load-functions
>   (lambda (file) (message "Loaded %S" file)))
>
> Or change your recipe to replace (sit-for 3) with (debug).

Right. The above can prove very useful. Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban





[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Stefan Monnier
BTW, it's probably easier to debug this in Elisp.
You can start with

(add-hook 'after-load-functions
  (lambda (file) (message "Loaded %S" file)))

Or change your recipe to replace (sit-for 3) with (debug).


Stefan





Re: [O] [ANN] Improved Flyspell check

2013-11-15 Thread Sebastien Vauban


Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> You mean it isn't applied yet? Because I already reloaded Emacs a ton of
>> times today -- for different tests.
>
> No it isn't applied yet. Meanwhile, you can test it by applying the second
> patch in this thread.

Applied. Looks good so far. Thanks!

The only thing it does not ignore is the "state change" lines, such as:

   :LOGBOOK:
   CLOCK: [2013-02-05 Tue 09:00]--[2013-02-05 Tue 10:11] =>  1:11
   - State "TODO"->  "STRT"   [2013-02-05 Tue 17:48]   
   - State "TODO"->  "STRT"   [2013-08-19 Mon 15:16]   
   :END:

which I've customized.

Shouldn't they be purely ignored?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mouse: solved

2013-11-15 Thread Rainer Stengele
I needed to configure variable org-mouse-features

Works! Thanks, Rainer.

Am 15.11.2013 14:08, schrieb Rainer Stengele:
> Hi, I also do see no functionality of any mouse button press after 
> successfully requiring org-mouse.
> How can I track that problem?
> 
> Rainer
> 
> Am 14.11.2013 17:43, schrieb Nick Dokos:
>> Kenneth Jacker  writes:
>>
>>> [ Xubuntu 12.04.3;  Xfce 4.8;  Wfwm 4.8.3; org-mode 8.2.1 ]
>>>
>>> As stated in the ELisp source file, I put this in my .emacs:
>>>
>>> (require 'org-mouse)
>>>
>>> I then "evaled" the above, and even restarted Emacs, but I can't seem to
>>> get any additional "mouse behavior" in Org.
>>>
>>> Do I need something else?
>>>
>>
>> No, evaling the require should be enough.
>>
>> Try clicking button-1 on an asterisk of a heading in an org file: does
>> it fold the item? If so, it's working :-)
>>
>> org-mouse.el contains the following notes - that should give you an idea
>> of what it does:
>>
>> ;; Org-mouse implements the following features:
>> ;; * following links with the left mouse button (in Emacs 22)
>> ;; * subtree expansion/collapse (org-cycle) with the left mouse button
>> ;; * several context menus on the right mouse button:
>> ;;+ general text
>> ;;+ headlines
>> ;;+ timestamps
>> ;;+ priorities
>> ;;+ links
>> ;;+ tags
>> ;; * promoting/demoting/moving subtrees with mouse-3
>> ;;+ if the drag starts and ends in the same line then promote/demote
>> ;;+ otherwise move the subtree
>> ;;
>>
>> It all seems to work fine for me.
>>
>> Nick
>>
>>
>>
>>
> 
> 
> 




Re: [O] org-mouse

2013-11-15 Thread Rainer Stengele
Hi, I also do see no functionality of any mouse button press after successfully 
requiring org-mouse.
How can I track that problem?

Rainer

Am 14.11.2013 17:43, schrieb Nick Dokos:
> Kenneth Jacker  writes:
> 
>> [ Xubuntu 12.04.3;  Xfce 4.8;  Wfwm 4.8.3; org-mode 8.2.1 ]
>>
>> As stated in the ELisp source file, I put this in my .emacs:
>>
>> (require 'org-mouse)
>>
>> I then "evaled" the above, and even restarted Emacs, but I can't seem to
>> get any additional "mouse behavior" in Org.
>>
>> Do I need something else?
>>
> 
> No, evaling the require should be enough.
> 
> Try clicking button-1 on an asterisk of a heading in an org file: does
> it fold the item? If so, it's working :-)
> 
> org-mouse.el contains the following notes - that should give you an idea
> of what it does:
> 
> ;; Org-mouse implements the following features:
> ;; * following links with the left mouse button (in Emacs 22)
> ;; * subtree expansion/collapse (org-cycle) with the left mouse button
> ;; * several context menus on the right mouse button:
> ;;+ general text
> ;;+ headlines
> ;;+ timestamps
> ;;+ priorities
> ;;+ links
> ;;+ tags
> ;; * promoting/demoting/moving subtrees with mouse-3
> ;;+ if the drag starts and ends in the same line then promote/demote
> ;;+ otherwise move the subtree
> ;;
> 
> It all seems to work fine for me.
> 
> Nick
> 
> 
> 
> 




[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Sebastien Vauban
Eli Zaretskii wrote:
>> From: "Sebastien Vauban" 
>> Cc: r...@gnu.org,  michael_heerde...@web.de,  15...@debbugs.gnu.org
>> Date: Fri, 15 Nov 2013 10:06:12 +0100
>> 
>> Eli Zaretskii wrote:
>> > Unfortunately, this:
>> >
>> >> (gdb) No symbol "backtrace_list" in current context.
>> >
>> > (whose reason I don't really understand) means that the Lisp backtrace
>> > is absent from your data.
>> 
>> Should the following explain it?  As I had no .gdbinit file (hence, no
>> definition for xstring), I had to found one that would match the 
>> requirements.
>> 
>> I took the .gdbinit from
>> http://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.90.tar.gz:
>
> You should use the one from the bzr revision used to produce the
> binary you are running.  You should be able to get that from
> http://bzr.savannah.gnu.org/lh/emacs/trunk/files.

Thanks. I've put it under ~/, and source it in the following session.

Here the new trace.

What's weird is that I only saw once "org", but still have the code block
executed twice in Emacs.

--8<---cut here---start->8---
$ gdb -p 12736
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".

/cygdrive/d/Users/fni/.gdbinit:21: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Attaching to process 12736
[New Thread 12736.0x7e8]
[New Thread 12736.0x3610]
[New Thread 12736.0x4cc]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs...done.
(gdb) break Fload
Breakpoint 1 at 0x119c210: file ../../repo/src/lread.c, line 1044.
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>p file
>xstring
>end
(gdb) source ~/.gdbinit
Warning: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/../lwlib: No such file 
or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from 
terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 2 at 0x10e1819: file ../../repo/src/emacs.c, line 349.
Temporary breakpoint 3 at 0x1104806: file ../../repo/src/sysdep.c, line 846.
(gdb) r -Q
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs -Q
[1]  + done   ./emacs -Q
[New Thread 5184.0x336c]
[New Thread 5184.0x22c0]
[New Thread 5184.0x2bc8]

Breakpoint 1, Fload (file=59406449, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048../../repo/src/lread.c: No such file or directory.
$1 = 59406449
$2 = (struct Lisp_String *) 0x38a7870
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/subdirs.el"
(gdb) c
Continuing.

Breakpoint 1, Fload (file=60206689, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$3 = 60206689
$4 = (struct Lisp_String *) 0x396ae60
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/vc/subdirs.el"
(gdb)
Continuing.

Breakpoint 1, Fload (file=60206625, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$5 = 60206625
$6 = (struct Lisp_String *) 0x396ae20
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/url/subdirs.el"
(gdb)
Continuing.

Breakpoint 1, Fload (file=60206577, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$7 = 60206577
$8 = (struct Lisp_String *) 0x396adf0
"c:/Program Files 
(x86)/emacs-trunk/share/emacs/24.3.50/lisp/textmodes/subdirs.el"
(gdb)
Continuing.

Breakpoint 1, Fload (file=60206529, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$9 = 60206529
$10 = (struct Lisp_String *) 0x396adc0
"c:/Program Files 
(x86)/emacs-trunk/share/emacs/24.3.50/lisp/progmodes/subdirs.el"
(gdb)
Continuing.

Breakpoint 1, Fload (file=60206481, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$11 = 60206481
$12 = (struct Lisp_String *) 0x396

[O] Implementing Reproducible Research

2013-11-15 Thread Christophe Pouzat
Hi all,

I've just seen that a book, Implementing Reproducible
Research,
edited by V. Stodden, F. Leisch and R. Peng is coming out next year from
CRC. I was wondering if anyone has written a chapter  presenting org for
it. Any clue?

Christophe

-- 
A Master Carpenter has many tools and is expert with most of them. If you
only know how to use a hammer, every problem starts to look like a nail.
Stay away from that trap.

Richard B Johnson.

--

Christophe Pouzat
MAP5 - Mathématiques Appliquées à Paris 5
CNRS UMR 8145
45, rue des Saints-Pères
75006 PARIS
France

tel: +33142863828
mobile: +33662941034
web: http://xtof.disque.math.cnrs.fr


[O] [BUG] C-c C-x p inserts PROPERTY drawer *inside* LOGBOOK drawer

2013-11-15 Thread Sebastien Vauban
Hello,

As you can see on http://screencast.com/t/Pwu5nf31AE, when being on the
collapsed LOGBOOK drawer, and calling `C-c C-x p' to insert a new property, the
PROPERTY drawer gets created *inside* the LOGBOOK drawer (see the consecutive
END lines):

--8<---cut here---start->8---
** WAIT Mail package to Susan
   :LOGBOOK:
   ... CLOCK lines ...
   :PROPERTIES:
   :Assignee: collea...@company.com
   :END:
   :END:
--8<---cut here---end--->8---

ECM:

--8<---cut here---start->8---
#+TITLE: Example of Tasks

* Personal
  :PROPERTIES:
  :CATEGORY: Personal
  :END:

** WAIT Mail package to Susan
   :LOGBOOK:
   - State "TODO"->  "STRT"   [2013-07-24 Wed 15:45]
   CLOCK: [2013-07-24 Wed 15:45]--[2013-07-24 Wed 17:28] =>  1:43
   CLOCK: [2013-08-12 Mon 11:56]--[2013-08-12 Mon 12:12] =>  0:16
   - State "STRT"->  "DONE"   [2013-08-12 Mon 12:12]
   - State "DONE"->  "TODO"   [2013-09-27 Fri 10:23]
   - State "TODO"->  "WAIT"   [2013-11-15 Fri 12:00]
   :END:
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [BUG] Children of archived task are visible in CONTENTS view

2013-11-15 Thread Sebastien Vauban
Hello,

If you have archived tasks with subtasks, those subtasks become avialable in
the CONTENTS view, when S-TAB'ing. They aren't visible (as expected) in the
OVERVIEW and in the SHOW ALL views.

See http://screencast.com/t/TCukmw8t6.

When TAB'ing the parent task, there, no problem: children of archived tasks are
never displayed (FOLDED, CHILDREN, SUBTREE views respect the archive tag).

ECM:

--8<---cut here---start->8---
#+TITLE: Example of Tasks

* Personal
  :PROPERTIES:
  :CATEGORY: Personal
  :END:

** TODO Make dentist appointment
   SCHEDULED: <2013-02-05 Tue>

** DONE Travel to Boston  :ARCHIVE:
   :LOGBOOK:
   - State "TODO"->  "DONE"   [2013-11-15 Fri 11:41]
   :END:

*** DONE Find a flight
:LOGBOOK:
- State "TODO"->  "DONE"   [2013-11-15 Fri 11:40]
:END:

*** DONE Reserve hotel room
:LOGBOOK:
- State "TODO"->  "DONE"   [2013-11-15 Fri 11:40]
:END:

*** DONE Schedule meetings
:LOGBOOK:
- State "TODO"->  "DONE"   [2013-11-15 Fri 11:40]
:END:

*** DONE Submit expense report
:LOGBOOK:
- State "TODO"->  "DONE"   [2013-11-15 Fri 11:40]
:END:

** TODO Check weekend hours at the gym
   SCHEDULED: <2013-02-06 Wed>
   :PROPERTIES:
   :Effort:   0:10
   :END:

** TODO Pay electricity bill
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Eli Zaretskii
> From: "Sebastien Vauban" 
> Cc: r...@gnu.org,  michael_heerde...@web.de,  15...@debbugs.gnu.org
> Date: Fri, 15 Nov 2013 10:06:12 +0100
> 
> Eli Zaretskii wrote:
> > Unfortunately, this:
> >
> >> (gdb) No symbol "backtrace_list" in current context.
> >
> > (whose reason I don't really understand) means that the Lisp backtrace
> > is absent from your data.
> 
> Should the following explain it?  As I had no .gdbinit file (hence, no
> definition for xstring), I had to found one that would match the requirements.
> 
> I took the .gdbinit from
> http://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.90.tar.gz:

You should use the one from the bzr revision used to produce the
binary you are running.  You should be able to get that from
http://bzr.savannah.gnu.org/lh/emacs/trunk/files.





[O] When moving headings, blank lines are added to the display

2013-11-15 Thread Sebastien Vauban
Hello,

As a short video is better than a long writing, see the effect on
http://screencast.com/t/1GUx4OiqY1O4.

In summary, with such a file:

--8<---cut here---start->8---
* Personal
  :PROPERTIES:
  :CATEGORY: Personal
  :END:

** TODO Make dentist appointment
   SCHEDULED: <2013-02-05 Tue>

** TODO Check weekend hours at the gym
   SCHEDULED: <2013-02-06 Wed>
   :PROPERTIES:
   :Effort:   0:10
   :END:

** Pay electricity bill

** Buy dog food

** Mail package to Susan

** Read "Getting Things Done"

** Do jogging

** Travel to Boston

*** TODO Find a flight

*** TODO Reserve hotel room

*** TODO Schedule meetings

*** TODO Submit expense report
--8<---cut here---end--->8---

When moving up/down some tasks in a collapsed view, extra blank lines are
inserted (on the display -- not physically in the file) between some headings,
though not all.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-agenda-category-filter-preset

2013-11-15 Thread Bastien
Hi Rene,

Rene  writes:

> Has anyone used org-agenda-category-filter-preset?
>
> I can't seem to make this working.
>
> Please provide me with some config example and tell me how to use it (which
> key to use, etc.).

Maybe show us your config and tell us what do you expect and what
do you get instead, that will surely be faster.

2 cents,

-- 
 Bastien



[O] org-agenda-category-filter-preset

2013-11-15 Thread Rene
Has anyone used org-agenda-category-filter-preset?

I can't seem to make this working.

Please provide me with some config example and tell me how to use it (which
key to use, etc.).




Re: [O] Bug: org-use-sub-superscripts not working [8.2.3b (8.2.3b-elpa @ c:/Users/xxx/.emacs.d/elpa/org-20131112/)]

2013-11-15 Thread Bastien
Hi,

Nick Dokos  writes:

> Maybe org-use-sub-superscripts is a remnant that should be deleted: not
> sure why it is still around. I note that it is defined and used in
> org.el, whereas org-export-with-sub-superscripts is defined and used in
> ox.el.

AFAIU both have different meaning: `org-use-sub-superscripts' is for
controlling the display, while `org-export-with-sub-superscripts' is
for controlling the export.  I clarified the docstrings a bit.

-- 
 Bastien



[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Sebastien Vauban
Eli Zaretskii wrote:
> Unfortunately, this:
>
>> (gdb) No symbol "backtrace_list" in current context.
>
> (whose reason I don't really understand) means that the Lisp backtrace
> is absent from your data.

Should the following explain it?  As I had no .gdbinit file (hence, no
definition for xstring), I had to found one that would match the requirements.

I took the .gdbinit from
http://alpha.gnu.org/gnu/emacs/pretest/emacs-24.2.90.tar.gz:

--8<---cut here---start->8---
# Copyright (C) 1992-1998, 2000-2012  Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.

# Force loading of symbols, enough to give us VALBITS etc.
set $dummy = main + 8
# With some compilers, we need this to give us struct Lisp_Symbol etc.:
set $dummy = Fmake_symbol + 8

# Find lwlib source files too.
dir ../lwlib
#dir /gd/gnu/lesstif-0.89.9/lib/Xm

# Don't enter GDB when user types C-g to quit.
# This has one unfortunate effect: you can't type C-c
# at the GDB to stop Emacs, when using X.
# However, C-z works just as well in that case.
handle 2 noprint pass

# Make it work like SIGINT normally does.
handle SIGTSTP nopass

# Pass on user signals
handle SIGUSR1 noprint pass
handle SIGUSR2 noprint pass

# Don't pass SIGALRM to Emacs.  This makes problems when
# debugging.
handle SIGALRM ignore

# Use $bugfix so that the value isn't a constant.
# Using a constant runs into GDB bugs sometimes.
define xgetptr
  if (CHECK_LISP_OBJECT_TYPE)
set $bugfix = $arg0.i
  else
set $bugfix = $arg0
  end
  set $ptr = ($bugfix & VALMASK) | DATA_SEG_BITS
end

define xgetint
  if (CHECK_LISP_OBJECT_TYPE)
set $bugfix = $arg0.i
  else
set $bugfix = $arg0
  end
  set $int = $bugfix << (USE_LSB_TAG ? 0 : INTTYPEBITS) >> INTTYPEBITS
end

define xgettype
  if (CHECK_LISP_OBJECT_TYPE)
set $bugfix = $arg0.i
  else
set $bugfix = $arg0
  end
  set $type = (enum Lisp_Type) (USE_LSB_TAG ? $bugfix & (1 << GCTYPEBITS) - 1 : 
$bugfix >> VALBITS)
end

# Set up something to print out s-expressions.
# We save and restore print_output_debug_flag to prevent the w32 port
# from calling OutputDebugString, which causes GDB to display each
# character twice (yuk!).
define pr
  pp $
end
document pr
Print the emacs s-expression which is $.
Works only when an inferior emacs is executing.
end

# Print out s-expressions
define pp
  set $tmp = $arg0
  set $output_debug = print_output_debug_flag
  set print_output_debug_flag = 0
  call safe_debug_print ($tmp)
  set print_output_debug_flag = $output_debug
end
document pp
Print the argument as an emacs s-expression
Works only when an inferior emacs is executing.
end

# Print value of lisp variable
define pv
  set $tmp = "$arg0"
  set $output_debug = print_output_debug_flag
  set print_output_debug_flag = 0
  call safe_debug_print (find_symbol_value (intern ($tmp)))
  set print_output_debug_flag = $output_debug
end
document pv
Print the value of the lisp variable given as argument.
Works only when an inferior emacs is executing.
end

# Print out current buffer point and boundaries
define ppt
  set $b = current_buffer
  set $t = $b->text
  printf "BUF PT: %d", $b->pt
  if ($b->pt != $b->pt_byte)
printf "[%d]", $b->pt_byte
  end
  printf " of 1..%d", $t->z
  if ($t->z != $t->z_byte)
printf "[%d]", $t->z_byte
  end
  if ($b->begv != 1 || $b->zv != $t->z)
printf " NARROW=%d..%d", $b->begv, $b->zv
if ($b->begv != $b->begv_byte || $b->zv != $b->zv_byte)
  printf " [%d..%d]", $b->begv_byte, $b->zv_byte
end
  end
  printf " GAP: %d", $t->gpt
  if ($t->gpt != $t->gpt_byte)
printf "[%d]", $t->gpt_byte
  end
  printf " SZ=%d\n", $t->gap_size
end
document ppt
Print current buffer's point and boundaries.
Prints values of point, beg, end, narrow, and gap for current buffer.
end

define pitmethod
  set $itmethod = $arg0
  # output $itmethod
  if ($itmethod == 0)
printf "GET_FROM_BUFFER"
  end
  if ($itmethod == 1)
printf "GET_FROM_DISPLAY_VECTOR"
  end
  if ($itmethod == 2)
printf "GET_FROM_STRING"
  end
  if ($itmethod == 3)
printf "GET_FROM_C_STRING"
  end
  if ($itmethod == 4)
printf "GET_FROM_IMAGE"
  end
  if ($itmethod == 5)
printf "GET_FROM_STRETCH"
  end
  if ($itmethod < 0 || $itmethod > 5)
output $itmethod
  end
end
documen

Re: [O] maintaining Org

2013-11-15 Thread Simon Thum
David, I had a short look and find it interesting but I would need some 
configuration. In particluar, I use "CANCELLED" not CANCELED.


http://grammarist.com/spelling/cancel/

but I guess there are also better reasons to make that configurable a 
bit. Do you inted to maintain org-effectiveness, and if yes, would you 
consider such a change?


Cheers,

Simon



On 11/14/2013 10:45 PM, David wrote:

El 10/11/13 17:29, Carsten Dominik escribió:

On 7.11.2013, at 20:38, David  wrote:


El 05/11/13 11:56, Bastien escribió:

Hi David,

Carsten Dominik   writes:


do you have FSF papers?  If so, write to Jason Dunsmore and send
him your public key.
Thanks you!

I think org-license.el and org-effectiveness.el belong to contrib/
so you don't need to sign the FSF papers for this.


I've signed the FSF papers and the FSF has accepted. I attach it in
other email

Thanks David.

- Carsten


$ git clone orgm...@orgmode.org:org-mode.git.

Now, org-effectiveness.el and org-license.el in #orgmode official
repository :-).








[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Eli Zaretskii
> From: "Sebastien Vauban" 
> Cc: r...@gnu.org,  michael_heerde...@web.de,  15...@debbugs.gnu.org
> Date: Fri, 15 Nov 2013 09:16:44 +0100
> 
> >  (gdb) break Fload
> >  (gdb) commands
> >> p file
> >> xstring
> >> end
> >  (gdb) r -Q
> >
> > Now, when the breakpoint breaks, you will see which file is being
> > loaded, and need just type "c RET" (or just "RET" after the first
> > time), and wait for "org-mode" to show in the output of the above
> > commands; then type "bt" to see who loaded it.
> 
> Here it is.

Thanks.

Unfortunately, this:

> (gdb) No symbol "backtrace_list" in current context.

(whose reason I don't really understand) means that the Lisp backtrace
is absent from your data.  Nevertheless, given this part:

> Breakpoint 3, Fload (file=60203985, noerror=57608218, nomessage=57608242, 
> nosuffix=57608218, must_suffix=57608242) at ../../repo/src/lread.c:1048
> 1048in ../../repo/src/lread.c
> $53 = 60203985
> $54 = (struct Lisp_String *) 0x396a3d0
> "org-loaddefs"
> (gdb)
> Continuing.
> [Thread 3332.0xaf4 exited with code 0]
> 
> Breakpoint 3, Fload (file=59407297, noerror=57608218, nomessage=57608242, 
> nosuffix=57608218, must_suffix=57608242) at ../../repo/src/lread.c:1048
> 1048in ../../repo/src/lread.c
> $55 = 59407297
> $56 = (struct Lisp_String *) 0x38a7bc0
> "org"

It is quite clear that org-loaddefs has something to do with the
problem.  As I understand it, Bastien just fixed that in Org trunk.

Thanks.





[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Sebastien Vauban
Bastien wrote:
> Glenn Morris  writes:
>> "Sebastien Vauban" wrote:
>>
>>> Where is the black magic?
>>
>> Somewhere in the labyrinthine depths of Org, so I suggest you ask the
>> Org maintainers to figure out why:
>>
>> emacs -Q -L /path/to/git/org-mode/lisp
>> (with-eval-after-load "org"
>>   (message "Eval this when Org is loaded")
>>   (sit-for 3)
>>   (message ""))
>> (require 'org)
>>
>> ends up loading org twice.
>
> I fixed this by removing any use of `org-autoload', which looked like
> code smell to me.
>
> This is in Org 8.2.3c, which I just released.
>
> Sébastien, can you confirmed this?

I updated, made the autoloads, and rerun my test.

Conclusion: it does not solve it.

See http://screencast.com/t/JlbEBkonN.

Best regards,
  Seb

-- 
Sebastien Vauban





Re: [O] Bug: org-use-sub-superscripts not working [8.2.3b (8.2.3b-elpa @

2013-11-15 Thread dieter
> The name of the variable is org-export-with-sub-superscripts. If you make
> this change to your code below, it DTRT I think.  If you say


thank you very much, this solved my problem!

> #+OPTIONS: ^:nil

> that's the variable that is set.

> Maybe org-use-sub-superscripts is a remnant that should be deleted: not
> sure why it is still around. I note that it is defined and used in
> org.el, whereas org-export-with-sub-superscripts is defined and used in
> ox.el.

also, it is a documentation issue, because org-use-sub-superscripts is 
referenced
in the documentation (chapter 11.7.2).

this problem aside, i really love org-mode (and emacs)!

kind regards,
dieter




[O] can't (require 'org) from .emacs with ELPA-installed org

2013-11-15 Thread Dan
If I (require 'org) in my .emacs, then open a file.org immediately
after emacs starts, then press C-c C-e (publish), I get

byte-code: Symbol's function definition is void: org-defvaralias

(no errors appear prior to attempting to publish in the message
buffer, and org-mode functionality appears to work)

I I don't require 'org at all, but let it autoload upon visiting
file.org (or if I require it from the scratch buffer), publishing
works.

This is with the latest ELPA package installed via
package-list-packages on an emacs 24.3.1 (Ubuntu Saucy)



[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-15 Thread Sebastien Vauban
Eli Zaretskii wrote:
>> From: "Sebastien Vauban" 
>> Date: Thu, 14 Nov 2013 19:57:02 +0100
>> Cc: 15...@debbugs.gnu.org
>> 
>> 0. Copy the minimal configuration in the clipboard
>> 1. Go into C:/Program Files/emacs-trunk/bin/
>> 2. Launch emacs -Q
>> 3. Paste the minimal configuration in the scratch buffer
>> 4. Eval it
>> 5. Open one random Org file (~/Public/Repositories/worg/ChangeLog.org)
>> 6. Look at the echo area
>> 7. Check in the Messages buffer -> block has been executed twice!
>> 
>> See http://screencast.com/t/pfWMZStlb23Z.
>> 
>> I do not see where extra `load' instructions could stay hidden (and out of my
>> mind) by applying this recipe.
>> 
>> Where is the black magic?
>
> Instead of wondering, run all this under GDB, after putting a
> breakpoint at Fload, and see whodunit.
>
> Since 'load' is potentially called many times during startup, I
> suggest the following setup:
>
>  (gdb) break Fload
>  (gdb) commands
>> p file
>> xstring
>> end
>  (gdb) r -Q
>
> Now, when the breakpoint breaks, you will see which file is being
> loaded, and need just type "c RET" (or just "RET" after the first
> time), and wait for "org-mode" to show in the output of the above
> commands; then type "bt" to see who loaded it.

Here it is.

$ gdb -p 12788
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".

Attaching to process 12788
[New Thread 12788.0x396c]
[New Thread 12788.0x2a78]
[New Thread 12788.0x25ec]
Reading symbols from /cygdrive/c/Program Files 
(x86)/emacs-trunk/bin/emacs...done.
Warning: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/../lwlib: No such file 
or directory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from 
terminal]
Environment variable "DISPLAY" not defined.
TERM = xterm-256color
Breakpoint 1 at 0x10e1819: file ../../repo/src/emacs.c, line 349.
Temporary breakpoint 2 at 0x1104806: file ../../repo/src/sysdep.c, line 846.
(gdb) break Fload
Breakpoint 3 at 0x119c210: file ../../repo/src/lread.c, line 1044.
(gdb) commands
Type commands for breakpoint(s) 3, one per line.
End with a line saying just "end".
>p file
>xstring
>end
(gdb) r -Q
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs -Q
[New Thread 3332.0x1bfc]
[New Thread 3332.0xaf4]
[New Thread 3332.0xca4]

Breakpoint 3, Fload (file=59406449, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048../../repo/src/lread.c: No such file or directory.
$1 = 59406449
$2 = (struct Lisp_String *) 0x38a7870
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/subdirs.el"
(gdb) c
Continuing.

Breakpoint 3, Fload (file=60206689, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$3 = 60206689
$4 = (struct Lisp_String *) 0x396ae60
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/vc/subdirs.el"
(gdb)
Continuing.

Breakpoint 3, Fload (file=60206625, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$5 = 60206625
$6 = (struct Lisp_String *) 0x396ae20
"c:/Program Files (x86)/emacs-trunk/share/emacs/24.3.50/lisp/url/subdirs.el"
(gdb)
Continuing.

Breakpoint 3, Fload (file=60206577, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$7 = 60206577
$8 = (struct Lisp_String *) 0x396adf0
"c:/Program Files 
(x86)/emacs-trunk/share/emacs/24.3.50/lisp/textmodes/subdirs.el"
(gdb)
Continuing.

Breakpoint 3, Fload (file=60206529, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$9 = 60206529
$10 = (struct Lisp_String *) 0x396adc0
"c:/Program Files 
(x86)/emacs-trunk/share/emacs/24.3.50/lisp/progmodes/subdirs.el"
(gdb)
Continuing.

Breakpoint 3, Fload (file=60206481, noerror=57608242, nomessage=57608242, 
nosuffix=57608242, must_suffix=57608218) at ../../repo/src/lread.c:1048
1048in ../../repo/src/lread.c
$11 = 60206481
$12 = (struct Lisp_String *) 0x396ad

Re: [O] org-insert-heading

2013-11-15 Thread Bastien
Hi Carsten,

Carsten Dominik  writes:

> I think it is dangerous to change the behavior in such a way that
> it will depend on the heading being folded or not.  Definitely org-in-item-p
> should not depend on that.  I am still debating with myself if 
> org-insert-heading
> should.  Maybe only in interactive use or something like that.
> Dangerous territory.

My rather simple take on this is that org-insert-heading should ignore
the context (like a list) when it's invisible, at least interactively.

2 cents of course,

-- 
 Bastien