emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in structmode++?
@ 2013-05-01 15:03 Igor Sosa Mayor
  2013-05-02  8:31 ` Igor Sosa Mayor
  0 siblings, 1 reply; 15+ messages in thread
From: Igor Sosa Mayor @ 2013-05-01 15:03 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Orgstruct minor mode is working with the mail-mode a little strange.

If I write a simple list where every item is smaller than a line, I can
use M-RET and a new item is inserted as expected.

But if the item goes over one line, the second line is not indented and
moreover M-RET does not work anymore.

org-version: 8.0.2; emacs: 24.3.1

thanks in advance

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

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

* Re: Bug in structmode++?
  2013-05-01 15:03 Bug in structmode++? Igor Sosa Mayor
@ 2013-05-02  8:31 ` Igor Sosa Mayor
  2013-05-02  8:33   ` Nicolas Goaziou
  2013-05-12 14:10   ` The Dude
  0 siblings, 2 replies; 15+ messages in thread
From: Igor Sosa Mayor @ 2013-05-02  8:31 UTC (permalink / raw)
  To: emacs-orgmode

I don't want to be annoying... but am I really alone with this problem?

Am Wed, May 01, 2013 at 05:03:51PM +0200, Igor Sosa Mayor wrote:
> Hi,
> 
> Orgstruct minor mode is working with the mail-mode a little strange.
> 
> If I write a simple list where every item is smaller than a line, I can
> use M-RET and a new item is inserted as expected.
> 
> But if the item goes over one line, the second line is not indented and
> moreover M-RET does not work anymore.
> 
> org-version: 8.0.2; emacs: 24.3.1
> 
> thanks in advance
> 
> -- 
> :: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
> :: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
> :: jabberid: rogorido  ::                            ::

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

* Re: Bug in structmode++?
  2013-05-02  8:31 ` Igor Sosa Mayor
@ 2013-05-02  8:33   ` Nicolas Goaziou
  2013-05-02  8:51     ` Igor Sosa Mayor
  2013-05-12 14:10   ` The Dude
  1 sibling, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2013-05-02  8:33 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:

> I don't want to be annoying... but am I really alone with this
> problem?

No, I can confirm this.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug in structmode++?
  2013-05-02  8:33   ` Nicolas Goaziou
@ 2013-05-02  8:51     ` Igor Sosa Mayor
  2013-05-02 13:37       ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Igor Sosa Mayor @ 2013-05-02  8:51 UTC (permalink / raw)
  To: emacs-orgmode

Am Thu, May 02, 2013 at 10:33:42AM +0200, Nicolas Goaziou wrote:

> No, I can confirm this.

Thanks Nicolas. At least, I dont feel alone anymore... Is there any
chance this getting fixed somehow? I used to use it very often in my
emails and I miss it.

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

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

* Re: Bug in structmode++?
  2013-05-02  8:51     ` Igor Sosa Mayor
@ 2013-05-02 13:37       ` Nicolas Goaziou
  2013-05-06 17:07         ` Christopher Schmidt
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2013-05-02 13:37 UTC (permalink / raw)
  To: emacs-orgmode

Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:

> Thanks Nicolas. At least, I dont feel alone anymore... Is there any
> chance this getting fixed somehow? I used to use it very often in my
> emails and I miss it.

I miss it, too.

I didn't follow recent changes to orgstruct-mode, so I cannot help here.
I hope that someone more knowledgeable than I am will jump in.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug in structmode++?
  2013-05-02 13:37       ` Nicolas Goaziou
@ 2013-05-06 17:07         ` Christopher Schmidt
  2013-05-07 10:16           ` Bastien
  0 siblings, 1 reply; 15+ messages in thread
From: Christopher Schmidt @ 2013-05-06 17:07 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:
>
>> Thanks Nicolas. At least, I dont feel alone anymore... Is there any
>> chance this getting fixed somehow? I used to use it very often in my
>> emails and I miss it.
>
> I miss it, too.
>
> I didn't follow recent changes to orgstruct-mode, so I cannot help
> here.  I hope that someone more knowledgeable than I am will jump in.

orgstruct(++)-mode used to set auto-fill-function to
'org-auto-fill-function.  This behaviour is too intrusive so we removed
it.  You either need to indent secondary lines by hand or set
auto-fill-function back to org-auto-fill-function.

