From: Decebal <CLDWesterhof@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Setting fill-column and others for text-mode
Date: Fri, 24 Oct 2008 09:54:57 -0700 (PDT) [thread overview]
Message-ID: <5ddf8b9b-1144-454e-ae60-1be36de9ab03@u75g2000hsf.googlegroups.com> (raw)
In-Reply-To: mailman.2012.1224863529.25473.help-gnu-emacs@gnu.org
On 24 okt, 17:52, Nikolaj Schumacher <m...@nschum.de> wrote:
\> > I would like to set fill-column, left-margin, tab-width and
default-
> > justification for text-mode, but I do not manage to get this working.
> > How can this be done?
>
> You can set them inside a hook like this:
> (setq fill-column 70)
It has to be:
(setq-default fill-column 72)
For fill-column and tab-width I thought it better to do it globally.
I also use:
(add-hook 'text-mode-hook (lambda () (refill-mode 1) (setq-default
default-justification 'full)))
(add-hook 'org-mode-hook (lambda () (refill-mode 0) (setq-default
default-justification 'left)))
But this only works partly. Refill-mode is t for text-mode and nill
for or-mode, but default-justification is for both full. What is going
wrong here?
I also tried:
(add-hook 'org-mode-hook (lambda () (refill-mode 0)))
(add-hook 'org-mode-hook (lambda () (setq-default default-
justification 'left)))
But with the same result.
And I would prefer something like:
(defun text-justification ()
(interactive)
(refill-mode 1)
(setq-default default-justification 'full)
)
(defun text-no-justification ()
(interactive)
(refill-mode 0)
(setq-default default-justification 'left)
)
(add-hook 'text-mode-hook 'text-justification)
(add-hook 'org-mode-hook 'text-no-justification)
Can something like this be done?
next prev parent reply other threads:[~2008-10-24 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 14:13 Setting fill-column and others for text-mode Decebal
2008-10-24 15:52 ` Nikolaj Schumacher
[not found] ` <mailman.2012.1224863529.25473.help-gnu-emacs@gnu.org>
2008-10-24 16:54 ` Decebal [this message]
2008-10-24 18:06 ` Lennart Borgman
[not found] ` <mailman.2016.1224871573.25473.help-gnu-emacs@gnu.org>
2008-10-25 8:03 ` Decebal
2008-10-25 8:49 ` Lennart Borgman
2008-10-26 13:58 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ddf8b9b-1144-454e-ae60-1be36de9ab03@u75g2000hsf.googlegroups.com \
--to=cldwesterhof@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.