unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Davi Leal <davi@leals.com>
To: emacs-devel@gnu.org
Cc: Andreas Schwab <schwab@suse.de>
Subject: Re: acute accents
Date: Sat, 29 Mar 2008 13:51:43 +0100	[thread overview]
Message-ID: <200803291351.43648.davi@leals.com> (raw)
In-Reply-To: <je1w5thgfe.fsf@sykes.suse.de>

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

Andreas Schwab wrote:
> Davi Leal writes:
> > I am unable to get acute accent working on yesterday CVS trunk, using the
> > usual Spanish keyboard.  For example: á é í ó ú
> >
> > "n tilde" neither work:   ñ
>
> Can you explain what "not work" means?  Your mail contains all the
> characters you are describing.

While I typing such characters on emacs I see at the emacs bottom bar:

  á SPC- 

  ú SPC return-ñ

and emacs beep as if I was typing a command!

The characters I got while typing are not rightly rendered on such compiled 
version of emacs with such configuration. See attached my .emacs


Coping from another editor and pasting on emacs works! The below files are 
identical:
    wrote-on-another-editor.txt
    pasted-on-emacs.txt

Pasting works, but not typing. Maybe it is an emacs input method bug?


I attach the files got along the test.
P.S.: My operating system is configured to use UTF-8.

