logs archiveIRC Archive / Freenode / #emacs / 2010 / April / 26 / 1
dim
here
offby1
I can't find it either.
madpickle
info-apropos returns nada
this is totally unfair. i never knew about it either.
ggole
,aget
fsbot
try: html-pagetoc.el PageTranslation SentenceToPageToSectionToWiki SimpleMiseEnPageTexte
ggole
What's aget?
dim
Return the value in ALIST that is associated with KEY.
(aget ALIST KEY &optional KEYNIL-P)
remote
hello
chosig
any of you actually use emacs to write something "useful"? ;P
         

ggole
I don't have that function o_O
dim
all my writtings are managed in emacs, so I like to think my answer is yes
s/managed/done/
qDot_
So far, I've added the ability to control sex toys and look at fantasy baseball stats to emacs. So I think my answer is yes, too.
However, history will be the true judge of that.
remote
i'm using cygwin and emacs in text mode through ssh and recently hitting C-s started freezing the console and so i need to save using M-x save-buffer instead of C-x C-s, how can I fix this?
hober
remote: C-q
dim
that's pause/resume for terminal emulators
offby1
remote: either your cygwin terminal, or else the terminal on the remote end, has that idiotic "flow control" set up
you must kill that!
mnemonikk
remote: do a stty -ixon in your terminal, that should fix that problem for good.
offby1
it made some marginal sense 30 years ago; it's nothing but trouble now
remote
yeah i know that C-q will unfreeze but i want to fix the problem
mnemonikk
remote: put it in your .bashrc if you're using bash.
remote
ok
oh maybe it has to do with me being in a screen session?
offby1
probably not
remote
ok
offby1
remote: I'd use Putty instead of Cygwin SSH
much nicer
hober
remote: C-a C-f to toggle flow control in screen
ggole
cygwin never really played nice for me
offby1
me neither
mnemonikk
hober: i often hit that keys accidentially when using emacs inside of screen. 8-)
offby1
mnemonikk: I changed C-a to C-z precisely so that I could use Emacs more comfortably
         

