* More problems with orgstruct++-mode, message-mode and auto fill
@ 2012-05-09 16:53 Bernt Hansen
2012-05-09 17:03 ` Christopher Schmidt
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Bernt Hansen @ 2012-05-09 16:53 UTC (permalink / raw)
To: emacs-orgmode
Hi Bastien,
Auto-fill wrapping has stopped working correctly lately.
I have orgstruct++-mode added to my message mode hook as
--8<---------------cut here---------------start------------->8---
(add-hook 'message-mode-hook 'orgstruct++-mode 'append)
(add-hook 'message-mode-hook 'turn-on-auto-fill 'append)
(add-hook 'message-mode-hook 'orgtbl-mode 'append)
--8<---------------cut here---------------end--------------->8---
and lately auto-fill doesn't work correctly when text starts in column
0. Text wraps to the start of the second word on the line.
,----[ orgstruct++-mode off with auto fill ]
| this is a long line which should auto fill but not wrap to 2nd word on
| the line
|
`----
,----[ orgstruct++-mode on with auto fill ]
| this is a line that is really long and autofilll with org struct mode
| does not work properly. It indents line 2+ by 5 chars
|
| whatifthe word is really long on the first line how does that make
| autofilll rec
`----
For now I've dropped orgstruct++-mode from my message-mode hook but I'm
going to miss this for lists in my emails.
GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11
on raven, modified by Debian
Org-mode version 7.8.09 (release_7.8.09-489-g541288 @
/home/bernt/git/org-mode/lisp/org-install.el)
Regards,
Bernt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 16:53 More problems with orgstruct++-mode, message-mode and auto fill Bernt Hansen
@ 2012-05-09 17:03 ` Christopher Schmidt
2012-05-09 17:40 ` Bastien
2012-05-09 19:15 ` Thorsten Jolitz
2 siblings, 0 replies; 11+ messages in thread
From: Christopher Schmidt @ 2012-05-09 17:03 UTC (permalink / raw)
To: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
> For now I've dropped orgstruct++-mode from my message-mode hook but
> I'm going to miss this for lists in my emails.
orgstruct-mode/orgtbl-mode work fine and do not break anything.
Christopher
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 16:53 More problems with orgstruct++-mode, message-mode and auto fill Bernt Hansen
2012-05-09 17:03 ` Christopher Schmidt
@ 2012-05-09 17:40 ` Bastien
2012-05-09 19:30 ` Bernt Hansen
2012-05-09 19:15 ` Thorsten Jolitz
2 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-05-09 17:40 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Hi Bernt,
Bernt Hansen <bernt@norang.ca> writes:
> Auto-fill wrapping has stopped working correctly lately.
It seems you're behind latest git HEAD by ~55 commits and
there has been bug fixes in this area.
Please pull again (even temporarily) and let me know if this
happens again with your configuration.
> I have orgstruct++-mode added to my message mode hook as
>
> (add-hook 'message-mode-hook 'orgstruct++-mode 'append)
> (add-hook 'message-mode-hook 'turn-on-auto-fill 'append)
> (add-hook 'message-mode-hook 'orgtbl-mode 'append)
I can't reproduce this with latest Org here. I load emacs -Q
then eval your three add-hook above then C-x m and I get the
expected behavior.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 17:40 ` Bastien
@ 2012-05-09 19:30 ` Bernt Hansen
2012-05-09 21:06 ` Bastien
2012-05-09 21:49 ` Bernt Hansen
0 siblings, 2 replies; 11+ messages in thread
From: Bernt Hansen @ 2012-05-09 19:30 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Bastien <bzg@gnu.org> writes:
> Hi Bernt,
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>> Auto-fill wrapping has stopped working correctly lately.
>
> It seems you're behind latest git HEAD by ~55 commits and
> there has been bug fixes in this area.
>
> Please pull again (even temporarily) and let me know if this
> happens again with your configuration.
OK - I'll update and try again - I browsed the shortlog and didn't see
anything relevant but maybe I missed it.
Thanks,
Bernt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 19:30 ` Bernt Hansen
@ 2012-05-09 21:06 ` Bastien
2012-05-09 21:49 ` Bernt Hansen
1 sibling, 0 replies; 11+ messages in thread
From: Bastien @ 2012-05-09 21:06 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Hi Bernt,
Bernt Hansen <bernt@norang.ca> writes:
> Bastien <bzg@gnu.org> writes:
>
>> Hi Bernt,
>>
>> Bernt Hansen <bernt@norang.ca> writes:
>>
>>> Auto-fill wrapping has stopped working correctly lately.
>>
>> It seems you're behind latest git HEAD by ~55 commits and
>> there has been bug fixes in this area.
>>
>> Please pull again (even temporarily) and let me know if this
>> happens again with your configuration.
>
> OK - I'll update and try again - I browsed the shortlog and didn't see
> anything relevant but maybe I missed it.
Check these two:
035ab39e * | Another fix to `org-indent-line-function'.
99c97fbf * | Fix bug in `org-indent-line-function'.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 19:30 ` Bernt Hansen
2012-05-09 21:06 ` Bastien
@ 2012-05-09 21:49 ` Bernt Hansen
1 sibling, 0 replies; 11+ messages in thread
From: Bernt Hansen @ 2012-05-09 21:49 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
> Bastien <bzg@gnu.org> writes:
>
>> Hi Bernt,
>>
>> Bernt Hansen <bernt@norang.ca> writes:
>>
>>> Auto-fill wrapping has stopped working correctly lately.
>>
>> It seems you're behind latest git HEAD by ~55 commits and
>> there has been bug fixes in this area.
>>
>> Please pull again (even temporarily) and let me know if this
>> happens again with your configuration.
>
> OK - I'll update and try again - I browsed the shortlog and didn't see
> anything relevant but maybe I missed it.
>
> Thanks,
> Bernt
This seems to work just fine now so I think it's fixed. Thanks and
sorry for the noise.
Bernt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 16:53 More problems with orgstruct++-mode, message-mode and auto fill Bernt Hansen
2012-05-09 17:03 ` Christopher Schmidt
2012-05-09 17:40 ` Bastien
@ 2012-05-09 19:15 ` Thorsten Jolitz
2012-05-10 1:11 ` Eric S Fraga
2 siblings, 1 reply; 11+ messages in thread
From: Thorsten Jolitz @ 2012-05-09 19:15 UTC (permalink / raw)
To: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
Hi Bernt,
> Auto-fill wrapping has stopped working correctly lately.
I had exactly the same problem you describe (no wonder because I just
copied your configuration) and solved it with Bastiens help.
You can search for subject "Strange indentation in message-mode" in the
gnus.user mailing list to find the thread.
What I mainly did was updating from the git repo and changing the order
of hooks (orgstruct++-mode last). And I had to get rid of
emacs-goodies-el too, but that was probably my specific configuration.
> I have orgstruct++-mode added to my message mode hook as
>
> --8<---------------cut here---------------start------------->8---
> (add-hook 'message-mode-hook 'orgstruct++-mode 'append)
> (add-hook 'message-mode-hook 'turn-on-auto-fill 'append)
> (add-hook 'message-mode-hook 'orgtbl-mode 'append)
> --8<---------------cut here---------------end--------------->8---
>
> and lately auto-fill doesn't work correctly when text starts in column
> 0. Text wraps to the start of the second word on the line.
>
> ,----[ orgstruct++-mode off with auto fill ]
> | this is a long line which should auto fill but not wrap to 2nd word on
> | the line
> |
> `----
>
> ,----[ orgstruct++-mode on with auto fill ]
> | this is a line that is really long and autofilll with org struct mode
> | does not work properly. It indents line 2+ by 5 chars
> |
> | whatifthe word is really long on the first line how does that make
> | autofilll rec
> `----
>
> For now I've dropped orgstruct++-mode from my message-mode hook but I'm
> going to miss this for lists in my emails.
>
> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11
> on raven, modified by Debian
>
> Org-mode version 7.8.09 (release_7.8.09-489-g541288 @
> /home/bernt/git/org-mode/lisp/org-install.el)
>
> Regards,
> Bernt
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-09 19:15 ` Thorsten Jolitz
@ 2012-05-10 1:11 ` Eric S Fraga
2012-05-10 6:36 ` Bastien
0 siblings, 1 reply; 11+ messages in thread
From: Eric S Fraga @ 2012-05-10 1:11 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Thorsten Jolitz <tjolitz@googlemail.com> writes:
[...]
> What I mainly did was updating from the git repo and changing the order
> of hooks (orgstruct++-mode last). And I had to get rid of
> emacs-goodies-el too, but that was probably my specific configuration.
Ahh, interesting data point. I have emacs-goodies.el installed. What
is it about this package that causes problems? This could be why
Bastien cannot reproduce the behaviour we have been seeing?
I did see another reference to this package on one of the emacs mailing
lists, implying that it wasn't necessary with Emacs 24, but I think I do
use a few bits from it (bar-cursor, dict, matlab, maybe others). Maybe
these are in emacs 24... but I don't think so. Any insight into this
would be most welcome!
thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-544-g505cc7
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-10 1:11 ` Eric S Fraga
@ 2012-05-10 6:36 ` Bastien
2012-05-10 8:28 ` Sebastien Vauban
0 siblings, 1 reply; 11+ messages in thread
From: Bastien @ 2012-05-10 6:36 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hi Eric,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Thorsten Jolitz <tjolitz@googlemail.com> writes:
>
> [...]
>
>> What I mainly did was updating from the git repo and changing the order
>> of hooks (orgstruct++-mode last). And I had to get rid of
>> emacs-goodies-el too, but that was probably my specific configuration.
>
> Ahh, interesting data point. I have emacs-goodies.el installed. What
> is it about this package that causes problems?
This package contains filladapt.el and filladapt.el _overwrites_ some
fundamental variables about filling. Even if you are not using
filladapt.el, it fill replace those variables... which is obvisouly
plain wrong.
> This could be why Bastien cannot reproduce the behaviour we have been
> seeing?
I think so.
> I did see another reference to this package on one of the emacs mailing
> lists, implying that it wasn't necessary with Emacs 24, but I think I do
> use a few bits from it (bar-cursor, dict, matlab, maybe others). Maybe
> these are in emacs 24... but I don't think so. Any insight into this
> would be most welcome!
(setq cursor-type 'bar) or (setq cursor-type 'hbar) works here.
As for dict, matlab, you can still download them from their original
locations I guess.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-10 6:36 ` Bastien
@ 2012-05-10 8:28 ` Sebastien Vauban
2012-05-10 9:26 ` Bastien
0 siblings, 1 reply; 11+ messages in thread
From: Sebastien Vauban @ 2012-05-10 8:28 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi,
Bastien wrote:
> Eric S Fraga <e.fraga-hclig2XLE9Zaa/9Udqfwiw@public.gmane.org> writes:
>>
>> I have emacs-goodies.el installed. What is it about this package that
>> causes problems?
>
> This package contains filladapt.el and filladapt.el _overwrites_ some
> fundamental variables about filling. Even if you are not using filladapt.el,
> it fill replace those variables... which is obvisouly plain wrong.
FWIW, I do use filladapt.el (version 2.12, directly downloaded from the Web,
long time ago), and never experienced troubles yet (in Gnus, with
orgstruct++-mode).
Bastien, you say we should get rid of it, but it seems the reason I have it on
my system is (or was) because "it does a better job than Emacs builtin
Adaptative Fill mode". Anybody: any comment on this?
#+begin_src emacs-lisp
;; enable FillAdapt (does a better job than Emacs builtin Adaptative
;; Fill mode)
(autoload 'turn-on-filladapt-mode "filladapt"
"Unconditionally turn on Filladapt mode in the current buffer.")
(autoload 'turn-off-filladapt-mode "filladapt"
"Unconditionally turn off Filladapt mode in the current buffer.")
(defun my/enable-filling ()
"Enable AutoFill and FillAdapt minor modes."
;; when inserting text, *automatically* break line at a previous
;; space, if the current column number is greater than the value of
;; `fill-column'
(turn-on-auto-fill)
;; turn on FillAdapt mode everywhere but in ChangeLog files
(cond ((equal mode-name "Change Log") t)
(t (turn-on-filladapt-mode))))
;; enable AutoFill and FillAdapt in Text and Org modes
(add-hook 'text-mode-hook 'my/enable-filling)
(add-hook 'org-mode-hook 'my/enable-filling)
#+end_src
In Gnus, this is my config:
#+begin_src emacs-lisp
;; operates on messages you send
(defun my/message-mode-hook ()
;; tab completion for alias in `.mailrc'
(local-set-key (kbd "<M-tab>") 'mail-abbrev-complete-alias)
;; enable automatic word-wrap when composing messages
(setq fill-column 78)
(turn-on-auto-fill)
(when (locate-library "org.el")
;; turn on the `org-mode' table editor
(turn-on-orgtbl)
;; turn on (the enhanced version of) orgstruct-mode
(turn-on-orgstruct++)
;; make `orgstruct-hijacker-command-22' rebind `M-q' to a message
;; specific function to fill a paragraph
(setq fill-paragraph-function 'message-fill-paragraph))
(when (locate-library "auto-complete.el")
(auto-complete-mode)))
(add-hook 'message-mode-hook 'my/message-mode-hook)
#+end_src
Notice that I had to add:
#+begin_src emacs-lisp
;; make `orgstruct-hijacker-command-22' rebind `M-q' to a message
;; specific function to fill a paragraph
(setq fill-paragraph-function 'message-fill-paragraph)
#+end_src
a couple of weeks ago, because the filling did not behave anymore like it did.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: More problems with orgstruct++-mode, message-mode and auto fill
2012-05-10 8:28 ` Sebastien Vauban
@ 2012-05-10 9:26 ` Bastien
0 siblings, 0 replies; 11+ messages in thread
From: Bastien @ 2012-05-10 9:26 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hi Sébastien,
perhaps the problem with filladapt was specific to Thorsten's
installation, it's hard to guess.
IMHO the real question is: what do you need filladapt for?
You wouldn't install a new software called Emacs-For-The-Real-Men just
because it advertizes itself as "Make a better job than Emacs"... unless
you can tell if this is true, and for what.
But I don't have /a priori/ concerns with anyone using filladapt.el, and
my advice was just to be taken as it is: a personal point of view.
My concern is "Should Org work even if people are shooting themselves in
the foot with libraries that are perhaps obsolete and that replace
fundamental variables of Emacs"? The simple answer is: "Yes, if this is
both reasonable and feasible."
Regarding filladapt, if it really "does a better job" at filling, then
it should be somehow merged into Emacs. For now, it replaces functions
like `do-auto-fill' and Org cannot really be expected to understand such
replacements done outside Emacs.
> Notice that I had to add:
>
> #+begin_src emacs-lisp
> ;; make `orgstruct-hijacker-command-22' rebind `M-q' to a message
> ;; specific function to fill a paragraph
> (setq fill-paragraph-function 'message-fill-paragraph)
> #+end_src
> a couple of weeks ago, because the filling did not behave anymore like it did.
That's why it "works" now.
You enable orgstruct++-mode but you don't use its `org-fill-paragraph'
function, you use `message-fill-paragraph' instead. As for auto-filling,
you don't use `auto-fill-function', but filladapt's internal ̀do-auto-fill'
instead.
So, unless you really know why you need/enjoy filladapt, I think it's
not _that_ unreasonable not using it.
2 cents,
--
Bastien
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-05-10 10:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 16:53 More problems with orgstruct++-mode, message-mode and auto fill Bernt Hansen
2012-05-09 17:03 ` Christopher Schmidt
2012-05-09 17:40 ` Bastien
2012-05-09 19:30 ` Bernt Hansen
2012-05-09 21:06 ` Bastien
2012-05-09 21:49 ` Bernt Hansen
2012-05-09 19:15 ` Thorsten Jolitz
2012-05-10 1:11 ` Eric S Fraga
2012-05-10 6:36 ` Bastien
2012-05-10 8:28 ` Sebastien Vauban
2012-05-10 9:26 ` Bastien
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).