logs archiveIRC Archive / Freenode / #emacs / 2010 / March / 1 / 1
brushie
stepnem: i typed C-x ( my commandes C-x ) then M-x name-last-kbd-macro "my_macro" and now i would like lisp to run it
stepnem
brushie: (execute-kbd-macro 'my_macro) doesn't work?
brushie
stepnem: thanks it work :D, but in fact it dont really resolved the probleem who made me trying to learn elisp, if the macro fail once the execution stop :(
offby1
brushie: you shouldn't be using a macro for whatever you're doing; instead, you should write a proper lisp function
ankou
hi, when I install a plug-in which adds a menu to the menubar this menu is empty, no matter if it is slime, cedet or something else
brushie
offby1: in fact it is the oposite i would like to use only macro like for exemple, i have a text "0123465798abcdef" and i would like to create an hexa X string like char string[] = "\x01\x23\x45\x67\x89\xab\xc\xde\xf0" so i create a a macro who make "\x" -> -> say m1, then another who add the char string[] = say m2 and i try to make a third one who call C-u 0 m1 then m2 and since m1 faile one at the and she cant -> it stop execution and m2 is n
ever called
never'
offby1
brushie: I think I understand: you're a C programmer, and you would like to type "0123465798abcdef" into your C code, and have emacs automatically convert that to char string[] = "\x01\x23\x45\x67\x89\xab\xc\xde\xf0"
brushie
yes :)
offby1
If I understand you correctly, there's no need to use a macro for that (although it might be possible)
         

brushie
in fact this is an exemple
i would like to know how to do this kind of thing i dotn want a "\x-ise-thing-function" :p
offby1
brushie: then learn Emacs Lisp -- it's not too hard, and it's designed to do exactly that sort of thing
brushie
but i cant do mixed lisp and macro ? :(
sometime macro is so cool and i dotn want to code something evrytime i need a little amcro :(
stepnem
sure, you can
you even know how, already
brushie
no :(
stepnem
you just have to fix the problems you encounter, no matter if you use macros of Elisp
*or
brushie
i cant run a macro untill it fail and continue execution if stop macro at first fail
it stop
offby1
brushie: it's easy to have a macro invoke lisp, but I suspect it's awkward to go the other way
brushie
awkward, but can i know how ? :p
if it work its ok, i use it as a tool not to make beautifull trashable macro code
stepnem
you're already doing that: `execute-kbd-macro' is a lisp function
brushie
yes but no
since the macro fail once, the lisp whiel i stopped
while*
stepnem
:D
It's hard to help with this kind of underspecified problems... you might not even need anything like that
if you only want what gave above, just copying the unchanging part and using a simple macro to do the "hexlification" would do just fine I guess
s/what/what you/
brushie
i woul like a C-u 0 M-x my_macro who dont stop on fail
stepnem
oh, OK
what about a pony?
brushie
pony? (like baby horse ??)
stepnem
yeah
brushie
:(
stepnem
I mean, you usually have to find an existing way of solving the problem, not dreaming about non-existent ways :)
unless you have a real lot of time, of course
brushie
but i dont feel like to be a so hard request to execute a macro until she fail in another macro OR in a lisp code without crashing this macro or this lisp :'(
stepnem
hm, I'm not sure I understand -- the macro will execute until it fails..., no?
just as a function would
if you get a failure, you normally can't continue, I don't see anything wrong with that
         

brushie
i would like to do sonething after the fail not the macro stopping
gwern
I have a question: why does C-jing '(boundp foo)' in *scratch* throw me into the debugger? http://www.gnu.org/s/emacs/manual/html_node/elisp/Void-Variables.html led me to believe it would simply return #f
er, nil, I guess
stepnem
gwern: you probably want (boundp 'foo)
gwern
oh. yes, I guess I do
stepnem
otherwise, you're trying to evaluate a (most probably) unset variable
... and get an error
gwern
(Action) is not very used to strict evaluation strategies like that
offby1
shocking!
gwern
I'm not. 'struth!
offby1
so what _are_ you used to/
?
stepnem
gone
apples`
i just grabbed a color theme, but for some reason the comments in all my source files are now invisible! (fg color = bg color) -- inside the color theme, i see that the settings for comment colors contradicts this. what could be the issue?
bob2
do you set colours in some other way, too?
brushie
i patched the source a bit to clariry the problem offby1 and stepnem: http://pastebin.com/GreS8g4F can you take a look at it please
stepnem
brushie: have a look at `condition-case' (or `ignore-errors', but that's a bit of an overkill here)
you can catch and ignore the error
brushie
oh it look cool
apples`
bob2, not that i'm aware
i only started using emacs a few days ago
kevin01123
How would I go about setting up two seperate .emacs configs, one for X, one without?
shabble
kevin01123: have two separate config files, then have your .emacs test 'window-system for 'x or nil and (load ...) hte appropriate config?
greboides
just (if window-system ...) is enough i guess
parolang
What distro do #emacs people use?
hazyarc
I use arch, but plan on moving to exherbo
stepnem
MS DOS
Sketch
,twbfix
fsbot
Most problems can be solved by installing Debian.
parolang
Haven't heard of exherbo...will google
jlindsay
debian/arch/fedora
Exherbo is a new name to me as well
Sketch
i use fedora and debian, myself
parolang
Dunno...I've been having problems with Debian...though it may be my computer/setup.
Hmm http://www.exherbo.org/
hazyarc
It is basically a better version of gentoo
parolang
Hmm...
hazyarc
of course you can use paludis in gentoo also
parolang
You know, I think I'm just going to be humble and install Ubuntu. Even Debian has turned out to be too much for me.
I think a lot of these distros are just trying to out-elite the previous oen.
hazyarc
parolang: yes
parolang
"The target user knows what they are doing."
From the exherbo home page.
By some value of "what they are doing" :)
kloeri
exherbos goals are somewhat different from gentoos
fro0g
(Action) like gentoo
likes, even
kloeri
but this is probably the wrong channel for exherbo advertisements :)
parolang
I think gentoo would take way too long to compile on my old desktop :)
hazyarc
it took about half a day to compile firefox on my old computer
twb
hazyarc: firefox should be fast -- only xulrunner should be slow.
Since firefox is really just some XML and javascript
fro0g
parolang: you could always try sabayon, which is based on gentoo, but have a precompiled system on top of it
twb
fro0g: gentoo ships binary builds, too...
fro0g
twb: for some ebuilds, but not all of them
twb
Granted.
greboides
twb: no it doesnt, sabayon does
twb
parolang: what problems were you having with Debian?
hazyarc
no gentoo does have some
parolang
twb: freezing up, random crashes
twb
parolang: are you using nvidia hardware?
parolang
twb: Yes.
twb
parolang: yeah, I won't provide support for that.
greboides
hazyarc: some very few
parolang
twb: Well...it's interesting that that's the first thing that came to your mind, because I've been thinking that too...
twb
If I have a choice I try to get Intel chipsets.
parolang
Well, maybe I'll get a new graphics card, if that's what it comes to. I don't use anything 3D. The only reason I installed the proprietary driver was to use multihead.
twb
Unfortunately Intel don't currently ship off-board GPUs, so you'd probably need to replace the motherboard.
parolang
Well...there goes that idea.
jlindsay
I moved my desktop to nouveau. Fixed many issues I had with the proprietary drivers.
twb
#debian on OFTC also has clued people who WILL provide support for Nvidia hardware.
parolang
twb: I might give it a try.
jlindsay: That's nice to know. I was wondering about that too...whether the free drivers could be better than the proprietary.
jvj
matrox and voodoo are where it's at
twb
Yeah, as far as GPUs go I had good success with a matrox 450 or so
bob2
however, you'll need a time machine to obtain one
one way intel will release non-crap pci-e video with linxu drivers and the world will rejoice
parolang
Maybe I'll just use generic drivers and unplug the second monitor...dunno.
It's not worth having all of these problems.
bob2
this ati requries non-free firmware of all things
jlindsay
parolang: Which drivers don't support dual head?
parolang
jlindsay: Well...my Nvidia card has two monitor ports in back.
jlindsay
Yes, that is what dual head means
parolang
Honestly...I don't really understand how drivers work. I tried to get it working without the proprietary nvidia drivers...but the proprietary drivers had a nice GUI to configure it for me.
twb
bob2: there ARE plans to release intel pcie gpus
jlindsay: vesa might not support dual-head.
jlindsay
twb: Sorry, I meant nvidia specific drivers
parolang
jlindsay: Well...if I understand, you can also plug in more than one video card.
twb
Well, his choices are nv, nouveau or vesa :-)
jlindsay
parolang: Well I can tell you that nouveau does support that setup. I am using it right now.
twb
So most likely is that parolang installed Debian *stable*, which is now about two years old and predates nouveau entirely.
parolang
yes...Debian stable :)
jlindsay
parolang: And it's a Randr setup, so things like gnome-display-properties can be used to rotate, set res of each screen, etc
But yes, Debian will be the problem with this
parolang
That explains a lot :)
twb
jlindsay: debian *stable* might be.
jlindsay
Right, *stable* I should have said
twb
It's not any different from running RHEL on a desktop
bob2
twb: 2011 now
twb
bob2: hmm?
bob2: oh, for the pcie gpus
parolang
They are telling me in #ubuntu that in the next release they'll move to nouveau.
cool :)
jlindsay
And if your nouveau were say Fedora 13 new, it has the acceleration to run Quake 3
twb
Because of course you install linux when you want to play games...
jlindsay
Of course :)
Intensity
stepnem: Thanks for the pointer on Gnus. I'm aware of the page and I frequent this channel here because of the greater responsiveness. I'm encountering a bug. Otherwise gnus works (mostly) normally.
twb
Most software works well apart from the bugs...
my_haz
twb: you have never coded in php before have you?
twb
my_haz: I won't even run PHP, let alone write it
shader
what do you mean my_haz?
my_haz
if that were an option i would be right there with ya, luckly at the moment i am coding in beautiful python
twb
Python isn't beautiful
my_haz
shader: PHP has a lot of "features" which are odd to say the least
shader
true
cluck
my_haz: easy enough to solve, implement a decent scheme->php compiler and only write scheme code! (if well written the compiler won't let you fu*kup the php)
,ass
fsbot
I think ASS is [0] all software sucks.
[1] but some sucks much, much more.,
[2] Bollocks to [1]. Suck is a unit vector. It's just that any given hacker finds suckage in some direction to be less disagreeable.
parolang
,php
fsbot
[->] hmm, php-mode is [0] <http://emacswiki.org/wiki/PhpMode>
[1] difficult to implement in Emacs (see mmm-mode),
[2] PHP is a good example of how not to design a language,
[3] see also nxhtml
my_haz
cluck: haXe baby haXe
shader
yeah, I've tried those, and it's still hard to get emacs to edit php properly
because it mixes html and php rather thoroughly
cluck
my_haz: here, entertain yourself: http://peter.michaux.ca/articles/scheme-from-scratch-introduction (i'd rather point ,,sicp but this does the trick of getting you started well enough)
fsbot
hmm, SICP is [0] Structure and Interpretation of Computer Programs, a CS textbook using Scheme <http://mitpress.mit.edu/sicp/> (HTML)
[1] <http://www.neilvandyke.org/sicp-texi/> (texinfo), ..[Type ,more]
twb
SICP isn't a Scheme textbook.
It's a CS textbook that happens to use Scheme for its examples.
my_haz
shader: if you can at all help it you should avoid mixing html and PHP anyways, i know thats not satisfy and doesn't help for other peoples code, but it's true
cluck
twb: nit picker :P
twb
my_haz: +1
cluck
twb: all good enough CS practices are indistinguishable from scheme (unless you're writing a cl implementation)
shader
"good enough"?
twb
cluck: a divisive, fragmented community is "good CS practice"?
shader
actually, I think it's just more if a distillation of computer science and programming in general
pure
just all focused on one language
and he was talking about the language, not the community
cluck
twb: sure, cut-throat competition prevents monopolies, it also prevents standardization and moving forward, but hey that's a small price to pay for freedom, right? ...right? :D
twb
cluck: no.
shader
it's because the barrier to entry is so low
anyone can make their own language
what you're looking at when you talk about the "fractured devisive" community, is actually just a bunch of smaller communities
cluck
shader: indeed i was, but twb is completely right (despite me joking) you can't rip one apart from the other
twb
shader: which means less sharing
shader
hmm...
twb
Because you can't drop a library or program written for, say, PLT, into Chicken, and have it Just Work
shader
maybe someone should make a "meta lisp" so that libraries and code can be converted between dialects
cluck
you _should_ be able to
« prev 1 2 3 4 5 6 7 8 9 next »