Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 10/01/2008, à 20:40

Dark Sidious

Configurer emacs

Bonsoir à  tous,
Je viens d'installer emacs + auctex  avec le gestionnaire de paquets Synaptic sous Ubuntu 7.10 afin de créer mes fichiers.tex,fichiers.asy,...
Afin de configurer emacs, il faut créer un fichier .emacs.el dans le home.
Je l'ai donc fait avec emacs :
C-x C-f ~/.emacs.el RET
c-X C-s
Wrote/home/fab/.emacs.el.
Je suppose que cela veut dire que mon fichier a bien été enregistré, oui mais je ne le trouve pas dans le home !
(Je débute avec Linux )
Merci.

#2 Le 10/01/2008, à 20:43

milambert

Re : Configurer emacs

les fichier commençants pas un point (.) sont des fichier caché.

Donc, on ne les vois pas sauf si on l'indique explicitement au navigateur de fichier.

ou via la commande dans un terminal:

ls -a

mouarf, ...

Hors ligne

#3 Le 10/01/2008, à 20:45

Astier

Re : Configurer emacs

Il me semble que le fichier de conf n'a pas besoin de l'extension .el ; voici l'un de mes fichiers de conf (basé sur d'autres fichiers mis à  disposition par leurs auteurs) si ça t'intéresse :

;; Codage des caractères

