logs archiveIRC Archive / Freenode / #emacs / 2010 / February / 8 / 1
quotemstr
Mamihlapinatapai.
sshelagh
quotemstr: are you trying to confuse me?
timmbob
Hi. I'm having a bit of trouble with tramp. I used tramp to connect to a remote machine via scp but now every time i start emacs tramp trys to reopen this connection. Do you have any idea how to prevent this?
fledermaus
,-q
fsbot
fledermaus, I heard -q is if you start emacs with "emacs -q" and the problem goes away, it's YOUR FAULT; check your .emacs. If "emacs -q" has problems and "emacs -Q" does not, it's caused by your distro or local admin.
quotemstr
sshelagh: Take out the live coals with the hand of the cat.!
ams
timmbob: using desktop mode?
timmbob
both
ams
timmbob: then that is your problem.
         

timmbob
starting emacs from the terminal or using carbon emacs makes no difference
fledermaus
timmbob: hat has that got to do with anything?
+w
nobody mentioned which windowing system you were using.
ams
fledermaus: be nice!
fledermaus
I am being nice.
ams
no you'renot.
you scare the newbies
timmbob
Sorry. I'm quite new to emacs, so my interpretation of deaktop mode was wrong
desktop
ams
,desktop-mode
fsbot
[google] http://www.emacswiki.org/cgi-bin/info-ref%3Ffind%3DSaving%2520Emacs%2520Sessions
http://www.emacswiki.org/emacs/ProjmanMode
fledermaus
tbf it's a misleading name.
basically, it's remebering the files you opened.
gwern
hi everyone. so I'm trying to match all -- or ---s to replace them with —, but not any html-style comments (the <!-- and --> bits). is "[^!<-]---?[^>!-]" wrong for this? (I'm checking in regexp-builder but I would be regexp replacing on a very large file with lots of varieties)
fledermaus
you need to find out how it remembers (some variable, probably saved to your .emacs) and make it forget, or tell it not to remember remote files
dim
(setq desktop-restore-eager 20) !
timmbob
ok. so this information must be stored somewhere and i can clear this cache right?
fledermaus
timmbob: try M-x customize-group RET desktop RET
timmbob
fledermaus: the customize-group for desktop says i'm not using desktop mode. at least desktop-save-mode is nil
fledermaus
start emacs with -q and se if the prblem goes away
see
problem
timmbob
is there a way to debug the initialization of emacs, so i can see which script starts tramp?
fledermaus
,debug-init
fsbot
bisect is, like, [0] To find a problematic form in your .emacs: comment out half, and try to reproduce the problem. You should now know which half causes the problem. Recurse as necessary.
[1] Don't use this to find the cause of a lisp error; instead start emacs with --debug-init., ..[Type ,more]
timmbob
emacs -q wokrs just fine
works
         

