emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-indent mode not indenting free text?
@ 2010-11-23 16:47 Erik Iverson
  2010-11-23 18:51 ` Nicolas Goaziou
  2010-12-02 18:51 ` Carsten Dominik
  0 siblings, 2 replies; 18+ messages in thread
From: Erik Iverson @ 2010-11-23 16:47 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I just pulled the latest org from git, and org-indent
mode does not seem to be fully working anymore.

I still see the additional stars added to headlines, and
they are shadowed properly.  But the free text lines under
each headline are not shown indented as they previously
were.

I cannot be sure when this change happened, but I think
within the last week or so.  Can anyone else reproduce
this?

It wasn't clear from looking at the git logs for
org-indent.el that anything has recently changed that
would affect this, so I'm currently stumped.

--Erik

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

* Re: org-indent mode not indenting free text?
  2010-11-23 16:47 org-indent mode not indenting free text? Erik Iverson
@ 2010-11-23 18:51 ` Nicolas Goaziou
  2010-11-23 20:35   ` David Maus
  2010-12-02 18:51 ` Carsten Dominik
  1 sibling, 1 reply; 18+ messages in thread
From: Nicolas Goaziou @ 2010-11-23 18:51 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode

Hello,

>>>>> Erik Iverson writes:

> I still see the additional stars added to headlines, and they are
> shadowed properly. But the free text lines under each headline are
> not shown indented as they previously were.

I can confirm this.

It looks like the following commit is the culprit

commit e40903a6b6087ab4b97c51830bfc36cc2f3a83c8

Regards,

-- Nicolas

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

* Re: org-indent mode not indenting free text?
  2010-11-23 18:51 ` Nicolas Goaziou
@ 2010-11-23 20:35   ` David Maus
  2010-12-02  7:57     ` Antti Kaihola
  0 siblings, 1 reply; 18+ messages in thread
From: David Maus @ 2010-11-23 20:35 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 628 bytes --]

At Tue, 23 Nov 2010 19:51:14 +0100,
Nicolas Goaziou wrote:
>
> Hello,
>
> >>>>> Erik Iverson writes:
>
> > I still see the additional stars added to headlines, and they are
> > shadowed properly. But the free text lines under each headline are
> > not shown indented as they previously were.
>
> I can confirm this.
>
> It looks like the following commit is the culprit
>
> commit e40903a6b6087ab4b97c51830bfc36cc2f3a83c8
>

Nope *cough*, 950bea36f8321b4ffdadd7c435619277bbcf201d (logic unit
misfired).

Fixed in master,

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-11-23 20:35   ` David Maus
@ 2010-12-02  7:57     ` Antti Kaihola
  2010-12-02 20:17       ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Antti Kaihola @ 2010-12-02  7:57 UTC (permalink / raw)
  To: emacs-orgmode

Erik Iverson writes:
>> > I still see the additional stars added to headlines, and they are
>> > shadowed properly. But the free text lines under each headline are
>> > not shown indented as they previously were.

I see the same thing. Indent-mode also only indents one space at a
time even though org-indent-indentation-level is set to 2.

Nicolas Goaziou wrote:
>> I can confirm this.
>>
>> It looks like the following commit is the culprit
>>
>> commit e40903a6b6087ab4b97c51830bfc36cc2f3a83c8

2010/11/23 David Maus <dmaus@ictsoc.de>:
> Nope *cough*, 950bea36f8321b4ffdadd7c435619277bbcf201d (logic unit
> misfired).
>
> Fixed in master,

I just updated to 768774812875b68dbd8b215a9c036597e00fb6d0 (Wed Dec 1
16:54:09 2010 +0000). Free text is still not indented and indents are
only one space.

I did a git bisect with this result:

