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

2018-07-06 Thread Benjamin Motz
Hello,

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
---
 lisp/org-colview.el | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 70710aa..b769c5f 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1327,7 +1327,7 @@ 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
@@ -1357,9 +1357,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 +1408,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 +1435,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
-- 
2.7.4


Best regards,
Benjamin Motz


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

2018-07-06 Thread Benjamin Motz
Hello,

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

It's a TINYCHANGE when ignoring space-change.

>From a0bed174852a6c7c6904f44bb649be45669f7b9f Mon Sep 17 00:00:00 2001
From: Benjamin Motz 
Date: Tue, 3 Jul 2018 19:36:21 +0200
Subject: [PATCH 1/2] org-colview.el: Add missing save-excursion for
 org-colview

Without this fix, point will jump to beginning of buffer each time the
column view is activated.

TINYCHANGE
---
 lisp/org-colview.el | 77 +++--
 1 file changed, 39 insertions(+), 38 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 82a0ae0..70710aa 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -807,44 +807,45 @@ view for the whole buffer unconditionally.
 
 When COLUMNS-FMT-STRING is non-nil, use it as the column format."
   (interactive "P")
-  (org-columns-remove-overlays)
-  (when global (goto-char (point-min)))
-  (if (markerp org-columns-begin-marker)
-  (move-marker org-columns-begin-marker (point))
-(setq org-columns-begin-marker (point-marker)))
-  (org-columns-goto-top-level)
-  ;; Initialize `org-columns-current-fmt' and
-  ;; `org-columns-current-fmt-compiled'.
-  (let ((org-columns--time (float-time (current-time
-(org-columns-get-format columns-fmt-string)
-(unless org-columns-inhibit-recalculation (org-columns-compute-all))
-(save-excursion
-  (save-restriction
-	(when (and (not global) (org-at-heading-p))
-	  (narrow-to-region (point) (org-end-of-subtree t t)))
-	(when (assoc "CLOCKSUM" org-columns-current-fmt-compiled)
-	  (org-clock-sum))
-	(when (assoc "CLOCKSUM_T" org-columns-current-fmt-compiled)
-	  (org-clock-sum-today))
-	(let ((cache
-	   ;; Collect contents of columns ahead of time so as to
-	   ;; compute their maximum width.
-	   (org-map-entries
-		(lambda () (cons (point) (org-columns--collect-values)))
-		nil nil (and org-columns-skip-archived-trees 'archive
-	  (when cache
-	(org-columns--set-widths cache)
-	(org-columns--display-here-title)
-	(when (setq-local org-columns-flyspell-was-active
-			  (bound-and-true-p flyspell-mode))
-	  (flyspell-mode 0))
-	(unless (local-variable-p 'org-colview-initial-truncate-line-value)
-	  (setq-local org-colview-initial-truncate-line-value
-			  truncate-lines))
-	(setq truncate-lines t)
-	(dolist (entry cache)
-	  (goto-char (car entry))
-	  (org-columns--display-here (cdr entry)
+  (save-excursion
+   (org-columns-remove-overlays)
+   (when global (goto-char (point-min)))
+   (if (markerp org-columns-begin-marker)
+   (move-marker org-columns-begin-marker (point))
+ (setq org-columns-begin-marker (point-marker)))
+   (org-columns-goto-top-level)
+   ;; Initialize `org-columns-current-fmt' and
+   ;; `org-columns-current-fmt-compiled'.
+   (let ((org-columns--time (float-time (current-time
+ (org-columns-get-format columns-fmt-string)
+ (unless org-columns-inhibit-recalculation (org-columns-compute-all))
+ (save-excursion
+   (save-restriction
+	 (when (and (not global) (org-at-heading-p))
+	   (narrow-to-region (point) (org-end-of-subtree t t)))
+	 (when (assoc "CLOCKSUM" org-columns-current-fmt-compiled)
+	   (org-clock-sum))
+	 (when (assoc "CLOCKSUM_T" org-columns-current-fmt-compiled)
+	   (org-clock-sum-today))
+	 (let ((cache
+		;; Collect contents of columns ahead of time so as to
+		;; compute their maximum width.
+		(org-map-entries
+		 (lambda () (cons (point) (org-columns--collect-values)))
+		 nil nil (and org-columns-skip-archived-trees 'archive
+	   (when cache
+	 (org-columns--set-widths cache)
+	 (org-columns--display-here-title)
+	 (when (setq-local org-columns-flyspell-was-active
+			   (bound-and-true-p flyspell-mode))
+	   (flyspell-mode 0))
+	 (unless (local-variable-p 'org-colview-initial-truncate-line-value)
+	   (setq-local org-colview-initial-truncate-line-value
+			   truncate-lines))
+	 (setq truncate-lines t)
+	 (dolist (entry cache)
+	   (goto-char (car entry))
+	   (org-columns--display-here (cdr entry))
 
 (defun org-columns-new ( spec  attributes)
   "Insert a new column, to the left of the current column.
-- 
2.7.4


Best regards,
Benjamin Motz


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

2018-07-06 Thread Alain . Cochard
Neil Jerram writes on Thu  5 Jul 2018 13:53:

 > FWIW, I just experimented.  This seems to work:
 > 
 >   M-right M-right M-right M-right M-right C-c C-x C-w
 > 
 >   move to new destination
 > 
 >   C-c C-x C-y
 > 
 > and is pretty fast.

That's an interesting idea.  Maybe I can build on that for my need.  I
appreciate the effort!


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



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

2018-07-06 Thread Alain . Cochard


Hi, and thanks for your message.

Nicolas Goaziou writes on Thu  5 Jul 2018 12:50:

> > I am also interested in knowing if there are specific (deep?)
 > > reasons why this seemingly basic operation, which I see as the
 > > analogous of org-do-promote/demote and perform very often with
 > > standard (but tedious) emacs editing commands, is not already
 > > implemented.

 > Yes, this is not a "basic" operation: it breaks the structure of
 > the document. Org helps you maintain it and organize it, this would
 > be going the opposite way.

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.

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

 > There are ways to do this, and you can even automate them with a
 > keyboard macro or a function.

Indeed, I will try to hack something.  Ideally, it has to work for
list items as well -- certainly not easy for me. I had hoped someone
would have done it already...

 > > [fn:1] I am surprised I can't find it in the manual -- I find it
 > > extremely useful.

 > Documentation patches are always welcome. The hardest part would be to
 > find an appropriate location for this. Maybe Miscellaneous.

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?

Regards
a.


[fn:2] Here I am not even talking about cases like going from:

* head 
  * sub head
text
* sub sub head

to:

* head 
* sub head
  text
* sub sub head

which is obtained by demoting 'sub head' 3 times.  (With the similar
structure with list items, one gets "Cannot outdent an item without
its children".)

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



Re: [O] ox-cv.el

2018-07-06 Thread eniotna
Hello,

Take a look at
https://archive.softwareheritage.org/browse/origin/https://github.com/mylese/ox-cv/directory/

Cheers,

tony / @ardumont

On Fri, Jul 6, 2018 at 11:56 AM, Eike  wrote:

>
> Hello,
>
> I'm occassionally using a nice package by Myles English that has been on
> github for a while https://github.com/mylese/ox-cv. This is gone now and
> I can't find it using some search-engines.
>
> Has it maybe been moved to another git provider? Or could someone hand a
> copy of this file to me :)
>
> Many thanks in advance
> Eike
>
>
>


Re: [O] ox-cv.el

2018-07-06 Thread Eike



Hi Diego,

thank you very much for your reply! That looks like really nice project.

Thanks,
Eike


Diego Zamboni  writes:

> Hi Eike,
>
> I don’t think it’s the same, but at least from the name, this one might serve 
> a similar purpose: 
> https://blog.oscarnajera.com/2018/05/org-cv-an-org-export-backend-for-cv/ 
> 
>
> I found it just yesterday, haven’t tried it yet.
>
> Best,
> —Diego
>
>
>> On 6 Jul 2018, at 11:56, Eike  wrote:
>> 
>> 
>> Hello,
>> 
>> I'm occassionally using a nice package by Myles English that has been on
>> github for a while https://github.com/mylese/ox-cv. This is gone now and
>> I can't find it using some search-engines.
>> 
>> Has it maybe been moved to another git provider? Or could someone hand a
>> copy of this file to me :)
>> 
>> Many thanks in advance
>> Eike
>> 
>> 


-- 
GPG/PGP: AD7AC35E
https://eikek.github.io/sharry



Re: [O] ox-cv.el

2018-07-06 Thread Diego Zamboni
Hi Eike,

I don’t think it’s the same, but at least from the name, this one might serve a 
similar purpose: 
https://blog.oscarnajera.com/2018/05/org-cv-an-org-export-backend-for-cv/ 


I found it just yesterday, haven’t tried it yet.

Best,
—Diego


> On 6 Jul 2018, at 11:56, Eike  wrote:
> 
> 
> Hello,
> 
> I'm occassionally using a nice package by Myles English that has been on
> github for a while https://github.com/mylese/ox-cv. This is gone now and
> I can't find it using some search-engines.
> 
> Has it maybe been moved to another git provider? Or could someone hand a
> copy of this file to me :)
> 
> Many thanks in advance
> Eike
> 
> 



[O] ox-cv.el

2018-07-06 Thread Eike


Hello,

I'm occassionally using a nice package by Myles English that has been on
github for a while https://github.com/mylese/ox-cv. This is gone now and
I can't find it using some search-engines.

Has it maybe been moved to another git provider? Or could someone hand a
copy of this file to me :)

Many thanks in advance
Eike




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

2018-07-06 Thread Eli Zaretskii
> From: rrandr...@gmail.com
> Date: Fri, 06 Jul 2018 00:46:14 +
> 
> 
> 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?

Thanks.