orgstruct++'s hijacker of org-insert-heading-respect-content did not
respect item bodies.  I fixed this in master a few minutes ago.

    741bc5c * origin/master master org.el: Execute org-insert-heading
    and org-insert-heading-respect-content in orgstruct++-mode when the
    context around point is an item-body.

        Christopher

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

* Re: Bug in structmode++?
  2013-05-06 17:07         ` Christopher Schmidt
@ 2013-05-07 10:16           ` Bastien
  2013-05-07 12:28             ` Sebastien Vauban
  2013-05-07 14:31             ` Christopher Schmidt
  0 siblings, 2 replies; 15+ messages in thread
From: Bastien @ 2013-05-07 10:16 UTC (permalink / raw)
  To: Christopher Schmidt; +Cc: emacs-orgmode

Hi Christopher,

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>> Igor Sosa Mayor <joseleopoldo1792@gmail.com> writes:
>>
>>> Thanks Nicolas. At least, I dont feel alone anymore... Is there any
>>> chance this getting fixed somehow? I used to use it very often in my
>>> emails and I miss it.
>>
>> I miss it, too.
>>
>> I didn't follow recent changes to orgstruct-mode, so I cannot help
>> here.  I hope that someone more knowledgeable than I am will jump in.
>
> orgstruct(++)-mode used to set auto-fill-function to
> 'org-auto-fill-function.  This behaviour is too intrusive so we removed
> it.  You either need to indent secondary lines by hand or set
> auto-fill-function back to org-auto-fill-function.

I don't remember why it was too intrusive, it worked fine for me.

> orgstruct++'s hijacker of org-insert-heading-respect-content did not
> respect item bodies.  I fixed this in master a few minutes ago.

I just tried with orgstruct-mode and I still have the problem.

With orgstruct++-mode, M-RET on the second line of an item inserts an
item correctly, but there is another problem (also for orgstruct-mode):
M-RET on the first line of a two-lines item will insert the new item in
the middle of the item...

Thanks for taking care of this!

-- 
 Bastien

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

* Re: Bug in structmode++?
  2013-05-07 10:16           ` Bastien
@ 2013-05-07 12:28             ` Sebastien Vauban
  2013-05-07 14:31             ` Christopher Schmidt
  1 sibling, 0 replies; 15+ messages in thread
From: Sebastien Vauban @ 2013-05-07 12:28 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Bastien wrote:
> Christopher Schmidt <christopher-TsugTnnrXQtNhJN0HIYqWA@public.gmane.org> writes:
>> Nicolas Goaziou <n.goaziou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>> Igor Sosa Mayor <joseleopoldo1792-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>>
>>>> Thanks Nicolas. At least, I dont feel alone anymore... Is there any
>>>> chance this getting fixed somehow? I used to use it very often in my
>>>> emails and I miss it.
>>>
>>> I miss it, too.
>>>
>>> I didn't follow recent changes to orgstruct-mode, so I cannot help
>>> here.  I hope that someone more knowledgeable than I am will jump in.
>>
>> orgstruct(++)-mode used to set auto-fill-function to
>> 'org-auto-fill-function.  This behaviour is too intrusive so we removed
>> it.  You either need to indent secondary lines by hand or set
>> auto-fill-function back to org-auto-fill-function.
>
> I don't remember why it was too intrusive, it worked fine for me.
>
>> orgstruct++'s hijacker of org-insert-heading-respect-content did not
>> respect item bodies.  I fixed this in master a few minutes ago.
>
> I just tried with orgstruct-mode and I still have the problem.
>
> With orgstruct++-mode, M-RET on the second line of an item inserts an
> item correctly, but there is another problem (also for orgstruct-mode):
> M-RET on the first line of a two-lines item will insert the new item in
> the middle of the item...
>
> Thanks for taking care of this!

I also have the problems that, when writing itemized lists in emails, the
minor mode takes the "- " as a line prefix, and does repeat it over each line,
something such as:

- this is a long, long, long, long, long, long, long, long, long, really long,
- very long item.
^
^ This one has been inserted automatically, unlike the behavior we had before.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Bug in structmode++?
  2013-05-07 10:16           ` Bastien
  2013-05-07 12:28             ` Sebastien Vauban
@ 2013-05-07 14:31             ` Christopher Schmidt
  2013-05-14  8:59               ` Bastien
  1 sibling, 1 reply; 15+ messages in thread
From: Christopher Schmidt @ 2013-05-07 14:31 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:
>> orgstruct(++)-mode used to set auto-fill-function to
>> 'org-auto-fill-function.  This behaviour is too intrusive so we
>> removed it.  You either need to indent secondary lines by hand or set
>> auto-fill-function back to org-auto-fill-function.
>
> I don't remember why it was too intrusive, it worked fine for me.

We overwrite the major mode's custom value of auto-fill-function.  This
is not The Right Thing in each and every case.

In message-mode this is not important,

    (defun message-do-auto-fill ()
      "Like `do-auto-fill', but don't fill in message header."
      (unless (message-point-in-header-p)
        (do-auto-fill)))

