logs archiveIRC Archive / Freenode / #emacs / 2010 / May / 10 / 1
nwidger
hi, i've turned on auto newline in c-mode and dont like how it puts a newline before the opening brace '{' or a function definition. i believe i need to customize c-hanging-braces-alist to change this behavior but im not sure what to set it to. would the 'defun-open' entry in that list be what im looking for?
ssito
I have a problem while editing any makefile. If I press tab emacs removes all indentation.
quotemstr
nwidger: Try it and see.
ssito
If it were some other kind of file I would not mind but for a makefile the tabs are important.
quotemstr
nwidger: I don't use auto-newline.
ssito: worksforme.
jlf`
ssito: do you have somethink like (BSDMakefile) in the modeline?
something even
nwidger
quotemstr: nevermind i figured it out. but thanks for responding with 'i have no idea' :P
ssito
I have GNUmakefile
jlf`
ssito: what does C-h c TAB say?
         

ssito
(indent-buffer)
jlf`
is the preceding line malformed?
ssito
jlf`: I will have a look at my .emacs file I think I know where the problem might be
offby1
rudybot: is jlf` malformed?
rudybot
*offby1: and the directory in (add-to-list 'load-path "~.emacs.d/") is malformed, unless you're specifying the home directory of a user named .emacs.d :)
jlf`
rudybot: is it uncomfortable having offby1's hand up in there?
rudybot
jlf`: I find those really uncomfortable now :(
jlf`
(Action) nods
quotemstr
rudybot: signs signs everywhere a sign blocking up the scenery breaking my mind
rudybot
quotemstr: tho i suppose the rugged coastal scenery probably isn't actually all that important to the taste
ssito
jlf`: The (indent-buffer) is an interactive function I made a while ago.
jlf`
the guilty party is revealed!
offby1
who?
quotemstr
This has gone on too far.
Google is "helpfully" searching for "different" when I type "diff".
offby1
quotemstr: alas, for 99% of English speakers, that is indeed helpful.
I mean really, what's the diff?
quotemstr
(Action) slays offby1.
offby1
someday -- soon -- Google will learn that you're a nerd, and that when you say "diff", you really _mean_ diff
jlf`
ssito: ssito, in the .emacs, with the indent-buffer function
offby1
then it'll know what when you search for "chicken", it knows you mean "free-range" etc
jlf`
er, s/ssito:/offby1:/
         

quotemstr
In magit, how do I show the difference between the working copy and the branch for just *one* file?
offby1
scroll down to that file's name in the list, then hit RET or TAB
Mosu
quotemstr: navigate to the file and press TAB if i understand you correctly
quotemstr
Ah, perfect! Thanks.
Mosu
you can also stage single diff chunks from that view :)
offby1
quotemstr: actually, it's not perfect: I don't like the way it colorizes the diffs. They're hard to read. C-x v = does a much nicer job, _and_ does that nice highlighting of the words that differ, too.
Mosu: I didn't know that, but that makes sense.
jlf`
ediff-revision too, right?
offby1
jlf`: hmm, that might mollify me
quotemstr
What the hell? In magit 0.8.0, C-c C-c is undefined in the commit buffer?!
offby1
jlf`: I don't see any such function in the output of C-h m :-|
quotemstr
It's now C-c M-s c
offby1
quotemstr: yeah, that was biting me for a while. I think I just updated to a newer magit and it resumed working
jlf`
offby1: it's not a magit thing
quotemstr
offby1: magit head? off github?
Mosu_
today HEAD is 0.8.0
quotemstr
Err, nevermind, C-c M-s c is some subversion thing.
Heh.
magit-log-edit-mode-map isn't referenced anywhere.
Does define-derived-mode automatically do that?
fledermaus
yes, assuming there's an appropriately named derived mode created by it
quotemstr
Hrm, thought so.
ssito
jlf`: Thanks I fixed my .emacs file and now it is working
quotemstr
Hrm, that's really odd.
the defvar generated in the macroexpansion of define-derived-mode somehow overwrote magit-log-edit-mode-map
Ahwell, works now.
e1f
australians can now pre-order ipads
technomancy
the poor face colors are probably my #1 gripe about magit
quotemstr
Oh, great.
Now C-c C-c signals "Not a tramp file name".
*sigh*
technomancy
(setq tramp-mode nil) ;; <= my solution
quotemstr
tramp-mode isn't buffer-local?!
"If it is set to nil, all remote file names are used literally." -- what does _that_ mean?
Are remove filenames used metaphorically otherwise?
fledermaus
it means the tramp file path handler won't step in and handle likely looking paths
quotemstr
Isn't that what file-name-handler-alist is for?
fledermaus
*shrug*
quotemstr
I've never bothered to look at the innards of tramp-mode.
fledermaus
it means you don't have to back it out of the list and put it back later if you want to disable it temporarily, I guess
quotemstr
Ah, looks like it's Emacs 23 compatibility crud.
start-file-process is an alias for `tramp-handle-start-file-process' in `tramp-compat.el'.
Or more specifically, it's two compatibility hacks playing off each other.
offby1
quotemstr: can't remember ... I'm using the one from ELPA now
technomancy
offby1: you should try the latest magit; it's quite nice
offby1
I update occasionally.
ej12n
anyone have some time to help an emacs newbie here? VIM user wanting to change to emacs...
offby1
sure
,salespitch
fsbot
We aren't gonna lie. Emacs sucks. Some of us tolerate it, but we can't tell you if YOU'LL be able to. Try it and make up your own mind.
ej12n
running on windows btw...
I knoww it sucks :P
offby1
a good start :)
ej12n
anyways, I been reading the wiki, stackoverflow, googling like crazy but customizing emacs seems notorious for a newbie lol
quotemstr
ej12n: It's a rite of passage.
offby1
*shrug*
ej12n
I got all basics commands and movements so I dont need intro on that
quotemstr
We don't have any mastodons to slay, so this is the next best thing.
ej12n
what I want to know is how to make it so I can actually start working on it...
technomancy
nobody is ever "done" customizing Emacs
it's a lifelong journey
ej12n
syntax highlighting, enable the modes automatically...etc
quotemstr
technomancy: Eventually once graduates from customizing Emacs to hacking on it.
technomancy
quotemstr: it's a fine line
quotemstr
Speaking of which, I have some js-mode bugs to fix today.
offby1
ej12n: let's take just one at a time, and be specific.
ej12n
good thing is I am using IRC thru emacs :)
technomancy
ej12n: depends on what uses you have in mind
which languages, etc
ej12n
Im happy with vim but I just got this voice in my head telling me switch to emacs lol dont ask me why
offby1
ej12n: and technomancy isn't kidding about the "lifelong journey" think; I'm getting close to my twentieth year of fiddling my .emacs
ej12n
offbyl that sounds good to me :)
offby1
ej12n: better ask a specific question quickly, or I'm gonna get bored and go back to twiddling my IRC bot.
ej12n
lol ok offby
offby1
(Action) fantasizes about dinner
ej12n
I got emacs installed on c:\emacs
offby1
sure
ej12n
and I know it comes with some packages whcih are on site-lisp
and modes, etc...
rudybot
burgers? mac 'n' cheese?
ej12n
how do I make for example let's say when I open a .php file load php-mode
automagically
offby1
ej12n: I'd have thought that'd be happening already :-|
ej12n
is not :/
offby1
I guess emacs doesn't come with PHP mode
,install
fsbot
I heard install is [0] To install a <file>.el, save it to, say ~/elisp
[1] add to the beginning of ~/.emacs: (add-to-list 'load-path "~/elisp"),
[2] now FOLLOW THE INSTALLATION INSTRUCTIONS IN THE FILE, typically adding (require '<file>) to the end of ~/.emacs, ..[Type ,more]
offby1
ej12n: so you gotta find a php-mode.el somewhere.
ej12n: expect to be disappointed. A lot of emacs lisp code that you snarf off the Internet is ... shall we say ... not so wonderful
,php
fsbot
[->] php-mode -- [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
jlf`
(Action) blanches in horror
ej12n
ok thx for those links
offby1
jlf`: it's true
ej12n
syntax hihglighting
I believe is font-lock something
offby1
what about it?
e1f
(Action) thinks jlf is the type that relies on the kindness of strangers
offby1
that too should be happening automatically -- but it generally requires that emacs recognize the "mode" of your buffer, and if you haven't yet installed php-mode, and are looking at a PHP file, then emacs _hasn't_ recognized it.
So lack of syntax highlighting in a PHP file isn't a separate problem; it's just a side-effect of not having php-mode installed.
ej12n
ok.
offby1
now, edit a Python, C, or lisp file, and you _should_ see decent syntax highlighting
e1f
(Action) wonders if the reference to a streetcar named desier is too subtle
offby1
'cuz emacs comes with built-in support for those languages
e1f: yes.
oh.
ej12n
does it have built-in css support?
offby1
e1f: it wasn't too subtle; I flat-out didn't notice it.
ej12n: 'spec not. Try It And See".
ej12n
I guess it does
offby1
mine seems to.
jlf`
e1f: i noticed it but cache missed on a suitable retort
offby1
jlf`: brilliantly phrased.
jlf`: I think the problem is that that's the last line in the play, so there's no natural response.
jlf`
(Action) - Fin -
quotemstr
So why exactly does setting the file descriptor returned by open("/dev/stdin") to non-blocking _also_ make FD 1 non-blocking?
offby1
(Action) stares blockedly
quotemstr
Granted, that might just be Darwin being brain-damaged.
ej12n
if I have emacs installed on c:\emacs but my $HOME is actually %appdata% what's my load-path by default?
quotemstr
Let's reimplement ptys in userspace.
ej12n: Start emacs and see?
ej12n: I've never used Emacs on Windows except through Cygwin.
ej12n
how can I echo the varible?
quotemstr
C-h v load-path RET
ej12n
thx
vim user here trying to do echo load-path :P
quotemstr
You may be beyond even our redemption.
fledermaus
quotemstr: because that fd applies to your tty?
I would guess
quotemstr
fledermaus: I thought each open() call returned a new file that has its own non-blocking state.
jlf`
(Action) confesses to being a former vimmer
quotemstr
But instead, open() seems to be acting more like dup().
fledermaus
quotemstr: I don't know the semantics of /dev/stdin off the top of my head
ssito
ej12n: Have you been able to see your load path
ej12n
ya I got it
fledermaus
ha
ej12n
let me go install color-theme
fledermaus
quotemstr: /dev/stdin is a symlink to /proc/self/fd/N
which is a symlink to /dev/pts/X
ltbarcly
Hmm, I have flymake mode set to run a certain script, but that script depends on environment variables, can I have emacs source or otherwise run the script in that environment?
fledermaus
so I was right, opening /dev/stdin gives you an fd through which you can frob your tty/pty
quotemstr
fledermaus: Or your serial line. :-)
fledermaus
whatever, you take my point
quotemstr
Aye.
fledermaus
if you want to set the behaviour of stdin alone, you should use fileno(stdin)
quotemstr
That'd do the same thing.
ej12n
Ok another question, this one is more about process itself
I use totalcmd and I put runemacs.exe as the editor
fledermaus
quotemstr: no, it would give you the existing fd for your standard input
ej12n
but I want to open multiple files in one instance of emacs instead of opening new "frames"
for each file I edit
in vim this is something like vim.exe --remote-silent
quotemstr
fledermaus: Well, yes, but open("/dev/stdin") turns out to just dup() fileno(stdin).
Except that it 's done in magic kernel-land.
ssito
ej12n: did you try C-x C-f to open your file
ej12n
that defaults to c:\emacs\bin, besides I do all my file stuff on totalcmd, I'm sure that'll change a lil when I get better on emacs
but for for now I just wanna know how to call emacs.exe and have it open new file in same instance
from what I read *I think* it has to do with emacs-server stuff?
quotemstr
M-x color-theme-word-perfect
ssito
ej12n: Normally to open a new file (buffer) in emacs you do C-x C-f from within emacs.
quotemstr
Is it possible to associate my own faces with color-themes?
ej12n
I understand that ssito, but what if I calling it from another program in this case totalcmd?
« prev 1 2 3 4 5 6 7 8 9 10 11 next »