Re: [O] inherit priority

2018-07-07 Thread Jesse Johnson

Hi all,

Here is my branch adding priority inheritance.

remote: https://code.orgmode.org/holocronweaver/org-mode.git

branch: inherit-priority-squashed

I rebased upon the latest master, everything still seems to work. Sorry 
for the long delay in release.


Please test and critique.

Thanks!

Jesse




[O] bug#32068: 26.1; problem with org-agenda and categories

2018-07-07 Thread Nicolas Goaziou
Hello,

andrés ramírez  writes:

> It is possible for me to have the previous behaviour. on 26.1
> ¿What change should i do?.

You can definitely get the previous behaviour, but I cannot remember the
change. Just look at the docstring, it is probably straightforward.

> I share my agenda among several devices with different emacs versions
> ("23.4" "25.1" "26.1|26.2|master")

Note that recent Org, i.e., Org 9.0+ do not support Emacs 23 anymore.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#32068: 26.1; problem with org-agenda and categories

2018-07-07 Thread Nicolas Goaziou
Hello,

andrés ramírez  writes:

>> It doesn't look like a bug. The OP may have missed
>> `org-agenda-time-grid' variable.
>
> ¿What is OP?.

Original poster: you.

> If I do the same on emacs 25.1 I get the expected behaviour. So
> something has changed between 25.1 and 26.1. ¿What is the change needed?
> for having the same result on both emacs versions 25.1 and 26.1.

Emacs 25.1 and 26.1 do not ship the same Org. `org-agenda-time-grid'
changed between the two releases. You may want to double-check this
variable.

Regards,

-- 
Nicolas Goaziou0x80A93738





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

2018-07-07 Thread Jean-Christophe Helary
Sorry, I missed that. Proceed with closing and if there is an issue I'll send a 
report again.

Jean-Christophe 

> On Jul 7, 2018, at 20:12, Nicolas Goaziou  wrote:
> 
> Nicolas Goaziou  writes:
> 
>> 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?
> 
> I'm closing this report. Since there was no answer from the OP, I assume
> the issue is fixed.





Re: [O] [PATCH 2/2] org-colview.el: Add property :exclude-tags to column view

2018-07-07 Thread Benjamin Motz
Hello,

Nicolas Goaziou  writes:

