[OT?] disabling automatic line-break in emacs octave-mode

View: New views
5 Messages — Rating Filter:   Alert me  

[OT?] disabling automatic line-break in emacs octave-mode

by Carlo de Falco-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I understand this is probably more of an emacs/lisp question but I
hope someone on this list might also know a solution.
I personally find the way emacs automatically breaks lines in octave-
mode
very annoying and I was looking for a way to disable it.
Has anyone done this or know how to do it?
Thanks,
c.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: [OT?] disabling automatic line-break in emacs octave-mode

by Francesco Potortì :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>I personally find the way emacs automatically breaks lines in octave-
>mode very annoying and I was looking for a way to disable it.

Put this into your /.emacs file:

(add-hook 'octave-mode-hook (lambda () (auto-fill-mode 0)))

--
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: Potorti@...
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: [OT?] disabling automatic line-break in emacs octave-mode

by Carlo de Falco-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 6 Nov 2009, at 11:17, Francesco Potortì wrote:

>> I personally find the way emacs automatically breaks lines in octave-
>> mode very annoying and I was looking for a way to disable it.
>
> Put this into your /.emacs file:
>
> (add-hook 'octave-mode-hook (lambda () (auto-fill-mode 0)))

I found this in my .emacs:

(add-hook 'octave-mode-hook
   (lambda ()
     (abbrev-mode 1)
     (auto-fill-mode 1)
     (if (eq window-system 'x)
  (font-lock-mode 1))))


I changed (auto-fill-mode 1) to (auto-fill-mode 0) and it worked.
great, thanks!
c.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: [OT?] disabling automatic line-break in emacs octave-mode

by Leo T Butler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Fri, 6 Nov 2009, Francesco Potortì wrote:

< >I personally find the way emacs automatically breaks lines in octave-
< >mode very annoying and I was looking for a way to disable it.
<
< Put this into your /.emacs file:
<
< (add-hook 'octave-mode-hook (lambda () (auto-fill-mode 0)))

The default column width in emacs in 70 characters including the
newline. This is usually pretty small. You can reset this by

C-u 200 C-xf

(C-u is control-u, etc.)

or by the elisp command

(set-fill-column 200)

Both enlarge the column width to 200.

auto-fill-mode is too useful in general to just turn-off, imo. So I
often reset the fill-column, input some lines I don't want broken, then
reset to the default.

Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

Re: [OT?] disabling automatic line-break in emacs octave-mode

by Francesco Potortì :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>< (add-hook 'octave-mode-hook (lambda () (auto-fill-mode 0)))
>
>The default column width in emacs in 70 characters including the
>newline. This is usually pretty small. You can reset this by
>
>C-u 200 C-xf
>
>(C-u is control-u, etc.)
>
>or by the elisp command
>
>(set-fill-column 200)
>
>Both enlarge the column width to 200.
>
>auto-fill-mode is too useful in general to just turn-off, imo. So I
>often reset the fill-column, input some lines I don't want broken, then
>reset to the default.

I have this:

(global-set-key "\C-ca" 'auto-fill-mode)

I use it routinely to set and reset auto-fill-mode by hitting C-c a.

--
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: Potorti@...
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave