Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Max-Gerd Retzlaff <m.retzlaff <at> gmx.net>
Subject: a patch for climacs (mainly regarding COMPLETABLY-PATHNAME) + a gimmick
Newsgroups: gmane.lisp.climacs.devel
Date: Wednesday 31st August 2005 02:05:56 UTC (over 12 years ago)
Hello,


 The COMPLETABLE-PATHNAME class

This patch mainly removes the class COMPLETABLE-PATHNAME. There is
nothing special about those pathnames that make them completable. They
are just ordinary pathnames (no offence meant). The only difference to
the normal PATHNAME presentation-type is that there are different
ACCEPT and PRESENT methods for it. (This ACCEPT offers completion over
pathnames, and the PRESENT just calls NAMESTRING on the pathname
before presenting it.)

This is better done by specialization on the VIEW keyword and not
by subclassing PATHNAME. This patch changes Climacs to the former
behaviour.

The VIEW subclass on which the methods specialize with this patch is
CLIMACS-TEXTUAL-VIEW. It has already bean created in pane.lisp but was
not yet used anywhere, therefore I just took it. Is it intended for
something else that prohibits the use in this context? To be able to
use it as a specializer in lambda-lists the variable
climacs-pane:+climacs-textual-view+ has been added, it hold an
instance of the class climacs-pane:climacs-textual-view, just as there
are such variables for the standard view classes (see clim spec 23.6).
Both symbols, #:climacs-textual-view and #:+climacs-textual-view+, of
the package CLIMACS-PANE are exported.

+climacs-textual-view+ is also the :default-view for the class
CLIMACS-GUI::CLIMACS-MINIBUFFER-PANE now, so that the aforementioned
ACCEPT and PRESENT methods for pathnames are used in the minibuffer.
(See at the beginning of gui.lisp.) Is there a special reason why the
:DEFAULT-VIEW for the class CLIMACS-PANE:CLIMACS-PANE is not specified
in the same way, but in the :AFTER method of (initialize-instance (pane
climacs-pane)) via the line:

  (setf (stream-default-view pane) (make-instance 'climacs-textual-view))

I propose to change this as well, but this patch doesn't do this yet.

As the :DEFAULT-VIEW of the minibuffer is now changed, all the calls to
   (accept 'completable-pathname :prompt "..")
are now substituted by just
   (accept 'pathname :prompt "..")
without the need for explicit specification by use of the :VIEW
keyword. All these calls are changed, even the one in
slidemacs-gui.lisp.


We should think about to moving this ACCEPT method for pathnames (or
something like it) into the McCLIM code, and making it the default
ACCEPT method for the TEXTUAL-VIEW class. Completion for pathnames is
always nice, isn't it?


While we are at PRESENTing pathames: It would nice if in the
climacs-info-pane (aka modeline) the name of the buffer would be
presented via something like:

(let ((name (name buffer))
      (filepath (filepath buffer)))
  (if filepath
      (with-output-as-presentation (pane filepath 'pathname)
        (princ name pane))
      (princ name pane)))

and not printed in this huge FORMAT of CLIMACS-GUI::DISPLAY-INFO.



 The function CLIMACS-GUI:CLIMACS

I added the keywords NEW-PROCESS and PROCESS-NAME to the lambda-list
and the correspondent construct. You can now do
   (climacs-gui:climacs :new-process t)
Just as it is possible with Clouseau and the Climacs-Listener.

I think this construct should be provided by McCLIM as an exported
macro. I've seen it in the Listener, Clouseau, the Beagle-Backend (in
Glimpse), and I use it in my own CLIM applications... Well, this
belogs to mcclim-devel.

CLIMACS-GUI:CLIMACS is also exported now. Why wasn't it before?



Okay, that's all. Only one question left: Why is the variable in the
DEFINE-APPLICATION-FRAME form that holds the minibuffer-pane called
"int"? What is the meaning of "int"?  I don't get it.

Bye,
Max


PS: A gimmick for your entertainment, as you've come to the end
    of this rather long mail:

Substitute +climacs-textual-view+ in the slot :default-view for the
class definition of CLIMACS-MINIBUFFER-PANE by +gadget-view+, apply
   http://bl0rg.net/~mgr/flux/CLIM-Listener.patch
to the Clim-Listener in your McCLIM source tree (cd mcclim/Apps/Listener/;
patch -p 1 < CLIM-Listener.patch) (will soon be commited), download and
load
   http://bl0rg.net/~mgr/flux/file-selector.lisp
(version 1.1!), and fire up FIND FILE in Climacs. You'll get:

   http://bl0rg.net/~mgr/flux/File-Selector-as-Find-File-of-Climacs.png

(I prefer the none gadget-view for the minibuffer, though..)

-- 
Max-Gerd Retzlaff 

For your amusement:
The secret of healthy hitchhiking is to eat junk food.
 
CD: 4ms