logs archiveIRC Archive / Freenode / #emacs / 2010 / April / 3 / 1
sjbrown_
is there a way to tell when emacs has a file open?
(from outside the process)
jlf
lsof
leo2007
sjbrown_: emacs writes a temp file when buffer's modified
sjbrown_
like vim's .foo.swp?
johnw
you mean, when a buffer is visiting a certain file?
you could use emacsclient and call get-file-buffer, and see if it returns non-nil
sjbrown_
i'm trying to write a program to detect if emacs is editing a python file, then run pylint when that file is written, and then notify the user of the pylint results
just for some background
johnw
sjbrown_: why not use flymake?
sjbrown_
i'll try some experiments with lsof, then try this "emacsclient" you speak of
johnw
http://www.emacswiki.org/emacs/PythonMode#toc7
         

sjbrown_
never heard of flymake. i'll check it out
johnw
oh, you'll like it way more than what you're thinking of
it highlights incorrect and possibly incorrect lines in your Python code on the fly
i use it all the time
(I even wrote some that wiki article, the second solution)
ams: are you a coffee drinker?
i guess so
ams
yes
johnw
http://www.amazon.com/Bialetti-Express-Espresso-Maker-06799/dp/B000HVC9JW/ref=sr_1_2?ie=UTF8&s=home-garden&qid=1270242496&sr=8-2
i love these
cheap, nearly indestructible, and good results
quotemstr
Someone summoned me?
johnw
I unsummon you
isomer
johnw: yeah, they're great. i do a lot of french press coffee too
quotemstr
I have one of these: http://www.amazon.com/Adagio-Teas-16-Ounce-Ingenuitea-Teapot/dp/B000FPN8TK/ref=sr_1_1?ie=UTF8&s=home-garden&qid=1270242552&sr=1-1
johnw
the only downside to a percolator is that coffee is so HOT
ams
johnw: we had one of those...
johnw
i have to put it in the freezer for 15 mins before I can use it in iced coffee
ams
coffee is supposed to be hot!?
johnw
otherwise, it just melts ALL the ice
yeah, but from an espresso machine it's a lot less hot
quotemstr
And one of these: http://www.amazon.com/Keurig-Gourmet-Single-Cup-Brewing-System/dp/B000GTR2F6/ref=sr_1_1?ie=UTF8&s=home-garden&qid=1270242575&sr=1-1
isomer
*nod*
best investment ever: http://www.espressoplanet.com/coffee-and-espresso/baratza-maestro-burr-grinder.html
ams
johnw: coffee i got in italy was always HOT
johnw
ams: this is so hot, the sun drinks it
quotemstr
I still need to get a burr grinder. I only have a blender-style one now.
ams
johnw: as it should be :-)
quotemstr
johnw: ... to cool off.
         

