emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Use of deprecated org-log-note-marker variable in outshine
@ 2016-01-06 23:09 Kaushal Modi
  2016-01-07 16:38 ` Thorsten Jolitz
  2016-02-03 23:02 ` Thorsten Jolitz
  0 siblings, 2 replies; 9+ messages in thread
From: Kaushal Modi @ 2016-01-06 23:09 UTC (permalink / raw)
  To: emacs-org list, tjolitz

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Hi Thorsten,

Recently the global variable org-log-note-marker was removed from org.el.

But it is used in outshine.el as follows:

(defadvice org-store-log-note (around org-store-log-note-around activate)
  "Outcomment inserted log-note in Outshine buffers."
  (let ((outshine-log-note-beg-marker
;; stay before inserted text
(copy-marker org-log-note-marker nil))
(outshine-log-note-end-marker
;; stay after inserted text
(copy-marker org-log-note-marker t)))
    ad-do-it
    (unless (derived-mode-p 'org-mode 'org-agenda-mode)
      (comment-region outshine-log-note-beg-marker
     outshine-log-note-end-marker))
    (move-marker outshine-log-note-beg-marker nil)
    (move-marker outshine-log-note-end-marker nil)))

So right now, I am getting this warning at emacs startup:

~/.emacs.d/elpa_25_0/outshine-20151203.802/outshine.elc:Warning: reference
to
    free variable ‘org-log-note-marker’


@ Thorsten, Nicolas: What would be the best way to fix that?

My org version:
Org-mode version 8.3.2 (release_8.3.2-469-ga902c8 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1955 bytes --]

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-06 23:09 Use of deprecated org-log-note-marker variable in outshine Kaushal Modi
@ 2016-01-07 16:38 ` Thorsten Jolitz
  2016-01-07 16:56   ` Kaushal Modi
  2016-02-03 23:02 ` Thorsten Jolitz
  1 sibling, 1 reply; 9+ messages in thread
From: Thorsten Jolitz @ 2016-01-07 16:38 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

Hi Kaushal,

> Recently the global variable org-log-note-marker was removed from
> org.el.
>
> But it is used in outshine.el as follows:
>
> (defadvice org-store-log-note (around org-store-log-note-around
> activate)
> "Outcomment inserted log-note in Outshine buffers."
> (let ((outshine-log-note-beg-marker
> ;; stay before inserted text
> (copy-marker org-log-note-marker nil))
> (outshine-log-note-end-marker
> ;; stay after inserted text
> (copy-marker org-log-note-marker t)))
> ad-do-it
> (unless (derived-mode-p 'org-mode 'org-agenda-mode)
> (comment-region outshine-log-note-beg-marker
> outshine-log-note-end-marker))
> (move-marker outshine-log-note-beg-marker nil)
> (move-marker outshine-log-note-end-marker nil)))
>
> So right now, I am getting this warning at emacs startup:
>
> ~/.emacs.d/elpa_25_0/outshine-20151203.802/outshine.elc:Warning:
> reference to
> free variable ‘org-log-note-marker’
>
> @ Thorsten, Nicolas: What would be the best way to fix that?

Was it just removed, or rather renamed or replaced by something else?
Maybe the fix would be trivial if somebody with insights about the
change could give some hints?

PS
Recently I managed to use Emacs/Org-mode more frequently again and even
follow the mailing list somehow, so I hope I can the change maintainance
state of the outshine libraries from 'unmaintained' to 'kind of
maintained' again.

-- 
cheers,
Thorsten

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-07 16:38 ` Thorsten Jolitz
@ 2016-01-07 16:56   ` Kaushal Modi
  2016-01-08 13:21     ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Kaushal Modi @ 2016-01-07 16:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Thorsten Jolitz, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

> Was it just removed, or rather renamed or replaced by something else?
> Maybe the fix would be trivial if somebody with insights about the
> change could give some hints?

I have never needed to use this function, so I cannot comment on it. So
asking Nicolas for help regarding this.

> Recently I managed to use Emacs/Org-mode more frequently again and even
> follow the mailing list somehow, so I hope I can the change maintainance
> state of the outshine libraries from 'unmaintained' to 'kind of
> maintained' again.

Thanks! That's great news! :)

--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 905 bytes --]

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-07 16:56   ` Kaushal Modi
@ 2016-01-08 13:21     ` Nicolas Goaziou
  2016-01-08 15:45       ` Kaushal Modi
                         ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2016-01-08 13:21 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list, Thorsten Jolitz

Hello,

Kaushal Modi <kaushal.modi@gmail.com> writes:

>> Was it just removed, or rather renamed or replaced by something else?
>> Maybe the fix would be trivial if somebody with insights about the
>> change could give some hints?
>
> I have never needed to use this function, so I cannot comment on it. So
> asking Nicolas for help regarding this.

Actually, it was a mistake to remove the variable in the first place. As
a consequence, I re-introduced it in master.

However, it doesn't store the same location as before, i.e., it merely
points to the entry where the note is going to be added instead of the
accurate location for the note.

As a first approximation, I think 

  (with-current-buffer (marker-buffer org-log-note-marker)
    (goto-char (org-log-note-marker))
    (copy-marker (org-log-beginning)))