95bb16661b22ce83326f13304ed4ad690cc03eba is the first bad commit
commit 95bb16661b22ce83326f13304ed4ad690cc03eba
Author: Achim Gratz <Stromeko@nexgo.de>
Date:   Fri Nov 19 01:37:01 2010 +0000

    Fix byte compiler warnings

    	* org-macs.el (org-called-interactively-p): Wrap function call in
    	with-no-warnings.
    	(with-silent-modifications) Declare macro for Emacs < 23.2.

    TINYCHANGE

:040000 040000 a6a2a10812ae5218f732d8419016b9b4be84996a
828a0e2bbbc5b1c52ed713cc64dc3ba764a5e406 M	lisp

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

* Re: org-indent mode not indenting free text?
  2010-11-23 16:47 org-indent mode not indenting free text? Erik Iverson
  2010-11-23 18:51 ` Nicolas Goaziou
@ 2010-12-02 18:51 ` Carsten Dominik
  2010-12-02 20:29   ` Erik Iverson
  1 sibling, 1 reply; 18+ messages in thread
From: Carsten Dominik @ 2010-12-02 18:51 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode

Hi Erik,

are you still having this problem?

- Carsten

On Nov 23, 2010, at 5:47 PM, Erik Iverson wrote:

> Hello,
>
> I just pulled the latest org from git, and org-indent
> mode does not seem to be fully working anymore.
>
> I still see the additional stars added to headlines, and
> they are shadowed properly.  But the free text lines under
> each headline are not shown indented as they previously
> were.
>
> I cannot be sure when this change happened, but I think
> within the last week or so.  Can anyone else reproduce
> this?
>
> It wasn't clear from looking at the git logs for
> org-indent.el that anything has recently changed that
> would affect this, so I'm currently stumped.
>
> --Erik
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-12-02  7:57     ` Antti Kaihola
@ 2010-12-02 20:17       ` Achim Gratz
  2010-12-03 13:30         ` Antti Kaihola
  0 siblings, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2010-12-02 20:17 UTC (permalink / raw)
  To: emacs-orgmode

Antti Kaihola <akaihola@gmail.com> writes:
> I did a git bisect with this result:
>
> 95bb16661b22ce83326f13304ed4ad690cc03eba is the first bad commit
> commit 95bb16661b22ce83326f13304ed4ad690cc03eba
> Author: Achim Gratz <Stromeko@nexgo.de>
> Date:   Fri Nov 19 01:37:01 2010 +0000
>
>     Fix byte compiler warnings
>
>     	* org-macs.el (org-called-interactively-p): Wrap function call in
>     	with-no-warnings.
>     	(with-silent-modifications) Declare macro for Emacs < 23.2.
>
>     TINYCHANGE

What version of Emacs are you running?  What does C-h f
with-silent-modifications result in?  Could you back out the change
(most likely the defmacro for with-silent-modifications in org-macs.el,
even though I have no clue why this would interact with org-indent-mode
as it should not be defined for versions >23.1) and tell us if that
solves your problem (which I can't test because org-indent-mode doesn't
even start on Emacs 23.1)?


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

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

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

* Re: org-indent mode not indenting free text?
  2010-12-02 18:51 ` Carsten Dominik
@ 2010-12-02 20:29   ` Erik Iverson
  2010-12-02 20:32     ` Erik Iverson
  2010-12-02 20:42     ` Carsten Dominik
  0 siblings, 2 replies; 18+ messages in thread
From: Erik Iverson @ 2010-12-02 20:29 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten,

Not as far as I can tell, it seemed fixed to me
after David's message:

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg33781.html

I haven't had any problems since then, and I just did
a pull just now, reloaded and all appears well.

If there's anything else I can do to help, please let me
know, but I can say that my original issue was fixed, so
I'm not sure if anyone else is still having the problem,
why it would be? Did they org-reload or restart emacs?
I thought maybe with that problem, I actually had to
restart emacs to get it to work again, but could be
mis-remembering.

--Erik

