emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* font lock mode can't get to work
@ 2008-09-25 19:31 Graham Smith
  2008-09-25 19:53 ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Graham Smith @ 2008-09-25 19:31 UTC (permalink / raw)
  To: emacs-orgmode

I am using emacs/org mode 6.07b on linux (ubuntu Hardy) and am having
a problem with the font lock mode.

adding -*- mode: org; -*- to the file itself works fine, but simply
loading a test.org file doesn't activate org mode.

I have tried commenting out and back in different options in .emacs,
but none seem to work.

I only have these lines in .emacs at the moment.


;;;;;;;;; Org -Mode;;;;;;;;;;

(setq load-path (cons "~/EmacsAddins/Orgmode/lisp" load-path))
(setq load-path (cons "~/EmacsAddins/Orgmode/contrib/lisp" load-path))
(require 'org-install)

;; The following lines are always needed. Choose your own keys.
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(global-font-lock-mode 1)                    ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only

I presume I am doing something stupid, but can someone tell me what it might be.

Thanks,

Graham

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

* Re: font lock mode can't get to work
  2008-09-25 19:31 font lock mode can't get to work Graham Smith
@ 2008-09-25 19:53 ` Bernt Hansen
  2008-09-25 20:04   ` Graham Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2008-09-25 19:53 UTC (permalink / raw)
  To: Graham Smith; +Cc: emacs-orgmode

"Graham Smith" <myotisone@gmail.com> writes:

> I am using emacs/org mode 6.07b on linux (ubuntu Hardy) and am having
> a problem with the font lock mode.
>
> adding -*- mode: org; -*- to the file itself works fine, but simply
> loading a test.org file doesn't activate org mode.
>
> I have tried commenting out and back in different options in .emacs,
> but none seem to work.
>
> I only have these lines in .emacs at the moment.
>
>
> ;;;;;;;;; Org -Mode;;;;;;;;;;
>
> (setq load-path (cons "~/EmacsAddins/Orgmode/lisp" load-path))
> (setq load-path (cons "~/EmacsAddins/Orgmode/contrib/lisp" load-path))
> (require 'org-install)
>
> ;; The following lines are always needed. Choose your own keys.
> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

This line looks wrong.  What's the extra \\' for after .org?

I have the following:

(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\)$" . org-mode))

so that any files ending in .org or .org_archive trigger org-mode.

-Bernt

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

* Re: font lock mode can't get to work
  2008-09-25 19:53 ` Bernt Hansen
@ 2008-09-25 20:04   ` Graham Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Graham Smith @ 2008-09-25 20:04 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

>> ;; The following lines are always needed. Choose your own keys.
>> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>
> This line looks wrong.  What's the extra \\' for after .org?
>
> I have the following:
>
> (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\)$" . org-mode))
>
> so that any files ending in .org or .org_archive trigger org-mode.

Ah, your comments have made me realise what the problem is. The line
has been copied from the PDF of the manual, but the single apostrophe
doesn't paste properly. I had corrected one but not the other.

Its working now. I did know it was going to be something stupid.

Thanks, your post made me look at this line that much more closely.

Graham

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

end of thread, other threads:[~2008-09-25 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-25 19:31 font lock mode can't get to work Graham Smith
2008-09-25 19:53 ` Bernt Hansen
2008-09-25 20:04   ` Graham Smith

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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