unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* toggle the line-length of an entire document?
@ 2016-10-03  7:07 Sharon Kimble
  2016-10-03 13:21 ` Drew Adams
  2016-10-03 14:16 ` Thien-Thi Nguyen
  0 siblings, 2 replies; 4+ messages in thread
From: Sharon Kimble @ 2016-10-03  7:07 UTC (permalink / raw)
  To: help-emacs

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


I'm currently using this to toggle line-length -

--8<---------------cut here---------------start------------->8---
(setq-default fill-column 100)
(defvar my-last-fill-col 75 "...")

(defun my-toggle-fill-column ()
   "..."
   (interactive)
   (setq-default my-last-fill-col
                 (prog1 fill-column
                   (setq-default fill-column my-last-fill-col)))
   (message "Fill column is now %d" fill-column))
--8<---------------cut here---------------end--------------->8---

Which works great for individual paragraphs, but now I want to toggle
the line-length of an entire document, but I can't work out how I'm
supposed to do it, so can anyone help please? Great aunt google hasn't
been much help so far! :)

Any ideas please folks?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* RE: toggle the line-length of an entire document?
  2016-10-03  7:07 toggle the line-length of an entire document? Sharon Kimble
@ 2016-10-03 13:21 ` Drew Adams
  2016-10-03 14:16 ` Thien-Thi Nguyen
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2016-10-03 13:21 UTC (permalink / raw)
  To: Sharon Kimble, help-emacs

> I'm currently using this to toggle line-length -
> (setq-default fill-column 100)
> (defvar my-last-fill-col 75 "...")
> (defun my-toggle-fill-column ()
>    (interactive)
>    (setq-default my-last-fill-col
>                  (prog1 fill-column
>                    (setq-default fill-column my-last-fill-col)))
>    (message "Fill column is now %d" fill-column))
> 
> Which works great for individual paragraphs, but now I want to toggle
> the line-length of an entire document, but I can't work out how I'm
> supposed to do it, so can anyone help please? Great aunt google hasn't
> been much help so far! :) Any ideas please folks?

See these commands: `fill-region', `fill-nonuniform-paragraphs', and
`fill-individual-paragraphs'.



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

* Re: toggle the line-length of an entire document?
  2016-10-03  7:07 toggle the line-length of an entire document? Sharon Kimble
  2016-10-03 13:21 ` Drew Adams
@ 2016-10-03 14:16 ` Thien-Thi Nguyen
  2016-10-03 18:57   ` Sharon Kimble
  1 sibling, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2016-10-03 14:16 UTC (permalink / raw)
  To: help-emacs

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


() Sharon Kimble <boudiccas@skimble.plus.com>
() Mon, 03 Oct 2016 08:07:20 +0100

   (setq-default ...)

Just curious: Why do you use ‘setq-default’?

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (type via)
   (case type
     (technical (eq 'mailing-list via))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: toggle the line-length of an entire document?
  2016-10-03 14:16 ` Thien-Thi Nguyen
@ 2016-10-03 18:57   ` Sharon Kimble
  0 siblings, 0 replies; 4+ messages in thread
From: Sharon Kimble @ 2016-10-03 18:57 UTC (permalink / raw)
  To: help-emacs

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

Thien-Thi Nguyen <ttn@gnu.org> writes:

> () Sharon Kimble <boudiccas@skimble.plus.com>
> () Mon, 03 Oct 2016 08:07:20 +0100
>
>    (setq-default ...)
>
> Just curious: Why do you use ‘setq-default’?

Because its worked well for me since 22/04/2015 when I first set it up.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

end of thread, other threads:[~2016-10-03 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-03  7:07 toggle the line-length of an entire document? Sharon Kimble
2016-10-03 13:21 ` Drew Adams
2016-10-03 14:16 ` Thien-Thi Nguyen
2016-10-03 18:57   ` Sharon Kimble

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