[-- Attachment #2: .emacs --]
[-- Type: text/plain, Size: 15244 bytes --]

(server-start)




(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.
 '(auto-compression-mode t nil (jka-compr))
 '(case-fold-search t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(ecb-options-version "2.32")
 '(global-font-lock-mode t nil (font-lock))
 '(save-place t nil (saveplace))
 '(w3m-use-cookies 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.
 )

 


;; PO files
;;
;; Ref.: http://www.gnu.org/software/gettext/manual/html_mono/gettext.html

;; DES-HABILITADO porque me daba error.

;; (setq auto-mode-alist
;;             (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist))
;; (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t)
;; 
;; 
;; (modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\."
;; 			                                'po-find-file-coding-system)
;; (autoload 'po-find-file-coding-system "po-mode")




;; (set-default-font
;;    "-*-Lucidatypewriter-medium-*-*-*-12-*-*-*-*-*-*-*"
;;    ; "-adobe-courier-medium-r-normal--*-130-*-*-m-*-iso8859-1"
;; )



(setq running-emacs-23 (> emacs-major-version 22))
(if running-emacs-23
	(progn
		(set-default-font "Bitstream Vera Sans Mono-7")
		(set-fontset-font (frame-parameter nil 'font) 'han '("cwTeXHeiBold" . "unicode-bmp"))
		(add-to-list 'default-frame-alist '(font . "Bitstream Vera Sans Mono-7"))
        )
)


; Warns for weird stuff -- http://www.emacswiki.org/cgi-bin/wiki/CWarnMode
(require 'cwarn)
(global-cwarn-mode t)




;; GNU Herds (gnuherds.org) UTF-8
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)


;;usenet news
(setq gnus-select-method '(nntp "mail.leals.com"))


;; Git -- Reference from: http://www.emacswiki.org/cgi-bin/wiki/Git
(setq load-path (cons (expand-file-name "/usr/share/doc/git-core/contrib/emacs") load-path))
(require 'vc-git)
(when (featurep 'vc-git) (add-to-list 'vc-handled-backends 'git))
(require 'git)
(autoload 'git-blame-mode "git-blame"
          "Minor mode for incremental blame for Git." t)

;;; ;; git
;;; (require 'git)
;;; 
;;; ;; git
;;; (add-to-list 'vc-handled-backends 'GIT)


;; desktop.el
;;; desktop-save-mode 1)
   
;; Customization follows below
;;; setq history-length 250)
;;; add-to-list 'desktop-globals-to-save 'file-name-history)

;; (setq desktop-buffers-not-to-save
;;	         (concat "\\(" "^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS"
;;			 	        "\\|\\.emacs.*\\|\\.diary\\|\\.newsrc-dribble\\|\\.bbdb" 
;;						        "\\)$"))
;; (add-to-list 'desktop-modes-not-to-save 'dired-mode)
;; (add-to-list 'desktop-modes-not-to-save 'Info-mode)
;; (add-to-list 'desktop-modes-not-to-save 'info-lookup-mode)
;; (add-to-list 'desktop-modes-not-to-save 'fundamental-mode)

;; (setq-default save-place t)

;; You want to set this so your bookmark file is saved after each change
;; (setq bookmark-save-flag 1)
;; (add-hook 'kill-buffer-hook (lambda () (when buffer-file-name (bookmark-set buffer-file-name))))


;; (desktop-load-default)
;; (desktop-read)


;; How to tell emacs to use TAB characters to indent ?
;;; (setq-default indent-tabs-mode t)
;;; (setq indent-tabs-mode t)
;;; (setq tab-width 8)

;;; <davi> johnw, how to tell emacs to use 8 to indent ?
;;; <johnw> davi: which mode are you in?
;;; <lde> why do movement keys work the other way on right-to-left text?
;;; <davi> Johbe, php
;;; <johnw> davi: tab-width sets the length of a tab
;;; <johnw> hmm
;;; <johnw> i don't know in php
;;; <johnw> it's c-basic-offset for the cc-mode derived modes
;;; <johnw> brb
;;; <davi> thanks, I am going to try it


;; Set the load path
;;;; (setq load-path (cons "~/.emacs.d" load-path))

;; Don't make me type out 'yes' and 'no'
;;;; (fset 'yes-or-no-p 'y-or-n-p)

;; Color the code
;;;; (require 'font-lock)
;;;; (global-font-lock-mode t)

;; Set the starting appearance
;;;; (setq default-frame-alist
;;;;       '(;;(cursor-color . "Firebrick")
;;;;         (cursor-color . "White")
;;;;         (cursor-type . box)
;;;;         ;;(foreground-color . "White")
;;;;         ;;(background-color . "DarkSlateGray")
;;;;         (foreground-color . "White")
;;;;         (background-color . "Black")
;;;;         (vertical-scroll-bars . right)))

;;;; ;;;;Change backup behavior to save in a directory, not in a miscellany
;;;; ;;;;of files all over the place.
;;;; (setq
;;;;     backup-by-copying t      ; don't clobber symlinks
;;;;     backup-directory-alist
;;;;     '(("." . "~/.saves"))    ; don't litter my fs tree
;;;;     delete-old-versions t
;;;;     kept-new-versions 6
;;;;     kept-old-versions 2
;;;;     version-control t)       ; use versioned backups

;;;; ;;;;Make sure that .emacs file is edited in lisp mode:
;;;; (setq auto-mode-alist (cons '("\.emacs" . lisp-mode) auto-mode-alist))
;;;; 
;;;; (setq default-tab-width 4)

;;;; ;; Fix the worse part about emacs: indentation craziness
;;;; ;;   1. When I hit the TAB key, I always want a TAB character inserted
;;;; ;;   2. Don't automatically indent the line I am editing.
;;;; ;;   3. When I hit C-j, I always want a newline, plus enough tabs to put me on
;;;; ;;      the same column I was at before.
;;;; ;;   4. When I hit the BACKSPACE key to the right of a TAB character, I want the
;;;; ;;      TAB character deleted-- not replaced with tabwidth-1 spaces.
;;;; (defun newline-and-indent-relative ()
;;;;   "Insert a newline, then indent relative to the previous line."
;;;;   (interactive "*") (newline) (indent-relative))
;;;; (defun indent-according-to-mode () ())
;;;; (defalias 'newline-and-indent 'newline-and-indent-relative)
;;;; (defun my-c-hook ()
;;;;   (defalias 'c-electric-backspace 'delete-backward-char)
;;;;   (defun c-indent-command () (interactive "*") (self-insert-command 1)))
;;;; (add-hook 'c-mode-common-hook 'my-c-hook)
;;;; (defun indent-region-with-tab ()
;;;;   (interactive)
;;;;   (save-excursion
;;;; 	(if (< (point) (mark)) (exchange-point-and-mark))
;;;; 	(let ((save-mark (mark)))
;;;; 	  (if (= (point) (line-beginning-position)) (previous-line 1))
;;;; 	  (goto-char (line-beginning-position))
;;;; 	  (while (>= (point) save-mark)
;;;; 		(goto-char (line-beginning-position))
;;;; 		(insert "\t")
;;;; 		(previous-line 1)))))
;;;; ;;(global-set-key [?\C-x tab] 'indent-region-with-tab)
;;;; (global-set-key [f4] 'indent-region-with-tab)
;;;; (defun unindent-region-with-tab ()
;;;;   (interactive)
;;;;   (save-excursion
;;;; 	(if (< (point) (mark)) (exchange-point-and-mark))
;;;; 	(let ((save-mark (mark)))
;;;; 	  (if (= (point) (line-beginning-position)) (previous-line 1))
;;;; 	  (goto-char (line-beginning-position))
;;;; 	  (while (>= (point) save-mark)
;;;; 		(goto-char (line-beginning-position))
;;;; 		(if (= (string-to-char "\t") (char-after (point))) (delete-char 1))
;;;; 		(previous-line 1)))))



; Moxley's php-mode customizations
(require 'php-mode)
(defun my-php-mode-common-hook ()
  ;; my customizations for php-mode
  (setq tab-width 8)
  (setq c-basic-offset 8)
  (c-set-offset 'topmost-intro-cont 8)
  (c-set-offset 'class-open 0)
  (c-set-offset 'inline-open 0)
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'arglist-intro '+)
  )
(defun pear-php-mode-hook ()
  (setq tab-width 8
        c-basic-offset 8
        indent-tabs-mode
      (string-match "\.php$" (buffer-file-name))))
(add-hook 'php-mode-hook 'pear-php-mode-hook)

;;;; ;; Hide password prompts
;;;; (add-hook 'comint-output-filter-functions
;;;;           'comint-watch-for-password-prompt)

;;;; ;; Display the time
;;;; (setq display-time-day-and-date t
;;;;       display-time-24hr-format t)
;;;; (display-time)

;; Show the column number
(column-number-mode t)

;;;; ;; Key bindings
;;;; (global-set-key [?\C-z] 'shell)
;;;; (global-set-key [?\C-x ?\C-g] 'goto-line)

;;;; (setq temporary-file-directory "/Users/moxleys/tmp")
;;;; (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.
;;;;  )
;;;; (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.
;;;;  '(c-offsets-alist nil))

;;;; (setq tramp-default-method "ssh")
;;;; (require 'tramp)

;;;; ;;;;"I always compile my .emacs, saves me about two seconds
;;;; ;;;;startuptime. But that only helps if the .emacs.elc is newer
;;;; ;;;;than the .emacs. So compile .emacs if it's not."
;;;; (defun autocompile nil
;;;;   "compile itself if ~/.emacs"
;;;;   (interactive)
;;;;   (require 'bytecomp)
;;;;   (if (string= (buffer-file-name) (expand-file-name (concat
;;;; default-directory ".emacs")))
;;;;       (byte-compile-file (buffer-file-name))))
;;;; 
;;;; (add-hook 'after-save-hook 'autocompile)

(tool-bar-mode)

(setq viper-mode t)
(require 'viper)


(put 'scroll-left 'disabled nil)


;;; ;;
;;; (require 'mailcrypt-init)




;;========================== cscope =============

; -*-Emacs-Lisp-*-

;; Usage:

;; M-x bscope-init
;; M-x bscope-find-global-definition

;; comment:

;; Because xcscope.el open a new process of "cscope -L" for each a
;; definition, it's wasting time for reloading cscope and reopening
;; database. It's so slow that I can't bear. So I wrote a simple
;; lisp script using "cscope -l" instead. It saved a lot of time
;; without reloading cscope.

;; Thanks to xcscope.el and Darryl Okahata, I learn a lot from them.

;; There may be a lot of bugs, and no warranty for this script

;; Joy it.
;; Feel free to hack yourself. Just send me your copy.

;; If you find any bugs, please let me know.
;; I don't assure reply for each.

;; My email address is
;; highfly22 at gmail dot com



(defun bscope-canonicalize-directory (dir)
  (or dir
      (setq dir default-directory))
  (setq dir (file-name-as-directory
             (expand-file-name (substitute-in-file-name dir))))
  dir
  )


;; (setq default-directory "g:/software/cscope-15.4/src/")



; process name "bscope"
; buffer name "*bscope*"
; program name "cscope"
; option "-l"
;; (start-process "bscope" "*bscope*" "cscope" "-l")

;; (process-send-string "bscope" "1main\n")

;; (process-send-string "bscope" "0yylex\n")

;; (process-send-string "bscope" "\n")

(defvar bscope-marker-ring-length 16 )

(defvar bscope-marker-ring (make-ring bscope-marker-ring-length)
  )



(defun bscope-init (dir)
  (interactive "DCscope Initial Directory: ")
  ;;   (interactive)
  (setq default-directory  dir)
  (start-process "bscope" "*bscope*" "cscope" "-l")
  ;;   (set-process-sentinel (get-process "bscope") 'bscope-msg-me)
  (set-process-filter (get-process "bscope") 'bscope-filter)
  (with-current-buffer "*bscope*"
    (accept-process-output (get-process "bscope") 10)
    (if (looking-at "^cscope: no source files found")
        (progn
          (erase-buffer)
          (message "bscope: no scope.out file here"))
      (progn
        (bscope-wait-for-output)
        (message  "bscope: load ok")
        )
      )
    )
  )

;; (defun bscope-msg-me (process event)
;;   (message
;;    (format "Process: %s had the event %s" process event)))



(defun bscope-filter (process string)
  ;; Write the output into the Tramp Process
  (with-current-buffer (process-buffer process)
    (save-excursion
      (goto-char (point-max))
      (insert string)
      ))
  )

(defun bscope-query (command)
  (let ((proc (get-process "bscope"))
        )
    (with-current-buffer (process-buffer proc)

      (goto-char (point-max))
      (insert command)

      (process-send-string "bscope" command)

      (bscope-wait-for-output )

      (bscope-process-output )
      )
    )
  )

;; (bscope-query "0yylex\n")
;; (bscope-query "0em_receive\n")


(defun bscope-find-global-definition (symbol)
  (interactive (bscope-interactive "Find this global definition: "))
  (setq query-command  (concat "1" symbol "\n") )
  (ring-insert bscope-marker-ring (point-marker))
  (bscope-query query-command)
  )

(defun bscope-interactive (prompt)
  (list
   (let (sym)
     (setq sym (current-word))
     (read-string
      (if sym
          (format "%s (default %s): "
                  (substring prompt 0 (string-match "[ :]+\\'" prompt))
                  sym)
        prompt)
      nil nil sym)
     ))
  )

(defun bscope-process-output ()

  (with-current-buffer "*bscope*"
    (setq stuff (buffer-substring-no-properties (point) (point-max)))
    (while (and stuff
                (string-match "\\([^\n]+\n\\)\\(\\(.\\|\n\\)*\\)" stuff))
      (setq line (substring stuff
                            (match-beginning 1) (match-end 1)))
      (setq stuff (substring stuff
                             (match-beginning 2)
                             (match-end 2)))
      (if (= (length stuff) 0)
          (setq stuff nil))


      (if (string-match
           "^\\([^ \t]+\\)[ \t]+\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(.*\\)\n"
           line)
          (progn
            (let (str)
              (setq file (substring line (match-beginning 1) (match-end 1))
                    function-name (substring line (match-beginning 2) (match-end 2))
                    line-number (string-to-number (substring line (match-beginning 3) (match-end 3)) )
                    line (substring line (match-beginning 4) (match-end 4))
                    )
              ;; move to new file

              (switch-to-buffer (find-file file))
              (if (> line-number 0)
                  (progn
                    (goto-line line-number)

                    ))
              )
            )

        (progn
          (message "bscope: Sorry, on found")
          )
        ))))


(defun bscope-pop-mark()
  (interactive)
  (if (ring-empty-p bscope-marker-ring)
      (error "No previous locations for bscope invocation"))
  (let ((marker (ring-remove bscope-marker-ring 0)))
    (switch-to-buffer (or (marker-buffer marker)
                          (error "The marked buffer has been deleted")))
    (goto-char (marker-position marker))
    (set-marker marker nil nil)))


(defun bscope-wait-for-output (&optional timeout)

  (let ((proc (get-buffer-process (current-buffer)))
        (found nil)
        (start-time (current-time))
        (start-point (point)))

    (save-excursion
      (while (not found)
        (accept-process-output proc 1)
        (goto-char (point-max))         ;move the last line
        (beginning-of-line)          ;move the beginning of last line
        (setq found (looking-at "^>>"))) ;looking for cscope prompt "^>>"
      )
    )
  )



(provide 'bscope)


(setq inhibit-splash-screen t)


  reply	other threads:[~2008-03-29 12:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-29 10:34 acute accents Davi Leal
2008-03-29 12:18 ` Andreas Schwab
2008-03-29 12:51   ` Davi Leal [this message]
2008-03-29 12:57     ` acute accents -- attached test files Davi Leal
2008-03-29 20:16 ` acute accents Stefan Monnier
2008-03-30  0:59   ` Davi Leal

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803291351.43648.davi@leals.com \
    --to=davi@leals.com \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).