IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New at risk of a war, do this
[link|http://math.claremontmckenna.edu/ALee/emacs/emacs.html|http://math.claremon.../emacs/emacs.html]
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New alt-C, bay-bee.
Add a keyboard macro in the mix, and you're good to go. ;-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Go ahead
Write the lisp code the parse out particular tags.
And explain it to him.

NOT YOU SCOTT!
New get vi'ed :-) I dont use that shite
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New Who the fsck writes LISP to use Emacs?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Ok, fine.
Please show your solution in emacs.
New I need more of the problem specifics
But it would be something along the lines of this keyboard macro:

^( ^s <name_of_tag ^f ^space ^s </name_of_tag> alt-b alt-b alt-b ^b ^b esc-x capitalize-region ^)

Then run the keyboard macro as many times as you need to. Basically it says, "find the next instance of the tag, mark everything in between the tag and the close tag as the region, then capitalize it".

It's a lot quicker to actually make the macro than it is to type it out, since you just do the editing commands you want to record. Probably 10-20 seconds to make the macro, then however long it takes to process the file.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Hope it's a single file
Initial post a "a file full of shtuff" so no need to load and save a bunch.
New As always, use the right tool for the job.
For the majority of my text munging needs, emacs keyboard macros are capable, fast and easy.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Bunch of text mungers
its xml - thus a serialized object model.

Easier and more reliable to work on the dom I think.

But go ahead and live in your flat little world.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Er, come again?
20 seconds of work to do a one-off, vs. thinking and writing a program to do it the "correct" way. And what's the point of creating an object graph for the entire thing when he wants to change one tag's contents only?

I get work done. I don't worry too much about how I get it done unless it actually matters.

"flat little world"... Man, talk about your insults out of nowhere.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New thats our todd, no point manipulating some text
when you can write a hello world example only using 11MB's of libraries and manipulating some text.
thanx,
bill
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New Probably smaller than emacs, though :-P
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Eh? I did it in 3 lines.
Anyhow, I find it easier to modify data structures than to fiddle text- which is error prone. When the text represents a data structure, like source code or xml, modifying the parse tree is more reliable and, I think, easier.

Anyhow, you're taking me way too seriously. :-)



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
Expand Edited by tuberculosis Dec. 12, 2006, 09:15:23 PM EST
New Re: Eh? I did it in 3 lines.
If I were going to do it more than once, sure. Otherwise it's a waste of time. Writing a keyboard macro is simple and quick, much quicker than even your 3 lines of code.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New emacs is xml?
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 51 years. meep

reach me at [link|mailto:bill.oxley@cox.net|mailto:bill.oxley@cox.net]
New Re: Ok, fine.
The following macro:

;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel.
;; Original keys: C-s <attr 2*M-f 2*C-f C-SPC C-s </att 5*C-b ESC xcapital TAB reg TAB RET

Command: last-kbd-macro
Key: none

Macro:

C-s\t\t\t;; isearch-forward
<attr\t\t\t;; self-insert-command * 5
2*M-f\t\t\t;; forward-word
2*C-f\t\t\t;; forward-char
C-SPC\t\t\t;; set-mark-command
C-s\t\t\t;; isearch-forward
</att\t\t\t;; self-insert-command * 5
5*C-b\t\t\t;; backward-char
ESC
xcapital\t\t;; self-insert-command * 4
TAB\t\t\t;; lisp-indent-line
reg\t\t\t;; self-insert-command * 3
TAB\t\t\t;; lisp-indent-line
RET\t\t\t;; newline


Used on the following:

asdsgas<attr ibute="foo">DINGLE_BERRIES</attr>jlj;lj;l
<attr ibute="foo">DINGLE_BERRIES</attr><moo>on you</moo>
<attr ibute="foo">DINGLE_BERRIES</attr><barry>likes herrings</barry>
<attr ibute="foo">DINGLE_BERRIES</attr>

Produces:

asdsgas<attr ibute="foo">Dingle_Berries</attr>
jlj;lj;l<attr ibute="foo">Dingle_Berries</attr><moo>on you</moo>
<attr ibute="foo">Dingle_Berries</attr>
<barry>likes herrings</barry>
<attr ibute="foo">Dingle_Berries</attr>

Like I said, the exact form of the macro is going to depend on the specific data.

The macro above is suitable for pasting into ^x^k^xe, incidentally. ;-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Help! How to programatically edit case of strings? - (CRConrad) - (24)
         Problem restated - (crazy) - (3)
             Particular - SOME tag, not any other tag. - (CRConrad) - (2)
                 The ultimate clueless non-programmer wannabe approach - (crazy) - (1)
                     Thanks a lot... (new thread) - (CRConrad)
         Well, in Squeak it would look something like - (tuberculosis)
         UltraEdit will do it. - (Another Scott)
         at risk of a war, do this - (boxley) - (16)
             alt-C, bay-bee. - (admin)
             Go ahead - (crazy) - (14)
                 get vi'ed :-) I dont use that shite -NT - (boxley)
                 Who the fsck writes LISP to use Emacs? -NT - (admin) - (12)
                     Ok, fine. - (crazy) - (11)
                         I need more of the problem specifics - (admin) - (9)
                             Hope it's a single file - (crazy) - (8)
                                 As always, use the right tool for the job. - (admin) - (7)
                                     Bunch of text mungers - (tuberculosis) - (6)
                                         Er, come again? - (admin) - (4)
                                             thats our todd, no point manipulating some text - (boxley) - (1)
                                                 Probably smaller than emacs, though :-P -NT - (admin)
                                             Eh? I did it in 3 lines. - (tuberculosis) - (1)
                                                 Re: Eh? I did it in 3 lines. - (admin)
                                         emacs is xml? -NT - (boxley)
                         Re: Ok, fine. - (admin)
         Thanks, Scotts. - (CRConrad)

Compatible with our orbiting brain lasers.
75 ms