is close to what `org-log-note-marker' used to be.


Regards,

-- 
Nicolas Goaziou

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-08 13:21     ` Nicolas Goaziou
@ 2016-01-08 15:45       ` Kaushal Modi
  2016-01-08 16:28       ` Nicolas Richard
  2016-02-03 23:04       ` Thorsten Jolitz
  2 siblings, 0 replies; 9+ messages in thread
From: Kaushal Modi @ 2016-01-08 15:45 UTC (permalink / raw)
  To: Kaushal Modi, Thorsten Jolitz, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

> Actually, it was a mistake to remove the variable in the first place. As
> a consequence, I re-introduced it in master.

Thanks. That has fixed the free variable warning.

@Thorsten But now you might need to have different versions of defadvice
for org-store-log-note based on the value of org-version.

[-- Attachment #2: Type: text/html, Size: 754 bytes --]

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-08 13:21     ` Nicolas Goaziou
  2016-01-08 15:45       ` Kaushal Modi
@ 2016-01-08 16:28       ` Nicolas Richard
  2016-01-31 22:11         ` Nicolas Goaziou
  2016-02-03 23:04       ` Thorsten Jolitz
  2 siblings, 1 reply; 9+ messages in thread
From: Nicolas Richard @ 2016-01-08 16:28 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list, Thorsten Jolitz

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Actually, it was a mistake to remove the variable in the first place. As
> a consequence, I re-introduced it in master.
>
> However, it doesn't store the same location as before, i.e., it merely
> points to the entry where the note is going to be added instead of the
> accurate location for the note.

Did you consider renaming it, in the case some code relies on it ?


>   (with-current-buffer (marker-buffer org-log-note-marker)
>     (goto-char (org-log-note-marker))
                 ^                   ^
                 I guess those parens are a typo.
>     (copy-marker (org-log-beginning)))

-- 
Nicolas

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-08 16:28       ` Nicolas Richard
@ 2016-01-31 22:11         ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2016-01-31 22:11 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: Thorsten Jolitz, emacs-org list, Kaushal Modi

Hello,

Nicolas Richard <nrichard@ulb.ac.be> writes:

> Did you consider renaming it, in the case some code relies on it ?

I don't consider it worth the hassle to rename internal variables
whenever we change their value.

>>   (with-current-buffer (marker-buffer org-log-note-marker)
>>     (goto-char (org-log-note-marker))
>                  ^                   ^
>                  I guess those parens are a typo.

Indeed.

Regards,

-- 
Nicolas Goaziou

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-06 23:09 Use of deprecated org-log-note-marker variable in outshine Kaushal Modi
  2016-01-07 16:38 ` Thorsten Jolitz
@ 2016-02-03 23:02 ` Thorsten Jolitz
  1 sibling, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2016-02-03 23:02 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

Hi Kaushal,

> Recently the global variable org-log-note-marker was removed from
> org.el.
>
> But it is used in outshine.el as follows:
>
> (defadvice org-store-log-note (around org-store-log-note-around
> activate)
> "Outcomment inserted log-note in Outshine buffers."
> (let ((outshine-log-note-beg-marker
> ;; stay before inserted text
> (copy-marker org-log-note-marker nil))
> (outshine-log-note-end-marker
> ;; stay after inserted text
> (copy-marker org-log-note-marker t)))
> ad-do-it
> (unless (derived-mode-p 'org-mode 'org-agenda-mode)
> (comment-region outshine-log-note-beg-marker
> outshine-log-note-end-marker))
> (move-marker outshine-log-note-beg-marker nil)
> (move-marker outshine-log-note-end-marker nil)))
>
> So right now, I am getting this warning at emacs startup:
>
> ~/.emacs.d/elpa_25_0/outshine-20151203.802/outshine.elc:Warning:
> reference to
> free variable ‘org-log-note-marker’
>
> @ Thorsten, Nicolas: What would be the best way to fix that?
>
> My org version:
> Org-mode version 8.3.2 (release_8.3.2-469-ga902c8 @
> /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Thanks for the bug report. Sorry for beeing so late ... but maybe better
late than never.

I pushed a first fix to origin/trunk. The outcommenting of inserted
log-notes in outshine seems to work again, but I encountered a new issue
with comment-region:

,----
| ;; * WAITING foo
|      ;; - State "WAITING"    from "TODO"       [2016-02-03 Mi 23:46] \\
|      ;;   waiting for bar
`----

It produces this now, which is no good, since outshine expects comments
to start at beginning-of-line. I reported this on Emacs Help.

Which Org-mode version is the first one with the new org-log-note-marker
semantics (to make the advice in outshine conditional on that)?

I push this to master once its really fixed.

-- 
cheers,
Thorsten

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

* Re: Use of deprecated org-log-note-marker variable in outshine
  2016-01-08 13:21     ` Nicolas Goaziou
  2016-01-08 15:45       ` Kaushal Modi
  2016-01-08 16:28       ` Nicolas Richard
@ 2016-02-03 23:04       ` Thorsten Jolitz
  2 siblings, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2016-02-03 23:04 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> As a first approximation, I think 
>
>   (with-current-buffer (marker-buffer org-log-note-marker)
>     (goto-char org-log-note-marker)
>     (copy-marker (org-log-beginning)))
>
> is close to what `org-log-note-marker' used to be.

Thanks for the code example - I used it.

-- 
cheers,
Thorsten

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

end of thread, other threads:[~2016-02-03 23:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-06 23:09 Use of deprecated org-log-note-marker variable in outshine Kaushal Modi
2016-01-07 16:38 ` Thorsten Jolitz
2016-01-07 16:56   ` Kaushal Modi
2016-01-08 13:21     ` Nicolas Goaziou
2016-01-08 15:45       ` Kaushal Modi
2016-01-08 16:28       ` Nicolas Richard
2016-01-31 22:11         ` Nicolas Goaziou
2016-02-03 23:04       ` Thorsten Jolitz
2016-02-03 23:02 ` Thorsten Jolitz

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).