> It looks good. This need to be documented in the manual, though. Would you
> mind adding this to your patch. 
>
> Also, a test would be nice in "test-org-colview.el", more accurately in
> `test-org-colview/dblock'. Could you add one?
>
>> -(defun org-columns--capture-view (maxlevel match skip-empty format local)
>> +(defun org-columns--capture-view (maxlevel match skip-empty exclude-tags 
>> format local)
>>"Get the column view of the current buffer.
>
> You need to describe the new argument in the docstring.

this is an updated patch with documentation and a test.

Please have a short look at the test example I've added. I'm not sure if
the list passed to :exclude-tags is normally escaped. If this is the
usual convention, the implementation would need to be adapted
accordingly.

>From 751a7eefde76596ae64e57fefc772b11e275c8ea Mon Sep 17 00:00:00 2001
From: Benjamin Motz 
Date: Wed, 4 Jul 2018 14:27:24 +0200
Subject: [PATCH] org-colview.el: Add property :exclude-tags to column view
 table

This addition allows to specify a list of tags to exclude from column
view tables.

TINYCHANGE
---
 doc/org-manual.org   |  5 +
 lisp/org-colview.el  | 22 +++---
 testing/lisp/test-org-colview.el | 20 
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 2ba0a84..0ad9add 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -5666,6 +5666,11 @@ This dynamic block has the following parameters:
  When non-~nil~, skip rows where the only non-empty specifier of
  the column view is =ITEM=.
 
+- =:exclude-tags= ::
+
+ List of tags to exclude from column view table: entries with
+ these tags will be excluded from the column view.
+
 - =:indent= ::
 
  When non-~nil~, indent each =ITEM= field according to its level.
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 70710aa..b6ad45a 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1327,14 +1327,15 @@ and variances (respectively) of the individual estimates."
 
 ;;; Dynamic block for Column view
 
-(defun org-columns--capture-view (maxlevel match skip-empty format local)
+(defun org-columns--capture-view (maxlevel match skip-empty exclude-tags format local)
   "Get the column view of the current buffer.
 
 MAXLEVEL sets the level limit.  SKIP-EMPTY tells whether to skip
 empty rows, an empty row being one where all the column view
-specifiers but ITEM are empty.  FORMAT is a format string for
-columns, or nil.  When LOCAL is non-nil, only capture headings in
-current subtree.
+specifiers but ITEM are empty.  EXCLUDE-TAGS is a list of tags
+that will be excluded from the resulting view.  FORMAT is a
+format string for columns, or nil.  When LOCAL is non-nil, only
+capture headings in current subtree.
 
 This function returns a list containing the title row and all
 other rows.  Each row is a list of fields, as strings, or
@@ -1357,9 +1358,13 @@ other rows.  Each row is a list of fields, as strings, or
 	 'org-columns-value
 	   'org-columns-value-modified)))
 		 row)))
-	   (unless (and skip-empty
-			(let ((r (delete-dups (remove "" row
-			  (or (null r) (and has-item (= (length r) 1)
+	   (unless (or
+		(and skip-empty
+			 (let ((r (delete-dups (remove "" row
+			   (or (null r) (and has-item (= (length r) 1)
+		(and exclude-tags
+			 (cl-some (lambda (tag) (member tag exclude-tags))
+  (org-get-tags
 	 (push (cons (org-reduced-level (org-current-level)) (nreverse row))
 		   table)
  (or (and maxlevel (format "LEVEL<=%d" maxlevel))
@@ -1404,6 +1409,8 @@ PARAMS is a property list of parameters:
 :matchWhen set to a string, use this as a tags/property match filter.
 :skip-empty-rows
 	  When t, skip rows where all specifiers other than ITEM are empty.
+:exclude-tags
+  List of tags to exclude from column view table.
 :format   When non-nil, specify the column view format to use."
   (let ((table
 	 (let ((id (plist-get params :id))
@@ -1429,6 +1436,7 @@ PARAMS is a property list of parameters:
 	  (org-columns--capture-view (plist-get params :maxlevel)
 	 (plist-get params :match)
 	 (plist-get params :skip-empty-rows)
+	 (plist-get params :exclude-tags)
 	 (plist-get params :format)
 	 view-pos))
 (when table
diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el
index fd00a2d..65c0f8d 100644
--- a/testing/lisp/test-org-colview.el
+++ b/testing/lisp/test-org-colview.el
@@ -1473,6 +1473,26 @@
 :END:"
   (let ((org-columns-default-format "%ITEM %A")) (org-update-dblock))
   (buffer-substring-no-properties (point) (outline-next-heading)
+  ;; Test `:exclude-tags' parameter.
+  (should
+   (equal
+"#+BEGIN: columnview :exclude-tags (\"excludeme\")
+| ITEM | A |
+|--+---|
+| H1   |   |
+#+END:
+"
+(org-test-with-temp-text

[O] bug#32068: 26.1; problem with org-agenda and categories

2018-07-07 Thread Eli Zaretskii
> From: Nicolas Goaziou 
> Cc: rrandr...@gmail.com,  32...@debbugs.gnu.org
> Date: Sat, 07 Jul 2018 13:05:53 +0200
> 
> It doesn't look like a bug. The OP may have missed
> `org-agenda-time-grid' variable.
> 
> I suggest to close this bug, if the OP doesn't object to it.

Thanks.  I will wait a few days and close it if no objections are
posted.





[O] bug#26467: 25.2; [Org mode] Call dot babel from elisp generate invalid image

2018-07-07 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> I can achieve the desired effect with:
>
> #+name: nodes
> | From | To | Weight |
> |--++|
> | A| B  |  3 |
> | A| C  |  2 |
> | B| D  |  4 |
> | B| E  |  5 |
> | C| F  | 10 |
>
> #+begin_src elisp :file /tmp/a.png :var nodes=nodes :results file
> (defun rowfun (x)
>   (format "%s -> %s [label=%s];" (nth 0 x) (nth 1 x) (nth 2 x)))
> (defun dotgen (nodes)
>   (format "digraph {\nnode [shape=circle]\n%s\n}"
>   (mapconcat #'rowfun nodes "\n")))
> (dotgen nodes)
> #+end_src
>
> I don't see why you would need to call `org-babel-execute:dot'.
>
> Does it fix your issue?

Since the OP didn't answer, I assume this is now fixed.

I'm closing this report.





[O] bug#22735: bug#22776: interactive org-set-effort (C-c C-x e) and column view direct index selection do not handle Effort_ALL with more than 10 entries

2018-07-07 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> I've changed `org-set-effort' to use `completing-read' for allowed
> values instead of relying on position in list. The prefix argument now
> means "increment". 
>
> This is simpler and less exotic.
>
> WDYT?

Since there is no answer from the OP, I assume this is fixed.

I'm closing the bug report.





[O] bug#24595: 24.5; Org manual indexing for #+STARTUP entries

2018-07-07 Thread Nicolas Goaziou
Hello,

Drew Adams  writes:

>> This should be reported to Org developers, not here.
>
> Org is part of distributed Emacs.  Bug reports for it should be
> dispatched from here automatically, or Org maintainers should
> pick them up here.
>
> I don't use Org.  Just reporting the problem, in case it helps.

It does. The new manual (for Org 9.2) hopefully fixes these. Please
open a new bug report if you think it doesn't.

I'm closing this one.

Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#27068: 25.2; org-odt-export-to-odt error when filename contains Chinese chars

2018-07-07 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> I cannot reproduce it. More specifically, I created a file named "童.org",
> added "* Headline" in it and exported it to ODT without problem.
>
> Could you provide a recipe for the issue you are encountering? If you
> are not able to reproduce it anymore, could you tell me so I can close
> this bug?

I'm closing this report since there was no answer from the OP. I assume
the issue is fixed.





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

2018-07-07 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> 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?

I'm closing this report. Since there was no answer from the OP, I assume
the issue is fixed.





[O] bug#31273: 27.0.50; org: #+begin_right block is not exported correctly

2018-07-07 Thread Nicolas Goaziou
I'm closing this report, which is not considered as a bug.

-- 
Nicolas Goaziou0x80A93738





[O] bug#32068: 26.1; problem with org-agenda and categories

2018-07-07 Thread Nicolas Goaziou
Hello,

Eli Zaretskii  writes:

>> When evaluating the snippet below:
>> --8<---cut here---start->8---
>> (eval-after-load "org"
>>   '(progn
>>  overwrite some settings
>>  (setq org-startup-folded nil ;unfolded
>>org-agenda-show-all-dates t
>>org-confirm-elisp-link-function nil ;; 4 the scratch call
>>org-agenda-include-diary t
>>org-agenda-include-all-todo t
>>)
>>  (when (file-directory-p "~/docs/org/deft/")
>>(setq org-agenda-files (directory-files "~/docs/org/deft/" t 
>> ".*agendatest\.org$"))
>>)
>>  (define-key org-mode-map (kbd "M-a") nil)
>>  ))
>> 
>> (require 'org)
>> 
>> (funcall 'org-agenda-list)
>> --8<---cut here---end--->8---
>> 
>> I am getting (which is not fine):
>
> Did you report this to the Org developers?  If so, and if they said
> this is a core Emacs bug, could you please point us to the relevant
> discussions with Org developers?

It doesn't look like a bug. The OP may have missed
`org-agenda-time-grid' variable.

I suggest to close this bug, if the OP doesn't object to it.

Regards,

-- 
Nicolas Goaziou





Re: [O] Bug: duplicated output in inline code block exports

2018-07-07 Thread Nicolas Goaziou
Hello,

"Berry, Charles"  writes:

>> On Jul 5, 2018, at 10:46 AM, William Denton  wrote:
>> 
>> Here's a very simple R command in an inline code block:
>> 
>> # -
>> What is 1 + 1?  src_R{1+1} {{{results(=2=)}}}
>> # -
>> 
>> Exporting this to PDF we get:
>> 
>> # -
>> What is 1 + 1? 2 2
>
> Or exporting to to latex 
>
> What is 1 + 1?  \texttt{2} \texttt{2}
>
> The results macro gets initialized by `org-macro-initialize-templates'
> which is run run before babel, the macro returns `=2=', and babel does
> not remove this when it adds the result again.

Fixed. Thank you.
> Also, shouldn't the docstring for `org-macro-initialize-templates'
> mention that "n", "author", "email", "keyword", "results", and "title"
> get set?

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] How to move up/down a headline but not the subtree?

2018-07-07 Thread Nicolas Goaziou
Hello,

alain.coch...@unistra.fr writes:

> I do not understand this.  When one is demoting/promoting
> headlines[fn:2] (and even whole subtrees), it seems to me that one is
> implicitly admitting that the structure is wrong.  I only see a
> quantitative difference (i.e., not a qualitative one) between doing
> this and performing want I want to do.

This is indeed a quantitative difference. demoting/promoting is quite
natural, predictable, and easy to implement. Barring indentation, it
only affects the current line. This is a useful low-level function.

Your suggestion is, OTOH, very vague. You want to move a headline and
its section. Where? What should happen then to the rest of the sub-tree?
Even if properly defined, it would potentially affect a lot of the
document, possibly in a convoluted way.

You certainly have good use for this, but I insist on this point: this
is not a "basic" operation, at all. AFAIU, I do think that such
a complex low-level operation should not be a standard command.

> Only now do I realize that it is probably the same logic which is
> behind the triggering of the error "Cannot move past superior level or
> buffer limit" which occurs when trying to move a subtree.  Well, I
> certainly don't appreciate these limitations :-) At least in that case
> I can not too painfully break the law by promoting+moving+demoting...

I cannot answer as I don't know what exactly you want to achieve.

> I understand patches are welcome, but I don't know how to do that yet.
> In that case, is it better that I remain silent?

Not at all. You can see how to contribute there:
. 

If you don't have time for the gory details, you can also suggest
a change in the Org manual without formatting it as a patch. Since the
manual is an Org file[1], you don't even have to learn Texinfo.

Regards,

Footnotes: 
[1]  https://code.orgmode.org/bzg/org-mode/raw/master/doc/org-manual.org

-- 
Nicolas Goaziou0x80A93738



Re: [O] [PATCH 2/2] org-colview.el: Add property :exclude-tags to column view

2018-07-07 Thread Nicolas Goaziou
Hello,

Benjamin Motz  writes:

> This addition allows to specify a list of tags to exclude from column
> view tables.
>
> From 4ac32c4b24f33b841ad73c4b10158ec7a18087a9 Mon Sep 17 00:00:00 2001
> From: Benjamin Motz 
> Date: Wed, 4 Jul 2018 14:27:24 +0200
> Subject: [PATCH 2/2] org-colview.el: Add property :exclude-tags to column view
>  table
>
> This addition allows to specify a list of tags to exclude from column
> view tables.
>
> TINYCHANGE

It looks good. This need to be documented in the manual, though. Would you
mind adding this to your patch. 

Also, a test would be nice in "test-org-colview.el", more accurately in
`test-org-colview/dblock'. Could you add one?

> -(defun org-columns--capture-view (maxlevel match skip-empty format local)
> +(defun org-columns--capture-view (maxlevel match skip-empty exclude-tags 
> format local)
>"Get the column view of the current buffer.

You need to describe the new argument in the docstring.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH 1/2] org-colview.el: Add missing save-excursion for org-colview

2018-07-07 Thread Nicolas Goaziou
Hello,

Benjamin Motz  writes:

> without this fix, point will jump to beginning of buffer each time the
> column view is activated. This was annoying to me and I'd consider it a
> bug. I'm not sure if this is the best way to fix the behaviour...

Thank you. I applied a slightly different fix which doesn't duplicate
`save-excursion' calls.

Regards,

-- 
Nicolas Goaziou