fledermaus
then it's something in your .emacs.
proceed from there.
timmbob
ok thanks
jim_rees
ams: Thanks for your help the other day, I fixed my buffer problems.
ams
no clue what you are talking about
glad to have been of help
jim_rees
ams: I figured you wouldn't remember, but many thanks anyway
ams
(i don't remeber what i had for dinner)
jim_rees
ams: you helped me with this:
(set-window-buffer (selected-window) (car (last (buffer-list))))
ams
i see.
jim_rees
I was missing the "car"
fualo_
how do I get messages to print in the minibuffer and not the current buffer? Like (message "test")
ams
no clue. don'tcare. glad to have been of help.
fualo_: that doe print itin the minibuffer.
fualo_
ams: I think the argument passing is screwing me up... how would argument passing worth with keybinding? I had thought (global-key-set "\C-cp" (func "test"))
fledermaus
fualo_: that's wrong on so many levele
levels
fualo_
:-), sorry, I'm a lisp newb
ams
fualo_: global-key-set takes a command.
that is not a command.
see manual for details
quotemstr
ams: You are a beggar as a church rat.
fualo_
func is the name of a fake function in that case, that I've already defined
fledermaus
it's a nonexistent function, the key is specified using the obsolete key syntax, and the function is not being passed in
ams
fledermaus: that is not obsolete syntax.
not to mention that global-key-set doesn't take a function, it takes a command.
quotemstr
All key syntaxes are obsolete next to the vector syntax!
fledermaus
(global-set-key (kbd "C-c p") 'name-of-command)
ams
(global-set-key "\C-cp" (lambda () (interactive) ...body...))
there is nothing obsolete with "\C-cp"
fualo_
ams: thanks, I see now with the lambda
ams
fualo_: no
fualo_: lambda makes a function.
fualo_: the interactive bit is the important.
that makes a comand.
fualo_
I thought it was like R, that if you had wrap it in a anonymous function?
quotemstr
,(commandp (lambda () (interactive) 1))
fsbot
nil ..(symbol)
ams
quotemstr: funny that.
on my box it returns t :)
quotemstr
ams: To craunch the marmoset, I think so.
ggole
Hmm, returns t here...
fsbot might be screwing with it
ams
yeah
ggole
,(commandp 'forward-line)
fsbot
t ..(symbol)
ggole
Dunno
ams
ggole: quotemstr is just trying to start an argument.
quotemstr
ams: He is not so devil as he is black! Kettle!
ams
ggole: see
e1f
"Linus Torvalds: Googles Nexus One First Mobile Phone I Dont Hate" http://feedproxy.google.com/~r/Techcrunch/~3/lBImAGj3YQI/
ams
linus torvalds: i don't give a sh*t about freedom
JordiGH
Wow.
What's nexus one like?
fledermaus
"unpopular" :)
e1f
just as popular as linux ;)
gwern
bleh. how do I make [^!]--[^>] not include the preceding and succeeding character?
quotemstr
JordiGH: To the admirals! A vice admiral's ship! How have you passed the night?
gwern
it matches things like \-- and replaces 3 characters when I want just the -- replaced
JordiGH
(Action) wonders if POSIX regexps can do perly look-around things.
fledermaus
zero-width lookahead and lookbehind? I don't believe so, no.
JordiGH
Perl regexps in Emacs NAO
gwern
so I guess I would have to match the preceding and succeeding character and explicitly replace them back in?
(Action) was hoping to avoid the groups stuff
fledermaus
or just replace the group in the middle
ams
how about...
you do it programatically
search for --
move back two char
see if !
e1f
write a keyboard macro
ams
move back on
see if <
move forward three
else
replace -- with ---
or whatever
gwern
e1f: the conditional mgiht be difficult in a macro
ams
why?
gwern
ams: a macro is just a static sequence of keypresses. where's the logic to determine whether to substitute or leave alone?
ams
gwern: bullsh*t
e1f
do two sets of macros then
ams
gwern: M-: ...
macros are just recordings of keypresses.
you make them as dynamic or static as you want
or you can do something easy.
replace <!-- with XXooXXooXX
and --> with xxOOxxOOxx
then replace -- with — or whatever
then
replace XXooXXooXX with <!--
and xxOOxxOOxx with -->
,next
fsbot
Another satisfied customer.
NEXT!
timmbob
Hmm, i commented out my whole emacs config: tramp does not try to connect at startup. Then I commented my emacs config back in succesively: tramp does not try to connect on startup. An i restarted emacs every time i changed my config. strange ...
anyhow, tramp stopped bugging me. so i'm fine for the moment
fledermaus, ams: thanks for your help
e1f
it might be recentf trying to connect to remote files
if you have the menu for recent files enabled
JordiGH
Does Wikipedia's entry on the Nexus One already say how Linus doesn't hate it?
timmbob
e1f: how can i check if it is enabled?
oh alright, it is named recentf
JordiGH
Hm, only a link to it at the bottom.
e1f
look in your File menu. is there an entry for recently edited files?
with a submenu listing them
ams
hmph.
i get so conflicted when i listen to speaches about freedom.
timmbob
e1f: yes i use recentf
;-)
JordiGH
ams: So what's non-free about Nexus one?
ams: Just some binary blobs?
e1f
next time you have issues just clear the menu entry
ams
JordiGH: oh, i'mlistning to eben moglen's speach called freedom in the cloud
timmbob
ithanks
ams
oh, you'reon about something else.
JordiGH
menu entry?
e1f
i;m talking to timmbob
marklarr
Hi all -- I have a elisp question. This might fall under common lisp since it's from 'cl. (and t t) and (and t nil) work as expected. (reduce #'+ '(2 3)) also works as expected. However, (reduce #'and '(t nil)) does not work. The error I'm getting is "Debugger entered--Lisp error: (invalid-function and)". Does anyone know why this might be?
fledermaus
,df and
fsbot
and is a special form in `C source code'.
(and CONDITIONS...)
Eval args until one of them yields nil, then return nil.
The remaining args are not evalled at all.
If no arg yields nil, return the last arg's value.
JordiGH
What...
They sell Nexus One without the ability to run as root?
You can't be root on your own device?
technomancy
JordiGH: I don't think they do
ams
marklarr: and is a macro.
fledermaus
marklarr: not a function
it's a special form
ams
fledermaus: even in 'cl?
fledermaus
not talking about 'cl, and I doubt 'cl replaces the definition of and
ams
nope, it doesn't.
marklarr
fledermaus: I see. Is there something else I could use for this?
ams
marklarr: no.
quotemstr
marklarr: CALLLEN SIE 'every'.
ams
marklarr: what do you want to do?
RaceCondition
Undefined function: AND <- from CL
e1f
www.redmondpie.com/how-to-root-google-nexus-one-on-android-2.1-9140296/
marklarr
fledermaus: I just want to see if something is true for all. I can just check by hand -- not that bad. I was wondering what I was missing -- why it wasn't working
RaceCondition
marklarr: you can warp and inside of a lambda
marklarr
quotemstr: ok versuche ich es.
RaceCondition: warp?
ams
what RaceCondition aid
fledermaus
wrap
RaceCondition
(reduce #'(lambda (x y) (and x y)) '(t nil)) works in CL
ams
marklarr: (reduce (lambda (x y) (and x y)) '(1 2 3 4))
RaceCondition
or what ams said
ams
RaceCondition: bah
:)
quotemstr
marklarr: Gut.B itteschön.
marklarr
ok, every and the lambda look good. I'll check out wrap. Thanks for the help people
ams
marklarr: the lambda is a wrap
you wrap the and around the lambda
RaceCondition
marklarr: ofcourse you don't need to wrap anything if you use every because the effect is the same
marklarr
ams: I see. That makes sense.
ams
every is though a cl'ism
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 next »