(set-terminal-coding-system 'utf-8)
;;(set-keyboard-coding-system 'utf-8)
(set-language-environment 'utf-8)


;;(modify-frame-parameters nil '((wait-for-wm . nil)))

;; Taille et position par defaut de la fenetre
;;(if window-system
;;(setq initial-frame-alist '((top . 00)(left . 00)(width . 120)(height . 20))))



;;                               #######################################
;;                               ## Configurations Emacs by Darksh3ll ##
;;                               ##     gnu-project@darksh3ll.com     ##
;;                               #######################################
;;http://www.darksh3ll.com/configuration_Gnu-Emacs_darksh3ll.html







;;################################################################################
;;                                   Dà‰SACTIVE LES DIFFà‰RENTES BARRES
;;################################################################################

;;--------------------------------------------------------------------------------
;;                                           barre de menu
;;--------------------------------------------------------------------------------

(tool-bar-mode -1)

;;--------------------------------------------------------------------------------
;;                                        la barre de défilement
;;--------------------------------------------------------------------------------
(scroll-bar-mode 1)
(menu-bar-mode 1)

;;################################################################################
;;                                            THUMBS-MODE
;;################################################################################
 (autoload 'thumbs "thumbs" "Preview images in a directory." t)

;;################################################################################
;;                                          THàˆME - AFFICHAGE
;;################################################################################
;;   (if window-system
;;   (color-theme-calm-forest)
;;   (color-theme-hober))

;;################################################################################
;;                                  ACTIVER LA COLORATION SYNTAXIQUE
;;################################################################################
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)
(setq font-lock-maximum-size nil)



;;################################################################################
;;                              SURLIGNAGE D'UNE Rà‰GION Sà‰LECTIONNà‰E
;;################################################################################
(transient-mark-mode t)


;;################################################################################
;;                   POUR NE PAS AVOIR à€ TAPER EN ENTIER LA Rà‰PONSE YES/NO
;;################################################################################

(fset 'yes-or-no-p 'y-or-n-p)

;;################################################################################
;;                  NUMà‰ROTATION DES LIGNES EST DES COLONNES
;;################################################################################
;; Show line-number in the mode line
(line-number-mode 1)

;; Show column-number in the mode line
(column-number-mode 1)

;;################################################################################
;;                        POUR AVOIR L'HEURE DANS LA BARRE D'ETAT
;;################################################################################
(display-time)

(setq display-time-24hr-format t)  ;; Format 24 heures


;;################################################################################
;;                             SUPPORT DE LA SOURIS
;;################################################################################


(mouse-wheel-mode t)



;;################################################################################
;;              AUTO FILL MODE(retour a la ligne automatiquement)
;;################################################################################


(setq auto-fill-mode 1)

(add-to-list 'auto-mode-alist (cons "\\.php$" 'php-mode))

(defun toggle-setnu-mode ()
      (interactive)
      (if setnu-mode
        (setnu-mode -1)
        (setnu-mode 1)))



;;################################################################################
;;                    AFFICHAGE DES IMAGES ET FICHIERS COMPRESSà‰S
;;################################################################################


(setq auto-image-file-mode t)
    (setq auto-compression-mode t)

(cond ((not (eq window-system 'x))
       (set-keyboard-coding-system 'latin-1)))


;;################################################################################
;;             LES 'BEEP' DEVIENNENT VISIBLES (ET NON PLUS AUDIBLES)
;;################################################################################
(setq visible-bell t)



;;################################################################################
    ; METTRE TOUS LES FICHIERS DE SAUVEGARDE DANS UN SEUL Rà‰PERTOIRE
;;################################################################################




(setq backup-directory-alist
    '(("." . "~/.emacs-backup-files/")))

(cond ((not (eq window-system 'x))
       (set-keyboard-coding-system 'latin-1)))



;;################################################################################
;                          TEXT AND AUTO FILL MODE
;;################################################################################


(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'text-mode-hook-identify)
(add-hook 'text-mode-hook 'turn-on-auto-fill)



;;################################################################################
;;                     CHEMIN COMPLET DANS LA BARRE DE TITRE ?
;;################################################################################

(setq frame-title-format "%S: %f")



;;################################################################################
 ;; POUR ENREGISTRER AUTOMATIQUEMENT LA POSITION DU CURSEUR QUAND ON QUITTE UN
;; FICHIER, ET Y RETOURNER AUTOMATIQUEMENT à€ LA Rà‰OUVERTURE
;;################################################################################

(require 'saveplace)
(setq-default save-place t)


;;################################################################################
;; PARENTHESE MATCHING, PERMET DE VERIFIER AU FUR ET à€ MESURE DE LA FRAPPE QUE
;; L'ON FERME BIEN CE QUE L'ON OUVRE, AUSSI BIEN POUR LES PARENTHàˆSES QUE LES
;; CROCHETS OU LES ACCOLADES.
;;################################################################################


(require 'paren)
(show-paren-mode 1)
(setq-default hilight-paren-expression t)


;;################################################################################
;; FERME AUTOMATIQUEMENT PARENTHàˆSES, CROCHETS, GUILLEMETS
;; AU COURS DE LA FRAPPE
;;################################################################################


(defun insert-parentheses () "insert parentheses and go between them"
  (interactive)
(insert "()")
(backward-char 1))
(defun insert-brackets () "insert brackets and go between them" (interactive)
(insert "[]")
(backward-char 1))
(defun insert-braces () "insert curly braces and go between them" (interactive)
(insert "{}")
(backward-char 1))
(defun insert-quotes () "insert quotes and go between them" (interactive)
(insert "\"\"")
(backward-char 1))
(defun insert-frqu () "insert quotes and go between them" (interactive)
(insert "\\og \\fg")
(backward-char 3))
(global-set-key "(" 'insert-parentheses) ;;inserts "()"
(global-set-key "[" 'insert-brackets)
(global-set-key "{" 'insert-braces)
(global-set-key "\"" 'insert-quotes)
(global-set-key "|" 'insert-frqu)



;;################################################################################
;;                  SUPPRIME TOUS LES ESPACES EN FIN DE LIGNE
;;################################################################################




(autoload 'nuke-trailing-whitespace "whitespace" nil t)



;;################################################################################
;;                      POUR QUE LA COULEUR MARCHE EN MODE SHELL.
;;################################################################################



(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(defun to-bottom () (interactive) "Recenter screen so that current
line is on the bottom of the screen"
  (recenter -1)
  )
(defun set-key-to-bottom () (interactive)
  (local-set-key "\C-l" 'to-bottom)
  )
(add-hook 'shell-mode-hook 'set-key-to-bottom)


;;################################################################################
;; SUPPRIMER LES FICHIERS DE SAUVEGARDE EN QUITTANT.
;; (VOUS SAVEZ, CES FAMEUX FICHIERS DONT LE NOM SE TERMINE PAR « ~ »)
;;################################################################################


(setq make-backup-files nil)








;; |  Jean-Baptiste Bourgoin
;; |  licence : GPL
;; |  1st version : 1999
;; |  actual version : 2007
;; |
;; `----------------
;; http://jbbourgoin.free.fr/dotfiles_emacs_emacsel.html
;; http://www.emacswiki.org/cgi-bin/wiki/CamilleBourgoin


;; ISPELL ;;
(setq ispell-dictionnary "francais")

;; TEX ;;
;; mode PDF par défault :
(setq TeX-PDF-mode t)
;; lancer kpdf pour les pdf :
(setq TeX-output-view-style (quote (
      ("^pdf$" "." "kpdf %o")
)))
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(cua-mode t nil (cua-base))
 '(current-language-environment "UTF-8")
 '(display-battery-mode t)
 '(display-time-mode t)
 '(scroll-bar-mode (quote right))
 '(show-paren-mode t)
 '(size-indication-mode t)
 '(transient-mark-mode t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

A+

Hors ligne

#4 Le 10/01/2008, à 23:35

Dark Sidious

Re : Configurer emacs

Bonsoir,
merci pour votre aide, c'est ok wink