org-auto-fill-function does not do much harm here.  That is not the case
for most prog modes, though.

You can easily get the old behaviour back by setting auto-fill-function
to org-auto-fill-function after you activate orgstruct{,++}-mode.

>> orgstruct++'s hijacker of org-insert-heading-respect-content did not
>> respect item bodies.  I fixed this in master a few minutes ago.
>
> I just tried with orgstruct-mode and I still have the problem.

orgstruct-mode does not respect item-body context - see this form in
orgstruct-make-binding:

    (org-context-p 'headline 'item
                   ,(when (memq fun
                                '(org-insert-heading
                                  org-insert-heading-respect-content
                                  org-meta-return))
                      '(when orgstruct-is-++
                         'item-body)))

I think that's a feature.

> With orgstruct++-mode, M-RET on the second line of an item inserts an
> item correctly, but there is another problem (also for
> orgstruct-mode): M-RET on the first line of a two-lines item will
> insert the new item in the middle of the item...

So does vanilla org-mode?


Most people use orgstruct{,++}-mode in message-mode, right?  I think it
makes sense to use vanilla org here.  That is, make an indirect buffer
of the message-mode buffer, narrow the buffer to the message body and
set the major mode to org-mode.  This should give one all the power of
Org, including links, footnotes, font-lock and so on, without that
orgstruct-mess.

        Christopher

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

* Re: Bug in structmode++?
  2013-05-02  8:31 ` Igor Sosa Mayor
  2013-05-02  8:33   ` Nicolas Goaziou
@ 2013-05-12 14:10   ` The Dude
  2013-05-12 14:59     ` Christopher Schmidt
  1 sibling, 1 reply; 15+ messages in thread
From: The Dude @ 2013-05-12 14:10 UTC (permalink / raw)
  To: emacs-orgmode

-> Igor Sosa Mayor writes:

> I don't want to be annoying... but am I really alone with this problem?
> Am Wed, May 01, 2013 at 05:03:51PM +0200, Igor Sosa Mayor wrote:

No, you're not alone.  I'm experiencing the same behavior and I'm
running the exact same versions.   It's really annoying.

org-version: 8.0.2; emacs-version: 24.3.1

>> Hi,
>> 
>> Orgstruct minor mode is working with the mail-mode a little strange.
>> 
>> If I write a simple list where every item is smaller than a line, I can
>> use M-RET and a new item is inserted as expected.
>> 
>> But if the item goes over one line, the second line is not indented and
>> moreover M-RET does not work anymore.
>> 
>> org-version: 8.0.2; emacs: 24.3.1
>> 
>> thanks in advance
>> 
>> -- 
>> :: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
>> :: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
>> :: jabberid: rogorido  ::                            ::

cheers
-- 
-dude

Too brief? Here's why! http://emailcharter.org

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

* Re: Bug in structmode++?
  2013-05-12 14:10   ` The Dude
@ 2013-05-12 14:59     ` Christopher Schmidt
  2013-05-12 18:34       ` Igor Sosa Mayor
  0 siblings, 1 reply; 15+ messages in thread
From: Christopher Schmidt @ 2013-05-12 14:59 UTC (permalink / raw)
  To: emacs-orgmode

The Dude <rafal.kowalski@mac.com> writes:
> No, you're not alone.  I'm experiencing the same behavior and I'm
> running the exact same versions.   It's really annoying.
>
> org-version: 8.0.2; emacs-version: 24.3.1

Please give the current master a try.

        Christopher

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

* Re: Bug in structmode++?
  2013-05-12 14:59     ` Christopher Schmidt
@ 2013-05-12 18:34       ` Igor Sosa Mayor
  2013-05-23  6:29         ` The Dude
  0 siblings, 1 reply; 15+ messages in thread
From: Igor Sosa Mayor @ 2013-05-12 18:34 UTC (permalink / raw)
  To: emacs-orgmode

Am Sun, May 12, 2013 at 03:59:00PM +0100, Christopher Schmidt wrote:
> Please give the current master a try.

After the commit 0ea11e26e46f2f562c1997cf1645dd744d5f6f2f you did, it
seems to work again.

thanks a lot.

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::

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

* Re: Bug in structmode++?
  2013-05-07 14:31             ` Christopher Schmidt
@ 2013-05-14  8:59               ` Bastien
  2013-05-14 11:16                 ` Daniel Bausch
  0 siblings, 1 reply; 15+ messages in thread
From: Bastien @ 2013-05-14  8:59 UTC (permalink / raw)
  To: Christopher Schmidt; +Cc: emacs-orgmode

Hi Christopher,

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> Most people use orgstruct{,++}-mode in message-mode, right?  I think it
> makes sense to use vanilla org here.  That is, make an indirect buffer
> of the message-mode buffer, narrow the buffer to the message body and
> set the major mode to org-mode.  

Mhh.. This looks too complex to me.

My guess is that message-mode and mail-mode are the modes where
orgstruct-mode is the most used, so having it doing what the users
expect is important.

At least there should be no regression wrt the previous behavior
of orgstruct-mode.

> This should give one all the power of
> Org, including links, footnotes, font-lock and so on, without that
> orgstruct-mess.

I sympathetize with your blame on the mess... but still, let's fix
the code, not users' behavior :)

But things are fine for me at the moment, I'll report issues if I
find some.

Best,

-- 
 Bastien

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

* Re: Bug in structmode++?
  2013-05-14  8:59               ` Bastien
@ 2013-05-14 11:16                 ` Daniel Bausch
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Bausch @ 2013-05-14 11:16 UTC (permalink / raw)
  To: Bastien; +Cc: Christopher Schmidt, emacs-orgmode

Hi!

Bastien writes:
> My guess is that message-mode and mail-mode are the modes where
> orgstruct-mode is the most used, so having it doing what the users
> expect is important.

Only for the record: I use orgstruct++ it in magit-log-edit-mode via
magit-log-edit-mode-hook.  I combine that with turn-on-auto-fill and
set-fill-column 72 to enforce the most common git commit style.

Regards,
Daniel Bausch

-- 
Daniel Bausch
Wissenschaftlicher Mitarbeiter
Technische Universität Darmstadt
Fachbereich Informatik
Fachgebiet Datenbanken und Verteilte Systeme

Hochschulstraße 10
64289 Darmstadt
Germany

Tel.: +49 6151 16 6706
Fax:  +49 6151 16 6229

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

* Re: Bug in structmode++?
  2013-05-12 18:34       ` Igor Sosa Mayor
@ 2013-05-23  6:29         ` The Dude
  0 siblings, 0 replies; 15+ messages in thread
From: The Dude @ 2013-05-23  6:29 UTC (permalink / raw)
  To: emacs-orgmode

-> Igor Sosa Mayor writes:

> Am Sun, May 12, 2013 at 03:59:00PM +0100, Christopher Schmidt wrote:
>> Please give the current master a try.

> After the commit 0ea11e26e46f2f562c1997cf1645dd744d5f6f2f you did, it
> seems to work again.

Yes, I confirm, it works for me too.  Thanks man!

> thanks a lot.

> -- 
> :: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
> :: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
> :: jabberid: rogorido  ::                            ::

-- 
-dude

Too brief? Here's why! http://emailcharter.org

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

end of thread, other threads:[~2013-05-23  6:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-01 15:03 Bug in structmode++? Igor Sosa Mayor
2013-05-02  8:31 ` Igor Sosa Mayor
2013-05-02  8:33   ` Nicolas Goaziou
2013-05-02  8:51     ` Igor Sosa Mayor
2013-05-02 13:37       ` Nicolas Goaziou
2013-05-06 17:07         ` Christopher Schmidt
2013-05-07 10:16           ` Bastien
2013-05-07 12:28             ` Sebastien Vauban
2013-05-07 14:31             ` Christopher Schmidt
2013-05-14  8:59               ` Bastien
2013-05-14 11:16                 ` Daniel Bausch
2013-05-12 14:10   ` The Dude
2013-05-12 14:59     ` Christopher Schmidt
2013-05-12 18:34       ` Igor Sosa Mayor
2013-05-23  6:29         ` The Dude

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).