Re: [O] toggling checkbox with one prefix arg modifies drawer contents

2018-01-15 Thread Samuel Wales
thank you.

On 1/15/18, Nicolas Goaziou  wrote:
> They are, arguably, body text.

what is the name of "the text after anything that org might typically modify"?

[i recognize this is not a perfect question.  repeaters are modified
by org.  if events were in the planning line it might be a bit more
perfect question.]



Re: [O] change in calling remote code blocks?

2018-01-15 Thread John Kitchin
I don't recall how I learned about that, I guess maybe in some library of
babel documentation somewhere. I confirmed it does work in 8.2.10, e.g.
just with emacs -Q.

There are a few changes in org 9 to org-babel-lob-execute-maybe
and org-babel-lob-get-info that seem to be the root cause of the change.
Notably, org-babel-lob-get-info now returns nil where it used to return the
"path" to the file and block.

So, if I put this into an org file

(progn
 (re-search-forward "call")
 (message "%s" (org-babel-lob-get-info)))   ;<- execute here


#+call: remote-call.org:test-block()

These get returned

In 8.2.10: "(remote-call.org:test-block() nil 0 nil)"
In 9.1.6: "nil"

I am not sure what all the differences are, but it seems to be where the
change in behavior came from.

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


On Mon, Jan 15, 2018 at 2:49 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> John Kitchin  writes:
>
> > In org8 I used to be able to call remote code blocks (
> > http://kitchingroup.cheme.cmu.edu/blog/2016/02/09/Calling-
> remote-code-blocks-in-org-mode/
> > )
> >
> > with a syntax like:
> >
> > #+call: si.org:figure-1() :wrap html
> >
> > And C-c C-c on that line would call a code block named figure-1 in the
> file
> > si.org and insert the results.
> >
> > in org 9.1.6, this does nothing. Does anyone know if this got changed,
> and
> > if there is a new way to do that?
>
> This sounds like a bug.
>
> It does ring a bell. However, I couldn't find any reference to this
> syntax or behaviour in the manual. Am I missing something?
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] change in calling remote code blocks?

2018-01-15 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> In org8 I used to be able to call remote code blocks (
> http://kitchingroup.cheme.cmu.edu/blog/2016/02/09/Calling-remote-code-blocks-in-org-mode/
> )
>
> with a syntax like:
>
> #+call: si.org:figure-1() :wrap html
>
> And C-c C-c on that line would call a code block named figure-1 in the file
> si.org and insert the results.
>
> in org 9.1.6, this does nothing. Does anyone know if this got changed, and
> if there is a new way to do that?

This sounds like a bug.

It does ring a bell. However, I couldn't find any reference to this
syntax or behaviour in the manual. Am I missing something?

Regards,

-- 
Nicolas Goaziou



Re: [O] toggling checkbox with one prefix arg modifies drawer contents

2018-01-15 Thread Nicolas Goaziou
Samuel Wales  writes:

> On 1/15/18, Nicolas Goaziou  wrote:
>> It could. It depends where is located the logbook. "Ignoring drawers" in
>> the docstring is a bit terse. It should be "ignoring any drawer right
>> after the headline".
>
> imo only body text should be modified.

They are, arguably, body text.

>> Do you have an ECM demonstrating the issue?
>
> no.  it should look like this:
>
> * NEXTREPEAT [#A] [15/109] [13%] whatever :physical:goto:
> SCHEDULED: <2018-02-11 Sun .+4w>
> :PROPERTIES:
> :ID:   a33ee4af-43ae-4a3e-9349-f14a22a58eaa
> :END:
> :LOGBOOK:
> - State "DONE"   from "NEXTREPEAT" [2018-01-14 Sun 20:24]
> :END:
>
>   1.  [X] consider
>   2.  [-] pre
>   1) [X] smart

Fixed. Thank you.

Regards,



Re: [O] [PATCH]: Replace calls to obsolete macros in org-notify.el

2018-01-15 Thread Nicolas Goaziou
Hello,

