unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Gud lord!
@ 2003-06-07 15:37 Nick Roberts
  2003-06-07 16:12 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 68+ messages in thread
From: Nick Roberts @ 2003-06-07 15:37 UTC (permalink / raw)



Where's the logic in putting gud.el in the progmodes directory? I can see the
point in grouping files which have a natural relationship together but gud.el
is not a mode for a computer language. If I'm looking for something, I quite
often grep the lisp directory, so my rule would be:

If there's not a natural grouping, keep the file in the top-level lisp
directory.

Nick

^ permalink raw reply	[flat|nested] 68+ messages in thread
* Re: yet another todo editing system
@ 2003-06-17  0:21 Joe Corneli
  2003-06-19  6:08 ` Joe Corneli
  0 siblings, 1 reply; 68+ messages in thread
From: Joe Corneli @ 2003-06-17  0:21 UTC (permalink / raw)
  Cc: emacs-devel

> > A feature for browsing programs certainly ought to be part of Emacs.

> One way to think about this feature would be to instantiate a function
> prototype (a b c) -- as in, (insert &rest ARGS) -- as something like
> this: ((a "link a") (b "link b") (c "link c")) -- where "link a"
> points to

>> You have lost me here.  You were talking about browsing, and now
>> you're talking about instantiating something.

>> I can't understand what this is all about.

Hoof.  Ok.  Sorry about the vagueness.  I had a head cold and a
terribly slow internet connection when I was writing last night.
Now both are considerably better.

Let me try to clarify what I was talking about.

A central point is that both Todo and Lisp are oriented towards lists.
The fact that my program works exclusively with lists as opposed to
plain text is the constraint inherent to the "structured editing
environment" I mentioned offhandedly a while ago.

When a person writes Lisp code, they are working within a similarly
constrained environment (assuming they want their code to compile).
Lisp code is made up of lists of strings.

Here is an example of a Lisp function I just wrote, set up in a
traditional style and indented by Emacs.

(defun grape ()
  (interactive)
  (switch-to-buffer "*grep*")
  (beginning-of-buffer)
  (next-line +2)
  (let ((lines (simple-count-lines-page))
        (line (simple-what-line)))
    (while (not (equal line lines))
      (switch-to-buffer "*grep*")
      (next-line +1)
      (setq line (+ 1 line))
      (compile-goto-error)
      (find-file-other-frame (buffer-name))
      (other-frame -1))))

And here is a version of the same function as it might be represented by
Todo.  As is typical with Todo, we find the text spread across several
files.  Recall that the syntax of the lines that make up Todo files is
"<char> text <<filename>>", which means "<user-specified markup code>
link description <<file-we-link-to>>".

grape:
< > defun <<defun>>
< > grape
< > nil <<nil>>
< > interactive <<interactive>>
< > switch-to-buffer <<switch-to-buffer.local>>
< > beginning-of-buffer <<beginning-of-buffer>>
< > next-line +2 <<next-line+2>>
< > let <<let.local>>

let.local:
< > let <<let>>
< > VARLIST <<let_VARLIST.local>>
< > BODY <<let_BODY.local>>

let_VARLIST.local:
< > lines <<simple-count-lines-page>>
< > line <<simple-what-line>>

simple-count-lines-page:
-- OMITTED --

simple-what-line:
-- OMITTED --

let_BODY.local:
< > while <<while.local>>

while.local:
< > while <<while>>
< > TEST <<while_TEST.local>>
< > BODY <<while_BODY.local>>

while_TEST.local:
< > not <<not.local>>

not.local:
< > equal <<equal>>
< > line <<let_VARLIST.local>>
< > lines <<let_VARLIST.local>>

while_BODY.local:
< > switch-to-buffer <<switch-to-buffer>>
< > next-line +1 <<next-line+1>>
< > setq <<setq.local>>
< > compile-goto-error <<compile-goto-error>>
< > find-file-other-frame <<find-file-other-frame.local>>
< > other-frame -1 <<other-frame-1>>

setq.local:
< > setq <<setq>>
< > line <<latest_definition_of_line>>
< > + <<+>>
< > 1 
< > line <<latest_definition_of_line>>

latest_definition_of_line:
< > initial value <<let_VARLIST.local>>
< > inside while loop <<setq.local>>

find-file-other-frame.local:
< > find-file-other-frame <<find-file-other-frame>>
< > buffer-name <<buffer-name>>

other-frame-1:
< > other-frame <<other-frame>>
< > -1

switch-to-buffer.local:
< > switch-to-buffer <<switch-to-buffer>>
< > "*grep*"

next-line+1:
< > next-line <<next-line>>
< > 1

next-line+2:
< > next-line <<next-line>>
< > 2

In the above, every file with the suffix "local" is (a representation
of) what I was calling an "instantiation" in my earlier email.  For
instance, the "let" I use in the definition of the function "grape" is
an instantiation of the function "let" defined in Emacs.  This is
slightly different from the "defun" I use.  The "defun" used in the
definiton of "grape" is exactly the same as any other "defun" you might
find in standard Lisp code.  So I don't point to a "local instantiation"
of defun, but rather to the Todo file that describes defun.

I've taken a liberty in the file let_VARLIST.local by making the 
link descriptions the same as the value of the variable that is being
set.  A more consistent version of let_VARLIST.local would be:

let_VARLIST.local:
< > first variable <<let_VARLIST.first_variable.local>>
< > second variable <<let_VARLIST.second_variable.local>>

let_VARLIST.first_variable.local
< > lines
< > simple-count-lines-page <<simple-count-lines-page>>

let_VARLIST.second_variable.local
< > line
< > simple-what-line <<simple-what-line>>

Another potentially confusing point is that I only have one
"switch-to-buffer.local".  In a more complicated function, there might
be several different "instantiations" of switch-to-buffer.  (We might
have (switch-to-buffer "*scratch*") as well as (switch-to-buffer
"*grep*"), for example.)  The file names used by Todo would have to
be adjusted to reflect this multiplicity.

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2003-06-19  6:08 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-07 15:37 Gud lord! Nick Roberts
2003-06-07 16:12 ` Stefan Monnier
2003-06-07 16:43   ` Robert Anderson
2003-06-07 16:47     ` Robert Anderson
2003-06-07 21:05     ` Miles Bader
2003-06-07 22:07       ` Robert Anderson
2003-06-07 22:35         ` Stefan Monnier
2003-06-08  0:01           ` Robert Anderson
2003-06-08  0:19             ` Stefan Monnier
2003-06-11 13:36             ` Stephen J. Turnbull
2003-06-11 14:04               ` Juanma Barranquero
2003-06-12 21:15                 ` Stephen J. Turnbull
2003-06-12 22:37                   ` Juanma Barranquero
2003-06-11 14:32               ` Stefan Monnier
2003-06-12  1:43                 ` Miles Bader
2003-06-12 15:30                   ` Stefan Monnier
2003-06-12 15:54                     ` Kai Großjohann
2003-06-07 23:47         ` Miles Bader
     [not found]           ` <1055032089.30724.114.camel@lan1>
2003-06-08  2:02             ` Miles Bader
2003-06-08  4:40               ` Robert Anderson
2003-06-12 17:49                 ` Per Abrahamsen
2003-06-08  2:19             ` Miles Bader
2003-06-07 22:59       ` yet another todo editing system Joe Corneli
2003-06-08  7:51         ` Thien-Thi Nguyen
2003-06-08  8:52           ` Joe Corneli
2003-06-08 10:37             ` Thien-Thi Nguyen
2003-06-08 12:32               ` Joe Corneli
2003-06-08 20:05                 ` Kai Großjohann
2003-06-09  7:29                   ` Joe Corneli
2003-06-09  7:34                     ` Miles Bader
2003-06-09  8:01                       ` Joe Corneli
2003-06-09  8:16                         ` Miles Bader
2003-06-09  9:27                     ` Kai Großjohann
2003-06-09 10:54                       ` Joe Corneli
2003-06-09 11:41                     ` Alex Schroeder
2003-06-09 19:43                 ` Thien-Thi Nguyen
2003-06-08 12:48             ` Alex Schroeder
2003-06-09  0:21         ` Richard Stallman
2003-06-09 10:05           ` Joe Corneli
2003-06-09 10:29             ` Joe Corneli
2003-06-15 15:59             ` Richard Stallman
2003-06-16  1:44               ` Joe Corneli
2003-06-16 17:57                 ` Richard Stallman
2003-06-09  0:21     ` Gud lord! Richard Stallman
2003-06-09  1:23       ` Jonathan Walther
2003-06-09 23:00         ` Richard Stallman
2003-06-10  1:28           ` Robert Anderson
2003-06-10  1:53             ` Jonathan Walther
2003-06-11  0:24             ` Richard Stallman
2003-06-09 14:32       ` Robert Anderson
2003-06-10 12:21         ` Richard Stallman
2003-06-10 12:54           ` David Kastrup
2003-06-10 17:10             ` Jonathan Walther
2003-06-11  8:27             ` Richard Stallman
2003-06-09  7:51   ` Juanma Barranquero
2003-06-09  8:11     ` Miles Bader
2003-06-09  8:32       ` Juanma Barranquero
2003-06-09  8:42         ` Miles Bader
2003-06-09  8:56           ` Juanma Barranquero
2003-06-09 13:37         ` Stefan Monnier
2003-06-09 14:07           ` Juanma Barranquero
2003-06-11 13:00             ` Stephen J. Turnbull
2003-06-11 13:53               ` Juanma Barranquero
2003-06-09  0:21 ` Richard Stallman
2003-06-09  7:49 ` Juanma Barranquero
2003-06-09 19:29   ` Not arch (was Re: Gud lord!) Nick Roberts
  -- strict thread matches above, loose matches on Subject: below --
2003-06-17  0:21 yet another todo editing system Joe Corneli
2003-06-19  6:08 ` Joe Corneli

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).