Carsten Dominik wrote:
> Hi Erik,
> 
> are you still having this problem?
> 
> - Carsten
> 
> On Nov 23, 2010, at 5:47 PM, Erik Iverson wrote:
> 
>> Hello,
>>
>> I just pulled the latest org from git, and org-indent
>> mode does not seem to be fully working anymore.
>>
>> I still see the additional stars added to headlines, and
>> they are shadowed properly.  But the free text lines under
>> each headline are not shown indented as they previously
>> were.
>>
>> I cannot be sure when this change happened, but I think
>> within the last week or so.  Can anyone else reproduce
>> this?
>>
>> It wasn't clear from looking at the git logs for
>> org-indent.el that anything has recently changed that
>> would affect this, so I'm currently stumped.
>>
>> --Erik
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 

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

* Re: org-indent mode not indenting free text?
  2010-12-02 20:29   ` Erik Iverson
@ 2010-12-02 20:32     ` Erik Iverson
  2010-12-03 13:15       ` Antti Kaihola
  2010-12-02 20:42     ` Carsten Dominik
  1 sibling, 1 reply; 18+ messages in thread
From: Erik Iverson @ 2010-12-02 20:32 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

I also don't understand the following part of
Antti's message:

"Free text is still not indented and indents are only one space."

That seems contradictory to me?

--Erik


Erik Iverson wrote:
> Carsten,
> 
> Not as far as I can tell, it seemed fixed to me
> after David's message:
> 
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg33781.html
> 
> I haven't had any problems since then, and I just did
> a pull just now, reloaded and all appears well.
> 
> If there's anything else I can do to help, please let me
> know, but I can say that my original issue was fixed, so
> I'm not sure if anyone else is still having the problem,
> why it would be? Did they org-reload or restart emacs?
> I thought maybe with that problem, I actually had to
> restart emacs to get it to work again, but could be
> mis-remembering.
> 
> --Erik
> 
> Carsten Dominik wrote:
>> Hi Erik,
>>
>> are you still having this problem?
>>
>> - Carsten
>>
>> On Nov 23, 2010, at 5:47 PM, Erik Iverson wrote:
>>
>>> Hello,
>>>
>>> I just pulled the latest org from git, and org-indent
>>> mode does not seem to be fully working anymore.
>>>
>>> I still see the additional stars added to headlines, and
>>> they are shadowed properly.  But the free text lines under
>>> each headline are not shown indented as they previously
>>> were.
>>>
>>> I cannot be sure when this change happened, but I think
>>> within the last week or so.  Can anyone else reproduce
>>> this?
>>>
>>> It wasn't clear from looking at the git logs for
>>> org-indent.el that anything has recently changed that
>>> would affect this, so I'm currently stumped.
>>>
>>> --Erik
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-12-02 20:29   ` Erik Iverson
  2010-12-02 20:32     ` Erik Iverson
