(unencodable-char-position (point-min) (point-max) 'utf-8) match-substitute-replacement (query-replace (format "%s" 'ä) "ä") (query-replace (format "%s" 'ü) "ü") (query-replace (format "%s" '←) "←") (query-replace (format "%s" '≠) "≠") (insert (list (read-from-string (format "%s" α)) (setq mon (list "Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" "August" "September" "Oktober" "November" "Dezember")) Mai \,(pop mon) git clone git://repo.or.cz/org-mode.git (message "%s" (case system-type (gnu/linux "Linux") (window-nt "windows") (darwin "mac") (t "other"))) (unless (eq last-command-event 'next) C-h b listet alle Tastenbindungen C-h K springt in die Info-Dokumentation zu einer Tastenbindung The read syntax `#'' is a short-hand for using `function'. For example, #'(lambda (x) (* x x)) is equivalent to (function (lambda (x) (* x x))) ;;;;;;;;;;;;;;;; To represent shared or circular structures within a complex of Lisp objects, you can use the reader constructs `#N=' and `#N#'. Use `#N=' before an object to label it for later reference; subsequently, you can use `#N#' to refer the same object in another place. Here, N is some integer. For example, here is how to make a list in which the first element recurs as the third element: (#1=(a) b #1#) This differs from ordinary syntax such as this ((a) b (a)) ;;;;;;;;;;;; completion-at-point multi-isearch-buffers Once again I recommend that people compile with -DUSE_LISP_UNION_TYPE to catch such bugs. They're trivial to catch this way. Florian Diesch wrote: > Stefan Reuther writes: >>im XEmacs kann man im shell den Anfang eines Befehls eingeben und >>erhält dann mit M-p den vorigen Befehl, der den gleichen Anfang hatte. >>Kann man dieses Verhalten dem GNU Emacs auch irgendwie beibiegen? M-p >>ignoriert hier die Eingabe und holt einfach den vorigen Befehl. M-r und >>dann eine Regexp eingeben geht zwar prinzipiell, aber die Variante mit >>M-p ist doch irgendwie fluffiger. > > Meinst du sowas wie comint-previous-matching-input-from-input  (C-c M-r)? Genau das. Das muss ich im Apropos vor lauter Bäumen wohl übersehen haben. ignore-errors \([ue]\)st\([0-9][0-9]\)_\([0-9][0-9]\)_ _\1st\2_\1st\3_ dired-mark-files-containing-regexp \([( ]\)\([a-z-]+\)-atpt dired-do-query-replace-regexp \1ar-\2-atpt raise-sexp paredit-splice-sexp-killing-backward .Xresources emacs.font: Bitstream Vera Sans Mono-10 \([0-9]+\) \,(+ (string-to-number \1) 240) (nth \([1-5]\) suffix) (nth \,(1- (string-to-number \1)) suffix) diff -u -b /home/speck/emacs/lisp/dired-aux.el /home/speck/progarbeit/emacs/veraendert/dired-aux.el ;; von auto-save Sicherungen wiederherstellen recover-this-file (interactive (progn (barf-if-buffer-read-only) (list (if current-prefix-arg 'full) t))) (delq nil (mapcar 'cdr table)) \([^ ]\)\.\([^ ]\) \1\\\\([[:punct:]]\\\\{0,2\\\\}\\\\|[[:alpha:]]\\\\)\2 \(.*\)fa-\([a-z-]+\) \(reload prot\))\(.*\) \1fa-\2 \3 "\2")\4 \\\\f\\\\n\\\\r\\\\t \\f\\n\\r\\t > >> How can I specify which abbrev table should be loaded in the file itself ? > > > I think the problem is, that the values of file-local-variables > are not evaluated. This in effect assigns the symbol `my-abbrev-table' > to the variable `local-abbrev-table' rather than its value > (the actual table). > > One way of fixing it is using the special eval form > > -*- eval: (setq local-abbrev-table my-abbrev-table); abbrev-mode: t - > *- > > and adding this form (and forms for other table-symbols you plan to > use in this way) to `safe-local-eval-forms'. > > (push '(setq local-abbrev-table my-abbrev-table) safe-local-eval- > forms) C-x 8 RET gives the following prompt: Unicode (name or hex): end-of-form-base \\"\(.\)\\" \\"\(.\)\\" end-of-form-base \\"\1\\" \\"\2\\" nil nil nil nil nil t hg clone http://bitbucket.org/agr/ropemode/ (define-abbrev-table 'global-abbrev-table '(("Infinity" "∞" nil 0) ("alpha" "α" nil 2) ("ar1" "→" nil 0) ("ar2" "⇒" nil 0) ("beta" "β" nil 1) ("gamma" "γ" nil 1) ("theta" "θ" nil 0))) (insert 8592)← (insert #X2260)≠ haskell-mode strace gcore ;;;;;;;;; Emacs' Schnellstarter (Geladenes als Binärdatei) #!/usr/bin/make -f emacs=/usr/bin/emacs fast-emacs: /usr/share/emacs/site-lisp/site-start.el /usr/local/bin/emacs ~/.emacs $(emacs) --batch --execute "(dump-emacs \"fast-emacs\" \"$(emacs)\")" und #!/bin/bash pushd `dirname $0` make-emacs popd exec fast-emacs $@ ;;;;;;;;; compilation-next-error All regular expression replacement commands now allow `\?' in the replacement string to specify a position where the replacement string can be edited for each replacement. If the string begins with `@', Emacs searches the key sequence which invoked the command for its first mouse click (or any other event which specifies a window). If the string begins with `^' and `shift-select-mode' is non-nil, Emacs first calls the function `handle-shift-select'. You may use `@', `*', and `^' together. They are processed in the order that they appear, before reading any arguments. ;;;;;;;;; > > Is it possbile to highligh the column of the page where the cursonr is > > located ? M-x column-marker-1 RET (or 2 or 3, you can mark up to three columns). C-u M-x column-marker-1 RET to disable it. ;;;;;;;;; > > > >   (autoload 'muse-mode "muse-mode" "" t) > >   (eval-after-load "muse-mode" > >     '(progn > >        (require 'muse-html) > >        (require 'muse-journal) > >        (require 'muse-latex) > >        (require 'muse-texinfo) > >        (require 'muse-docbook) > >        (require 'muse-blosxom) > >        (require 'muse-project))) ;;;;;;;;; Von Emacs-keys zu Universal "\(\\C\-\)\([^\"]\)\([^\"]*\)" [(control \2)(\3)] ;;;;;;;;; FWIW, I've got this in my ~/.emacs: (add-hook 'text-mode-hook (defun text-mode-punctuation-syntax () ;; Change non-letter characters from word syntax to punctuation: (modify-syntax-entry ?\240 ".") ; NO-BREAK SPACE (modify-syntax-entry ?' "."))) ; APOSTROPHE -- Kevin Rodgers Denver, Colorado, USA ;;;;;;;;; Check out the Emacs manual - 22.17.1.2 Extended Menu Items I think they are extended the same way as binding commands to keys. > > That said, if we're adding menu items, how could I add one that basically did > > "shift region right", but twice? First you need to write such a command. (Then bind the command to a menu.) (defun my-command-name () (interactive) (call-interactively 'original-command-name) (call-interactively 'original-command-name)) You can find the original command name with C-h k . ;;;;;;;;; Notice that regexp don't 'show' anything, they 'match' input. It's the program that use the regexp that may decide to show or hide lines depending on whether a regexp match them. Here is such a regexp matching any line but those containing "--": ^\([^-]\|-[^-]\)*\(\|-\)$ -- __Pascal Bourguignon__ ;;;;;;;;; epa-dired-do-encrypt Du kannst es natõ‚‰…õ€ˆ¦ï½½ï½¼rlich auch unter Linux ausprobieren, z.B.: (define-key global-map [kp-decimal] [?*]) Dann mõ‚‰…õ€ˆ¦ï½½ï½¼sstest Du mit Komma-Taste ein Stern bekommen. Aber auf meinem Windows XP SP3 und GNU Emacs 22.3.1 hat es funktioniert. ;; Groõ‚‰…õ€ˆï½­æ®·chstaben ^\([;]+[ ]+\)\([A-Z]\) ;; c-comment-start suchen (re-search-backward "\/\\* " nil t 1) (re-search-backward "\\/\\* " nil t 1) (setq ispell-program-name "/opt/local/bin/aspell") ;;;;;;;;;; Emacs mit nXhtml-Mode Nachteile: - Emacs ist natõ‚‰…õ€ˆ¦ï½½ï½¼rlich Geschmackssache - unterstõ‚‰…õ€ˆ¦ï½½ï½¼tzt nur XHTML ;;;;;;;;; Mit Einzel-, Doppel-, Dreifachklick der linken Maustaste markiert man Zeichen, Wort, Zeile des Anfangs einer Region, mit der rechten Maustaste das Ende, zweimal rechts lõ‚‰…õ€ˆ¦ï½½ï½¶scht die Region. Ob gelõ‚‰…õ€ˆ¦ï½½ï½¶scht oder nicht, mit der mittleren Maustaste fõ‚‰…õ€ˆ¦ï½½ï½¼gt man sie anderswo ein. Nil oder Eingabe (let ((s (read-from-minibuffer "Description for %s: "))) (message "%s" (when (not (string= "" s)) s)))) (global-set-key [(control button3)] 'describe-face-at-mouse-point) uuid.el v0.2 Von: Stefan Arentz An: gnu-emacs-sources@gnu.org ;; ;; uuid.el - This tiny emacs extension defines a new command, ;; insert-random-uuid, which will insert a randomly generated ;; UUID at the point. ;; (defun generate-random-hex-string (length) (let (result (digits "0123456789abcdef")) (dotimes (number length result) (setq result (cons (elt digits (random 16)) result))) (concat result))) (defun generate-random-uuid () "Generate a random UUID." (mapconcat 'generate-random-hex-string (list 8 4 4 4 12) "-")) (defun insert-random-uuid () "Insert a random UUID at the point." (interactive) (insert (generate-random-uuid))) ;;;;;;;; Re: Basic Emacs Lisp question Von: Giorgos Keramidas An: help-gnu-emacs@gnu.org On Tue, 29 Apr 2008 20:56:17 +0300, Giorgos Keramidas wrote: > On Tue, 29 Apr 2008 17:49:19 +0200, Matthias Pfeifer wrote: >> Hello, >> >> What is the difference between >> >> (list 0 nil -1) >> >> and >> >> '(0 nil -1) > > In Common Lisp (list 0 nil -1) is required to 'cons' a new list every > time it is called. Quoting the list as in '(0 nil -1) is not required > to build a new list. In fact, in compiled code it may reuse the same > static object over and over again. Reading my own post reveals that I may have been too terse. To clarify the point I was trying to make, here's a small test in Common Lisp, and the equivalent test in Emacs Lisp. 1. Common Lisp test ------------------- * Save the following Lisp code to a file called "foo.lisp": (defun foo-quoted () '(0 nil -1)) (defun foo-list () (list 0 nil -1)) * Then compile the file, and load it. Here's the output from loading the compiled file in SBCL: CL-USER> (compile-file "foo") ; compiling file "/home/keramida/foo.lisp" (written 30 APR 2008 01:48:02 AM): ; compiling (DEFUN FOO-QUOTED ...) ; compiling (DEFUN FOO-LIST ...) ; /home/keramida/foo.fasl written ; compilation finished in 0:00:00 #P"/home/keramida/foo.fasl" NIL NIL CL-USER> (load "foo") ;; This actually loads "foo.fasl" in SBCL. T CL-USER> * Every time the `foo-quoted' function runs it returns exactly the same compiled object. The object returned by separate calls to `foo-quoted' is all of EQ, EQL and EQUAL to any previous call, as you can see in: CL-USER> (let ((one-list (foo-quoted)) (another-list (foo-quoted))) (mapcar (lambda (test) (funcall test one-list another-list)) (list #'eq #'eql #'equal))) (T T T) CL-USER> * In contrast, the object returned by the `foo-list' function is a newly CONS-ed list every time the function runs: CL-USER> (let ((one-list (foo-list)) (another-list (foo-list))) (mapcar (lambda (test) (funcall test one-list another-list)) (list #'eq #'eql #'equal))) (NIL NIL T) CL-USER> The lists returned by `foo-list' are EQUAL, but they are neither EQ nor EQL to each other. They are created from scratch by allocating new storage for the value of the expression every time the `foo-list' function is called. 2. Emacs Lisp test ------------------ * Save the same two functions in a file called "foo.el". * Fire up Emacs, and byte-compile the file by typing M-x byte-compile-file RET foo.el RET * Load the byte-compiled file by typing M-x load-file RET foo.elc RET * Now evaluate the same two LET forms in your scratch buffer, by pasting them in the buffer and typing `C-x C-e' after each expression. Emacs Lisp should also evaluate them as: (let ((one-list (foo-quoted)) (another-list (foo-quoted))) (mapcar (lambda (test) (funcall test one-list another-list)) (list #'eq #'eql #'equal))) => (t t t) (let ((one-list (foo-list)) (another-list (foo-list))) (mapcar (lambda (test) (funcall test one-list another-list)) (list #'eq #'eql #'equal))) => (nil nil t) I hope this makes what I initially wrote a bit easier to grasp :-) Giorgos ;;;;;;;;; An alternative way of evaluating Emacs Lisp expressions interactively is to use Inferior Emacs-Lisp mode, which provides an interface rather like Shell mode (see section Shell Mode) for evaluating Emacs Lisp expressions. Type M-x ielm to create an `*ielm*' buffer which uses this mode. ; Kastrup (progn (setq x '(5)) (dotimes (i 5) (push i x)) x) and get (4 3 2 1 0 5) and that is the only permitted behavior. In contrast, list must always create a fresh object. ,, meins (progn (setq x (list 5)) (dotimes (i 5) (push i x)) x) ;;;;;;;;; Ansi Color Names Vector, py-shell, face ;;;;;;;;; M-x apropos RET hyper RET This is specified by: x-hyper-keysym Usually, it's Hyper_L and Hyper_R. You can choose what key generate these keysyms with xmodmap(1). ;;;;;;;;; ;; oxdivk Optionen -fullscreen -s 6 ;;;;;;;;; (add-hook 'dired-mode-hook (lambda () (local-set-key [mouse-2] 'my-dired-mouse-find-file-same-window))) ;;;;;;;;; (defun insert-hyphen-or-two () (interactive "*") (cond ((or (bolp) (not (looking-back "'"))) ;; insert just one ' (self-insert-command 1)) ((save-excursion (backward-char) ;; Skip symbol backwards. (and (not (zerop (skip-syntax-backward "w_"))) (not (looking-back "`")) (or (insert-and-inherit "`") t)))) (t ;; insert `' around following symbol (delete-backward-char 1) (unless (looking-back "`") (insert-and-inherit "`")) (save-excursion (skip-syntax-forward "w_") (unless (looking-at "'") (insert-and-inherit "'")))))) (global-set-key [39] 'insert-hyphen-or-two) martin (Rudalics) ;;;;;;;;; ;; Internal function for test (defun highlight-current-line-reload () "Reload library highlight-current-word for test purposes." (unload-feature 'highlight-current-word) (load-library "highlight-current-word")) ; emacs C-x C-c sudo apt-get Re: Fast emacs?: msg#00074 help-gnu-emacs-gnu Subject: Re: Fast emacs? > C-x C-f /sudo::/etc/fstab RET I use this which is great. Open the file in normal mode, and then C-x C-r to switch to root privs. ,---- | (defun find-alternative-file-with-sudo () | "Open current buffer as root!" | (interactive) | (when buffer-file-name | (find-alternate-file | (concat "/sudo:root@localhost:" | buffer-file-name)))) | | (global-set-key (kbd "C-x C-r") 'find-alternative-file-with-sudo) ;;;;;;;;;;;;; It is possible to use your aliases with M-x shell-command, I do it all the time. Do the following: * in you bash config (.bashrc): shopt -s -q expand_aliases This makes bash aliases work in non-interactive bashs. * In your emacs config (.emacs): (setenv "BASH_ENV" "~/.bashrc") This tells emacs that non-interactive bash subprocesses should load .bashrc. ;;;;;;;;; tramp C-x C-f /su::/path/to/file/owned/by/root scp MYFILE USER@HOST:/MYDIR /[ra@akronyx.de]/PATH/ M-x list-charset-chars RET unicode-bmp RET And also check `M-x list-load-path-shadows' to find which external elisp files shadow emacs builtins. Bye, Tassilo ;;;;;;;;;; > The shell of Emacs gives me, > > WARNING: terminal is not fully functional > > > > This is quite disturbing. Anyone knows how to get out of this warning > > plz? By "the shell of Emacs" do you mean "M-x shell" command? If so, the warning is correct, "M-x shell" is not terminal at all, it's a kind of repeated shell command prompt. If you need a terminal inside Emacs use "M-x term".