logs archiveIRC Archive / Freenode / #emacs / 2015 / September / 8 / 1
EDT
wgreenhouse: was that the value of it or am I not pasting the right thing?
wgreenhouse
EDT: yes, that's the right variable. you also could've done C-h v org-capture-templates
EDT: I don't see anything obviously bogus for my perpetual-newb org-user skills
EDT: did you recently upgrade org releases?
I had many errors when moving from 8.2.x to 8.3.x
otrenav
Hi. I would like Emacs to execute some code everytime a new emacsclient is started. I found that the server-visit-hook might work for this. However, Emacs seems to not pick it up. I have (defun foo () (message-box "Inside the hook.")) (add-hook 'server-visit-hook 'foo), and it's not working. Any hints?
holomorph
otrenav: perhaps before-make-frame-hook ?
otrenav
I've tried setting up other messages in my configuration files, and they don't show either when using emacs --daemon, but when emacs is run withoutd daemon mode they get picked up normally. Why is this happening?
EDT
wgreenhouse: I haven't upgraded org recently, no
holomorph
otrenav: (i just did M-x apropos RET frame hook RET)
wgreenhouse
EDT: were these templates working before?
EDT
the first and the last two are confirmed to have worked, and they don't now.
         

bremner
otrenav: emacsclient doesn't run init.el
EDT
I can try commenting the others out
wgreenhouse
otrenav: I have never divined when server-visit-hook is meant to run.
apparently it is run for `server-visit-files'
and that's it
so that's only one of many possibilities for how emacsclient can be invoked
EDT
got a new error this time
wgreenhouse
i.e. it only runs for emacsclient FILENAME and nothing else
otrenav
holomorph: didn't work. I've also tried window-setup-hook, and that hasn't worked either.
bremner: I know it doesn't run it, but shouldn't I be able to see the messages in the *Message* buffer from when the deamon read through init.el?
wgreenhouse
otrenav: huh?
otrenav
wgreenhouse: I see, had not thought about that.
wgreenhouse
init.el doesn't get evaluated inside a client
catern
wgreenhouse: wait a second, server-visit-files you say? hacking that would work for the thing we were talking about earlier
otrenav
wgreenhouse: I know it doesn't. Only the daemon evaluates it... right? But when I create some messages and execute emacs --daemon, shouldn't I be able to see those messages when using a client and looking into *Messages*?
catern
or would it
wgreenhouse
catern: server-visit-files is the low-level thing called by emacsclient files files files
catern
ah
well
i see
and then it passes the resulting buffers to server-window I assume
one by one...
bremner
otrenav: maybe it crashes in daemon mode partway through init.el
wgreenhouse
catern: and apparently org advices its way into it to intercept `org-protocol'
otrenav
wgreenhouse: you're right. When I do emacsclient files... then my messages do appear. Is there a hook to have this behavior even if not sending a file to emacsclient?
wgreenhouse
otrenav: indeed not.
catern
wgreenhouse: oh god, org-protocol, I forgot about that
wgreenhouse
otrenav: non-file-visiting emacsclients follow a different code path
         

holomorph
before-make-frame-hook worked for me
wgreenhouse
otrenav: you could put advice on `server-select-display' or something
catern
hmm, DBus also supports fd-passing
wgreenhouse
or not. sounds awful tbh
nikd
I'm reading the giraffe book instead of the lisp reference manual. wish me luck.
offby1
didn't even know there was a giraffe book
I assume anything that's actually printed and bound is out of date
nikd
http://shop.oreilly.com/product/9781565922617.do
it's pretty new. from 1997.
wgreenhouse
:D
offby1
ah, OK then
wgreenhouse
writing elisp of the immediate post-schism era
bremner
"no new crap"
nikd
so not that out of date. has anything happened in technology in the last 20 years.. not really.
otrenav
bremner: I'm pretty sure the init.el file is fine.
holomorph: it works for me too but only if there's another frame already in existence.
offby1
wow, oreilly wants $26 for that book from 1997
EDT
huh, figured it out
otrenav
wgreenhouse: yes, I'll keep trying. If I find something useful, I'll post it here. Thanks everyone.
EDT
emacs did some weird auto-configuration thing when I opened the graphical customization thing
it's fixed now, thankfully.
holomorph
otrenav: spooky.i put (add-hook 'before-make-frame-hook (lambda () (message "YOW!"))) in my init.el, killed emacs, did emacs --damon, opened an emacsclient and saw the message in *Messages*
fwiw
nikd
you can get the emacs lisp manual in hardcover on amazon.
ryouma
psa: please don't pm questions, ask the channel
offby1
nikd: or directly from the FSF
well, maybe softcover
nikd
i'm not so into reading on paper anymore. it makes moving difficult.
otrenav
holomorph: I think that what is happening is that I'm putting the message inside a conditional on the window-system (I want this code to execute when a new X frame is created), and that's why I was not seeing it at startup (since the daemon doesn't have an X frame).
holomorph: thanks, helped me understand something else.
wgreenhouse
otrenav: yes, that's correct; the daemon's "frame" is an invisible dimensionless thing that has a window-system of nil
otrenav: it's a notional object that holds things like the terminal the daemon was invoked from
otrenav: use after-make-frame-functions, default-frame-alist, etc. for stuff that should happen in graphical frames
otrenav
wgreenhouse: those seem very helpful. Thanks!
taylanub
Scheme is like a ball of snow. You can add any amount of snow to it and it still looks like a ball of snow. Moreover, snow is cleaner than mud. -- Marc Feeley
best troll in ages
holomorph
what if the snow is yellow
taylanub
then a CL mossback took a piss in it out of jealousy, dunno
wgreenhouse
taylanub: he's never seen Russian roadside snow in midwinter
catern
dear #emacs, is there a way to have, like, variables in org? I have a URL that I want to insert in multiple places but it might change so I don't want to have to update it in all the places I put it
taylanub
catern: I believe that's what citations are for, usually
catern
do you mean footnotes?
footnotes don't really make sense logically here, it's a set of instructions
taylanub
hm, I see
catern
and crossreferences
that would be nice to
too*
like, a reference to another section in this document
wgreenhouse
catern: radio links might be what you're looking for
ryouma
catern: macros would work if nothing else
wgreenhouse
they make all instances of "someword" radioactive and point to the <<<someword>> definition
ryouma
catern: or link types
catern
wgreenhouse: oh is *that* what radio means? radioactive? that was confusing to me because I thought of radio buttons
ryouma
it means beaming
wgreenhouse
catern: I'm snarking a bit but that's how I think of it
catern
ryouma: that makes even more sense
wgreenhouse
catern: like all copies of that word are painted with radioactive pellets
parsnip
it's electromagnetic waves all the way down
catern
edmz
in org-journal, is there a way to visualize what I've done in a specific period?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 next »