@ 2010-12-02 20:42     ` Carsten Dominik
  1 sibling, 0 replies; 18+ messages in thread
From: Carsten Dominik @ 2010-12-02 20:42 UTC (permalink / raw)
  To: Erik Iverson; +Cc: emacs-orgmode

Hi Erik,

On Dec 2, 2010, at 9:29 PM, Erik Iverson wrote:

> Carsten,
>
> Not as far as I can tell, it seemed fixed to me
> after David's message:
>
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg33781.html

Thanks for your reply.  It is working here as well, so
I also do not know why there are still problems.  Most
likely a version/loading issue I would think.

- Carsten


>
> I haven't had any problems since then, and I just did
> a pull just now, reloaded and all appears well.


>
> If there's anything else I can do to help, please let me
> know, but I can say that my original issue was fixed, so
> I'm not sure if anyone else is still having the problem,
> why it would be? Did they org-reload or restart emacs?
> I thought maybe with that problem, I actually had to
> restart emacs to get it to work again, but could be
> mis-remembering.
>
> --Erik
>
> Carsten Dominik wrote:
>> Hi Erik,
>> are you still having this problem?
>> - Carsten
>> On Nov 23, 2010, at 5:47 PM, Erik Iverson wrote:
>>> Hello,
>>>
>>> I just pulled the latest org from git, and org-indent
>>> mode does not seem to be fully working anymore.
>>>
>>> I still see the additional stars added to headlines, and
>>> they are shadowed properly.  But the free text lines under
>>> each headline are not shown indented as they previously
>>> were.
>>>
>>> I cannot be sure when this change happened, but I think
>>> within the last week or so.  Can anyone else reproduce
>>> this?
>>>
>>> It wasn't clear from looking at the git logs for
>>> org-indent.el that anything has recently changed that
>>> would affect this, so I'm currently stumped.
>>>
>>> --Erik
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-12-02 20:32     ` Erik Iverson
@ 2010-12-03 13:15       ` Antti Kaihola
  0 siblings, 0 replies; 18+ messages in thread
From: Antti Kaihola @ 2010-12-03 13:15 UTC (permalink / raw)
  To: emacs-orgmode

2010/12/2 Erik Iverson <eriki@ccbr.umn.edu>:
> I also don't understand the following part of
> Antti's message:
>
> "Free text is still not indented and indents are only one space."
>
> That seems contradictory to me?

Sorry about vague language: task items (lines with asterisks) are
indented by only one space, and free text isn't indented at all.

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

* Re: Re: org-indent mode not indenting free text?
  2010-12-02 20:17       ` Achim Gratz
@ 2010-12-03 13:30         ` Antti Kaihola
  2010-12-03 16:18           ` Erik Iverson
  2010-12-03 17:08           ` Achim Gratz
  0 siblings, 2 replies; 18+ messages in thread
From: Antti Kaihola @ 2010-12-03 13:30 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

2010/12/2 Achim Gratz <Stromeko@nexgo.de>:
> What version of Emacs are you running?

This is:
GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
2009-09-27 on palmer, modified by Debian

> What does C-h f with-silent-modifications result in?

with-silent-modifications is a Lisp macro in `org-macs.el'.

(with-silent-modifications ORG-UNMODIFIED)

Not documented.

> Could you back out the change
> (most likely the defmacro for with-silent-modifications in org-macs.el,
> even though I have no clue why this would interact with org-indent-mode
> as it should not be defined for versions >23.1) and tell us if that
> solves your problem (which I can't test because org-indent-mode doesn't
> even start on Emacs 23.1)?

Yes it does! I commented out:

;;(if (or (< emacs-major-version 23)
;;	(and (<= emacs-major-version 23)
;;	     (< emacs-minor-version 2)))
;;    (defmacro with-silent-modifications
;;      (org-unmodified)))

and it now works correctly. Thanks a lot!

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

* Re: Re: org-indent mode not indenting free text?
  2010-12-03 13:30         ` Antti Kaihola
@ 2010-12-03 16:18           ` Erik Iverson
  2010-12-03 19:57             ` Carsten Dominik
  2010-12-03 17:08           ` Achim Gratz
  1 sibling, 1 reply; 18+ messages in thread
From: Erik Iverson @ 2010-12-03 16:18 UTC (permalink / raw)
  To: Antti Kaihola; +Cc: Achim Gratz, emacs-orgmode

Just a guess here: This may be some weirdness
because the check in org-indent *will* allow
people using GNU Emacs 23.1.50 to turn on
org-indent, as far as I can tell.

The message "org-indent-mode can crash Emacs 23.1"
does not fully explain if it can also crash 23.1.50.

If indeed you should be having to run Emacs 23.2 or
greater to get org-indent-mode, I don't believe that
is what is currently happening.

Perhaps that check should require 23.2 or
greater? I don't know the details here, but
it's a starting place to look.

