logs archiveIRC Archive / Freenode / #emacs / 2010 / February / 25 / 1
Matson
can use a command line flag to open a file and append a line at the end provided by a command line argument? emacs file_to_open -applendline "Append this line at the end of file_to_open"
something like that
similar to the --insert file arg, but wilth --insert "line of text"
cvandusen
Matson: I believe you can, but you could just as easily do: echo "foo" >> file
unless you need something more involved
Matson
cvandusen: "foo" >> file doesn't work with sudo
'sudo cat "line of text" > /etc/configfile' -> doesn't work
cvandusen
are doing exactly that? cat "line of text"
JordiGH
Matson: Learn to sudo.
Matson: sudo 'echo "foo" >> bar'
Actually, to be technical, learn to bash, I guess.
Matson
thanks
cvandusen
sudo echo "echo" > canyon
JordiGH
Aw, crap, that doesn't work, sudo does a mess.
jabot
ay... someone should have told him to avoid >
         

JordiGH
jabot: What are you?
jabot
no bot
ezakimak
you probably need to quote the whole thing: sudo "echo \"echo\" > canyon"
otherwise it's sudo's output that's being redirected to the file w/the perms of the shell invoking sudo
JordiGH
Aha, the trick is to use sh. :-/
sudo sh -c "echo foo >> bar"
Meh.
ezakimak
or just su. :)
JordiGH
sudo -i
i liek typing moar lol
typen
ezakimak
anyways, good luck and thanks for the help.
Han
JordiGH, then why maintain 2 useraccounts?
JordiGH
Han: Context?
Han
your last statement in here...
JordiGH
"<JordiGH> i liek typen moar lol" <--- that?
Han
I wouldn't respond to something like that.
JordiGH
Han: "<JordiGH> Aha, the trick is to use sh. :-/" <-- I still don't get it, what does that have to do with 2 useraccounts?
tomoyuki28jp
On Carbon Emacs, when I try to create new file, I get this warning message: "File does not exist, create buffer?". How can I change my setting to not to display this message?
ola
org-mode/mobileorg users: I have an (apparently) unusual predicament. I own an ipod touch, would like to use mobileorg, and can not agree to the Apple terms of use agreement. Does anyone know where I can get mobileorg binaries?
jlf
download the source and compile it yourself?
JordiGH
jlf: I thougth iProducts were tivoised to prevent that?
thought
jlf
the source is on github
JordiGH
Huh? I'm talking about software not being installable on portable iProducts if it wasn't approved by AAPL.
jlf
he'd have to pay to put it on his own device, or find someone who's paid to give him a test key
         