hober
I use C-z for my screen prefix too
offby1
"escape ^Zz" -> ~/.screenrc
qDot_
(Action) just remapped C-a to `
ggole
Nobody ever seems to use emacs' C-z
remote
http://paste.pocoo.org/show/206102/
offby1
qDot_: ` has its uses in emacs, particularly C-x ` (next-error)
remote
i think stty -ixon doesn't apply
dim
C-z runs the command undo
ggole
Not by default
qDot_
WEll, i don't usually use emacs via screen
hober
C-z runs the command suspend-emacs
madpickle
and the ever-useful M-`
dim
ggole: yes, my point somehow :)
M-` runs the command other-frame
madpickle
`tmm-menubar'
ggole
Ooh, I have to remember to steal that binding
offby1
qDot_: it's practically the only way I _do_ use it
madpickle
ggole: nods..
offby1
,df hoffman -> "Steal This Binding"
fsbot
ERROR: Symbol's function definition is void: hoffman
qDot_
offby1: Yeah, I've been going more emacs-centric than terminal-centric lately
Just to see if I can.
offby1
it's the Way of the Warrior
qDot_
(Action) lived under terminal/screen for many years. Is still contemplating whether this change is worth it or not.
ERC + bitlbee, for im, has been iffy.
offby1
tried that a little
not worth it
I hadda either trust my creds to some random server, or run my own.
qDot_
Oh, running my own isn't the problem there.
No way in hell I'm using their public server. :3
moljac024
is there a command for switching between 2 most recently visited buffers?
offby1
moljac024: C-x b
moljac024
without needing to hit return
offby1
you could write one fairly easily
moljac024
i saw this function defined in emacswiki, but i was wondering if there was a built in command in latest emacs
fledermaus
,dk C-x <left>
fsbot
previous-buffer is an interactive compiled Lisp function in
`simple.el'.
It is bound to C-x <left>, C-x <C-left>, <menu-bar> <buffer>
<previous-buffer>.
(previous-buffer)
Switch to the previous buffer in cyclic order.
fledermaus
,dk C-x <right>
fsbot
next-buffer is an interactive compiled Lisp function in `simple.el'.
It is bound to C-x <right>, C-x <C-right>, <menu-bar> <buffer>
<next-buffer>.
(next-buffer)
Switch to the next buffer in cyclic order.
offby1
that too
remote
ok i've added wp_header and wp_footer and I see the analytics script in there but it's not loaded
loading
moljac024
but those go one way
ggole
I don't hink those will cycle
moljac024
and when you call the same one again it doesn't return to the one before
ggole
I don't *think* they will, either
Yeah, you might need to write a little function to get what you want
moljac024
(switch-to-buffer (other-buffer) <-- this should work fine?
offby1
Try It And See".
remote
oops
sorry
ggole
I think that might need to be (other-buffer (current-buffer))
moljac024
ggole: (switch-to-buffer (other-buffer (current-buffer))) ?
damd
(switch-to-buffer nil) will do the same thing as (switch-to-buffer (other-buffer))
it's also the same thing as `mode-line-other-buffer
'
so moljac024, you want (switch-to-buffer nil) or (switch-to-buffer (other-buffer)) if you want to be verbose about it
moljac024
damd: yup
damd
or (switch-to-buffer (other-buffer (current-buffer))) if you *really really* want to be sure ;I
moljac024
just tested it and it works
damd: so that is somehow better? explain the difference please
damd
moljac024: when you pass nil to `switch-to-buffer', it will use (other-buffer) as its "default" argument so to speak
ggole
I'm going by other-buffer's docstring: "If buffer is omitted or nil, some interesting buffer is returned."
moljac024
current-buffer is an argument to other-buffer?
ggole
Yes
moljac024
so what does that do?
ggole
Returns the current buffer
moljac024
why would that mean previous buffer
damd
moljac024: C-h f other-buffer
ggole
Read the docstring of other-buffer
damd
"Return most recently selected buffer other than BUFFER."
moljac024
so (switch-to-buffer (other-buffer (current-buffer))) is the best way to be sure...thanks
but it automagically ignores ibuffer and buffer-menu and the likes?
damd
ibuffer and buffer-menu have nothing to do with this at all
those two are visualisations of the "buffer queue" or whatever that's called
moljac024
but they are buffers in their own right
damd
oh, yes, they are
sorry, i misunderstood
moljac024
so when i'm in one buffer and visit another using ibuffer, i have actually went through ibuffer buffer and it is in fact the most recent buffer
good thing it's ignored though
damd
i never really thought about that, but i guess that's how it works
(Action) dives into ibuffer.el
moljac024
lol
ggole
I think ibuffer buries itself when you use it to select a buffer
damd
ggole: yes, but you can't see the ibuffer buffer in ibuffer
ggole
Sure, it has a filter
moljac024
damd: but you see the ibuffer buffer in buffer menu
ggole
That doesn't affect the buffer switching primitives
moljac024
and you see the buffer menu (titled *Buffer List*) in ibuffer
ggole
They each implement their own filter
It's a bit silly, really
moljac024
yes
ggole
Maybe it would be better to have one filtering facility and provide a way for buffers to identify their characteristics in order to be filtered sanely
moljac024
maybe that's something for emacs 24 :)
ggole
As it is there's just a list
Maybe. It's not a huge problem.
moljac024
although I don't mind it
one thing I'm not so fond of is refreshing of both ibuffer and buffer-menu
damd
i don't even remember how buffer-menu works, i've come to rebind C-x C-b to ibuffer for so longe
moljac024
when i kill a buffer and i visited it through one of those, it returns to the buffer list but it's not up to date, and the killed buffer is still there
qDot_
Mmm, ibuffer
moljac024
damd: me too, but i was testing both
damd
btw, is it just me or does the deletion of files in dired work differently from killing buffers in ibuffer? it seems i always get the 'x', 'd' and 'D' keys mixed up.
moljac024
any way to fix the refreshing? as of now I have to manually invoke ibuffer for it to pick up on changes
if i switch to it in any other way it has outdated buffer list
damd
moljac024: maybe hit g in ibuffer?
i'm not sure if that's what you're asking
moljac024
damd: then better rebind those, lest you not screw something up in your file system
what does g do? refresh?
damd
yes
madpickle
moljac024: yes.
damd
'g' is used to "refresh" in lots of modes
moljac024
but there is no way to make it automatic
madpickle
moljac024: and it works in most dired-style buffers like VC, dired, ibuffer
moljac024
without the need to press anything for ibuffer to be up to date
?
madpickle
not that i'm aware of
there are timers - you might be able to rig something
i doubt it'd work well though
mnemonikk
there are also hooks...
fledermaus
,dv buffer-kill-hook
fsbot
not documented as a variable.
damd
there are "file watchers" in many OSs, but i don't think emacs makes use of those
moljac024
meh, nevermind
fledermaus
,dv kill-buffer-hook
fsbot
Hook to be run (by `run-hooks', which see) when a buffer is killed.
The buffer being killed will be current while the hook is running.
See `kill-buffer'.
moljac024
hmm, interesting
i could just slap ibuffer-refresh or something like that in there?
damd
do you keep ibuffer open all the time?
offby1
I sure don't
moljac024
well, it never closes really does it?
offby1
depends what you mean by "close"
moljac024
like any other buffer in emacs
offby1
if you don't kill the buffer explicitly, it hangs around.
moljac024
that's what i mean
mnemonikk
there's also ibuffer-auto-mode which sounds like it could DTRT.
moljac024
and if you kill a buffer, and you came to that buffer through ibuffer, it displays ibuffer with outdated list (the killed buffer still lingering there)
so if you try to switch to it, it says sth like "buffer not existing"
offby1
moljac024: I suspect it'd be easy to find some hook that runs when you switch to an ibuffer buffer ... then add to that hook the function that refreshes it.
mnemonikk
moljac024: checked it, ibuffer-auto-mode is what you want.
moljac024
offby1: maybe, but i'm still a fresh fish with emacs and lisp and elisp and the likes
just set ibuffer-auto-mode to t?
or 1?
is it a mode or a var?
it's a function...i just run it?
ggole
It's a command
moljac024
so i just slap (ibuffer-auto-mode) into .emacs?
ggole
Either that, or on the appropriate hook
moljac024
k
mnemonikk
moljac024: no, you have to enable it for your ibuffer hook, it wouldn't work otherwise.
ggole
It might need ibuffer to be running: not sure
mnemonikk
moljac024: (add-hook 'ibuffer-mode-hook (lambda () (ibuffer-auto-mode 1)))
moljac024
mnemonikk: thanks
« prev 1 2 3 4 5 6 7 8 9 10 11 12 next »