* Toggle line length?
@ 2015-01-29 5:12 Sharon Kimble
2015-01-29 5:40 ` Drew Adams
0 siblings, 1 reply; 9+ messages in thread
From: Sharon Kimble @ 2015-01-29 5:12 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
I have my line length set to 74 with this - (setq-default
fill-column 74). Is it possible to be able to toggle this so that I
could have an alternative line length of 100 please? I've been
googling but without success.
Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.6, emacs 24.4.1.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 5:12 Toggle line length? Sharon Kimble
@ 2015-01-29 5:40 ` Drew Adams
2015-01-29 8:24 ` Sharon Kimble
0 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2015-01-29 5:40 UTC (permalink / raw)
To: Sharon Kimble, help-gnu-emacs
> I have my line length set to 74 with this - (setq-default
> fill-column 74). Is it possible to be able to toggle this so that I
> could have an alternative line length of 100 please? I've been
> googling but without success.
(defvar my-last-fill-col 100 "...")
(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))
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Toggle line length?
2015-01-29 5:40 ` Drew Adams
@ 2015-01-29 8:24 ` Sharon Kimble
2015-01-29 14:37 ` Drew Adams
0 siblings, 1 reply; 9+ messages in thread
From: Sharon Kimble @ 2015-01-29 8:24 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
Drew Adams <drew.adams@oracle.com> writes:
>> I have my line length set to 74 with this - (setq-default
>> fill-column 74). Is it possible to be able to toggle this so that I
>> could have an alternative line length of 100 please? I've been
>> googling but without success.
>
> (defvar my-last-fill-col 100 "...")
>
> (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))
Thanks Drew, that’s working very nicely, and thanks for the
speediness! :)
How can I make the line-length of the complete buffer to be 100
please? Again toggling back and forth with 74.
I'm writing a latex document, and 74 seems so short whilst I'm in
the thick of it, so I'm wanting to try out 100.
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.6, emacs 24.4.1.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 8:24 ` Sharon Kimble
@ 2015-01-29 14:37 ` Drew Adams
2015-01-29 18:23 ` Sharon Kimble
2015-01-29 18:52 ` Artur Malabarba
0 siblings, 2 replies; 9+ messages in thread
From: Drew Adams @ 2015-01-29 14:37 UTC (permalink / raw)
To: Sharon Kimble; +Cc: help-gnu-emacs
> How can I make the line-length of the complete buffer to be 100
> please?
Sorry, I don't know what you mean. What is "the line length of
the complete buffer"?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Toggle line length?
2015-01-29 14:37 ` Drew Adams
@ 2015-01-29 18:23 ` Sharon Kimble
2015-01-29 18:39 ` Drew Adams
2015-01-29 18:52 ` Artur Malabarba
1 sibling, 1 reply; 9+ messages in thread
From: Sharon Kimble @ 2015-01-29 18:23 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Drew Adams <drew.adams@oracle.com> writes:
>> How can I make the line-length of the complete buffer to be 100
>> please?
>
> Sorry, I don't know what you mean. What is "the line length of
> the complete buffer"?
I mean that the same line-length of 100 is seen throughout the whole
buffer. Whilst other open buffers remain at 74.
Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.6, emacs 24.4.1.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 18:23 ` Sharon Kimble
@ 2015-01-29 18:39 ` Drew Adams
0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2015-01-29 18:39 UTC (permalink / raw)
To: Sharon Kimble; +Cc: help-gnu-emacs
> >> How can I make the line-length of the complete buffer to be 100
> >> please?
> >
> > Sorry, I don't know what you mean. What is "the line length of
> > the complete buffer"?
>
> I mean that the same line-length of 100 is seen throughout the whole
> buffer. Whilst other open buffers remain at 74.
`fill-column' affects the whole buffer.
I thought you wanted to change the _default_ value of `fill-column'
each time you toggle between 100 and 74, because you mentioned
`setq-default'.
But you can also use just `setq' in that code, to toggle the value
only for the current buffer.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 14:37 ` Drew Adams
2015-01-29 18:23 ` Sharon Kimble
@ 2015-01-29 18:52 ` Artur Malabarba
2015-01-29 19:12 ` Drew Adams
2015-01-29 19:51 ` Artur Malabarba
1 sibling, 2 replies; 9+ messages in thread
From: Artur Malabarba @ 2015-01-29 18:52 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs, Sharon Kimble
I think they mean window width.
On 29 Jan 2015 14:37, "Drew Adams" <drew.adams@oracle.com> wrote:
> > How can I make the line-length of the complete buffer to be 100
> > please?
>
> Sorry, I don't know what you mean. What is "the line length of
> the complete buffer"?
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 18:52 ` Artur Malabarba
@ 2015-01-29 19:12 ` Drew Adams
2015-01-29 19:51 ` Artur Malabarba
1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2015-01-29 19:12 UTC (permalink / raw)
To: bruce.connor.am; +Cc: help-gnu-emacs, Sharon Kimble
>>> How can I make the line-length of the complete buffer to be 100
>>> please?
>>>
>> Sorry, I don't know what you mean. What is "the line length of
>> the complete buffer"?
>
> I think they mean window width.
Then this all means nothing to me; sorry.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Toggle line length?
2015-01-29 18:52 ` Artur Malabarba
2015-01-29 19:12 ` Drew Adams
@ 2015-01-29 19:51 ` Artur Malabarba
1 sibling, 0 replies; 9+ messages in thread
From: Artur Malabarba @ 2015-01-29 19:51 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs, Sharon Kimble
On 29 Jan 2015 18:52, "Artur Malabarba" <bruce.connor.am@gmail.com> wrote:
>
> I think they mean window width.
Ignore me. Glitchy Internet.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-01-29 19:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 5:12 Toggle line length? Sharon Kimble
2015-01-29 5:40 ` Drew Adams
2015-01-29 8:24 ` Sharon Kimble
2015-01-29 14:37 ` Drew Adams
2015-01-29 18:23 ` Sharon Kimble
2015-01-29 18:39 ` Drew Adams
2015-01-29 18:52 ` Artur Malabarba
2015-01-29 19:12 ` Drew Adams
2015-01-29 19:51 ` Artur Malabarba
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).