Peter Münster  writes:

> Please find attached a patch that removes calls to obsolete macros.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] ox-publish export subtree scopes?

2018-01-15 Thread Adonay Felipe Nogueira
Rasmus, emacs-orgmode, what's the status of this?

2017-12-05T19:10:17+ Kaushal Modi wrote:
> Hello Rasmus,
>
> I'd like to make the ox-publish based exporting working for my ox-hugo[1]
> package but so far have been unsuccessful.
>
> The main reason is that org-foo-publish-to-bar functions take only plist,
> filename and pub-dir as args. I miss the ability to first pick a subtree
> scope from the specific Org file and then export only that. Is something like
> that already possible which I am missing?
>
> In addition, when given a file name, I need to auto-decide (i) if I need to
> cycle through "valid" subtrees (see more about that below) and export those
> subtrees,or (ii) export the whole Org file if #+TITLE is present.
>
> So I ended up with org-hugo-export-wim-to-md[2] ("wim" stands for What I
> Mean). Below is a snippet from its doc string:
>
> =
> - If the current subtree has the \"EXPORT_FILE_NAME\" property, export
> that subtree.
> - If the current subtree doesn't have that property, but one of its
> parent subtrees has, then export from that subtree's scope.
> - If none of the subtrees have that property (or if there are no Org
> subtrees at all), but the Org #+TITLE keyword is present,
> export the whole Org file as a post with that title (calls
> `org-hugo-export-to-md' with its SUBTREEP argument set to nil).
>
> - If ALL-SUBTREES is non-nil, export all valid Hugo post subtrees
> \(that have the \"EXPORT_FILE_NAME\" property) in the current file
> to multiple Markdown posts.
> - If ALL-SUBTREES is non-nil, and again if none of the subtrees have
> that property (or if there are no Org subtrees), but the Org #+TITLE
> keyword is present, export the whole Org file.
>
> - If the file neither has valid Hugo post subtrees, nor has the
> #+TITLE present, throw a user error. If NOERROR is non-nil, use
> `message' to display the error message instead of signaling a user
> error.
> =
>
> And I use a Makefile[3] to find all Org files in the current directly and
> call the above function, which then does the right thing as explained in the
> conditions above.
>
> Is there any way to call org-publish to export either the entire file or
> cycle through the file and export the subtrees matching a predicate?
>
> [1]: https://github.com/kaushalmodi/ox-hugo
> [2]:
> https://github.com/kaushalmodi/ox-hugo/blob/832a5d7424013f60b77354ec28613440afac0269/ox-hugo.el#L2424-L2448
>
> [3]: https://github.com/kaushalmodi/ox-hugo/blob/master/Makefile

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.



Re: [O] toggling checkbox with one prefix arg modifies drawer contents

2018-01-15 Thread Samuel Wales
On 1/15/18, Nicolas Goaziou  wrote:
> It could. It depends where is located the logbook. "Ignoring drawers" in
> the docstring is a bit terse. It should be "ignoring any drawer right
> after the headline".

imo only body text should be modified.

> Do you have an ECM demonstrating the issue?

no.  it should look like this:

* NEXTREPEAT [#A] [15/109] [13%] whatever :physical:goto:
SCHEDULED: <2018-02-11 Sun .+4w>
:PROPERTIES:
:ID:   a33ee4af-43ae-4a3e-9349-f14a22a58eaa
:END:
:LOGBOOK:
- State "DONE"   from "NEXTREPEAT" [2018-01-14 Sun 20:24]
:END:

  1.  [X] consider
  2.  [-] pre
  1) [X] smart



[O] [PATCH]: Replace calls to obsolete macros in org-notify.el

2018-01-15 Thread Peter Münster
Hi,

Please find attached a patch that removes calls to obsolete macros.

Kind regards,
-- 
   Peter
>From 8d2f68f7c01687565dcd248930ab949ab3b77516 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Peter=20M=C3=BCnster?= 
Date: Mon, 15 Jan 2018 19:23:51 +0100
Subject: [PATCH] Replace calls to obsolete macros

* contrib/lisp/org-notify.el: Replace flet with cl-letf and macrolet
with cl-macrolet.
---
 contrib/lisp/org-notify.el | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index 96e7d4ee2..8e800eec7 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -118,7 +118,7 @@ simple timestamp string."
 
 (defun org-notify-make-todo (heading &rest ignored)
   "Create one todo item."
-  (macrolet ((get (k) `(plist-get list ,k))
+  (cl-macrolet ((get (k) `(plist-get list ,k))
  (pr (k v) `(setq result (plist-put result ,k ,v
 (let* ((list (nth 1 heading))  (notify (or (get :NOTIFY) "default"))
(deadline (org-notify-convert-deadline (get :deadline)))
@@ -157,7 +157,7 @@ PERIOD."
 (defun org-notify-process ()
   "Process the todo-list, and possibly notify user about upcoming or
 forgotten tasks."
-  (macrolet ((prm (k) `(plist-get prms ,k))  (td (k) `(plist-get todo ,k)))
+  (cl-macrolet ((prm (k) `(plist-get prms ,k))  (td (k) `(plist-get todo ,k)))
 (dolist (todo (org-notify-todo-list))
   (let* ((deadline (td :deadline))  (heading (td :heading))
  (uid (td :uid))(last-run-sym
@@ -245,9 +245,10 @@ seconds.  The default value for SECS is 20."
   (switch-to-buffer (find-file-noselect file))
   (org-with-wide-buffer
(goto-char begin)
-   (show-entry))
+   (outline-show-entry))
   (goto-char begin)
   (search-forward "DEADLINE: <")
+  (search-forward ":")
   (if (display-graphic-p)
   (x-focus-frame nil)))
   (save-excursion
@@ -268,7 +269,7 @@ seconds.  The default value for SECS is 20."
 
 (defun org-notify-on-action-button (button)
   "User wants to see action after button activation."
-  (macrolet ((get (k) `(button-get button ,k)))
+  (cl-macrolet ((get (k) `(button-get button ,k)))
 (org-notify-on-action (get 'plist) (get 'key))
 (org-notify-delete-window (get 'buffer))
 (cancel-timer (get 'timer
@@ -311,7 +312,7 @@ seconds.  The default value for SECS is 20."
   (compose-mail user-mail-address (concat "TODO: " (plist-get plist :heading)))
   (insert (org-notify-body-text plist))
   (funcall send-mail-function)
-  (flet ((yes-or-no-p (prompt) t))
+  (cl-letf (((symbol-function 'yes-or-no-p) (lambda (x) t)))
 (kill-buffer)))
 
 (defun org-notify-select-highest-window ()
@@ -334,7 +335,7 @@ org-notify window.  Mostly copied from `appt-select-lowest-window'."
 (defun org-notify-action-window (plist)
   "Pop up a window, mostly copied from `appt-disp-window'."
   (save-excursion
-(macrolet ((get (k) `(plist-get plist ,k)))
+(cl-macrolet ((get (k) `(plist-get plist ,k)))
   (let ((this-window (selected-window))
 (buf (get-buffer-create
   (format org-notify-window-buffer-name (get :uid)
-- 
2.13.6



[O] change in calling remote code blocks?

2018-01-15 Thread John Kitchin
In org8 I used to be able to call remote code blocks (
http://kitchingroup.cheme.cmu.edu/blog/2016/02/09/Calling-remote-code-blocks-in-org-mode/
)

with a syntax like:

#+call: si.org:figure-1() :wrap html


And C-c C-c on that line would call a code block named figure-1 in the file
si.org and insert the results.

in org 9.1.6, this does nothing. Does anyone know if this got changed, and
if there is a new way to do that?

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] org-html-head documentation mistake?

2018-01-15 Thread Bastien
Hi Adam,

> The docstring for org-html-head gives this example:

Thanks for reporting this, I fixed this using this example:

   
/**/
   

Can you check and report if this is correct?

Thanks,

-- 
 Bastien



Re: [O] [PATCH] org-agenda: Disable message logging for some messages

2018-01-15 Thread Nicolas Goaziou
Hello,

Xu Chunyang  writes:

> * lisp/org-agenda.el (org-agenda-filter-by-tag):
> (org-agenda-view-mode-dispatch):
> (org-agenda-diary-entry):
> (org-agenda-bulk-action): Disable message logging for some messages.
> ---
>
> When under the *Org Agenda* buffer, my *Messages* buffer is filled
> quickly by these "prompt"-like messages, I prefer they are not written to
> the *Messages* buffer.

I applied your patch. Thank you.

For the record, I used `org-unlogged-message' and added TINYCHANGE at
the end of the commit message.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Allow :urgency flags for org-notify

2018-01-15 Thread Nicolas Goaziou
Hello,

Jay Kamat  writes:

> I recently began using the org-notify package, and I would like to pass
> the :urgency flag to `notifications-notify' occasionally. This small
> patch passes the :urgency key from the org-notify configuration on to
> `notitifications-notify'.
>
> For example, after this patch, you can:
>
> (org-notify-add 'test-notifications
> '(:time "10m" :period "1m" :actions -notify/window :urgency critical))
>
> And get notifications labeled as critical in that way.

Thank you. I applied your patch on behalf of Org notify's author
(Cc'ed).

> Eventually, I would like to write an alert
> (https://github.com/jwiegley/alert) backend for org-notify, would that
> be suitable for inclusion in the core package?

Org notify is not in Org core, but in contrib/ directory, soon to be
moved to orgmode.org repository as a separate package.

Regards,

-- 
Nicolas Goaziou



[O] bug#27140: Different key bindings between GUI emacs and terminal emacs

2018-01-15 Thread Nicolas Goaziou
Hello,

Jean-Christophe Helary  writes:

> Ok Eli. I'm sending them a report.

Thank you.

I think I fixed it in Org's master branch (aka Org 9.2).

Meanwhile, I think setting `org-use-extra-keys' to a non-nil value
should do the trick.

Could you confirm it?

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] Keeping outline after reverting buffer

2018-01-15 Thread Roland Fehrenbacher
Hi,

is there any option or other customization to keep the outline of an org
buffer (uncollapsed parts of the tree) after the buffer has been
reverted (org-mode 9.0.1, emacs 25.3.2)? In my case only the top
headings are displayed after reverting. This is quite annoying and
time-consuming in a setup, where one constantly switches between git
branches e.g.

Thanks,

Roland



Re: [O] Generating sitemap: ‘org-publish-cache-get’ called, but no cache present

2018-01-15 Thread Nicolas Goaziou
Hello,

Vikas Rawal  writes:

> I have been using the following code block to generate a sitemap for my 
> org-jkyll based blog.
>
> #+begin_src emacs-lisp :results output silent :exports none :cache yes
>   (org-publish-sitemap
>(assoc "indblog" org-publish-project-alist)
>"sitemap.org")
> #+end_src
>
> I had not generated the sitemap for a while, and now I find that it
> ends with the following message, and sitemap.org 
> is not recreated.

`org-publish-sitemap' is not meant to be called directly. It assumes
project is properly set-up, which is done in its caller,
`org-publish-projects'.

So, why don't you simply publish "indblog" project?

Regards,

-- 
Nicolas Goaziou



Re: [O] toggling checkbox with one prefix arg modifies drawer contents

2018-01-15 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

>> If the cursor is in a headline, apply this to all checkbox items
> in the text below the heading, taking as reference the first item
> in subtree, ignoring drawers.
>
> in recent maint this seems to affect state change lines in logbook.

It could. It depends where is located the logbook. "Ignoring drawers" in
the docstring is a bit terse. It should be "ignoring any drawer right
after the headline".

Do you have an ECM demonstrating the issue?

Regards,

-- 
Nicolas Goaziou