Re: org-mode time tracking setup integrating with SaaS (Harvest, Toggl, Bonsai etc)

2020-10-11 Thread Daryl Manning
Very impressive. I am probably going to steal some of these functions.
Thank you.

Is the process you use to get this into jira (via clocktable) automatedx in
any way (even copy/paste) or do you have to put things in manually again?

Daryl.


On Sat, Oct 10, 2020 at 5:21 PM Dr. Arne Babenhauserheide 
wrote:

>
> Daryl Manning  writes:
>
> > Has anyone run across a good integration for doing that or has a blog
> post
> > on their system particularly where they need to track hours/tasks across
> a
> > few clients and projects for consultancy purposes
>
> I don’t do consultancy, but we I need to book for multiple projects at
> work. I track my time and projects with org-mode (and found that
> whenever I think “this is so small, I don’t need an org-headline for
> this”, time gets out of hand). At the end of the week I then book my
> time on the corresponding Jira issues using the clocktable in
> agenda-view.
>
> These are my essential customizations for that:
>
> (use-package org-agenda
>   :defer 8
>   :custom
>   (alert-default-style 'libnotify)
>   (appt-disp-window-function 'alert-for-appt)
>   (appt-delete-window-function (lambda ()))
>   (org-agenda-clock-consistency-checks
>(quote
> (:max-duration "12:00" :min-duration 0 :max-gap "0:05" :gap-ok-around
>("4:00" "12:00")
>:default-face
>((:background "DarkRed")
> (:foreground "white"))
>:overlap-face nil :gap-face nil :no-end-time-face nil
> :long-face nil :short-face nil)))
>   (org-agenda-clockreport-parameter-plist (quote (:link t :maxlevel 2
> :properties ("Effort"
>   (org-agenda-start-with-clockreport-mode t)
>   :config
>   ;; Rebuild the reminders everytime the agenda is displayed
>   (add-hook 'org-agenda-finalize-hook (lambda () (org-agenda-to-appt t)))
>   ;; Run once when Emacs starts
>   (org-agenda-to-appt t)
>   ;; Activate appointments so we get notifications
>   (appt-activate t))
>
> (defun my/org-agenda-show-kanban ()
>   (interactive)
>   (save-excursion
> (search-forward ":KANBAN:")
> (org-agenda-goto)
> (org-narrow-to-subtree)
> (show-all)
> (fit-window-to-buffer)
> (widen)
> (recenter-top-bottom 0)))
>
> ;; KDE: show custom agenda with kanban via f12:
> (with-eval-after-load 'org
>   (setq org-agenda-custom-commands
> '(("o" "Agenda and TODOs"
>((agenda)
> (tags-todo "-notodo" ((org-agenda-block-separator ?-)))
> (tags "KANBAN" ((org-agenda-block-separator
> ?-)(org-agenda-compact-blocks nil)(org-agenda-overriding-header "")))
>
> ;; from https://www.emacswiki.org/emacs/TransposeWindows solution by
> Robert Bost
> (defun rotate-windows (arg)
>   "Rotate your windows; use the prefix argument to rotate the other
> direction"
>   (interactive "P")
>   (if (not (> (count-windows) 1))
>   (message "You can't rotate a single window!")
> (let* ((rotate-times (prefix-numeric-value arg))
>(direction (if (or (< rotate-times 0) (equal arg '(4)))
>   'reverse 'identity)))
>   (dotimes (_ (abs rotate-times))
> (dotimes (i (- (count-windows) 1))
>   (let* ((w1 (elt (funcall direction (window-list)) i))
>  (w2 (elt (funcall direction (window-list)) (+ i 1)))
>  (b1 (window-buffer w1))
>  (b2 (window-buffer w2))
>  (s1 (window-start w1))
>  (s2 (window-start w2))
>  (p1 (window-point w1))
>  (p2 (window-point w2)))
> (set-window-buffer-start-and-point w1 b2 s2 p2)
> (set-window-buffer-start-and-point w2 b1 s1 p1)))
>
>
> (defun agenda-and-todo ()
>   (interactive)
>   (org-agenda nil "o")
>   (delete-other-windows)
>   (my/org-agenda-show-kanban)
>   (rotate-windows 1))
> ;;  systemsettings shortcuts: map f12 to
> ;;emacsclient -e '(progn (show-frame)(agenda-and-todo))'
> (global-set-key (kbd "") 'agenda-and-todo)
>
> ;; KDE: record new issue with M-f12 (alt f12):
> ;;  systemsettings shortcuts: map alt f12 to
> ;;emacsclient -e '(progn (show-frame)(org-capture))'
> (global-set-key (kbd "M-") 'org-capture)
>
> ;; clock into the current task via S-f12 (shift f12). rationale: shift
> ;; is used to shift from one task to another without clocking out.
> (global-set-key (kbd "S-") 'org-clock-in)
>
> ;; KDE: global clock out via M-S-f12 (alt-shift f12):
> ;;  systemsettings shortcuts: map f12 to
> ;;emacsclient -e '(progn (show-frame)(org-clock-out))'
> (global-set-key (kbd "M-S-") 'org-clock-out)
>
> (defun show-frame ( frame)
>   "Show the current Emacs frame or the FRAME given as argument.
>
> And make sure that it really shows up!"
>   (raise-frame)
>   ; yes, you have to call this twice. Don’t ask me why…
>   ; select-frame-set-input-focus calls x-focus-frame and does a bit of
>   ; additional magic.
>   

Re: Bug: unexpected new page started after bullet line [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-10-11 Thread Rob Sargent
My apologies, I can no longer reproduce this.  I'm not sure where I went 
wrong.



On 10/10/20 4:14 AM, Richard Lawrence wrote:

Hi Rob,

Rob Sargent  writes:


This construct causes a new page to be started
* head
** subhead
- bullet


... in which export backend? You say you are using LibreOffice, but you
provided an example Org file with many LaTeX-related options. Do you see
the page break in a LibreOffice document? in a LaTeX-compiled PDF? both?

If in LibreOffice, do you see the same behavior if you don't have all
the LaTeX-related options in place?

FWIW, I tried exporting this construct to both LaTeX and ODT *without*
the LaTeX options on Org 9.4 and do not see the page breaks you are
seeing.





Bug: ODT exporter permission issue on functional distros (eg, Guix) [9.1.9 (release_9.1.9-65-g5e4542 @ /home/cwebber/.guix-profile/share/emacs/26.3/lisp/org/)]

2020-10-11 Thread Christopher Lemmer Webber
Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/home/cwebber/.guix-profile/share/emacs/26.3/lisp/org/)

Not sure if this will work on Windows because it uses posix'y
permissions but anyway I found that the ODT exporter did not work on
Guix because the styles.xml got copied over as read-only.  This fixes it
for me.

I've already done copyright assignment for the "AM/PM support on the
agenda timegrid" patch I sent in 2010; I assume this has not expired
over the last decade.  If you check the use-by date and my copyright
assignment has somehow gone moldy let me know and I'll be happy to
update it.

 - Chris

>From df53e6282e7113b2601490266315f5018d7f2d6b Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber 
Date: Sun, 11 Oct 2020 12:56:34 -0400
Subject: [PATCH] ox-odt: Fix read-only error with styles.xml.

On systems where the source file is read-only, it's possible that
the destination styles.xml could end up read-only as well, resulting
in an error when modified or deleted by us.

* lisp/ox-odt.el (org-odt-template): Explicitly set permissions of
styles.xml to read-write for the current user.
---
 lisp/ox-odt.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 104319a9d..c2693d883 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1375,7 +1375,13 @@ original parsed data.  INFO is a plist holding export options."
 	 ((string= styles-file-type "xml")
 	  (copy-file styles-file (concat org-odt-zip-dir "styles.xml") t))
 	 ((member styles-file-type '("odt" "ott"))
-	  (org-odt--zip-extract styles-file "styles.xml" org-odt-zip-dir)
+	  (org-odt--zip-extract styles-file "styles.xml" org-odt-zip-dir)))
+	;; It's possible that when copying the file from a location that's
+	;; read-only that we accidentally end up with a read-only styles.xml
+	;; here also (eg on Guix systems)... this prevents that from
+	;; blowing up
+	(set-file-modes (concat org-odt-zip-dir "styles.xml")
+#o600)))
  (t
   (error "Invalid specification of styles.xml file: %S"
 	 (plist-get info :odt-styles-file
-- 
2.28.0



Re: [RFC] ob-reticulate: R+Python interface from Babel

2020-10-11 Thread Jack Kamm
Hi all,

I've put ob-reticulate.el on github so it can be more easily used:
https://github.com/jackkamm/ob-reticulate

I plan to submit it to MELPA or GNU ELPA over the coming weeks as well.

Cheers,
Jack



Re: Reply-All noise

2020-10-11 Thread Eric Abrahamsen
Tim Cross  writes:

> Eric S Fraga  writes:
>
>> On Sunday, 11 Oct 2020 at 16:35, c.bu...@posteo.jp wrote:
>>> From my point of view mailinglists and web-forums are a step back in
>>> usability and efficiency.
>>
>> On this, we can definitely agree!  Newsgroups are still the best way to
>> have these types of conversations.
>>
>>> But there is just one exception (just IMO): StackExchange e.g.
>>> StackOverflow. ;)
>>
>> But here I disagree: I hate using the browser for anything other than
>> reading or banking.  But that's me.
>
> I am the same. One thing I do which has reduced the pain is to use the
> 'Edit with Emacs' Chrome extension. At least now, when I'm required to
> provide text input, I can do so from within Emacs.
>
> There is also an Emacs mode for stackOverflow/stackExchange sites. I've
> not used it for a while, but it wasn't too bad and would allow you to do
> your SO searching/browsing/replying from within Emacs. Main drawback was
> the auth2 stuff - you have to use the web browser to get a login token.
>
> I do miss the old newsgroups. I use to very much enjoy starting my day
> with a Gnus+NNTP session!

Some of us are stilling starting the day that way :)




Re: Reply-All noise

2020-10-11 Thread Tim Cross


Eric S Fraga  writes:

> On Sunday, 11 Oct 2020 at 16:35, c.bu...@posteo.jp wrote:
>> From my point of view mailinglists and web-forums are a step back in
>> usability and efficiency.
>
> On this, we can definitely agree!  Newsgroups are still the best way to
> have these types of conversations.
>
>> But there is just one exception (just IMO): StackExchange e.g.
>> StackOverflow. ;)
>
> But here I disagree: I hate using the browser for anything other than
> reading or banking.  But that's me.

I am the same. One thing I do which has reduced the pain is to use the
'Edit with Emacs' Chrome extension. At least now, when I'm required to
provide text input, I can do so from within Emacs.

There is also an Emacs mode for stackOverflow/stackExchange sites. I've
not used it for a while, but it wasn't too bad and would allow you to do
your SO searching/browsing/replying from within Emacs. Main drawback was
the auth2 stuff - you have to use the web browser to get a login token.

I do miss the old newsgroups. I use to very much enjoy starting my day
with a Gnus+NNTP session! I've never gotten use to the whole IM stuff
and things like slack, but I never really got into IRC either.

Tim

-- 
Tim Cross



Re: Reply-All noise

2020-10-11 Thread Eric S Fraga
On Sunday, 11 Oct 2020 at 16:35, c.bu...@posteo.jp wrote:
> From my point of view mailinglists and web-forums are a step back in
> usability and efficiency.

On this, we can definitely agree!  Newsgroups are still the best way to
have these types of conversations.

> But there is just one exception (just IMO): StackExchange e.g.
> StackOverflow. ;)

But here I disagree: I hate using the browser for anything other than
reading or banking.  But that's me.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505



Re: Reply-All noise

2020-10-11 Thread c.buhtz
On 2020-10-11 14:58 Eric S Fraga  wrote:
> the org mode mailing list is open,

I never understood the benefit of an "open" mailinglist. But I am not
the center of the universe. ;)

> I am not trying to be snarky or rude

Your are not. Everything is fine.

> For other lists, the situation could
> be different, as it would be with newsgroups

Yeah, I think it is the root of my "problem". I am from the
usenet/newsgroups age. I miss it.

From my point of view mailinglists and web-forums are a step back in
usability and efficiency.

But there is just one exception (just IMO): StackExchange e.g.
StackOverflow. ;)



Re: Reply-All noise

2020-10-11 Thread Eric S Fraga
On Saturday, 10 Oct 2020 at 10:53, c.bu...@posteo.jp wrote:
> IMO the problem is the list user that "Answers to all".

But this is *not* the problem as the org mode mailing list is open,
i.e. anybody can post whether they subscribe or not.  Hence, replying to
all is actually the safest option.

The problem, if there is one, is to use a mail reading tool that doesn't
show you emails you've already seen again.  gnus, for instance.

> Why should I modify my system because another one make errors?

Not an error so either modify or live with it?  I am not trying to be
snarky or rude, simply stating the options for *this* particular mailing
list.  For other lists, the situation could be different, as it would
be with newsgroups of old where it was common practice to ask for email
followups with the promise of a summary of results afterwards.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505



Re: Annoyance when resolving clock idle time with emacsclient

2020-10-11 Thread Budiman Snowman
On Fri, Oct 9, 2020 at 6:40 PM Samuel Loury  wrote:

> > I almost always choose 'k' (keep) and it is often not responding after
> the
> > first or several presses. But as Samuel Loury pointed out, I'll try
> > pressing ten times at least, the next time it happens.
>
> IIRC, pressing 'k', even a lot, did not work. I realized that i might be
> linked to the fact that 'k' asks for some minibuffer input and this
> input is waited in the other frame. And when emacs is waiting for some
> minibuffer input in one frame, there is nothing I could do to get the
> control on the other frame.¹
>
> What I am suggesting is to press a lot 'i', until org-mode releases its
> grasp on the other frame. You notice that it is so when the letter 'i'
> gets written in front of you :-). Then, when org-mode let you go, you
> can run M-x org-resolve-clocks and you will be able to press 'k' this
> time.
>
> I hope this is clearer this time.
>
> Good luck :-).
>
> ¹ Actually, there is one way. Send the SIGUSR2 signal to emacs (pkill
>   -SIGUSR2 emacs) so that it starts the debugger (in your current focused
>   frame), then close the debugger and re run manually M-x
>   org-resolve-clocks. SIGUSR2 would have enabled the debug-on-quit, so
>   disable it with M-x toggle-debug-on-quit
>
>
Ah, got it. Will also try the SIGUSR2 trick, thanks.

Regards,


Re: Annoyance when resolving clock idle time with emacsclient

2020-10-11 Thread Budiman Snowman
On Fri, Oct 9, 2020 at 9:35 AM Ihor Radchenko  wrote:

> > Thanks for the tip, I'll try pressing 10 times the next time it happens
> > (which is probably today).
>
> That sounds really odd. Could it be that there are multiple open
> (without ending time) clocks existing in your org files?
>
>
I never have multiple clocks active either, as I only have one "work
journal" file and only start one clock for the current day's entry.

Regards,


Re: Disabling automatic links for timestamps and tags

2020-10-11 Thread Peter Bienstman
Thanks! Is there a way to achieve this while still keeping the syntax
highlighting intact?

On Sun, Oct 11, 2020 at 7:23 AM Kyle Meyer  wrote:

> Peter Bienstman writes:
>
> > I don't want clicking on timestamps and tags to open a search Window.
>
> You can customize org-highlight-links.  For example, assuming you have
> seq and org loaded:
>
> (setq org-highlight-links
>   (seq-remove (lambda (x) (memq x '(tag date)))
>   org-highlight-links))
>


Re: Bug: org-priority face has extra space at the end starting from version 9.4 [9.4 (9.4-elpaplus @ /home/rrudakov/.emacs.d/elpa/org-plus-contrib-20200914/)]

2020-10-11 Thread Kyle Meyer
Protesilaos Stavrou writes:

> On 2020-09-29, 08:00 +, Roman Rudakov  wrote:
>
>> "Protesilaos Stavrou"  writes:
>>
>>> Roman Rudakov  [2020-09-15, 18:50 +]:
>>>
 I use theme which draw boxes around priority cookie. Before updating to
 version 9.4 box was rendered just around square brackets, but since
 version 9.4 it has additional space at the end.

 I think it's related to the fact that org-priority face definition used
 to use separate regex which didn't include space, and now it uses
 variable org-priority-regexp which does include additional space
 character.

Thanks, all, for the excellent report and debugging.

>> I think proper value for `org-priority-regex` should be
>> ".*?\\(\\[#\\([A-Z0-9]+\\)\\]\\) ?", extra space should be moved out of
>> the brackets, It won't break anything and face definition will be
>> correct.
>
> This is to confirm that I and Ilja (in Cc) get the desired behaviour by
> evaluating the suggested regexp.

I'm wary of changing the regexp.  Although the docstring does suggest
the space shouldn't be a part of the first group, the group has included
the space since org-priority-regex was introduced way back in 2008.  And
making the suggested change results in a failing test
(test-org/entry-put).  So at this point, I'd lean towards adjusting the
docstring.

I've applied a different fix for the regression (b1de0c8e4).