[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ee-dev] Selecting search strings and functions

From: Juri Linkov
Subject: Re: [Ee-dev] Selecting search strings and functions
Date: Sun, 25 May 2008 03:11:08 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

Hi Henry,

> I have hit a couple of problems while working on extending the functionality 
> of
> ee-dselect, firstly the example search has the search-string hard-coded:
>  [((type . view)
>    (name . "by Type/Emacs-related packages")
>    (r-filter . (lambda (r) (or (string-match "emacs" (ee-field 'package r))
>                             (ee-dselect-search-string-in-description r 
> "emacs")
> can it easily be made a user-input?  I could create a global variable and set 
> it
> before calling the generalised search view but this is VERY clunky, do you 
> have
> a better idea?

I think a global variable is the best way to implement such a search.
You can create a new command that reads a string to search like

(defun ee-dselect-search-string (search-string)
  "Debian package handling frontend."
  (interactive (read-string "String to search: "))
   (format "*%s*" ee-dselect-mode-name)

and use `search-string' in the view file instead of the hard-coded string.

> Secondly I would like to be able to select the function to be applied to the
> marked set e.g. in the case of ee-dselect, install, remove, upgrade etc. 
> rather
> than the single one referred to by r-execute (or r-select for that matter); do
> you have a good idea for this?

Marking in ee is implemented very similar to dired.  So I think it would
be natural to add another feature of dired: using `!' to run a command
on selected lines.  Perhaps a new core command should read an argument
and call r-execute/r-select with this argument.

> It would be great if both these features could be supported in the core of ee,
> it would allow much more powerful and flexible ee-packages.

Thanks, I'll investigate what can be done here.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]