Re: [O] inherit priority

2018-07-09 Thread Jesse Johnson

Hi Nicolas,

On 07/09/2018 01:22 AM, Nicolas Goaziou wrote:

It looks good. Could you send it on this ML as a patch so I can comment
it more conveniently?


Since you want to comment I guess you want the patch in the e-mail body 
rather than attached. Here goes nothing.


From bb02cd6c00b32155c0a25f409f1bfa4160b2ddcd Mon Sep 17 00:00:00 2001
From: Jesse Johnson 
Date: Sun, 22 Apr 2018 18:12:54 -0700
Subject: [PATCH] Add priority inheritance

* New org-use-priority-inheritance defcustom to toggle inheritance.
* org-get-priority now takes a pos and implements inheritance.
* org-get-priority-function can make use of inheritance by returning t.
* org-agenda-fix-displayed-priority ensures inherited priority is
  visible.
* Updates where priority is used so that inheritance is respected.  As
  a side effect, org-get-priority-function is now more widely
  respected.
---
 lisp/org-agenda.el | 117 
+

 lisp/org-habit.el  |  16 
 lisp/org.el    | 102 ++
 3 files changed, 157 insertions(+), 78 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eaeddb6..e18e73d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4581,6 +4581,7 @@ is active."
         (setq marker (org-agenda-new-marker (point))
           category (org-get-category)
           level (make-string (org-reduced-level 
(org-outline-level)) ? )

+  priority (org-get-priority)
           inherited-tags
           (or (eq org-agenda-show-inherited-tags 'always)
               (and (listp org-agenda-show-inherited-tags)
@@ -4593,13 +4594,13 @@ is active."
                ""
                (buffer-substring-no-properties
                 beg1 (point-at-eol))
-                   level category tags t))
+                   level category priority tags t))
         (org-add-props txt props
           'org-marker marker 'org-hd-marker marker
           'org-todo-regexp org-todo-regexp
           'level level
           'org-complex-heading-regexp org-complex-heading-regexp
-              'priority 1000
+              'priority priority
           'type "search")
         (push txt ee)
         (goto-char (1- end))
@@ -5078,7 +5079,7 @@ of what a project is and how to check if it stuck, 
customize the variable

   (setq entries
     (mapcar
  (lambda (x)
-       (setq x (org-agenda-format-item "" x nil "Diary" nil 'time))
+       (setq x (org-agenda-format-item "" x nil "Diary" nil nil 'time))
    ;; Extend the text properties to the beginning of the line
    (org-add-props x (text-properties-at (1- (length x)) x)
      'type "diary" 'date date 'face 'org-agenda-diary))
@@ -5361,6 +5362,7 @@ and the timestamp type relevant for the sorting 
strategy in

   ts-date (car ts-date-pair)
   ts-date-type (cdr ts-date-pair)
   txt (org-trim (buffer-substring (match-beginning 2) 
(match-end 0)))

+  priority (1+ (org-get-priority))
   inherited-tags
   (or (eq org-agenda-show-inherited-tags 'always)
       (and (listp org-agenda-show-inherited-tags)
@@ -5370,8 +5372,7 @@ and the timestamp type relevant for the sorting 
strategy in

            (memq 'todo org-agenda-use-tag-inheritance
   tags (org-get-tags nil (not inherited-tags))
   level (make-string (org-reduced-level (org-outline-level)) ? )
-      txt (org-agenda-format-item "" txt level category tags t)
-      priority (1+ (org-get-priority txt)))
+      txt (org-agenda-format-item "" txt level category priority 
tags t))

 (org-add-props txt props
   'org-marker marker 'org-hd-marker marker
   'priority priority
@@ -5570,6 +5571,9 @@ displayed in agenda view."
        (assq (point) deadline-position-alist))
   (throw :skip nil))
     (let* ((category (org-get-category pos))
+   (priority (if habit?
+ (org-habit-get-priority 
(org-habit-parse-todo))

+   (org-get-priority item)))
        (inherited-tags
         (or (eq org-agenda-show-inherited-tags 'always)
         (and (consp org-agenda-show-inherited-tags)
@@ -5588,11 +5592,10 @@ displayed in agenda view."
        (item
         (org-agenda-format-item
      (and inactive? org-agenda-inactive-leader)
-         head level category tags time-stamp org-ts-regexp habit?)))
+         head level category priority tags
+ time-stamp org-ts-regexp habit?)))
   (org-add-props item props
-        'priority (if habit?
-              (org-habit-get-priority (org-habit-parse-todo))
-                (org-get-priority item))
+        'priority priority
     'org-marker (org-agenda-new-marker pos)
     

[O] bug#32068: obsolescense of #+CATEGORY on org-mode 9.x

2018-07-09 Thread Nicolas Goaziou
Hello,

andrés ramírez  writes:

> ¿What would have been the way a user should discover this incompatibility
> or obsolescense of the "#+CATEGORY"?.

I would suggest that user to read the releases notes, located in
ORG-NEWS files, in particular the "Incompatible changes" sections.

This particular change was announced in Org 8.3.

Also, this feature (multiple CATEGORY keywords) was strongly deprecated,
as pointed out in the old manual, since Org 5.14 (2008).

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] malformed function

2018-07-09 Thread hymie!
Greetings.

I know this is technically an emacs problem and not an Orgmode problem,
but maybe you guys will see the error that I can't find.

I have two different machines.  One is a Linux machine running
Orgmode 9.1.13 under Emacs 25.3.1 , and one is a Windows 10 machine
running Orgmode 9.1.13 under Emacs 24.5.1 .  Both have the same .emacs
file as far as I can tell.

The Linux machine is getting this error:

Warning (bytecomp): ‘(extract-window (line) (let ((start
(get-text-property 1 (quote time-of-day) line)) (dur (get-text-property
1 (quote duration) line))) (cond ((and start dur) (cons start
(org-time-from-minutes (+ dur (org-time-to-minutes start) (start
start) (t nil’ is a malformed function

As far as I can tell, the parens and quotes are all matched properly, and
the Windows machine is not displaying this error.

Here is the relevant part of my .emacs file.  Maybe you guys can see the
error I don't see?

= 8< =
; http://orgmode.org/worg/org-hacks.html
(defun org-time-to-minutes (time)
  "Convert an HHMM time to minutes"
  (+ (* (/ time 100) 60) (% time 100)))
(defun org-time-from-minutes (minutes)
  "Convert a number of minutes to an HHMM time"
  (+ (* (/ minutes 60) 100) (% minutes 60)))
(defadvice org-agenda-add-time-grid-maybe (around mde-org-agenda-grid-tweakify
  (list ndays todayp))
  (if (member 'remove-match (car org-agenda-time-grid))
  (flet ((extract-window
  (line)
  (let ((start (get-text-property 1 'time-of-day line))
(dur (get-text-property 1 'duration line)))
(cond
 ((and start dur)
  (cons start
(org-time-from-minutes
 (+ dur (org-time-to-minutes start)
 (start start)
 (t nil)
(let* ((windows (delq nil (mapcar 'extract-window list)))
   (org-agenda-time-grid
(list (car org-agenda-time-grid)
  (cadr org-agenda-time-grid)
  (remove-if
   (lambda (time)
 (find-if (lambda (w)
(if (numberp w)
(equal w time)
  (and (>= time (car w))
   (< time (cdr w)
  windows))
   (caddr org-agenda-time-grid)
  ad-do-it))
ad-do-it))
(ad-activate 'org-agenda-add-time-grid-maybe)
= 8< =

Thanks.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




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

2018-07-09 Thread Nicolas Goaziou
Hello,

Benjamin Motz  writes:

> this is an updated patch with documentation and a test.

I applied it on "next" branch. Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] inherit priority

2018-07-09 Thread Nicolas Goaziou
Hello,

Jesse Johnson  writes:

> Here is my branch adding priority inheritance.
>
> remote: https://code.orgmode.org/holocronweaver/org-mode.git

It looks good. Could you send it on this ML as a patch so I can comment
it more conveniently?

Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Small fix for Org manual

2018-07-09 Thread Nicolas Goaziou
Hello,

Vladimir Lomov  writes:

> Hello,
> recent changes in org-manual.org (commit
> b94e6e2b459d03429f983b2b11ed6a3095b9d12c) breaks typesetting from texi
> to pdf (texi2pdf). I made small fix for the issue.

I actually reverted that commit.

Thank you.

Regards,

-- 
Nicolas Goaziou



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

2018-07-09 Thread Nicolas Goaziou
Hello,

andrés ramírez  writes:

> I have tried org-lint it suggest me to use :CATEGORY: property. As I
> have done on my example. But still It Does not work.

> * the world cup on my agenda
> ** groups
> :CATEGORY: 0.6groups

The correct syntax is

** groups
:PROPERTIES:
:CATEGORY: 0.6groups
:END:

See (info "(org) Property Syntax")

Regards,

-- 
Nicolas Goaziou0x80A93738