ams
might get one of those
johnw
that's cool
isomer
ams: toy won't regret it
johnw
making a note of this grinder
isomer
*you
johnw
is the canadian version friendlier to use?
ams
canadian?
fsbot`
I think canadian is eh .. + other entries
isomer
johnw: it says "sorry" a lot, but that's all
johnw
lol
isomer
johnw: you get my email re org-mode link grabber?
johnw
ams: It says "Canadian version" on the web page
isomer: oh I did, didn't realize that was you!
i have it flagged to be looked at again
isomer
<_<
>_>
ams
johnw: does that mean that it doesn't brew coffee? ;-)
isomer
it's in fairly good shape now. if you have other app integration, i'll put them in
johnw
maybe it only brews café
isomer
double-doubles
ams
johnw: my coffee routine is: two spoons into a cup, pour hot water.
isomer
http://www.urbandictionary.com/define.php?term=Double-Double if that means nothnig to you
johnw
ams: if you boil super-fine grounds with water, you get turkish style
aka Arabic coffee
isomer
mmmmmm tasty
johnw
that's the kind my Persian wife is used to from back home
ams
johnw: not sure if i would class this as arabic...
johnw
if anyone is ever stopping by Flagstaff, AZ, I know an awesome coffee roaster there
ams
johnw: but i don't boil the stuff with water, just pour boiling water over it
johnw
Wikipedia: "http://en.wikipedia.org/wiki/Turkish_coffee is also sometimes also referred to as "Arabic coffee"."
http://en.wikipedia.org/wiki/Turkish_coffee
quotemstr
johnw: I've also seen it referred to as "Greek coffee".
johnw
if you boil them together, it makes a syrupy thick coffee
ams
interesting...
johnw
hey, they even mention a burr mill
isomer
i'll bet i'm the nerdiest coffee geek here, though, as i roast my own beans in one of these http://www.behmor.com/
quotemstr
isomer: Neat, but how is it better than using an oven with aluminum foil?
johnw
"While prolonged boiling of coffee gives it an unpleasant "cooked" or "burnt" taste, very brief boiling does not and shows without guesswork that it has reached the appropriate temperature."
quotemstr
isomer: Or a popcorn popper?
sjbrown_
so flymake: i don't like that it requires a Makefile and I don't like that it's (apparently) only for emacs
isomer
quotemstr: it's got a smoke eater
and it can roast 1lb at a time
sjbrown_
i tried lsof to see what files emacs has open, but i don't see the file i'm editing
johnw
sjbrown_: it requires a Makefile?
sjbrown_: not with the hacks on the Emacs WIki
sjbrown_
according to the video i watched
johnw
it only requires Emacs
yeah, that general flymake
not hacked-for-pylint-flymake
lsof won't help
Emacs doesn't keep files open when editing them
ams
i'd like to try real turkish coffee someday
johnw
only when it ultimately saves the buffer
sjbrown_
so this "emacsclient", i guess i'll see what it's all about
ams
johnw: i suppose us poles drink something close to turkish coffee...
johnw: we usually drink it in kinda high glasses, two spoons of coffe, and scoldingwater over that...
let it sit for a few min...
sweeds have perverted the art of drinking coffee though...
johnw
oh, is there an IKEA coffee maker?
leo2007
johnw: I have never used flymake. I guess slime already does what flymake does for common lisp.
ams
they run it through a filter... and you get this watery black thing out of it..
johnw
leo2007: flymake does it passively, while you write your code
sjbrown_
when a user is running emacs to edit a file, is a emacs server automatically started?
ams
no
sepult
nope
sjbrown_
hm. looking at the lsof output again, emacs has the directory held open
that will be good enough for me
i'll set up a notify on that directory looking for writes
ams
night
leo2007
johnw: I will check it out ;)
johnw
night ams
cluck
hi
johnw
hi cluckalucka
cluck
hey johnw
sjbrown_
argh no. i thought lsof showed emacs holding a directory open where i was editing the file, but it turns out it holds my home directory open, but not any other directories
so i'm back to the drawing board -- how to tell what files emacs is editing / what directories those files are in
jlf
.seen fledermaus
birny
fledermaus was last seen quitting at 2010-04-02 12:47:53 GMT (9 hours, 42 minutes, 49 seconds ago).
jlf
sjbrown_: it sounds like flymake is your best bet
sjbrown_
jlf, flymake doesn't work for vim
and doesn't seem to report to the desktop / arbitrary notification destinations
jlf
cron?
sjbrown_
set up a cronjob? to do what?
jlf
to run your linter on any files that have changed since the last invocation
you could also define a save-hook to kick off your linter
fledermaus: ping
Krinn
I have some questions about ERC; is there someone with the time to help me through them?
jlf
,ask
fsbot`
hmm, ask is [0] Go ahead and ask :-) ... and some one will try to help.. if not right now, whenever they happen to wander over to the computer
[1] don't ask to ask and don't ask if someone has or can. Just ask your question and everybody will be happy ;-)
fledermaus
jlf: ?
Krinn
Ah, cheers for the clarification. First time here, not a frequent IRC user: hence tentative steps.
fledermaus
ah
e1f
what's jlilly doing
jlf
e1f: it's a glitch in the matrix
cluck
fsbot`: tell Krinn about anyone
fsbot`
Krinn: hmm, anyone is Please do not ask if anyone uses, knows, is good with, can help you with <some program or library>. Instead, ask your real question and someone will answer if they can help.
cluck
fsbot`: tell Krinn about ask
fsbot`
Krinn: ask is, like, [0] Go ahead and ask :-) ... and some one will try to help.. if not right now, whenever they happen to wander over to the computer
[1] don't ask to ask and don't ask if someone has or can. Just ask your question and everybody will be happy ;-)
wgreenhouse
Krinn: what's up with your ERC?
Krinn
(Action) is in the process of formulating the question in a cogent manner, thanks for the encouragement.
johnw
fsbot`: except johnw
cluck
e1f: flooding! if intentionally or not only he knows
sjbrown_
well a cronjob won't work because it won't know what files to look for. and i don't know what a save-hook is but it sounds like something the user would have to install into their emacs
johnw
people whining about people who ask to ask gets on his nerves
sometimes the question is sufficiently complex that it's a huge waste of time if no one is even present with knowledge in that area
in other words, "ask to ask" = "waste more of your time, not less of mine"
Krinn
I'm having a problem configuring ERC to automatically join a given network and channel, with a saved password, and to rejoin after netsplits, again without prompting. I hope that this is a Solved Problem and I'm just having trouble understanding the documentation.
johnw: which I note also encourages the "speaking the question clearly leads to the answer" syndrome.
wgreenhouse
Krinn: may I have a look at your current ERC config? if you could post it to paste.lisp.org that'd be a big help
jlf
sjbrown_: you could have a cron job use find(1) to find recently modified files
johnw
Krinn: most of the time I'm OK with it; I'm just bugged by people who insist there is never a right time to ask for experts before asking
sjbrown_
jlf. hmm. i kinda like that...
Krinn
http://paste.lisp.org/display/97255
wgreenhouse
Krinn: thanks! 2 secs while I peek at this.
Krinn
johnw: this is a sane point of view.
johnw
also, technically speaking, me asking if anyone is around who understands overlays is itself a question :)
Krinn
Turtles all the way down, hmm ?
johnw
but it's also true that most questions can be answered by many people on this channel; and it's even more true that if someone says, "Yeah, I know about that", the person asking assumes it means they have just committed to providing tech support
hey kensanata!
Krinn
Well, it's nice that the bot apparently gives a civil way to dump a good chunk of that context, as happened just now to me.
jlf
johnw: ,ask can seem a bit di*kish but i think it's good because in socializing people to ask their real question initially it increases the chances that they'll get a useful answer
kensanata
johnw: hello!
cluck
johnw: the point of that ask/anyone is second hand experience, despite it all in emacsen land issues are usually known, few and far between enough that odds are someone else (even if not an expert at it) might have bumped on them before and thus may be able to help even not being qualified
johnw
cluck: that's true
kensanata: were are discussing about how to discuss certain discussions
wgreenhouse
Krinn: couple things. first, you can use this variable to set your automatic channel list:
,erc-autojoin-channels-alist
fsbot`
[google] http://www.emacswiki.org/emacs/ErcExampleEmacsFile
http://www.emacswiki.org/emacs/ErcNickserv
wgreenhouse
,dv erc-autojoin-channels-alist
fsbot`
Alist of channels to autojoin on IRC networks.
Every element in the alist has the form (SERVER . CHANNELS).
SERVER is a regexp matching the server, and channels is the
list of channels to join.
Customize this variable to set the value for your first connect. ..[Type ,more]
wgreenhouse
,more
fsbot`
Once you are connected and join and part channels, this alist
keeps track of what channels you are on, and will join them
again when you get disconnected. When you restart Emacs, however,
those changes are lost, and the customization you saved the last
time is used again. ..[Type ,more]
KB1JWQ
fledermaus: You can remove that ban now.
fledermaus: Got it at the network level. :-)
Krinn
Hmm. That wasn't working for me, but at my experience level, the odds are good that I was Doing It Wrong. *reread, try again*
wgreenhouse
I'm not currently an ERC user, but I think you may need to set erc-autojoin-mode to a non-nil value before that variable will take effect
fledermaus
there's no way to store channel passwords that I know of
only server/network passwords
wgreenhouse
Krinn: you said you're also getting dumped on netsplits?
,dv erc-server-auto-reconnect
fsbot`
Non-nil means that ERC will attempt to reestablish broken connections.
Reconnection will happen automatically for any unexpected disconnection.
You can customize this variable.
Defined in `/usr/share/emacs/23.1/lisp/erc/erc-backend.elc'.
« prev 1 2 3 4 5 6 7 8 9 10 11 next »