Requesting a new release of org-contrib.

2022-12-11 Thread Malcolm Purvis
Emacs 29 and the new main branch (emacs-30) require the 't' 
condition in a cl-case to be the last entry.  This breaks 
org-checklist in version 0.4 of org-contrib.


The fix has already been applied 
(https://git.sr.ht/~bzg/org-contrib/commit/6422b265f1150204f024e33d54f2dcfd8323005c) 
but it is not available in NonGNU ELPA.


Could a new release of org-contrib be made to make the fix widely 
available?


Thanks,

Malcolm
--
     Malcolm Purvis 



bug#57381: 29.0.50; void-function byte-compile-warn-obsolete when building latest org-mode

2022-08-25 Thread Malcolm Purvis
"Lars" == Lars Ingebrigtsen  writes: 



This should now be fixed in Emacs 29.


Confirmed.  Thank you.

Malcolm 


--
     Malcolm Purvis 





Re: [O] Change in appearance of org-todo-keywords

2017-08-07 Thread Malcolm Purvis
>>>>> "Josh" == Josh Moller-Mara  writes:

Josh> From what I can tell, doing something like (org-toggle-tag
Josh> "sometag" 'off) produces these double colons. It seems to have to
Josh> do with the way that org-split-string no longer returns nil, but
Josh> returns ("").

I'm also seeing this problem and I have org-todo-state-tags-triggers
set.

A git bisect points the finger at this commit, which also agrees your
observations about org-split-string.

commit f776e65373fa135fffb51e201698823fbfb3865b (refs/bisect/bad)
Author: Nicolas Goaziou 
Date:   Thu Jul 27 13:39:52 2017 +0200

Move `org-split-string' to "org-macs.el"

* lisp/org.el (org-split-string): Move the function...
* lisp/org-macs.el (org-split-string): ... here.  Also clarify
      docstring with regards to `split-string'.

Malcolm

-- 
   Malcolm Purvis 



[O] Automatically Concluding a Habit.

2017-06-18 Thread Malcolm Purvis
I have a habit that I'd like to perform every day or so in the lead up
to an event, but after the event date I would like to be marked
permanently done and never again appear in the agenda.

Is there a way to do this automatically?  I've tried with a combination
of scheduled and deadlines, but the habit reappears after the deadline:

* Prepare for Event
DEADLINE: <2017-07-09 Sun> SCHEDULED: <2017-07-04 Tue .+1d>
:PROPERTIES:
:STYLE:habit
:END:

Editing the habit to remove the '.+1d' results in the desired behaviour,
however I was hoping to avoid the manual edit.

Thanks,

Malcolm

-- 
   Malcolm Purvis 



Re: [O] [ANN] New Org duration library

2017-02-22 Thread Malcolm Purvis
>>>>> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> The documentation lists what is allowed. Strings are not. Where
Nicolas> did you read that they might be? For the record, here are the
Nicolas> first paragraphs of the docstring:

Nicolas>   The value can be set to, respectively, ‘h:mm:ss’ or ‘h:mm’,
Nicolas> which means a duration is expressed as, respectively, a
Nicolas> "H:MM:SS" or "H:MM" string.

I too was confused by this and took the quotes around ‘h:mm:ss’ and
‘h:mm’ to mean that they are strings.  Changing the working to be:

   The value can be set to, respectively, the symbols ‘h:mm:ss’ or ‘h:mm’,

would clarify the situation.

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Time clocking problem

2016-09-04 Thread Malcolm Purvis
>>>>> "Louis" == Louis Turk  writes:

Louis> * Organization
[...]
Louis> :PROPERTIES:
Louis> :CLOCK_MODELINE_TOTAL: today
Louis> :id: eb155a82-92b2-4f25-a3c6-0304591af2f9
Louis> :END:

Louis> (defvar bh/organization-task-id "eb155a82-92b2-4f25-a3c6-0304591af2f9")

Louis,

These look correct to me.  Does the following command produce any output?

M-: (org-id-find bh/organization-task-id)

Perhaps org can't find file with the Organization node.  It the file in
your agenda list?

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Time clocking problem

2016-09-01 Thread Malcolm Purvis
>>>>> "Louis" == Louis Turk  writes:

Louis> 1 and 3 do not work for me. I have to place the cursor on the
Louis> *Organization task to start timing it. And when I clock out of a
Louis> todo item, the *Organization task is not automatically clocked
Louis> in.

The code searches for the Organization task by the id stored in
the variable bh/organization-task-id.  Are these matching in your case?

Eg:

#+begin_src org
,#+FILETAGS: PERSONAL
...
,* Tasks
,** Organization
   :PROPERTIES:
   :CLOCK_MODELINE_TOTAL: today
   :ID:   eb155a82-92b2-4f25-a3c6-0304591af2f9
   :END:
   ...
#+end_src

#+begin_src elisp
(setq bh/organization-task-id "eb155a82-92b2-4f25-a3c6-0304591af2f9")
#+end_src

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Helm update brings "funcall: Symbol's value as variable is void: helm-walk-ignore-directories"

2015-09-07 Thread Malcolm Purvis
>>>>> "Eduardo" == Eduardo Mercovich  writes:

Eduardo> Just found it. The new installed version was not included in
Eduardo> .emacs in the (add-to-list 'load-path "[snip]") part.

Eduardo> Is this the expected behavior when we update through the
Eduardo> package manager?

The package manager does not unload the old package and load new package
as part of the upgrade.  As a consequence, I always restart Emacs after
upgrading packages to avoid problems like this.

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Logging the new time on a reschedule.

2015-08-20 Thread Malcolm Purvis
>>>>> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> Malcolm Purvis  writes:
>> Thanks.  Unfortunately I now get an error when I try to reschedule:

Nicolas> Oops. Fixed. Thank you.

It works as expected now.  Thanks again.

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Logging the new time on a reschedule.

2015-08-20 Thread Malcolm Purvis
>>>>> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> None that I know. This is fixed. Thank you.

Thanks.  Unfortunately I now get an error when I try to reschedule:

Error in post-command-hook (org-add-log-note): (wrong-type-argument 
char-or-string-p time)

The relevant part of my config is:

--8<---cut here---start->8---
(setq
 org-log-reschedule (quote time)
 org-log-redeadline (quote time)
 )

(setq org-log-note-headings
  (cons '(reschedule .  "Rescheduled from %S to %s on %t")
org-log-note-headings))
(setq org-log-note-headings
  (cons '(redeadline .  "New deadline from %S to %s on %t")
org-log-note-headings))
--8<---cut here-------end--->8---

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Logging the new time on a reschedule.

2015-08-20 Thread Malcolm Purvis
>>>>> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> None that I know. This is fixed. Thank you.

Thanks.  Unfortunately I now get an error when I try to reschedule:

Error in post-command-hook (org-add-log-note): (wrong-type-argument 
char-or-string-p time)

The relevant part of my config is:

--8<---cut here---start->8---
(setq
 org-log-reschedule (quote time)
 org-log-redeadline (quote time)
 )

(setq org-log-note-headings
  (cons '(reschedule .  "Rescheduled from %S to %s on %t")
org-log-note-headings))
(setq org-log-note-headings
  (cons '(redeadline .  "New deadline from %S to %s on %t")
org-log-note-headings))
--8<---cut here-------end--->8---

Malcolm

-- 
   Malcolm Purvis 



[O] Logging the new time on a reschedule.

2015-08-18 Thread Malcolm Purvis
I would like to log the new time as well as the old when changing the
scheduling or deadline of a task.  I changed the value of
org-log-note-headings to include the new time (%s) in the reschedule
log:

(reschedule .  "Rescheduled from %S to %s on %t")

and set org-log-reschedule to 'time.  However the new time is missing
from the log entry:

- Rescheduled from "[2015-08-21 Fri]" to  on [2015-08-19 Wed 11:03]

I expected this instead:

- Rescheduled from "[2015-08-29 Sat]" to "[2015-09-19 Sat]" on [2015-08-19 
Wed 11:38]

The cause is neither org-schedule nor org-deadline pass the the new time
to org-add-log-setup.  Is there a reason for this?

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Tangling and Exporting an Unsupported Language.

2014-10-01 Thread Malcolm Purvis
>>>>> "Ista" == Ista Zahn  writes:

Ista> Exporting and tangling don't require any language support.

Ista> #+begin_src foobarbas :tangle foo.bar
Ista> +end_src

Ista> is perfectly fine and will export and tangle just fine. Or did I
Ista> misunderstand your question?

Thanks, I wasn't aware that you could put an arbitrary string as the
language.

I also found that I had org-latex-listings set to t, which was making
LaTeX error because it didn't know about the languages I was trying.

I've now switched the using the minted LaTeX package, which supports
'text' as a language, and have started using that.

Thanks for your help.

Malcolm

-- 
   Malcolm Purvis 



[O] Tangling and Exporting an Unsupported Language.

2014-09-28 Thread Malcolm Purvis
All,

I'm writing an org document which contains code examples of a language
not supported by Babel (a local domain specific language).  The language
doesn't even have a supporting Emacs mode.

I'm wondering what the best portable approach is to managing the code
blocks.  I'm particularly interested in exporting the document to LaTeX
and tangling the code.  I may need to share the document with others, so
I'd prefer not to require a supporting elisp file if I can help it.

Currently I'm using the org language, since it seems to be the most generic:

#+begin_src org :tangle foo.bar
#+end_src

Is there a case for 'begin_src text' to handle arbitrary content?

Malcolm 

-- 
   Malcolm Purvis 



Re: [O] Error with removing zero time clocks in capture.

2014-09-11 Thread Malcolm Purvis
>>>>> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> This should be fixed. Thank you for reporting it.

I can confirm that the error has gone.

Thanks,

Malcolm

-- 
   Malcolm Purvis 



[O] Error with removing zero time clocks in capture.

2014-09-11 Thread Malcolm Purvis
a 
save-match-data-internal (quote evaporate))
  (progn (save-excursion (save-restriction (widen) (goto-char beg) 
(beginning-of-line) (let ((save-match-data-internal (match-data))) 
(unwind-protect (progn (let (... ...) (if ... ...) (let ... ...))) 
(set-match-data save-match-data-internal (quote evaporate)) 
(org-element--cache-set-timer (current-buffer)))
  (if (org-element--cache-active-p) (progn (save-excursion (save-restriction 
(widen) (goto-char beg) (beginning-of-line) (let ((save-match-data-internal 
(match-data))) (unwind-protect (progn (let ... ... ...)) (set-match-data 
save-match-data-internal (quote evaporate)) (org-element--cache-set-timer 
(current-buffer
  org-element--cache-after-change(666 666 1)
  replace-match("")
  org-capture-empty-lines-after(0)
  org-capture-finalize(nil)
  call-interactively(org-capture-finalize nil nil)
--8<---cut here---end--->8---

I assume that the cache code is trying to remove the clock information
from the draw that has already been removed because
org-clock-out-remove-zero-time-clocks is set.

Malcolm

-- 
   Malcolm Purvis 



Re: [O] Regex Speedup for org-refresh-category-properties.

2014-07-29 Thread Malcolm Purvis
>>>>> "Achim" == Achim Gratz  writes:

Achim> I think that "^[ \t]*\\(\\(?:#\\+\\|:\\)CATEGORY:\\)\\(.*\\)"
Achim> would be a better regex, assuming that the original regex was
Achim> doing the right thing.

Thanks.  Things are just as fast with this regexp.

Malcolm

-- 
   Malcolm Purvis 



[O] Regex Speedup for org-refresh-category-properties.

2014-07-28 Thread Malcolm Purvis

I use the master version of org, and some months ago the time required
to generate my custom agenda view sky rocketed.  I've found that 90% of
the time was being spent in the call to re-search-forward in
org-refresh-category-properties.  The patch below speeds up the regular
expression search and makes the generation of my agenda as fast as
before.

Malcolm

diff --git a/lisp/org.el b/lisp/org.el
index 7e30061..2fc6854 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9474,7 +9474,7 @@ The refresh happens only for the current tree (not 
subtree)."
 (goto-char (point-min))
 (put-text-property (point) (point-max) 'org-category def-cat)
 (while (re-search-forward
-"^[ \t]*\\(#\\+CATEGORY:\\|[ \t]*:CATEGORY:\\)\\(.*\\)" nil t)
+"^[ \t]*\\(#\\+CATEGORY:\\|*:CATEGORY:\\)\\(.*\\)" nil t)
   (setq pos (match-end 0)
 optionp (equal (char-after (match-beginning 0)) ?#)
 cat (org-trim (match-string 2)))

-- 
   Malcolm Purvis 



Re: [O] orgstruct-mode taking over C-c C-f

2014-01-24 Thread Malcolm Purvis
>>>>> "Bastien" == Bastien   writes:

Bastien> Did you recompiled Org?

I can confirm that the problem still exists with a freshly compiled
version of the latest mainline
(240329465b466584f4bf80f24eb881fb3c9285cf).

Also the alias org-set-transient-map doesn't seem to be called, so I
still get the error about the undefined function set-transient-map when
running Emacs 23.3.

Thanks,

Malcolm

-- 
    Malcolm Purvis