MPC.el p17

2006-03-27 Thread Stefan Monnier

I haven't received any feedback about my MPC.el so I assume nobody but me's
using it, but incase someone cares, development is moving forward little
by little.

The latest version has improved layout of the songs buffer and has support
for album covers (the code currently assumes they're already available in
your music library as files cover.jpg in the album's directory).


Stefan
___
gnu-emacs-sources mailing list
gnu-emacs-sources@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources


Re: globalff.el --- Global find file

2006-03-27 Thread spamfilteraccount
New release.

Changes:

- Added globalff-selection-face, so that it can be set independtly from
the standard region face

- Fixed initial selection if regexp filtering is active

- Added option globalff-adaptive-selection to optionally preselect the
  last file chosen for the same input pattern automatically. If no
exact
  input match is found then the most recent input pattern which matches
  the beginning of the current input is used.

  This option makes it possible to use a short input string to
  locate a previously visited file again quickly.


;;; globalff.el --- Global find file

;; Copyright (C) 2006  Free Software Foundation, Inc.

;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;; Start with M-x globallff and type in any substring of any path on
;; your system to display the matching files. The displayed list is
;; updated dynamically as you type more characters or delete some.
;;
;; Needs an up-to-date locate database for file name searching.
;;
;; Since the search is based on locate you can use any globbing
;; characters allowed by the locate command.
;;
;; You can move up/down the list with the cursor keys (I know these
;; bindings are not very Emacsian, but I happen to like them) and
;; select a file to open with Enter.
;;
;; You can quit with C-g.
;;
;; See the variable `globalff-map' for further bindings.
;;

;;; Code:

(require 'cl)

;;
;; User configurable variables
;;

(defvar globalff-case-sensitive-search nil
  Whether to use case sensitive pattern matching.)

(defvar globalff-regexp-search nil
  Whether to use regular expression pattern matching.)

(defvar globalff-databases nil
  List of database files separated with colon to be used by the locate
command.
If nil then the system default database is used.)

(defvar globalff-filter-regexps nil
  List of regular expressions to filter out unwanted files from the
output.)

(defvar globalff-minimum-input-length 3
  The minimum number of characters needed to start file searching.)

(defvar globalff-search-delay 0.5
  Idle time after last input event, before starting the search.)

(defvar globalff-adaptive-selection nil
  If enabled the last file chosen for the same input is preselected
automatically instead of the first one in the list. If no exact input
match is found then the most recent input pattern which matches the
beginning of the current input is used.

Doesn't do anything if the user moves the selection manually, before a
file is selected automatically.

This option makes it possible to use a short input string to locate a
previously visited file again quickly.)

(defvar globalff-history-length 50
  Number of previous file selections saved if
`globalff-adaptive-selection' is enabled.)

(defvar globalff-history-file ~/.globalff_history
  Name of the history file where previous file selections saved if
`globalff-adaptive-selection' is enabled.)

;; Face used to highlight the currently seleceted file name
(copy-face 'region 'globalff-selection-face)

(defvar globalff-map
  (let ((map (copy-keymap minibuffer-local-map)))
(define-key map (kbd down) 'globalff-next-line)
(define-key map (kbd up) 'globalff-previous-line)
(define-key map (kbd prior) 'globalff-previous-page)
(define-key map (kbd next) 'globalff-next-page)
(define-key map (kbd C-c) 'globalff-toggle-case-sensitive-search)
;; I wanted to choose C-t as a homage to iswitchb, but
;; transpose-chars can be useful during pattern editing
(define-key map (kbd C-r) 'globalff-toggle-regexp-search)
(define-key map (kbd C-s) 'globalff-toggle-around-globs)
(define-key map (kbd RET) 'globalff-exit-minibuffer)
map)
  Keymap for globalff.)

;;
;; End of user configurable variables
;;

(defvar globalff-idle-timer nil
  Idle timer for monitoring typed characters.)

(defconst globalff-buffer *globalff*
  Buffer used for finding files.)

(defvar globalff-previous-input 
  The previous input substring used for searching.)

(defvar globalff-overlay nil
  Overlay used to highlight the current selection.)

(defvar globalff-history nil
  List of the previous file selections if
`globalff-adaptive-selection' is enabled.)

(defvar globalff-adaptive-selection-target nil
  The search output filter looks for this file name in the output if
`globalff-adaptive-selection' is enabled.)


(defun 

EmacsAssist

2006-03-27 Thread Anton V. Belyaev
Remember VisualAssist for VisualStudio? If you lack its convinient M-o,
M-m features in Emacs, EmacsAssist is for you. EmacsAssist is a C/C++
code navigator, allowing rapid navigation between class methods and
switch between header and body files (.h and .cpp).

Comments, critics, feature requests are welcome.
I am beginner in eLisp, so I would highly appreciate comments related
to Elisp usage and Emacs API usage (for example if something is written
ugly from point of view of experienced Elisp programmer).

;;; eassist.el --- EmacsAssist, C/C++ code navigator.

;; Copyright (C) 2006 Anton V. Belyaev
;; Author: Anton V. Belyaev anton.belyaev at the gmail.com

;; This file is *NOT* part of GNU Emacs.

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.

;; This program is distributed in the hope that it will be
;; useful, but WITHOUT ANY WARRANTY; without even the implied
;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;; PURPOSE.  See the GNU General Public License for more details.

;; You should have received a copy of the GNU General Public
;; License along with this program; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA

;; Version: 0.1

;; Compatibility: Emacs 22, CEDET 1.0pre3.

;;; Commentary:

;; Contains some useful functions features for C/C++ developers similar
to
;; those from VisualAssist. Remember that convinient M-o, M-g and M-m?

;; 1) Method navigaton.
;;When eassist-list-methods called when c/c++ body file buffer is
active
;;a new buffer is shown, containing list of methods and functions
in the
;;format: return type, class, method name. You can select the
method
;;moving to its line and press ENTER to jump to the method. You
also can
;;type a string in the buffer and method list will be reduced to
those
;;which contain the string as a substring. Nice highlight is
implemented.
;;This function is recommended to be bound to M-m in c-mode.

;; 2) Header - Body file switch.
;;You can easily switch between body (c, cpp, cc...) and its
corresponding
;;header file (h, hpp...) using eassist-switch-h-cpp. The file is
searched
;;in the same directory. You can adjust body to header
correspondance
;;customizing eassist-header-switches variable.
;;This function is recommended to be bound to M-o in c-mode.

;; EmacsAssist uses Semantic
(http://cedet.sourceforge.net/semantic.shtml)
;; EmacsAssist is defeloped for Semantics from CEDET 1.0pre3 package.
;; EmacsAssist works with current development (22) version of Emacs and
;; does not work with version 21.

;; Usage:

;; 1) Install CEDET 1.0pre3 package for Emacs (if you dont have CEDET
already).
;; 2) Copy eassist.el to your emacs/lisp folder.
;; 3) Add to your .emacs following line to load EmacsAssist:
;;(require 'eassist)
;; 4) Add convinient keymaps for fast EmacsAssist calls in c-mode:
;;(defun my-c-mode-common-hook ()
;;  (define-key c-mode-base-map (kbd M-o) 'eassist-switch-h-cpp)
;;  (define-key c-mode-base-map (kbd M-m) 'eassist-list-methods))
;;(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
;; 5) Open any C++ file with class definithion, press M-m. Try to type
;;any method name.
;; 6) Open any .cpp file. Press M-o. If there is .h or .hpp file in the
;;same folder, it will be opened.

;;; Changelog:

;; 27 mar 2006 -- Initial version 0.1 created.

;;; Code:

;; == My STRING utils

(defun eassist-string-last (string n)
  (substring string (- (length string) n)))

(defun eassist-string-without-last (string n)
  (substring string 0 (max 0(- (length string) n

(defun eassist-string-ends-with (string end)
  (string= end (eassist-string-last string (length end
;; == My STRING utils end


;; == CPP-H switch
===
;; Funcalls action until it is not nil.
;; Returns result of the last action.
(defun eassist-do-for-first-suitable (lst action)
  (if (null lst)
  nil
(let ((res (funcall action (car lst
  (if (null res)
  (eassist-do-for-first-suitable (cdr lst) action)
res

(setq eassist-header-switches '(
 (h . (cpp cc c))
 (hpp . (cpp))
 (cpp . (h hpp))
 (c . (h))
 (cc . (h hpp))
 ))

(defun eassist-switch-h-cpp ()
  (interactive)
  (let ((ext (file-name-extension (buffer-file-name
(if (null (eassist-do-for-first-suitable eassist-header-switches
 (lambda (i)
 

EmacsAssist

2006-03-27 Thread Anton V. Belyaev
Remember VisualAssist for VisualStudio? If you lack its convinient M-o,
M-m features in Emacs, EmacsAssist is for you. EmacsAssist is a C/C++
code navigator, allowing rapid navigation between class methods and
switch between header and body files (.h and .cpp).

Comments, critics, feature requests are welcome.
I am beginner in Elisp, so I would highly appreciate comments related
to Elisp usage and Emacs API usage (for example if something is written
ugly from point of view of experienced Elisp programmer).

Here is the link:
http://rain.ifmo.ru/~bell/eassist.el

___
gnu-emacs-sources mailing list
gnu-emacs-sources@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources


Re: globalff.el --- Global find file

2006-03-27 Thread Francesco Potorti`
New release.

I think that writing to this list with a fake From: line is not good
practice.  The mail does not even have a signature.  The source does not
contain the author's name.

Anyway, whoever you are, note that your mail agent wraps long lines, so
the elisp source you posted for globalff.el, which I am beginning to use
with some satisfaction (thanks) contains at least one syntax error.


___
gnu-emacs-sources mailing list
gnu-emacs-sources@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources