As a global project I want to add some X11 binds to XEmacs, which will allow to create window manager in elisp. I always wants to integrate XEmacs in my desktop and control windows from within elisp.
Here is my WishList:
(minibuffer . only)frame.
Unbelievable! X proto in elisp is great! I just try it out and it works perfectly! May be I should try to write fully in elisp without Xlib internal binds? I think speed is not the point for window managers, the first must be maximum usability and ergonomic feel.
Yes I like this kind of window managers too, I use ION. But sometimes it is really necessary to have normal(standard) way of handling windows, say you start some application that have numerous windows(like gimp or glade) - it is no need to maximaze them and mouse is much more easier way to control them. Actually I have two large screens(about 1600x1200) xineramed together and one screen occupied by emacs frame splited to 4 windows. It is very handy to use. But there is no way to access minibuffer, modeline or any emacs routine from any context of windows (f.i.: you want to eval (calc-eval “18*65+5”) expression, or paste from kill-ring to xterm you currently focused). So I want elisped window manager :) BTW: I get ION and Afterstep work together at the same time, one of IONs workspace is occupied by Afterstep and you can switch from ION to Afterstep and vice versa.
I just start XWEM project. XWEM is 100% pure Emacs Lisp window manager. It will need patched version of XlibInterface to support more X funtionality. And I want to hear your wishes about what you want to see in it. I must say that I will try to make it as minimal as possible, it will hold only base functionality and all actions on clients windows, X selections, etc will be hooked around. Here is what I want to see:
‘keymap’(is in FSF Emacs it is special type or list?) for holding keybindings.
I also must acknowledge you that XWEM project will be slowly developing project :(( because of many factors (such as the birth of my son today :) )
Well XE is the beginning of XEmacs and WM stands for Window Manger, so you almost divine, I just mix letters :). Name for XWEM is opened for suggestions. May be fem-wm (wm for emacs maniacs)?
I do realy want WM internally in Emacs(no external proccesses and no other lisp implementations) and realy have fun writing, but it eats time like a piranha.
I copied the Usemod Russian file, converted it to UTF-8, and started using it. Not all strings are translated, and some of the translated strings have changed, but it gives a good expression of what to expect.
Done. Thanks! – Alex.
BTW, on my Mozilla Firebird 0.6 the Russian fonts seem to be extra large – much larger than all the others. Any ideas what this could be? – AlexSchroeder
Recently scanning my
.emacs I found some useful functions, but did not remember when I added them.
;; Some useful functions (defun my-maybeinsert (str &optional arg) "As identity, but inserts to selected buffer if ARG is non-nil." (if arg (insert str) str)) (defun alphabet (&optional arg) "Return latin alphabet as string or insert to selected buffer." (interactive "P") (my-maybeinsert "abcdefghijklmnopqrstuvwxyz" arg)) (defun digits (&optional arg) "Return digits list as string or insert to selected buffer." (interactive "P") (my-maybeinsert "1234567890" arg))
Here is pieces of my
.emacs file, that I use daily:
(defun my-find-tag-regex (tagname) "Use `igrep-find' command to find all occurances of tag with TAGNAME." (interactive (if current-prefix-arg (list (current-word)) (list (find-tag-tag "Find tag: ")))) (let ((dir (file-name-directory tags-file-name))) (igrep-find "grep" tagname (concat dir "/*")))) (defun my-insert-nl-at-eol (arg) "Insert new line at the end of line. If prefix ARG supplied, do not move point." (interactive "P") (eval (list (if arg 'save-excursion 'progn) '(end-of-line) '(newline-and-indent))))
(defun my-do-cmd-under-save-excursion (keys key) "Execute KEY command under `save-excursion'. This command can be bound only to single key(not keysequence)." (interactive (list (this-command-keys) (read-key-sequence (concat (key-description (this-command-keys)) " -"))))
(let ((nkeys (vconcat (butlast (append keys nil)) key))) (save-excursion (command-execute nkeys))))
M-o, and now can insert 17 spaces issuing
C-u 1 7 M-o <SPC>, or I can execute keyboard macro three times starting from same position with
M-3 M-o C-x e
M-x my-try-luck RET
(defun my-try-luck (&optional luck-arg) "Try your luck. Prefix arg LUCK-ARG specifies luck parameter, default is 4." (interactive "P") (unless luck-arg (setq luck-arg 4)) (setq luck-arg (prefix-numeric-value luck-arg)) (if (= (truncate (* luck-arg (/ (random most-positive-fixnum) (float most-positive-fixnum)))) (1- luck-arg)) (message "No luck for today.") (message "You are lucky!") ))
(autoload 'w3m-url-encode-string "w3m") (autoload 'url-insert-file-contents "url") (defun google-calc (string) "Query google calc to calculate STRING." (interactive "sGoogle Calc: ") (with-temp-buffer (url-insert-file-contents (concat "http://www.google.com/search?q=" (w3m-url-encode-string string))) (if (and (re-search-forward "/images/calc_img\\.gif" nil t) (re-search-forward "<b>\\(.*\\)</b></td>" nil t)) (setq res (replace-in-string (match-string 1) "<[^>]*>[^<]*</[^>]*>" "")) (setq res "No result")) (set-buffer-modified-p nil)) (message "Google Calc: %s" res))
M-x google-calc RET 20 rubles in euro RET⇒ Google Calc: 20 Russian rubles = 0.592065171 Euro
Pis prefix key, pressing
P-awill be equivalent to pressing
C-u a- insert ‘a’ four time. Or
C-u M-!- insert output of shell command to current buffer.
Hello lg. I noticed you edited Lisp:flashcard.el in a way that makes the whole file unusable to everyone, even if they’re not affected by the problem you mentioned. I would have preferred if you had added a code fragment like (when (featurep ‘xemacs) (error “Dangerous code here!”)). Also, though I usually monitor this wiki quite closely, especially my own pages, I somehow missed your change, so I would have liked to receive an email about the problem. Thanks. JorgenSchäfer?
Yes, thanks for your comment. I was very hoping just to stress attention on that problem and was very sure that one of authors does monitor EmacsWiki daily and will patch Lisp:flashcard.el in correct way. But than i simple forgot about that, and nobody reviewed it. Forgive me if i did something wrong or gave a lot of troubles. I was also pretty pissed off loosing data, so probably made changes to Lisp:flashcard.el while being in brain affected state :)