[O] org-plus-contrib error org-mime.el

2017-03-02 Thread Tim Cross
Just ran into a problem due to the most recent org-plus-contrib
(org-plus-contrib-20170210) including org-mime.el.

This file is no longer in the contrib directory of the repo and according
to the commit log

commit eb87e9b8fed78f02e3d546874cab9e471846a48e
Author: Bastien 
Date:   Sun Jan 29 18:47:37 2017 +0100

Delete contrib/lisp/org-mime.el

See https://github.com/melpa/melpa/pull/4497#issuecomment-275907926

So I suspect the fact it is in the elpa package is an error.


-- 
regards,

Tim

--
Tim Cross


Re: [O] What are you doing ? -- autoclocking

2017-03-02 Thread Marcin Borkowski

On 2017-03-02, at 23:49, Samuel Wales  wrote:

> your message ended in spam folder.
>
> i have long wondered if autoclocking is possible in org.

Yes.  In fact, I have something like this half-baked, only not withing
Org-mode/clocking, but in a custom format.  Each N seconds, Emacs
records the buffer name and mode we're in, also current X window class
and name, and the current idle time.  I didn't actually finish that,
though.

Extending/rewriting it to use clocking as you suggest shouldn't be too
difficult.

Best,

--
Marcin Borkowski



[O] [PATCH] Fix issue with ob-clojure not returning output

2017-03-02 Thread Tim Cross
The attached patch is a simple fix for the problem with ob-clojure using an
incorrect cider-current-session call instead of cider-current-ns. For
background on the issue see
https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169


Not 100% convinced that the optional namespace argument should even be
included - it really doesn't seem to do anything. However, leaving it in
seemed like the minimal change needed.  Have tested it and at least I now
get data back from evaluation of clojure code blocks where previously, you
only got the message "block processed with no output".

-- 
regards,

Tim

--
Tim Cross
---
 lisp/ob-clojure.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index d407105..e542a29 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -44,6 +44,7 @@
 
 (declare-function cider-current-connection "ext:cider-client" ( type))
 (declare-function cider-current-session "ext:cider-client" ())
+(declare-function cider-current-ns "ext:cider-client" ())
 (declare-function nrepl--merge "ext:nrepl-client" (dict1 dict2))
 (declare-function nrepl-dict-get "ext:nrepl-client" (dict key))
 (declare-function nrepl-dict-put "ext:nrepl-client" (dict key value))
