logs archiveIRC Archive / Freenode / #emacs / 2009 / November / 25 / 1
bbeecher
In python-mode, when doing a multiline function call or making a dictionary the keyword arguments are aligned such that they're in a direct line beneath each other - can I change that?
asn
Anyone knows how to delete nndir groups in gnus?
skorpan
bbeecher: why would you want to change that?
bbeecher
skorpan: I'm forced to use tabs for indentation at work, and it uses a combination of tabs and spaces
skorpan
w...t...f...!
1 tab = 8 chars in python
so using only tabs wouldn't even work
neosoothsayer
forced to use tabs for indentation? regressive!
bbeecher
neosoothsayer: I know :( I hate it, but I'm the junior
skorpan
bbeecher: where do you work? i'll make sure never to apply for a job there
you should just tell them about how much tabs suck
bbeecher
skorpan: python doesn't really care as long as it's consistant
         

skorpan
bbeecher: i don't understand what you just said... they don't line up using only tabs.
mishoo
IIRC, Guido himself advised against TAB characters in the code
skorpan
not that one should take guido seriously, but he has a point there
bbeecher
skorpan: oh you mean lining up the keyword args? Yeah, they can't line up right when only using tabs. I misread
technomancy
bbeecher: maybe you should show them this: http://www.emacswiki.org/pics/static/TabsSpacesBoth.png
skorpan
bbeecher: yeah, that's what i meant
ams
tab should be eradicated just like caps lock.
skorpan
i use caps lock on a daily basis
neosoothsayer
bbeecher: yeah, let us know where you work!
cvandusen
bbeecher: Break your Tab key
skorpan
i think i now know where bbeecher works
bbeecher
I'm really not a big fan of using tabs, but once you configure emacs to indent with them I don't really notice it
skorpan
i will never apply there
ams
skorpan: you do?
skorpan
ams: yeah, using magic (and a bit of google) i think i have a fair idea
neosoothsayer
technomancy: I find it amusing that the hip dude is for 'tabs' in the cartoon. I thought 'spaces' was progress!
mishoo
I used to use literal tabs in JavaScript, which was OK as long as only I was working on the code :)
rgr
Don't worry. I'm sure you could use non tab indentation in your spare time :-; <ducks>
neosoothsayer
skorpan: share your findings!
skorpan
neosoothsayer: same here
         