Antti Kaihola wrote:
> 2010/12/2 Achim Gratz <Stromeko@nexgo.de>:
>> What version of Emacs are you running?
> 
> This is:
> GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
> 2009-09-27 on palmer, modified by Debian
> 
>>  What does C-h f with-silent-modifications result in?
> 
> with-silent-modifications is a Lisp macro in `org-macs.el'.
> 
> (with-silent-modifications ORG-UNMODIFIED)
> 
> Not documented.
> 
>>  Could you back out the change
>> (most likely the defmacro for with-silent-modifications in org-macs.el,
>> even though I have no clue why this would interact with org-indent-mode
>> as it should not be defined for versions >23.1) and tell us if that
>> solves your problem (which I can't test because org-indent-mode doesn't
>> even start on Emacs 23.1)?
> 
> Yes it does! I commented out:
> 
> ;;(if (or (< emacs-major-version 23)
> ;;	(and (<= emacs-major-version 23)
> ;;	     (< emacs-minor-version 2)))
> ;;    (defmacro with-silent-modifications
> ;;      (org-unmodified)))
> 
> and it now works correctly. Thanks a lot!
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-12-03 13:30         ` Antti Kaihola
  2010-12-03 16:18           ` Erik Iverson
@ 2010-12-03 17:08           ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2010-12-03 17:08 UTC (permalink / raw)
  To: emacs-orgmode

Antti Kaihola <akaihola@gmail.com> writes:
> This is:
> GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
> 2009-09-27 on palmer, modified by Debian

I see.  So the check needs to include the sub-sub-version also, just
like org-indent-mode does.  The documentation said that
with-silent-modifications was introduced with Emacs 23.2, but maybe it
got backported to 23.1.50 by Debian maintainers.

> Yes it does! I commented out:
>
> ;;(if (or (< emacs-major-version 23)
> ;;	(and (<= emacs-major-version 23)
> ;;	     (< emacs-minor-version 2)))
> ;;    (defmacro with-silent-modifications
> ;;      (org-unmodified)))
>
> and it now works correctly. Thanks a lot!

Can you please check whether with-silent-modifications is defined in
your Emacs version?  I can only assume it must be since I don't think
org-indent-mode would work correctly without... if so, I think patching
the patch would be straightforward.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: Re: org-indent mode not indenting free text?
  2010-12-03 16:18           ` Erik Iverson
@ 2010-12-03 19:57             ` Carsten Dominik
  2010-12-03 21:16               ` Achim Gratz
  2010-12-03 21:21               ` Erik Iverson
  0 siblings, 2 replies; 18+ messages in thread
From: Carsten Dominik @ 2010-12-03 19:57 UTC (permalink / raw)
  To: Erik Iverson; +Cc: Achim Gratz, emacs-orgmode, Antti Kaihola

Hi Erik,

On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:

> Just a guess here: This may be some weirdness
> because the check in org-indent *will* allow
> people using GNU Emacs 23.1.50 to turn on
> org-indent, as far as I can tell.

org-indent-mode should work in 23.1.50, this is the
release where the fix was made.

>
> The message "org-indent-mode can crash Emacs 23.1"
> does not fully explain if it can also crash 23.1.50.

Yes, may be this is not so clear.  The current setup forbids it
before 23.1.50, and allows it from 23.1.50.  At least that is
what I meant.  Is there a bug?

[...]
>
> Antti Kaihola wrote:
>> 2010/12/2 Achim Gratz <Stromeko@nexgo.de>:
>>> What version of Emacs are you running?
>> This is:
>> GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
>> 2009-09-27 on palmer, modified by Debian
>>> What does C-h f with-silent-modifications result in?
>> with-silent-modifications is a Lisp macro in `org-macs.el'.
>> (with-silent-modifications ORG-UNMODIFIED)
>> Not documented.
>>> Could you back out the change
>>> (most likely the defmacro for with-silent-modifications in org- 
>>> macs.el,
>>> even though I have no clue why this would interact with org-indent- 
>>> mode
>>> as it should not be defined for versions >23.1) and tell us if that
>>> solves your problem (which I can't test because org-indent-mode  
>>> doesn't
>>> even start on Emacs 23.1)?
>> Yes it does! I commented out:
>> ;;(if (or (< emacs-major-version 23)
>> ;;	(and (<= emacs-major-version 23)
>> ;;	     (< emacs-minor-version 2)))
>> ;;    (defmacro with-silent-modifications
>> ;;      (org-unmodified)))
>> and it now works correctly. Thanks a lot!


