From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.help Subject: Re: Setting fill-column and others for text-mode Date: Fri, 24 Oct 2008 20:06:06 +0200 Message-ID: References: <5ddf8b9b-1144-454e-ae60-1be36de9ab03@u75g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224871600 12726 80.91.229.12 (24 Oct 2008 18:06:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 18:06:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Decebal Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 20:07:41 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KtR4V-0003J4-N6 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 20:07:39 +0200 Original-Received: from localhost ([127.0.0.1]:57110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtR3P-00089w-My for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 14:06:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtR36-00089c-4W for help-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:06:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtR32-00089H-RU for help-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:06:11 -0400 Original-Received: from [199.232.76.173] (port=52428 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtR32-00089E-O5 for help-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:06:08 -0400 Original-Received: from rn-out-0910.google.com ([64.233.170.189]:25463) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtR32-0003Xj-H3 for help-gnu-emacs@gnu.org; Fri, 24 Oct 2008 14:06:08 -0400 Original-Received: by rn-out-0910.google.com with SMTP id k32so741768rnd.7 for ; Fri, 24 Oct 2008 11:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=5m7bF4AtQ6WAlhGIDtJBvUgQQbF4qOewpC5fBvu86nI=; b=F/7HGLq59uBHv2jJp/yD8sawY2B+90A8i7JC3zIofHNaE/Rc0FK7TIjX3eC5wSCpNa VGtPC0mAhLRx4JaIKgvYWeilOdJ9fLSJ0i6UXzVo1uqO5we06ouSFGh4T7yZeB9ksW20 oY2uqx5z7YRzjRjbvlpI9KQ2mgUHBauTsVFC0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=laWlMbJFGNyRklrW03JAZRHcXmW/MqD+ufZIxFfauUd+0jd9zDQg6WMy3okDrYwwDq EhVaLQSyCRu+XwbA/3DgvIuSTNz0hu6cv4IYfMl7GRjFMzWzeUt+dHDbOWr6APwv/XRf WgaEB1wRWhKiZPZO1pKOGuLzIq9A5IeMyAS80= Original-Received: by 10.86.23.17 with SMTP id 17mr402164fgw.0.1224871566619; Fri, 24 Oct 2008 11:06:06 -0700 (PDT) Original-Received: by 10.86.65.3 with HTTP; Fri, 24 Oct 2008 11:06:06 -0700 (PDT) In-Reply-To: <5ddf8b9b-1144-454e-ae60-1be36de9ab03@u75g2000hsf.googlegroups.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59135 Archived-At: On Fri, Oct 24, 2008 at 6:54 PM, Decebal wrote: > 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? You hit a documentation barrier in space-time. The doc string for org-mode simply does not tell you some essential things: - org-mode is made by define-derived-mode from outline-mode - outline-mode is similar made from text-mode - the mode hooks from the ancestor modes are run before the mode hook In this case it means that when you turn on org-mode then the following hooks are run at the end by run-mode-hooks, in this order: text-mode-hook, outline-mode-hook, org-mode-hook This (together with how setq-default works) can probably explain what you see.