all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
@ 2013-06-18 20:22 Peter Münster
  2013-06-18 20:22 ` [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties) Peter Münster
  2013-06-18 21:11 ` [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet David Engster
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Münster @ 2013-06-18 20:22 UTC (permalink / raw)
  To: emacs-orgmode

* contrib/lisp/org-notify.el (org-notify-make-todo)
(org-notify-process, org-notify-on-action-button)
(org-notify-action-email, org-notify-action-window): Replace `flet'
and `macrolet' by `cl-flet' and `cl-macrolet'.
---
 contrib/lisp/org-notify.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index 4047448..3019852 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -118,7 +118,7 @@ simple timestamp string."
 
 (defun org-notify-make-todo (heading &rest ignored)
   "Create one todo item."
-  (macrolet ((get (k) `(plist-get list ,k))
+  (cl-macrolet ((get (k) `(plist-get list ,k))
              (pr (k v) `(setq result (plist-put result ,k ,v))))
     (let* ((list (nth 1 heading))      (notify (or (get :notify) "default"))
            (deadline (org-notify-convert-deadline (get :deadline)))
@@ -157,7 +157,7 @@ PERIOD."
 (defun org-notify-process ()
   "Process the todo-list, and possibly notify user about upcoming or
 forgotten tasks."
-  (macrolet ((prm (k) `(plist-get prms ,k))  (td (k) `(plist-get todo ,k)))
+  (cl-macrolet ((prm (k) `(plist-get prms ,k))  (td (k) `(plist-get todo ,k)))
     (dolist (todo (org-notify-todo-list))
       (let* ((deadline (td :deadline))  (heading (td :heading))
              (uid (td :uid))            (last-run-sym
@@ -268,7 +268,7 @@ seconds.  The default value for SECS is 20."
 
 (defun org-notify-on-action-button (button)
   "User wants to see action after button activation."
-  (macrolet ((get (k) `(button-get button ,k)))
+  (cl-macrolet ((get (k) `(button-get button ,k)))
     (org-notify-on-action (get 'plist) (get 'key))
     (org-notify-delete-window (get 'buffer))
     (cancel-timer (get 'timer))))
@@ -311,7 +311,7 @@ seconds.  The default value for SECS is 20."
   (compose-mail user-mail-address (concat "TODO: " (plist-get plist :heading)))
   (insert (org-notify-body-text plist))
   (funcall send-mail-function)
-  (flet ((yes-or-no-p (prompt) t))
+  (cl-flet ((yes-or-no-p (prompt) t))
     (kill-buffer)))
 
 (defun org-notify-select-highest-window ()
@@ -334,7 +334,7 @@ org-notify window.  Mostly copied from `appt-select-lowest-window'."
 (defun org-notify-action-window (plist)
   "Pop up a window, mostly copied from `appt-disp-window'."
   (save-excursion
-    (macrolet ((get (k) `(plist-get plist ,k)))
+    (cl-macrolet ((get (k) `(plist-get plist ,k)))
       (let ((this-window (selected-window))
             (buf (get-buffer-create
                   (format org-notify-window-buffer-name (get :uid)))))
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties)
  2013-06-18 20:22 [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet Peter Münster
@ 2013-06-18 20:22 ` Peter Münster
  2013-06-27 14:42   ` Bastien
  2013-06-18 21:11 ` [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet David Engster
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Münster @ 2013-06-18 20:22 UTC (permalink / raw)
  To: emacs-orgmode

* contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
org-element are all uppercase now.
---
 contrib/lisp/org-notify.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index 3019852..dd4100d 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -120,7 +120,7 @@ simple timestamp string."
   "Create one todo item."
   (cl-macrolet ((get (k) `(plist-get list ,k))
              (pr (k v) `(setq result (plist-put result ,k ,v))))
-    (let* ((list (nth 1 heading))      (notify (or (get :notify) "default"))
+    (let* ((list (nth 1 heading))      (notify (or (get :NOTIFY) "default"))
            (deadline (org-notify-convert-deadline (get :deadline)))
 	   (heading (get :raw-value))
            result)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-18 20:22 [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet Peter Münster
  2013-06-18 20:22 ` [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties) Peter Münster
@ 2013-06-18 21:11 ` David Engster
  2013-06-18 23:03   ` Peter Münster
  1 sibling, 1 reply; 11+ messages in thread
From: David Engster @ 2013-06-18 21:11 UTC (permalink / raw)
  To: Peter Münster; +Cc: emacs-orgmode

Peter Münster writes:
> * contrib/lisp/org-notify.el (org-notify-make-todo)
> (org-notify-process, org-notify-on-action-button)
> (org-notify-action-email, org-notify-action-window): Replace `flet'
> and `macrolet' by `cl-flet' and `cl-macrolet'.

cl-lib was just introduced in Emacs 24.3.

-David

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-18 21:11 ` [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet David Engster
@ 2013-06-18 23:03   ` Peter Münster
  2013-06-19 17:14     ` Achim Gratz
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Münster @ 2013-06-18 23:03 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Jun 18 2013, David Engster wrote:

> Peter Münster writes:
>> * contrib/lisp/org-notify.el (org-notify-make-todo)
>> (org-notify-process, org-notify-on-action-button)
>> (org-notify-action-email, org-notify-action-window): Replace `flet'
>> and `macrolet' by `cl-flet' and `cl-macrolet'.
>
> cl-lib was just introduced in Emacs 24.3.

Does that mean, that the trunk should be modified later?

I've submitted the patch only because of this message:
http://article.gmane.org/gmane.emacs.orgmode/71560

-- 
           Peter

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-18 23:03   ` Peter Münster
@ 2013-06-19 17:14     ` Achim Gratz
  2013-06-19 18:46       ` David Engster
  0 siblings, 1 reply; 11+ messages in thread
From: Achim Gratz @ 2013-06-19 17:14 UTC (permalink / raw)
  To: emacs-orgmode

Peter Münster writes:
>> cl-lib was just introduced in Emacs 24.3.
>
> Does that mean, that the trunk should be modified later?

It means you should implement a solution that doesn't make Org
non-functional for Emacs 23 users.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-19 17:14     ` Achim Gratz
@ 2013-06-19 18:46       ` David Engster
  2013-06-20  9:51         ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: David Engster @ 2013-06-19 18:46 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz writes:
> Peter Münster writes:
>>> cl-lib was just introduced in Emacs 24.3.
>>
>> Does that mean, that the trunk should be modified later?
>
> It means you should implement a solution that doesn't make Org
> non-functional for Emacs 23 users.

The easiest solution is to simply do nothing, until Org drops support
for Emacs 24.2 and earlier. The 'cl' library will be shipped with Emacs
for a long time.

BTW, which Emacs versions does Org support? Is this documented anywhere?

-David

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-19 18:46       ` David Engster
@ 2013-06-20  9:51         ` Carsten Dominik
  2013-06-20 11:52           ` Peter Münster
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2013-06-20  9:51 UTC (permalink / raw)
  To: David Engster; +Cc: Achim Gratz, emacs-orgmode


On 19.6.2013, at 20:46, David Engster <deng@randomsample.de> wrote:

> Achim Gratz writes:
>> Peter Münster writes:
>>>> cl-lib was just introduced in Emacs 24.3.
>>> 
>>> Does that mean, that the trunk should be modified later?
>> 
>> It means you should implement a solution that doesn't make Org
>> non-functional for Emacs 23 users.
> 
> The easiest solution is to simply do nothing, until Org drops support
> for Emacs 24.2 and earlier. The 'cl' library will be shipped with Emacs
> for a long time.
> 
> BTW, which Emacs versions does Org support? Is this documented anywhere?

No, but loosely, we have tried to support the current major version (i.e. 24) and
the previous major version (i.e. 23)

- Carsten

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-20  9:51         ` Carsten Dominik
@ 2013-06-20 11:52           ` Peter Münster
  2013-08-31  6:32             ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Münster @ 2013-06-20 11:52 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, Jun 20 2013, Carsten Dominik wrote:

>> The easiest solution is to simply do nothing, until Org drops support
>> for Emacs 24.2 and earlier. The 'cl' library will be shipped with Emacs
>> for a long time.
>> 
>> BTW, which Emacs versions does Org support? Is this documented anywhere?
>
> No, but loosely, we have tried to support the current major version (i.e. 24) and
> the previous major version (i.e. 23)

All right. Please apply this patch only later, when emacs 25 is out.

-- 
           Peter

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties)
  2013-06-18 20:22 ` [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties) Peter Münster
@ 2013-06-27 14:42   ` Bastien
  2013-06-27 16:41     ` Peter Münster
  0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2013-06-27 14:42 UTC (permalink / raw)
  To: Peter Münster; +Cc: emacs-orgmode

Hi Peter,

Peter Münster <pmlists@free.fr> writes:

> * contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
> org-element are all uppercase now.

Mhh... not sure what it means -- do you have a pointer?

> -    (let* ((list (nth 1 heading))      (notify (or (get :notify) "default"))
> +    (let* ((list (nth 1 heading))      (notify (or (get :NOTIFY) "default"))

I feel dull: please let me know why this is needed.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties)
  2013-06-27 14:42   ` Bastien
@ 2013-06-27 16:41     ` Peter Münster
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Münster @ 2013-06-27 16:41 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, Jun 27 2013, Bastien wrote:

>> * contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
>> org-element are all uppercase now.
>
> Mhh... not sure what it means -- do you have a pointer?

Yes, here: http://article.gmane.org/gmane.emacs.orgmode/73628

Citation:

  | (defun org-element-headline-parser (limit &optional raw-secondary-p)
  |   "Parse a headline.
  |
  | Return a list whose CAR is `headline' and CDR is a plist
  | containing `:raw-value', `:title', `:alt-title', `:begin',
  | `:end', `:pre-blank', `:hiddenp', `:contents-begin' and
  | `:contents-end', `:level', `:priority', `:tags',
  | `:todo-keyword',`:todo-type', `:scheduled', `:deadline',
  | `:closed', `:quotedp', `:archivedp', `:commentedp' and
  | `:footnote-section-p' keywords.
  |
  | The plist also contains any property set in the property drawer,
  | with its name in upper cases and colons added at the
  | beginning (i.e. `:CUSTOM_ID').
  |
        [...]


>> -    (let* ((list (nth 1 heading))      (notify (or (get :notify) "default"))
>> +    (let* ((list (nth 1 heading))      (notify (or (get :NOTIFY) "default"))
>
> I feel dull: please let me know why this is needed.

No problem. Here another pointer:
http://article.gmane.org/gmane.emacs.orgmode/73637

-- 
           Peter

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet
  2013-06-20 11:52           ` Peter Münster
@ 2013-08-31  6:32             ` Carsten Dominik
  0 siblings, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2013-08-31  6:32 UTC (permalink / raw)
  To: Peter Münster; +Cc: emacs-orgmode

Hi Peter,

Please remind me then.

Thank you!

- Carsten

On 20.6.2013, at 13:52, Peter Münster <pmlists@free.fr> wrote:

> On Thu, Jun 20 2013, Carsten Dominik wrote:
> 
>>> The easiest solution is to simply do nothing, until Org drops support
>>> for Emacs 24.2 and earlier. The 'cl' library will be shipped with Emacs
>>> for a long time.
>>> 
>>> BTW, which Emacs versions does Org support? Is this documented anywhere?
>> 
>> No, but loosely, we have tried to support the current major version (i.e. 24) and
>> the previous major version (i.e. 23)
> 
> All right. Please apply this patch only later, when emacs 25 is out.
> 
> -- 
>           Peter
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-08-31  6:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 20:22 [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet Peter Münster
2013-06-18 20:22 ` [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties) Peter Münster
2013-06-27 14:42   ` Bastien
2013-06-27 16:41     ` Peter Münster
2013-06-18 21:11 ` [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet David Engster
2013-06-18 23:03   ` Peter Münster
2013-06-19 17:14     ` Achim Gratz
2013-06-19 18:46       ` David Engster
2013-06-20  9:51         ` Carsten Dominik
2013-06-20 11:52           ` Peter Münster
2013-08-31  6:32             ` Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.