I have now changed the definition like this:

(if (and (not (fboundp 'with-silent-modifications))
	 (or (< emacs-major-version 23)
	     (and (= emacs-major-version 23)
		  (< emacs-minor-version 2))))
     (defmacro with-silent-modifications (&rest body)
       `(org-unmodified ,@body)))



May I ask you to pull and check if this is
working for you out of the box?

Thank you.

- Carsten


>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-indent mode not indenting free text?
  2010-12-03 19:57             ` Carsten Dominik
@ 2010-12-03 21:16               ` Achim Gratz
  2010-12-03 21:21               ` Erik Iverson
  1 sibling, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2010-12-03 21:16 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:
> I have now changed the definition like this:
>
> (if (and (not (fboundp 'with-silent-modifications))
> 	 (or (< emacs-major-version 23)
> 	     (and (= emacs-major-version 23)
> 		  (< emacs-minor-version 2))))
>     (defmacro with-silent-modifications (&rest body)
>       `(org-unmodified ,@body)))
>
> May I ask you to pull and check if this is
> working for you out of the box?

Beat me to it... :-)

My own solution looked very similar, I can confirm this works with Emacs
23.1.1 (without org-indent-mode of course).


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: Re: org-indent mode not indenting free text?
  2010-12-03 19:57             ` Carsten Dominik
  2010-12-03 21:16               ` Achim Gratz
@ 2010-12-03 21:21               ` Erik Iverson
  2010-12-03 22:33                 ` Carsten Dominik
  2010-12-04  9:12                 ` Achim Gratz
  1 sibling, 2 replies; 18+ messages in thread
From: Erik Iverson @ 2010-12-03 21:21 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Achim Gratz, emacs-orgmode, Antti Kaihola



Carsten Dominik wrote:
> Hi Erik,
> 
> On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:
> 
>> Just a guess here: This may be some weirdness
>> because the check in org-indent *will* allow
>> people using GNU Emacs 23.1.50 to turn on
>> org-indent, as far as I can tell.
> 
> org-indent-mode should work in 23.1.50, this is the
> release where the fix was made.
> 
>>
>> The message "org-indent-mode can crash Emacs 23.1"
>> does not fully explain if it can also crash 23.1.50.
> 
> Yes, may be this is not so clear.  The current setup forbids it
> before 23.1.50, and allows it from 23.1.50.  At least that is
> what I meant.  Is there a bug?

No, I did not realize that this is what was indeed meant.
More below...

<snip>

>>>> Could you back out the change
>>>> (most likely the defmacro for with-silent-modifications in org-macs.el,
>>>> even though I have no clue why this would interact with org-indent-mode
>>>> as it should not be defined for versions >23.1) and tell us if that
>>>> solves your problem (which I can't test because org-indent-mode doesn't
>>>> even start on Emacs 23.1)?
>>> Yes it does! I commented out:
>>> ;;(if (or (< emacs-major-version 23)
>>> ;;    (and (<= emacs-major-version 23)
>>> ;;         (< emacs-minor-version 2)))
>>> ;;    (defmacro with-silent-modifications
>>> ;;      (org-unmodified)))
>>> and it now works correctly. Thanks a lot!
> 
> 
> I have now changed the definition like this:
> 
> (if (and (not (fboundp 'with-silent-modifications))
>      (or (< emacs-major-version 23)
>          (and (= emacs-major-version 23)
>           (< emacs-minor-version 2))))
>     (defmacro with-silent-modifications (&rest body)
>       `(org-unmodified ,@body)))

I must admit I don't understand the above macro,
but what I was getting at before was:

It only appears defined for Emacs < 23.2,
So in particular, 23.1.50 is 'stuck' in
between these two version checks, and maybe
that's causing Antti's issue?

> May I ask you to pull and check if this is
> working for you out of the box?

Works for me fine on Emacs 23.2, we will see
if it does for Antti also.

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

* Re: Re: org-indent mode not indenting free text?
  2010-12-03 21:21               ` Erik Iverson
@ 2010-12-03 22:33                 ` Carsten Dominik
  2010-12-04  9:12                 ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Carsten Dominik @ 2010-12-03 22:33 UTC (permalink / raw)
  To: Erik Iverson; +Cc: Achim Gratz, emacs-orgmode, Antti Kaihola

Hi Erik,

thank you for your persistence, and sorry that I have
not been taking the time to explain myself clearly, in
this way I have made this thread unnecessarily long.

OK, lets look at exhibit 1:

    ((and org-indent-mode
          (not (org-version-check "23.1.50" "Org Indent  
mode" :predicate)))
      (message "org-indent-mode can crash Emacs 23.1 - refusing to  
turn it on!")

This test is run when someone tries to turn
on org-indent mode.  If this is not Emacs 23.1.50 or later, org-indent
mode will not be turned on, and none of the remaining code in
org-indent.el will actually run, because the mode is never turned on.

Now, exhibit 2:

(if (and (not (fboundp 'with-silent-modifications))
	 (or (< emacs-major-version 23)
	     (and (= emacs-major-version 23)
		  (< emacs-minor-version 2))))
     (defmacro with-silent-modifications (&rest body)
       `(org-unmodified ,@body)))

This is code to supply a replacement macro in Emacsen where
`with-silent-modifications' was not defined.  The idea was that
maybe there are a few minor versions of Emacs where this
macro is not defined, and where org-indent-mode might still
be able to work.  Since I did not know
exactly when the macro was introduced, I put in some
version test which I now see is not very useful at all.

Is there anyone here who has Emacs 23.1.50 currently running?
Can you tell me if with-silent-modifications is defined in
"emacs -q" [1]?  If that is the case, then we can remove the
entire top-level form.

I hope I am making a bit more sense now.

Thanks



On Dec 3, 2010, at 10:21 PM, Erik Iverson wrote:

>
>
> Carsten Dominik wrote:
>> Hi Erik,
>> On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:
>>> Just a guess here: This may be some weirdness
>>> because the check in org-indent *will* allow
>>> people using GNU Emacs 23.1.50 to turn on
>>> org-indent, as far as I can tell.
>> org-indent-mode should work in 23.1.50, this is the
>> release where the fix was made.
>>>
>>> The message "org-indent-mode can crash Emacs 23.1"
>>> does not fully explain if it can also crash 23.1.50.
>> Yes, may be this is not so clear.  The current setup forbids it
>> before 23.1.50, and allows it from 23.1.50.  At least that is
>> what I meant.  Is there a bug?
>
> No, I did not realize that this is what was indeed meant.
> More below...
>
> <snip>
>
>>>>> Could you back out the change
>>>>> (most likely the defmacro for with-silent-modifications in org- 
>>>>> macs.el,
>>>>> even though I have no clue why this would interact with org- 
>>>>> indent-mode
>>>>> as it should not be defined for versions >23.1) and tell us if  
>>>>> that
>>>>> solves your problem (which I can't test because org-indent-mode  
>>>>> doesn't
>>>>> even start on Emacs 23.1)?
>>>> Yes it does! I commented out:
>>>> ;;(if (or (< emacs-major-version 23)
>>>> ;;    (and (<= emacs-major-version 23)
>>>> ;;         (< emacs-minor-version 2)))
>>>> ;;    (defmacro with-silent-modifications
>>>> ;;      (org-unmodified)))
>>>> and it now works correctly. Thanks a lot!
>> I have now changed the definition like this:
>> (if (and (not (fboundp 'with-silent-modifications))
>>     (or (< emacs-major-version 23)
>>         (and (= emacs-major-version 23)
>>          (< emacs-minor-version 2))))
>>    (defmacro with-silent-modifications (&rest body)
>>      `(org-unmodified ,@body)))
>
> I must admit I don't understand the above macro,
> but what I was getting at before was:
>
> It only appears defined for Emacs < 23.2,
> So in particular, 23.1.50 is 'stuck' in
> between these two version checks, and maybe
> that's causing Antti's issue?
>
>> May I ask you to pull and check if this is
>> working for you out of the box?
>
> Works for me fine on Emacs 23.2, we will see
> if it does for Antti also.
>
>

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

* Re: org-indent mode not indenting free text?
  2010-12-03 21:21               ` Erik Iverson
  2010-12-03 22:33                 ` Carsten Dominik
@ 2010-12-04  9:12                 ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2010-12-04  9:12 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Erik Iverson <eriki@ccbr.umn.edu> writes:
> It only appears defined for Emacs < 23.2,
> So in particular, 23.1.50 is 'stuck' in
> between these two version checks, and maybe
> that's causing Antti's issue?

Sorry for the confusion and my apologies for any trouble I have caused.

When introducing this patch I referred to the documentation that said
"with-silent-modifications" was introduced in Emacs 23.2, hence the test
for this version.  I was completely unaware of Emacs 23.1.50, which must
have this function, otherwise org-indent-mode should not work as it is
currently implemented.  In earlier versions of org-indent-mode the call
to with-silent-modifications had been using org-unmodified (see [1] for
why it has been changed), hence my attempt to redefine
with-silent-modifications with org-unmodified when unavailable.  The
problems on Emacs 23.1.50 prove that these two are not really
interchangeable, but I was hoping for "close enough".

As I understand, the crashes Emacs <23.1.50 with org-indent-mode have
nothing to do with the bug that got fixed by with-silent-modifications,
so these are really different issues.  For the reasons outlined above my
attempted patch is botched, but I'm not sure how to proceed.  Maybe a
better idea is to revert org-indent back to using org-unmodified and
implementing this macro using with-silent-modifications on Emacsen where
it is available.  Since org-unmodified is used in many more places this
would need some testing, but it might be easier to maintain in the long
run.

(defmacro org-unmodified (&rest body)
  "Execute body without changing `buffer-modified-p'.
Also, do not record undo information."
  (if (not (fboundp 'with-silent-modifications))
      `(set-buffer-modified-p
	(prog1 (buffer-modified-p)
	  (let ((buffer-undo-list t)
		before-change-functions after-change-functions)
	    ,@body)))
    `(with-silent-modifications ,@body)))

The version check in org-indent.el should probably be replaced by a
feature-check for with-silent-modifications to avoid the bug in [1].

[1] http://comments.gmane.org/gmane.emacs.orgmode/31927



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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

end of thread, other threads:[~2010-12-04  9:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 16:47 org-indent mode not indenting free text? Erik Iverson
2010-11-23 18:51 ` Nicolas Goaziou
2010-11-23 20:35   ` David Maus
2010-12-02  7:57     ` Antti Kaihola
2010-12-02 20:17       ` Achim Gratz
2010-12-03 13:30         ` Antti Kaihola
2010-12-03 16:18           ` Erik Iverson
2010-12-03 19:57             ` Carsten Dominik
2010-12-03 21:16               ` Achim Gratz
2010-12-03 21:21               ` Erik Iverson
2010-12-03 22:33                 ` Carsten Dominik
2010-12-04  9:12                 ` Achim Gratz
2010-12-03 17:08           ` Achim Gratz
2010-12-02 18:51 ` Carsten Dominik
2010-12-02 20:29   ` Erik Iverson
2010-12-02 20:32     ` Erik Iverson
2010-12-03 13:15       ` Antti Kaihola
2010-12-02 20:42     ` Carsten Dominik

Code repositories for project(s) associated with this 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).