Azuvix
Ooh, proprietary flavor...
Yuck.
jlf
there's always openmoko
JordiGH
jlf: http://platinum.linux.pl/~jordi/piccies/freedom.jpg
damd
how do you "kickban" someone in rcirc?
JordiGH
I should put some GNU horns on Mel.
damd
wow, i just found a major bug in the rcirc logging system...
i somehow managed to get nothing but my own messages in one log file and everyone else's messages in another
due to file name case sensitivity
Azuvix
Good catch there.
e1f
sounds like apartheid
damd
abbe: i'm skorpan btw
abbe
damd: :) hiding from someone ?
damd
nah, just felt like changing the nickname
abbe
:)
kurkale6ka
Hi, after a M-y, how can I go back to the previous text?
kenyon
kurkale6ka: M-- M-y
jlf
maybe C-u - 1 M-y
kurkale6ka
neither works
I mean: c-y pastes b, M-y a, how go back to b?
jlf
kurkale6ka: both of those techniques behave as you describe here. what version of emacs have you?
kurkale6ka
it's emacs on the bash command line
jlf
that tells me nothing
M-x emacs-version says what?
kurkale6ka
dunno how to check...
jabot
kurkale6ka: hit M-x, enter "emacs-version", then hit return.
kurkale6ka
I tried, doesn't work on the command line
jabot
that should be done inside emacs
kurkale6ka
I talk about set -o emacs. I don't think that emacs is the same as the one installed with rpm say
jlf
heh
shabble
are you talking about the emacs-like readline bindings for bash?
r4yner
or emacs --version on the commandline
jlf
kurkale6ka: try #bash
jabot
heh, yes. set -o emacs affects the keybindings for your shell
kurkale6ka
jlf: oh? not a emacs question?? ha ha
jabot
well...
not directly
jlf
not at all
shabble
might be something useful in http://tiswww.case.edu/php/chet/readline/readline.html#SEC13
kurkale6ka
jlf: If you ask me about set -o vi, I think it is vi related and I can answer. thx shabble
jlf
where's ams when we need him...
shabble
kurkale6ka: they're "emacs-like" but don't use emacs itself for anything. It's all inside the readline lib
jlf: you mean gnu/ams, right?
kurkale6ka
shabble: I see
jlf
yeah him
shabble
wasn't he banned? or did he come back?
technomancy
the ban expired
so we've had the pleasure of his company reinstated
jlf
his bannination is in a metastable state
shabble
actually, I didn't realise that readline had an actual kill-ring. That could prove useful
jlf
he was rebanned and debanned shortly afterward yesterday
kurkale6ka
shabble: it is useful
shabble
kurkale6ka: I use yank all the time, but had assumed it was a single kill-buffer
kurkale6ka
shabble: he, you just learned something from a non emacs user :)
shabble
I'm not fussy about where I learn new cool stuff from :)
kurkale6ka
shabble: I also use M-. in a ring style as well
shabble
yeah, I know that one.
kurkale6ka
cool
ok, it seems what I wanted is not possible...
shabble
kurkale6ka: re your original question, does 'undo' work? (C-_ I think?)
kurkale6ka
shabble: yes, both c-_ and c-/
damd
and C-x u ...
shabble
kurkale6ka: I meant for cycling the kill-ring the other way. Tried it and doesn't seem towork though
kurkale6ka
damd: what is it for?
shabble: ah...
damd
kurkale6ka: C-x u is just the same as C-_ and C-/
kurkale6ka
damd: ah yeah, I recall now
damd: doesn't seem to work though
shabble
it's C-x C-u it seems
kurkale6ka
shabble: that works
Aniya
(Action) i can't believe this!!!! who the f*ck are you to do this, DIEGOPOP??? <a rel="nofollow" href="http://www.youtube.com/watch?v=cAMMiiAcSjk">http://www.youtube.com/watch?v=cAMMiiAcSjk</a>
kurkale6ka
also, is there a way to repeat previous words other than with M-tab?
oh, I could bind it to c-p I guess...
I don't know what command to bind to ^p so it repats previous words...
anxt`
how can i show all imap folders in wanderlust?
VilleWitt
(Action) is testing ERC...
shabble
hmm, this is a really strange bug. When editing a buffer, when auto-fill comes to wrap the text entered into the last visible line in the window, the cursor jumps to the middle of the window (without scrolling the buffer)
cornjuliox
C-x 2 inside a buffer splits it into 2 horizontally, but how do i get it to split vertically?
shabble
C-x 3
cornjuliox
wait, i meant how do i get one window to split into 2 vertical windows, as opposed to horizontal ones
bob2
^^
cornjuliox
ah ok
there we go.
konr
how can I remove the read-only property of all the text in a buffer (not of the buffer itself)?
brx
poor russians..
twb
Remind me, how do I turn a MAC address into a manufacturer/model name?
brx
twb
I was thinking more something I can put in my .bash_history
Something *like* wireshark, but not actually wireshark, has a simple database of sextets to manufacturers
Oh well, the immediate issue is dealt with
cornjuliox
what extension should a makefile have?
shabble
none, typically
cornjuliox
i take it emacs doesn't have a syntax highlighting for makefiles, does it?
bob2
it sure does
shabble
makefile-bsdmake-mode is hte one they default to for me
bob2
it Just Works fof files called Makefile
cornjuliox
but dont files need extensions for emacs to auto-detect the proper highlighting mode?
bob2
no
cornjuliox
ah ok
so it just needs to be named 'Makefile'
bob2
or .am or .in
shabble
auto-modes-alist is a bunch of regular expressions which map filenames to modes.
bob2
but you'd usually call it Makefile anyway, since that's what /make/ likes it to be called
shabble
usually they operate off extensions, but TODO, Makefile, ... are all special
cornjuliox
ok
twb
cornjuliox: .mk
cornjuliox: unless (as usual) it is using a name that make or gmake automatically searches for: GNUmakefile, Makefile or makefile.
jlf
shabble: how's TODO special? comes up in fundamental mode here.
twb
jlf: he's probably set it to org-mode or somethign
jlf
that's what i was expecting, but it sounded like built-in magic
shabble
jlf: oops, looks like that was me, yeah.
and indeed, it's Org :)
jlf
any insufficiently recalled technology is indistinguishable &c.
e1f
did ddalton manage to get w3m working with emacs 23 last night?
kenyon
e1f: yes, but had some unsolved debian packaging problems, I think
e1f
ok thanks
ryomanolonger
is there a command to delete the second and succeeding duplicate lines in a region? bonus points if it does not also sort.
(Action) guesses not
e1f
why not pipe the region through uniq?
m-| uniq
ryomanolonger
e1f: good idea. it would have to either be a machine that has unique(1) or it would have to sort, but i might just live with the sorting.
was hoping there would be a function
e1f
ah i see
twb
ITYM uniq(1)
M-x replace regexp ^(.*^Q^J)\{2,\} RET \1 RET <-- might work
Note that uniq(1) assumes lines are sorted.
e1f
do the english really find milton keynes amusing?
enthymene
does anybody know if there's an inferior mode for gnuplot? I'd rather avoid using Octave since I don't have a lot of time.
e1f
,gnuplot
fsbot
gnuplot is [0] a programmable, graphical plotting utility
[1] at http://gnuplot.info,
[2] at http://leonardo.phys.washington.edu/~ravel/software/gnuplot-mode.html,
[3] NOT a GNU project.
twb
enthymene: IIRC I just used conf-mode or so
enthymene
oh there's a gnuplot-mode
sorry, wrong term
I'm looking for a way to run gnuplot from inside emacs, other than M-x shell -> gnuplot
twb
enthymene: oh, you mean an inferior mode
enthymene: M-x comint run RET gnuplot RET will do about three quarters of that
e1f
http://en.wikipedia.org/wiki/Bletchley_Park
twb
e1f: you can't sign the petition, because you're not a British resident
ryomanolonger
twb: i meant unique(1) which in some distros lets you not sort
twb: what does your regexp do?
twb
ryomanolonger: oh, OK.
It's not a regexp :-)
ryomanolonger
oh, yes, it will require sorting too
funny emacs doesn't have this built in
twb
ryomanolonger: M-x sort lines?
ryomanolonger
that just sorts
in 22 anyway
twb
Oh, you mean the uniq part
zenspider
any osx users? I'd like feedback on my patches demonstrated here: http://www.youtube.com/watch?v=jKNLnogaZsE
twb
zenspider: you saved patches as a video? Why not use text?
ryomanolonger
zenspider: what do they do?
zenspider
twb: I've done both. :P I've submitted them to the osx maintainer and he was meh on it
saying that something else was coming from someone else... that was months and months ago
I'd like to see what I can do to get this patch in. the current behavior is simply intolerable
ryomanolonger: if a picture is worth a thousand words, what does 30 frames a second get me?
ryomanolonger
zenspider: i will not navigate to it, click, read the text hoping it will explain, launch a gui browser, and wait for it to start just to find out what it does. that is what it gets you.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 next »