@@ -118,7 +119,7 @@ using the :show-process parameter."
 			org-babel-clojure-sync-nrepl-timeout))
 		   (nrepl-sync-request:eval expanded
 		(cider-current-connection)
-		(cider-current-session
+		(cider-current-ns
 	   (setq result
 		 (concat
 		  (nrepl-dict-get response
@@ -153,7 +154,7 @@ using the :show-process parameter."
 		;; Update the status of the nREPL output session.
 		(setq status (nrepl-dict-get response "status")))
 	  (cider-current-connection)
-	  (cider-current-session))
+	  (cider-current-ns))
 
 	 ;; Wait until the nREPL code finished to be processed.
 	 (while (not (member "done" status))
-- 
2.7.4



Re: [O] org gnus, link to gmane article

2017-03-02 Thread Nick Dokos
Nick Dokos  writes:

>> Who is the culprit, org-mode or gmane?
>>
>
> My money would be on the latter.
>
> IME gmane is moribund: if anybody has a different experience, I would
> love to know about it.

I should amend that a bit: I am using gmane's nntp feed to read this list, so 
that
part of it is working. What is not working for me is most of the website
(and search in particular).

-- 
Nick




Re: [O] [ANN] New Org duration library

2017-03-02 Thread David Mann
David Mann  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Detlef Steuer  writes:
>>
>>> after updating org this morning from git I get:
>>>
>>> org-duration-to-minutes: Invalid duration format: " 9:00"
>>>
>>> if I try to invoke my agenda with C-c a a
>>>
>>> What gives me headaches: I don't use, AFAIK, durations anywhere
>>> and a grep over my org files shows *no* occurence of " 9:00".
>>>
>>> This is the complete relevant part of the message buffer:
>>>
>>> org-duration-to-minutes: Invalid duration format: " 9:00"
>>> Quit
>>> Making completion list... [2 times]
>>> Quit [4 times]
>>> Saving file /home/steuer/.emacs.d/init.el...
>>> Wrote /home/steuer/.emacs.d/init.el
>>> Press key for agenda command (unrestricted):
>>> org-duration-to-minutes: Invalid duration format: " 9:00"
>>>
>>> Any idea? My agenda is inaccessible for me at the moment, what is
>>> not so nice.
>>
>> I didn't allow leading or trailing blanks in durations. Apparently,
>> Agenda needs this. So I updated the regexps.
>>
>> Please update Org and tell me if it works now.
>>
>> Regards,
>
> I am having a similar problem with my agenda since updating Org to
> 9.0.5.  Since seems to be after the fix above.  I get a message 'Invalid
> duration format: "50%".
>
> I am using org from git:
> Org mode version 9.0.5 (release_9.0.5-333-g8a1649 @
> /Users/mannd/git/org-mode/lisp/)
>
> Emacs version is:
> GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34
> Version 10.11.3 (Build 15D21)) of 2016-03-13
>
> thanks,
> David Mann

I will add that this problem does not appear in the tagged release_9.0.5
version.

DEM




Re: [O] [ANN] New Org duration library

2017-03-02 Thread David Mann
Nicolas Goaziou  writes:

> Hello,
>
> Detlef Steuer  writes:
>
>> after updating org this morning from git I get:
>>
>> org-duration-to-minutes: Invalid duration format: " 9:00"
>>
>> if I try to invoke my agenda with C-c a a
>>
>> What gives me headaches: I don't use, AFAIK, durations anywhere
>> and a grep over my org files shows *no* occurence of " 9:00".
>>
>> This is the complete relevant part of the message buffer:
>>
>> org-duration-to-minutes: Invalid duration format: " 9:00"
>> Quit
>> Making completion list... [2 times]
>> Quit [4 times]
>> Saving file /home/steuer/.emacs.d/init.el...
>> Wrote /home/steuer/.emacs.d/init.el
>> Press key for agenda command (unrestricted):
>> org-duration-to-minutes: Invalid duration format: " 9:00"
>>
>> Any idea? My agenda is inaccessible for me at the moment, what is
>> not so nice.
>
> I didn't allow leading or trailing blanks in durations. Apparently,
> Agenda needs this. So I updated the regexps.
>
> Please update Org and tell me if it works now.
>
> Regards,

I am having a similar problem with my agenda since updating Org to
9.0.5.  Since seems to be after the fix above.  I get a message 'Invalid
duration format: "50%".

I am using org from git:
Org mode version 9.0.5 (release_9.0.5-333-g8a1649 @
/Users/mannd/git/org-mode/lisp/)

Emacs version is:
GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34
Version 10.11.3 (Build 15D21)) of 2016-03-13

thanks,
David Mann





Re: [O] What are you doing ? -- autoclocking

2017-03-02 Thread Samuel Wales
your message ended in spam folder.

i have long wondered if autoclocking is possible in org.

you'd be working in emacs and not explicitly clock in or out.  no
logbook entries are automatically created.  if the current entry does
not have one, search upward for one.  if there is not one, then use a
generic one.  if you want to clock something then clock in and out
manually to create a logbook.

if emacs has no activity for N minutes, then clock out to N minutes ago.

if emacs starts activity, then clock in.

your activity shows in agenda, in an agenda clocktable, or in an
outline clocktable.

is this possible?  would it suit your needs?  i am incapable of coding
it, so this is just a brainstorm.

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

The NIH, FDA, and CDC are not there for you.  Not without activism.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] "Which function for creating the link?

2017-03-02 Thread Eric Abrahamsen
Uwe Brauer  writes:

> > Uwe Brauer  writes:
>
> > Probably you've set `gnorb-gnus-mail-search-backend' to 'mairix. Then,
> > when you call `gnorb-bbdb-mail-search', that would result in a call to
> > `mairix-search', which I'm sure is autoloaded and will bring in the
> > whole package.
>
> No it is set to nil.
> > There's not much to be done about that: you can set
> > `gnorb-gnus-mail-search-backend' to nil (or a different backend) and
> > that will solve the problem, but if you ever try to use mairix, the same
> > thing will happen again.
>
> It seems that part of the problem was caused that is still sticked with
> org-mode 8.3.X I have deleted that version and installed 9.0.5 and at
> the moment everything looks fine. I hope also the registry problem I
> reported to you privately is solved. But I will know for sure in a
> couple of days.

Ah, that's good to know. You reported a few other good points -- I will
get to them!

Eric




Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Eric S Fraga
On Thursday,  2 Mar 2017 at 15:57, Uwe Brauer wrote:
> Hi
>
> I have even put in my init file
> (setq org-store-link-functions

In my org, which is reasonably up to date, there is no such
variable.  There *is* a function by that name, however.

What version of org are you using?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


Re: [O] [PATCH] ox-confluence.el: Handle checkboxes and inactive timestamps correctly

2017-03-02 Thread Nicolas Goaziou
Hello,

Marc Ihm  writes:

> this is a corrected patch, which handles timestamps in a more canoncial
> way.

Great. Thank you.

It looks good. Could you provide a commit message?

Regards,

-- 
Nicolas Goaziou



Re: [O] Clocktable creates superfluous columns

2017-03-02 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

> So the behaviour that whatever :maxlevel is set to becomes the number of
> columns even when the rightmost columns are empty is now considered a
> feature?  I haven't tried to bisect for when that changed, but empty
> columns used to be dropped from the table.

I'm a bit surprised that was the case. When fixing the clocktable,
I also wondered what was the expected behaviour in that case, did some
quick tests and came to the conclusion empty columns were fine.

Would you mind doing the bisecting part and providing an ECM?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] M-TAB in org manual

2017-03-02 Thread Nicolas Goaziou
Hello,

Thomas Rikl  writes:

> The patch (i think the first in my life delivered to public)
> contains a superfluous comment line first inserted then removed
> other parts come from fill-paragraph.
>
> I tried also to unify the spelling of M-TAB somtimes M-, or variants.
>
> $ git format-patch -2 HEAD --stdout --minimal >M-TAB_patch
>
> made the attached file.

Applied. Thank you.

For the record, I added a commit message and put two spaces at the end
of sentences, as required by Texinfo.

I also added a kindex for C-M-i.

Regards,

-- 
Nicolas Goaziou



Re: [O] Clocktable creates superfluous columns

2017-03-02 Thread Achim Gratz
Nicolas Goaziou writes:
> Fixed. Thank you.

So the behaviour that whatever :maxlevel is set to becomes the number of
columns even when the rightmost columns are empty is now considered a
feature?  I haven't tried to bisect for when that changed, but empty
columns used to be dropped from the table.  I can see the new behaviour
useful sometimes, but the old one wasn't unreasonable either.  Is there
an option that I may have missed?


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

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




Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > On Thursday,  2 Mar 2017 at 15:57, Uwe Brauer wrote:
   >> I have even put in my init file
   >> (setq org-store-link-functions

   > Following this up, in org v8, this was a variable but in org v9 it is
   > now a function.

Yep I upgraded to 9.0.5 and this problem seems to be gone.




Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Uwe Brauer

   > Uwe Brauer  writes:

   > What version of org are you using? In 9.0.5, I don't have a variable
   > called 'org-store-link-functions', but I have a function called that.
   > Is it possible that you have a mixed install?

As I said to Eric A., yes I had a terrible mix of old org installations
in my elpa directory. I deleted them all and started with a fresh 9.0.5
version and everything seems fine, now.
Thanks

Uwe 




Re: [O] org gnus, link to gmane article

2017-03-02 Thread Nick Dokos
Uwe Brauer  writes:

> Hi
>
>
>
> I thought that sometimes the following worked. I open an article in
> gmane, say in the org mode group. I use org-store-link.
>
> I use gnus-summary-post-news and then via org-insert-link, I insert the
> stort link and send it (to myself).
>
> The link has the form 
> [[http://mid.gmane.org/87wpc83nwc.fsf%2540mat.ucm.es][Email from Uwe Brauer: 
> test]]
> So far so good but when I open that mail just send and click on the link
> I see http://article.gmane.org//
> From: NOT FOUND
> Subject: NOT FOUND
> Newsgroups: NOT FOUND
> Date: NOT FOUND
>
> NOT FOUND
>
> Who is the culprit, org-mode or gmane?
>

My money would be on the latter.

IME gmane is moribund: if anybody has a different experience, I would
love to know about it.

-- 
Nick




Re: [O] "Which function for creating the link?

2017-03-02 Thread Nick Dokos
Uwe Brauer  writes:

>> Try
>
>>emacs -q -l /path/to/minimal.el
>
> I am not sure what minimal.el is supposed to be, but
> emacs -q I might try.
>

It may be a no-op or it may be a few lines of code, depending on how
you get your org-mode. For me, building from latest master every so
often, it's basically this:

--8<---cut here---start->8---
(add-to-list 'load-path "~/src/emacs/org/org-mode/lisp")

(require 'org-loaddefs)
;; not sure why I require org separately, but I guess I needed it
;; at some point - I should try without it.
(require 'org)

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
--8<---cut here---end--->8---



>> I don't know why you are seeing it now, but I don't think anything
>> has changed in the mairix space for years.
>
> Yes but there is a change proposed by John Kitchin which makes my suspicious 
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00047.html
>

I believe this was merged indeed and it may be that org-mairix.el was not 
updated
to follow the new convention: that may be the cause of the problem, but avoiding
the load of org-mairix should resolve it in any case.

-- 
Nick




Re: [O] "Which function for creating the link?

2017-03-02 Thread Uwe Brauer

> Uwe Brauer  writes:

> Probably you've set `gnorb-gnus-mail-search-backend' to 'mairix. Then,
> when you call `gnorb-bbdb-mail-search', that would result in a call to
> `mairix-search', which I'm sure is autoloaded and will bring in the
> whole package.

No it is set to nil.
> There's not much to be done about that: you can set
> `gnorb-gnus-mail-search-backend' to nil (or a different backend) and
> that will solve the problem, but if you ever try to use mairix, the same
> thing will happen again.

It seems that part of the problem was caused that is still sticked with
org-mode 8.3.X I have deleted that version and installed 9.0.5 and at
the moment everything looks fine. I hope also the registry problem I
reported to you privately is solved. But I will know for sure in a
couple of days.

Uwe 




Re: [O] Clock setup stopped working after update

2017-03-02 Thread Nicolas Goaziou
Hello,

Markus Heller  writes:

> I just updated emacs to GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-21
> and orgmode to Org mode version 9.0.5 (9.0.5-elpa @
> c:/Users/mheller/AppData/Roaming/.emacs.d/elpa/org-20170210/).
>
> I've been using Bernt Hansen's clock setup for over a year now, without
> issues.  I realize that this is not readily reproduced, but I'm hoping that
> somebody will be able to spot what's going on based on experience.  So,
> now, after this update, punching in after starting emacs results in an
> error:
>
> org-back-to-heading: Before first headline at position 1121 in buffer
> *Messages*
>
> Debugger:
>
> Debugger entered--Lisp error: (error "Before first headline at position 71
> in buffer *GNU Emacs*")

You are trying to clock in from *GNU Emacs* buffer, which is not in Org
mode. Could you send an ECM for that?

Regards,

-- 
Nicolas Goaziou



[O] Clock setup stopped working after update

2017-03-02 Thread Markus Heller
Hello,

I just updated emacs to GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-21
and orgmode to Org mode version 9.0.5 (9.0.5-elpa @
c:/Users/mheller/AppData/Roaming/.emacs.d/elpa/org-20170210/).

I've been using Bernt Hansen's clock setup for over a year now, without
issues.  I realize that this is not readily reproduced, but I'm hoping that
somebody will be able to spot what's going on based on experience.  So,
now, after this update, punching in after starting emacs results in an
error:

org-back-to-heading: Before first headline at position 1121 in buffer
*Messages*

Debugger:

Debugger entered--Lisp error: (error "Before first headline at position 71
in buffer *GNU Emacs*")
  signal(error ("Before first headline at position 71 in buffer *GNU
Emacs*"))
  error("Before first headline at position %d in buffer %s" 71 #)
  org-back-to-heading(t)
  org-clock-mark-default-task()
  org-clock-in((16))
  (save-restriction (widen) (goto-char (or --mpom (point))) (org-clock-in
(quote (16
  (save-excursion (save-restriction (widen) (goto-char (or --mpom (point)))
(org-clock-in (quote (16)
  (save-excursion (if (markerp --mpom) (set-buffer (marker-buffer --mpom)))
(save-excursion (save-restriction (widen) (goto-char (or --mpom (point)))
(org-clock-in (quote (16))
  (let ((--mpom (org-id-find bh/organization-task-id (quote marker
(save-excursion (if (markerp --mpom) (set-buffer (marker-buffer --mpom)))
(save-excursion (save-restriction (widen) (goto-char (or --mpom (point)))
(org-clock-in (quote (16)))
  bh/clock-in-organization-task-as-default()
  (if (and (equal major-mode (quote org-mode)) (not
(org-before-first-heading-p)) (eq arg 4)) (org-clock-in (quote (16)))
(bh/clock-in-organization-task-as-default))
  (save-restriction (widen) (if (and (equal major-mode (quote org-mode))
(not (org-before-first-heading-p)) (eq arg 4)) (org-clock-in (quote (16)))
(bh/clock-in-organization-task-as-default)))
  (if (equal major-mode (quote org-agenda-mode)) (let* ((marker
(org-get-at-bol (quote org-hd-marker))) (tags (let ((--mpom marker))
(save-excursion (if (markerp --mpom) (set-buffer ...)) (save-excursion
(save-restriction ... ... ...)) (if (and (eq arg 4) tags)
(org-agenda-clock-in (quote (16))) (bh/clock-in-organization-task-as-default)))
(save-restriction (widen) (if (and (equal major-mode (quote org-mode)) (not
(org-before-first-heading-p)) (eq arg 4)) (org-clock-in (quote (16)))
(bh/clock-in-organization-task-as-default
  bh/punch-in(1)
  funcall-interactively(bh/punch-in 1)
  call-interactively(bh/punch-in nil nil)
  command-execute(bh/punch-in)

I did not change anything in my .emacs.  Is somebody able to give me a hint
as to what's going on?

Thanks
Markus


[O] jumping from Agenda/Timeline to .org source file

2017-03-02 Thread uselpa
Hello all,

I've been using org mode for several months now on my Mac without problems. 
Since most of what I do is for work I've tried using it on our company Windows 
7 machines, using the official GNU Emacs 25.1 
for Windows. Unfortunately, I've had a nagging issue both with the september 
and the november version:

When I jump from the Agenda-Timeline view to the source .org file, either with 
TAB, SPACE or by using the follow mode, Emacs will position me exactly *below* 
the source line in the org file (where the 
scheduled date is). On macOS or Linux this does not happen, the cursor is on 
the task description. I've tried to work with different line endings on Windows 
to no avail.  Also, my org file and my Emacs config 
are minimal and identical between macOS and Windows.

Is there a configuration setting I could change? Or is this a packaging issue 
with GNU Emacs?

Regards,
pu

(Please cc: me since I am not subscribed to the list)



Re: [O] "Which function for creating the link?

2017-03-02 Thread Eric S Fraga
On Thursday,  2 Mar 2017 at 13:20, Uwe Brauer wrote:

[...]

> Hm I am using gnus.

[...]

> (add-hook 'gnus-select-article-hook 'my-org-store-link-simple)

Ah, okay, now makes sense.  Unfortunately, I cannot help with
this.  Hopefully others on the list can.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


Re: [O] [PATCH] ox-confluence.el: Handle checkboxes and inactive timestamps correctly

2017-03-02 Thread Marc Ihm
Nicolas Goaziou  writes:

> Correcting myselfè
>
> Nicolas Goaziou  writes:
>
>>> +  :filters-alist '((:filter-final-output . org-confluence-fix-timestamps))
>>
>> Why do you use a final filter? It is a pretty gross tool, couldn't you
>> simply generate the correct output from the plain-list or item
>> translator?
>
> I meant timestamp translator.

Hi,

this is a corrected patch, which handles timestamps in a more canoncial
way.

Best regards
Marc

--- a/contrib/lisp/ox-confluence.el	2017-03-02 20:10:19.645053100 +0100
+++ b/contrib/lisp/ox-confluence.el	2017-03-02 20:14:57.963701300 +0100
@@ -58,6 +58,7 @@
 		 (table-cell . org-confluence-table-cell)
 		 (table-row . org-confluence-table-row)
 		 (template . org-confluence-template)
+ (timestamp . org-confluence-timestamp)
 		 (underline . org-confluence-underline)
 		 (verbatim . org-confluence-verbatim)))
 
@@ -81,17 +82,34 @@
 (defun org-confluence-italic (italic contents info)
   (format "_%s_" contents))
 
+(defun org-confluence-timestamp (timestamp contents info)
+  "Transcode a TIMESTAMP object from Org to Confluence.
+CONTENTS and INFO are ignored."
+  (let ((translated (org-timestamp-translate timestamp)))
+(if (string-prefix-p "[" translated)
+(concat "(" (substring translated 1 -1) ")")
+  translated)))
+
 (defun org-confluence-item (item contents info)
   (let* ((plain-list (org-export-get-parent item))
  (type (org-element-property :type plain-list))
- (bullet (if (eq type 'ordered) ?\# ?\-)))
-(concat (make-string (1+ (org-confluence--li-depth item)) bullet)
-" "
-(if (eq type 'descriptive)
- (concat "*"
- (org-export-data (org-element-property :tag item) info)
- "* - "))
-(org-trim contents
+	 (depth (1+ (org-confluence--li-depth item)))
+	 (checkbox-possibly (cl-case (org-element-property :checkbox item)
+			  (on "*{{(X)}}* ") 
+			  (off "*{{( )}}* ")
+			  (trans "*{{(\\-)}}* "
+(cl-case plain-list
+  (descriptive
+   (concat (make-string depth ?-) " " checkbox-possibly
+   (org-export-data (org-element-property :tag item) info) ": "
+   (org-trim contents)))
+  (ordered
+   (concat (make-string depth ?#) " " checkbox-possibly
+   (org-trim contents)))
+  (t
+   (concat (make-string depth ?-)
+   " " checkbox-possibly
+   (org-trim contents))
 
 (defun org-confluence-fixed-width (fixed-width contents info)
   (org-confluence--block
@@ -106,12 +124,18 @@
   (format "\{\{%s\}\}" (org-element-property :value code)))
 
 (defun org-confluence-headline (headline contents info)
-  (let ((low-level-rank (org-export-low-level-p headline info))
-(text (org-export-data (org-element-property :title headline)
-   info))
-(level (org-export-get-relative-level headline info)))
-;; Else: Standard headline.
-(format "h%s. %s\n%s" level text
+  (let* ((low-level-rank (org-export-low-level-p headline info))
+	 (text (org-export-data (org-element-property :title headline)
+info))
+	 (todo (org-export-data (org-element-property :todo-keyword headline)
+info))
+	 (level (org-export-get-relative-level headline info))
+	 (todo-text (if (or (not (plist-get info :with-todo-keywords))
+			(string= todo ""))
+			""
+		  (format "*{{%s}}* " todo
+
+(format "h%s. %s%s\n%s" level todo-text text
 (if (org-string-nw-p contents) contents
   ""
 
@@ -167,7 +191,7 @@
 (concat
  (when (org-export-table-row-starts-header-p table-row info)
"|")
- contents "|")))
+ " " contents " |")))
 
 (defun org-confluence-template (contents info)
   (let ((depth (plist-get info :with-toc)))


[O] org gnus, link to gmane article

2017-03-02 Thread Uwe Brauer



Hi



I thought that sometimes the following worked. I open an article in
gmane, say in the org mode group. I use org-store-link.

I use gnus-summary-post-news and then via org-insert-link, I insert the
stort link and send it (to myself).

The link has the form 
[[http://mid.gmane.org/87wpc83nwc.fsf%2540mat.ucm.es][Email from Uwe Brauer: 
test]]
So far so good but when I open that mail just send and click on the link
I see http://article.gmane.org//
From: NOT FOUND
Subject: NOT FOUND
Newsgroups: NOT FOUND
Date: NOT FOUND

NOT FOUND

Who is the culprit, org-mode or gmane?

Thanks

Uwe Brauer 



Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > On Thursday,  2 Mar 2017 at 15:57, Uwe Brauer wrote:
   >> I have even put in my init file
   >> (setq org-store-link-functions

   > Following this up, in org v8, this was a variable but in org v9 it is
   > now a function.

Right, but I am still using
org-version is a variable defined in ‘org.el’.
Its value is "8.3.6"


So that setting should work, but maybe gnorb thinks that it is a
functions and this is where the trouble comes from.


Do you recommend to upgrade?

Eric Abrahamsen, if you read this, what do you say?

Uwe Brauer 




Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Nick Dokos
Uwe Brauer  writes:

> Hi
>
> I have even put in my init file
> (setq org-store-link-functions
>   (list  'org-gnus-store-link
> 'org-rmail-store-link
> 'org-mhe-store-link
> 'org-irc-store-link
> 'org-info-store-link
> 'org-docview-store-link
> 'org-bibtex-store-link
> 'org-bbdb-store-link
> 'org-w3m-store-link))
>
> But I always obtain when using
> describe-variable org-store-link-functions
> which is annoying any help is appreciated.
>
> Uwe Brauer

What version of org are you using? In 9.0.5, I don't have a variable
called 'org-store-link-functions', but I have a function called that.
Is it possible that you have a mixed install?

>
> ,
> | 
> | org-store-link-functions is a variable defined in ‘org.el’.
> | Its value is
> | (org-mairix-store-gnus-link org-gnus-store-link org-rmail-store-link 
> org-mhe-store-link org-irc-store-link org-info-store-link 
> org-docview-store-link org-bibtex-store-link org-bbdb-store-link 
> org-w3m-store-link)
> | 
> |   This variable may be risky if used as a file-local variable.
> | 
> | Documentation:
> | List of functions that are called to create and store a link.
> | Each function will be called in turn until one returns a non-nil
> | value.  Each function should check if it is responsible for creating
> | this link (for example by looking at the major mode).
> | If not, it must exit and return nil.
> | If yes, it should return a non-nil value after a calling
> | ‘org-store-link-props’ with a list of properties and values.
> | Special properties are:
> | 
> | :type The link prefix, like "http".  This must be given.
> | :link The link, like "http://www.astro.uva.nl/~dominik;.
> |   This is obligatory as well.
> | :description  Optional default description for the second pair
> |   of brackets in an Org-mode link.  The user can still change
> |   this when inserting this link into an Org-mode buffer.
> | 
> | In addition to these, any additional properties can be specified
> | and then used in capture templates.
> `
>
>
>

-- 
Nick




Re: [O] "Which function for creating the link?

2017-03-02 Thread Eric Abrahamsen
Uwe Brauer  writes:

> > Uwe Brauer  writes:
>
> > You are probably either loading explicitly org-mairix (from contrib)
> > or requiring 'org-mairix (explicitly or implicitly).
>
> I think I found the culprit, I started emacs -q and the 
> variable org-store-link-functions did not contain
> org-mairix-store-gnus-link.
>
> However when I loaded gnorb, org-store-link-functions 
> *did* contain org-mairix-store-gnus-link.
>
> @Eric what do you say?
>
> I briefly scanned the code but cannot find why 
> org-mairix-store-gnus-link is put into the list

Probably you've set `gnorb-gnus-mail-search-backend' to 'mairix. Then,
when you call `gnorb-bbdb-mail-search', that would result in a call to
`mairix-search', which I'm sure is autoloaded and will bring in the
whole package.

There's not much to be done about that: you can set
`gnorb-gnus-mail-search-backend' to nil (or a different backend) and
that will solve the problem, but if you ever try to use mairix, the same
thing will happen again.

Eric




Re: [O] "Which function for creating the link?

2017-03-02 Thread Uwe Brauer

> Uwe Brauer  writes:

> You are probably either loading explicitly org-mairix (from contrib)
> or requiring 'org-mairix (explicitly or implicitly).

I think I found the culprit, I started emacs -q and the 
variable org-store-link-functions did not contain
org-mairix-store-gnus-link.

However when I loaded gnorb, org-store-link-functions 
*did* contain org-mairix-store-gnus-link.

@Eric what do you say?

I briefly scanned the code but cannot find why 
org-mairix-store-gnus-link is put into the list

Uwe 




Re: [O] "Which function for creating the link?

2017-03-02 Thread Uwe Brauer
>>> "Nick" == Nick Dokos  writes:

   > Uwe Brauer  writes:
   >> org-store-link-functions is a variable defined in ‘org.el’.
   >> Its value is
   >> 
   >> 
   >> (org-mairix-store-gnus-link org-rmail-store-link org-mhe-store-link
   >> org-irc-store-link org-info-store-link org-gnus-store-link
   >> org-docview-store-link org-bibtex-store-link org-bbdb-store-link
   >> org-w3m-store-link)
   >> 
   >> And org-store link takes the first entry. I prefer him to take
   >> org-gnus-store-link instead, how can I do this??
   >> 

   > You are probably either loading explicitly org-mairix (from contrib)
   > or requiring 'org-mairix (explicitly or implicitly).

That is my feeling too, but I greped org-mairix in all my lisp files,
and found nothing.


   > Try

   >emacs -q -l /path/to/minimal.el

I am not sure what minimal.el is supposed to be, but
emacs -q I might try.

   > and evaluate

   >   (org-store-link-functions)

   > The returned list should not contain org-mairix-store-gnus-link.

   > Then

   >   (load-file "/path/to/org-mode/contrib/lisp/org-mairix.el")

   > and evaluate

   >   (org-store-link-functions)

   > The returned list will now contain org-mairix-store-gnus-link.

   > If you cannot find the place where org-mairix gets loaded (e.g with
   > find and grep), by using this method, you could bisect through your
   > init files to find it.

Yeah I was hoping to avoid this, but maybe I have to do it sigh.

   >> 
   >> I have the feeling that this is relatively new (say from 2016).

   > I don't know why you are seeing it now, but I don't think anything
   > has changed in the mairix space for years.

Yes but there is a change proposed by John Kitchin which makes my suspicious 

https://lists.gnu.org/archive/html/emacs-orgmode/2016-07/msg00047.html

Uwe 




Re: [O] the evil org-store-link-functions variable

2017-03-02 Thread Eric S Fraga
On Thursday,  2 Mar 2017 at 15:57, Uwe Brauer wrote:
> I have even put in my init file
> (setq org-store-link-functions

Following this up, in org v8, this was a variable but in org v9 it is
now a function.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


Re: [O] "Which function for creating the link?

2017-03-02 Thread Nick Dokos
Uwe Brauer  writes:

> org-store-link-functions is a variable defined in ‘org.el’.
> Its value is
>
>
> (org-mairix-store-gnus-link org-rmail-store-link org-mhe-store-link
> org-irc-store-link org-info-store-link org-gnus-store-link
> org-docview-store-link org-bibtex-store-link org-bbdb-store-link
> org-w3m-store-link)
>
> And org-store link takes the first entry. I prefer him to take
> org-gnus-store-link instead, how can I do this??
>

You are probably either loading explicitly org-mairix (from contrib)
or requiring 'org-mairix (explicitly or implicitly).

Try

   emacs -q -l /path/to/minimal.el

and evaluate

  (org-store-link-functions)

The returned list should not contain org-mairix-store-gnus-link.

Then

  (load-file "/path/to/org-mode/contrib/lisp/org-mairix.el")

and evaluate

  (org-store-link-functions)

The returned list will now contain org-mairix-store-gnus-link.

If you cannot find the place where org-mairix gets loaded (e.g with
find and grep), by using this method, you could bisect through your
init files to find it.

>
> I have the feeling that this is relatively new (say from 2016).

I don't know why you are seeing it now, but I don't think anything
has changed in the mairix space for years.

-- 
Nick




[O] the evil org-store-link-functions variable (was: "Which function for creating the link?)

2017-03-02 Thread Uwe Brauer
Hi

I have even put in my init file
(setq org-store-link-functions
  (list  'org-gnus-store-link
'org-rmail-store-link
'org-mhe-store-link
'org-irc-store-link
'org-info-store-link
'org-docview-store-link
'org-bibtex-store-link
'org-bbdb-store-link
'org-w3m-store-link))

But I always obtain when using
describe-variable org-store-link-functions
which is annoying any help is appreciated.

Uwe Brauer 

,
| 
| org-store-link-functions is a variable defined in ‘org.el’.
| Its value is
| (org-mairix-store-gnus-link org-gnus-store-link org-rmail-store-link 
org-mhe-store-link org-irc-store-link org-info-store-link 
org-docview-store-link org-bibtex-store-link org-bbdb-store-link 
org-w3m-store-link)
| 
|   This variable may be risky if used as a file-local variable.
| 
| Documentation:
| List of functions that are called to create and store a link.
| Each function will be called in turn until one returns a non-nil
| value.  Each function should check if it is responsible for creating
| this link (for example by looking at the major mode).
| If not, it must exit and return nil.
| If yes, it should return a non-nil value after a calling
| ‘org-store-link-props’ with a list of properties and values.
| Special properties are:
| 
| :type The link prefix, like "http".  This must be given.
| :link The link, like "http://www.astro.uva.nl/~dominik;.
|   This is obligatory as well.
| :description  Optional default description for the second pair
|   of brackets in an Org-mode link.  The user can still change
|   this when inserting this link into an Org-mode buffer.
| 
| In addition to these, any additional properties can be specified
| and then used in capture templates.
`




[O] Bug: org-agenda-skip-deadline-prewarning-if-scheduled as pre-scheduled has no effect [9.0.5 (9.0.5-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170210/)]

2017-03-02 Thread Jorge Morais Neto
1. Write a file named agenda_bug.org with the following content
(remove indentation):
  *** TODO Dummy
  SCHEDULED: <2017-03-06 Seg> DEADLINE: <2017-03-07 Ter ++1m -6d>

2. Start GNU Emacs 25.2.1 (25.2-rc2) with an empty init.el.
3. (require 'org-agenda)
4. Customize org-agenda-skip-deadline-prewarning-if-scheduled to
   'pre-scheduled
5. Visit agenda_bug.org and type C-c [
6. M-x org-agenda a 
7. The warning of deadline "Dummy" appears under today.  According to the
   docstring of org-agenda-skip-deadline-prewarning-if-scheduled, it should
   not appear before the scheduled date.

Regards

Emacs  : GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2017-02-22
Package: Org mode version 9.0.5 (9.0.5-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170210/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled
 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-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 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 '(#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-show-block-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [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-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-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-link-parameters '(("id" :follow org-id-open)
  ("rmail" :follow org-rmail-open :store org-rmail-store-link)
  ("mhe" :follow org-mhe-open :store org-mhe-store-link)
  ("irc" :follow org-irc-visit :store org-irc-store-link)
  ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
  ("gnus" :follow org-gnus-open :store org-gnus-store-link)
  ("docview" :follow org-docview-open :export org-docview-export :store
org-docview-store-link)
  ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
  ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
  ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
  ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link)
  ("file" :complete org-file-complete-link)
  ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path
  ("help" :follow org--open-help-link)
  ("http" :follow (lambda (path) (browse-url (concat "http:" path
  ("https" :follow (lambda (path) (browse-url (concat "https:" path
  ("mailto" :follow (lambda (path) (browse-url (concat "mailto:; path
  ("message" :follow (lambda (path) (browse-url (concat "message:" path
  ("news" :follow (lambda (path) (browse-url (concat "news:; path
  ("shell" :follow org--open-shell-link))
 org-agenda-files '("/tmp/agenda_bug.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] "Which function for creating the link?

2017-03-02 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

> On Thursday,  2 Mar 2017 at 11:38, Uwe Brauer wrote:
>> Hi
>> 
>> When I try to open some messages[1] the minibuffer pops up asking
>> orglist
>> "Which function for creating the link?

> Maybe give a bit more context?  What messages?  How is this related to
> org?

Hm I am using gnus.
For example your message which I read via gmane in the newsgroup
gmane.emacs.orgmode

I hit enter or space, which I always do in order to read message via
gnus and again the minibuffer poped up with this question. I searched my
elpa archive and the only place where such a question is asked is in

(defun org-store-link

Now I don't understand why this function is called nor do I understand
why this question is asked without having set any variable.
Hm I have to search my init files,

Ok found it

(add-hook 'gnus-select-article-hook 'my-org-store-link-simple)


(defun my-org-store-link-simple ()
  "Translate TeX commands to png generated by org-preview-latex-fragment
into overlays or extents." 
  (interactive)
(call-interactively 'org-store-link))

But the funny part is: if I call org-store-link
directly, *no* question is asked about mairix,

So what do I have to do to get rid of the question, could 
org-gnus-prefer-web-links be the culprit?
org-gnus-prefer-web-links is a variable defined in ‘org-gnus.el’.
Its value is t


Hm I debugged org-store-link, which was a considerable ordeal, and it
seems it is this

org-store-link-functions is a variable defined in ‘org.el’.
Its value is


(org-mairix-store-gnus-link org-rmail-store-link org-mhe-store-link
org-irc-store-link org-info-store-link org-gnus-store-link
org-docview-store-link org-bibtex-store-link org-bbdb-store-link
org-w3m-store-link)

And org-store link takes the first entry. I prefer him to take
org-gnus-store-link instead, how can I do this??

I have the feeling that this is relatively new (say from 2016).


Regards

Uwe Brauer 







Re: [O] Structure info in minibuffer

2017-03-02 Thread Loris Bennett
Updating org-ref solved the problem.  Thanks.

John Kitchin  writes:

> Do you use org-ref? It did that for a short time. If so an update of org-ref 
> should make it go away. 
>
> On Thu, Mar 2, 2017 at 3:40 AM Loris Bennett  
> wrote:
>
>  Hi,
>
>  I'm not exactly sure when this started happening, but I assume it came
>  with the update to Org 9:
>
>  In any org file, potentially lengthy information about (I'm guessing
>  here) org objects is displayed in the minibuffer, e.g.:
>
>  (headline (:raw-value Nutzer :begin 805 :end 3472 :pre-blank 0 
> :contents-begin 814 :contents-end 3471 :level 1 :priority nil :tags nil 
> :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil
>  :archivedp nil :commentedp nil :post-affiliated 805 :title Nutzer))
>
>  In certain table cells, the minibuffer expands to 4 or 5 lines (of 180
>  characters) in order to display the information.
>
>  How can I turn this off?
>
>  Cheers,
>
>  Loris
>
>  --
>  This signature is currently under construction.

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Structure info in minibuffer

2017-03-02 Thread John Kitchin
Do you use org-ref? It did that for a short time. If so an update of
org-ref should make it go away.


On Thu, Mar 2, 2017 at 3:40 AM Loris Bennett 
wrote:

> Hi,
>
> I'm not exactly sure when this started happening, but I assume it came
> with the update to Org 9:
>
> In any org file, potentially lengthy information about (I'm guessing
> here) org objects is displayed in the minibuffer, e.g.:
>
> (headline (:raw-value Nutzer :begin 805 :end 3472 :pre-blank 0
> :contents-begin 814 :contents-end 3471 :level 1 :priority nil :tags nil
> :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil
> :archivedp nil :commentedp nil :post-affiliated 805 :title Nutzer))
>
> In certain table cells, the minibuffer expands to 4 or 5 lines (of 180
> characters) in order to display the information.
>
> How can I turn this off?
>
> Cheers,
>
> Loris
>
> --
> This signature is currently under construction.
>
>
> --
John

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


Re: [O] "Which function for creating the link?

2017-03-02 Thread Eric S Fraga
On Thursday,  2 Mar 2017 at 11:38, Uwe Brauer wrote:
> Hi
>
> When I try to open some messages[1] the minibuffer pops up asking
> orglist
> "Which function for creating the link?

Maybe give a bit more context?  What messages?  How is this related to
org?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8


signature.asc
Description: PGP signature


[O] "Which function for creating the link?

2017-03-02 Thread Uwe Brauer

Hi

When I try to open some messages[1] the minibuffer pops up asking
orglist
"Which function for creating the link?

And offers org-mairix-store-gnus-link

Which I don't want. How can I stop this annoying behavior, because
mairix links seem not to work for me.

BTW, 3 message of mine did not arrive in the list, via gmane this is why
I try it writing directly to the list.

Uwe Brauer 

Footnotes: 
[1]  but not all




[O] Structure info in minibuffer

2017-03-02 Thread Loris Bennett
Hi,

I'm not exactly sure when this started happening, but I assume it came
with the update to Org 9:

In any org file, potentially lengthy information about (I'm guessing
here) org objects is displayed in the minibuffer, e.g.:

(headline (:raw-value Nutzer :begin 805 :end 3472 :pre-blank 0 :contents-begin 
814 :contents-end 3471 :level 1 :priority nil :tags nil :todo-keyword nil 
:todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 
nil :post-affiliated 805 :title Nutzer))

In certain table cells, the minibuffer expands to 4 or 5 lines (of 180
characters) in order to display the information.

How can I turn this off?

Cheers,

Loris

-- 
This signature is currently under construction.