mishoo
but once more people started hacking it, it became a mess. I've put untabify on save hooks
bbeecher
skorpan: creepy man, creepy.
skorpan
bbeecher: too easy though
ams
mishoo: i think people spend to much time worrying about "what other people would use"... just stick to one format, and use whatever format the source code/project uses and use something like GNU indent
rgr
anyone here got a way to rest ALL counts in gnus? My article couts are all over the place and some groups wont let me recall recent read articles anymore either. I really dont want to wipe it and have to resubscribe to all the groups and fanny around with topics and indent all over again.
bbeecher
skorpan: yeah, I'm at work right now so it's not hard to figure out - still creepy though
skorpan
bbeecher: your IP had nothing to do with it, fyi
technomancy
neosoothsayer: I think you're mistaking "mac douche" for "hip dude"
a common mistake
neosoothsayer
technomancy: I guess Apple is a bit of a pain, but their products are definately cooler than normal PCs
cvandusen
I thought "hip dude" and "x douche" were synonymous (for all values of 'x')
neosoothsayer
cvandusen: :=)
mfisher
nothing like getting to disable pep8 messages for local standards
dotemacs
hello, is this 'clean' enough: http://gist.github.com/242275
can it be written better?
bbeecher
Thanks all - found the answer in the docs. If you don't put the first item on the same line you open the list, it indents it according to your settings
nopedia
dotemacs: Shouldln't u shell-quote-argument the file?
jlf
,u
fsbot
Damnit Jim! It's YOU. Y-O-U. Not *U*. U is a letter. YOU is a word. Dutch for 'you' (formal singular). See http://ars.userfriendly.org/cartoons/?id=20041201
dotemacs
nopedia: sorry, what do you mean?
nopedia: nevermind, found it
ggole
dotemacs: why are you using defun to define a hook variable?
No wait, I misread your code. Never mind.
The nested defuns are still pretty wierd though
neosoothsayer
I find it a little annoying that C-s leaves the point at the end of the matched string, while C-r leaves the point at the start of the match. Why the discrepancy?
dotemacs
ggole: would you re-write it somehow?
ggole
Move the innermost defun outside and just make a function call there
bpalmer
dotemacs: don't name a function whatever-hook
a hook is where you hang functions
I'm not sure I'd use a hook at all for this.
also, rails_best_practice is not standard elisp naming convention; use dashes instead of underscores
expand-file-name is probably unnecessary, although you may want to see the expansion
sachac
neosoothsayer: You could probably wrap advice around that or find a config variable. =)
esbena
shouldn't "(setq safe-local-eval-forms '(highlight-lines-matching-regexp))" allow "eval:(highlight-lines-matching-regexp .*)" in the local variables list? (very little documentation in the info file
jlf
let's add sparklines to emacs and patent it
neosoothsayer
sachac: there's a way to customize it? I can't find it in documentation. :(
grumbel
Is it possible to make emacs indent properly with tabs? The issue I have comes when doing linebreaks, instead of <tab>SomeFunction(foobar,\n<tab> another_argument); Emacs does: <tab>SomeFunction(foobar,\n<tab><tab> another_argument);, i.e. emacs uses <tabs> not only for logical indention, but also for making the second line lineup with the first, which breaks when using different tab-widths
ams
grumbel: that is proper indenting.
grumbel
ams: no, its broken. Tabs should only be used for indention levels, here they are used as space replacement
sellout
grumbel: I used to be a mixed-indentation fan, but it's doomed to fail.
You should just use spaces.
ams
grumbel: you may so consider it, but the editor has spoken.
grumbel
ams: the editor is wrong
ams
,praise
fsbot
4:153 The People of the Documentation ask you to bring down for them a
documentation from heaven. Of RMS they demanded a harder thing than
that. They said to him: "Show us EMACS distinctly." And for their
wickedness a thunderbolt smote them. They worshipped vi after We ..[Type ,more]
grumbel
ams: "another_argument" needs an exact number of spaces to line up with "foobar"
ams
grumbel: no it doesn't.
grumbel
having a tab instead of space doesn't make any sense, as a tab doesn't have a width
meanburrito920_
I'm getting strange errors when i try to activate ecb: ECB 2.40: Errors during the layout setup of ECB. (error-type: error, error-data: ("Lisp nesting exceeds `max-lisp-eval-depth'"))
grumbel
ams: as long as you have a fix-width font it does
ams
grumbel: not really.
you wanted proper indenting, you got it.
grumbel
ams: Its not proper, as tabs are used to similate space, which is just plain broken
ggole
Yeah, because everybody agrees how tabs and spaces should be used
grumbel
proper indention would work with any tab-width, emacs style indention breaks when changing tabwidth
ggole
solution: don't change tab width
ams
indeed.
grumbel
ggole: that would defeat the reason to use tabs in the first place
ams
and frankly, you might want to step down from your horse...
ggole
I couldn't agree more.
ams
not like what you consider proper is really proper.
it is what you want, this does not make it proper.
grumbel
its proper as its the only logical way to get it right
ams
oh bullsh*t.
this has worked for 20+ odd years, clearly it is as logical as whatever you wnat.
you might not like it, it does not make it any less wrong than whatever you have in mind.
grumbel
just because broken behaviour is old doesn't make it right
sellout
grumbel: Mixed indentation doesn't work ... let's say you like a two-space tab, and you wrap lines at 78 chars. Then someone with 4 space tab opens your files ... anything with more than one level of indentation can be wrapped or truncated.
ams
grumbel: just cause you dislike it does not mean it is broken.
grumbel
sellout: so what? Thats a display issue, not a content issue
rouslan
How do I call a function in emacs? (Specifically "compile")
grumbel
ams: Its broken as its impossible to line up two lines when using tabs where they don't belong
ams
rouslan: M-x compile ...
rouslan: (compile ....)
ggole
rouslan: programmatically or by hand?
ams
grumbel: hence why you should use tabs and spaces.
as emacs does.
rouslan
interactively
ams
and has been doing for god knows how long.
sellout
grumbel: If you had an editor that did intelligent line wrapping for you, then I might agree. But then tab-only indentation would work, because the editor would handle wrapping anything that would need spaces for alignment.
ams
printf ("Hello!\n",
\t foo);
is what emacs does by default.
sellout
(Action) is happy he uses a language where everyone _does_ agree on indentation.
technomancy
sellout++
ams
sellout: brainfu*k?
grumbel
ams: he does in in a wrong way, as I understand the algorithm (just from looking at the behaviour). Emacs does Tab == 8 spaces, and replaces 8 spaces with tabs whenever it sees them
ams
grumbel: right, you might dislike this, it does notmake it wrong.
sellout
ams: lisp, of course.
grumbel
sellout: its not about agreeing on indention or tabs vs spaces, its about how emacs mixes tabs and spaces in the wrong way (maybe just a config issue of course)
ams: Its wrong whenever you wrap a line
sellout
grumbel: It is just a config issue. IE, in lisp-mode you'll never see a tab.
ams
grumbel: (and for the record, emacs doesn't replace anything when you reindent a properly indented line)
grumbel
as its impossible to have the second line line up when tab-width changes
ggole
lisp-mode uses tabs
mfisher
yet another holy war :\
ams
grumbel: again, just cause _YOU_ dislike it does notmake it wrong, so get of your damn high horse.
ggole
Or at least, emacs-lisp-mode does
grumbel
mfisher: wrong, its not about holy grail, its about emacs tab usage being broken
sellout
ggole: Oh ... then I guess all the lispers just turn that off. Either way config issue.
mfisher
ams
ggole: emacs uses tabs and spaces to line up things.
ggole
sellout: nope, there are tabs in most lisp code
sellout
ggole: not Common Lisp
grumbel
ams: Name one benefit of emacs broken behaviour
ggole
size 8 (the standard)
ams
grumbel: please stop calling it broken just cause you dislike it.
grumbel
ams: when lines don't line up, thats broken to me
mfisher
grumbel: saving some bytes on disk?
ams
grumbel: lines do line up, clearly, they do so in my buffer.
grumbel: so what you say is not true.
grumbel
mfisher: trying to get proper code layout that works with variable tab width
ams: change the tab-width
ams
grumbel: why would i want to do that?
grumbel: clearly, it is broken to change the tab-width...
bpalmer
grumbel: http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indentation-with-tabs-and-spaces/
ams
grumbel: for one, you cannot use only tabs to line up code properly.
grumbel: so tabs only is broken.
bpalmer
grumbel: it's relatively easy to get the behaviour you're describing; far easier and more productive than this argument. :)
grumbel
bpalmer: thanks, looks to describe my issue
bpalmer
that particular example is set to work with the cc-modes ; I missed which language you're using
grumbel
ams: yes, tabs-only is broken, thats not what I want
ams
grumbel: fine, add a hook to do untabify on save.
ggole
An unproductive argument about spaces vs tabs? On my internets?
ams
then you got what you.
want.
ggole
(Action) is shocked, totally shocked
grumbel
bpalmer: C#
jlf
also, it's silly to insist upon prepending "gnu/" to linux
grumbel
ggole: its not about spaces vs tab
bpalmer
grumbel: ok, csharp probably is handled by something in the cc-mode family.
ams
jlf: not really, linux is a specific project, and not a operating system.
jlf
hehe
obvious troll is obvious
bpalmer
(But I suspect that C# has several modes for it)
ams
jlf: or do you call apples for tomatoes, just cause they both are round fruits?
jlf
ams: relax, i was just baiting you
ggole
successful troll is successful
ams
bpalmer: *whine* *whin* jlf called me names, why aren't you asking jlf to stop insulting people?
bpalmer
ams: no he didn't.
ams
bpalmer: uhm, so calling people a troll is not calling them names?
okie.
oxi
aquamacs has the menu: "Command" -> "LaTeX" which I can choose to compile a pdf document
does anyone have an idea which command could be called in the background?
ams
oxi: latex?
bpalmer
oxi: C-h k
jlf
ams: i was calling myself a troll
oxi
bpalmer: what command equals to that combo?
bpalmer
oxi: Type it.
ams
jlf: ok, so do s/me/jlf/
bpalmer
oxi: then type something else/select a menu option/etc.
ams
bpalmer: whine whine, jlf called jlf for names!
oxi: look at tex-compile.
bpalmer
oxi: your editor will then -tell you- what it did.
ams
or really, tex-compile-commands
bpalmer
oxi: this will help you learn to fish.
mfisher
or C-h m will explain the modes, including LaTeX mode
Chile
what's the current solution for right-to-left languages? everything I've seen references emacs21
bpalmer
(it's possible aquamacs menus aren't tied in to the help system, but I'd be quite surprised)
ams
Chile: i don't think there is such support in emacs currently
oxi
bpalmer: awesome, thanks!: <menu-bar> <Command> <LaTeX> runs the command menu-function-141 which is an interactive Lisp function. (menu-function-141)
ams: tex-compile doesn't exist in M-x for me
bpalmer
oxi: fair enough. So not enormously useful in aquamacs
in emacs or xemacs, it'd give you something much more relevant.
« prev 1 2 3 4 5 6 7 next »