logs archiveIRC Archive / Freenode / #emacs / 2009 / November / 22 / 1
defn
anyone know why doc-view wont view my .pdf as a pdf?
boscop
defn: try reloading
MrTorque
ggole: i rather want to do a character-shifting. like adding 2 to the numeric value of a character.
defn
boscop: reloading emacs?
boscop: ive tried that
boscop
the pdf
defn
is there any special way i should be opening it?
im just C-x C-f'ign it
ing*
boscop
that should do it
ggole
MrTorque: I don't think there's anything already written for that
boscop
maybe it's malformed?
         

ggole
If you know elisp you could have something up, I guess...
defn
boscop: it wont open any pdf files
ggole
*hack
boscop
defn: maybe it doesn't recognize it as pdf
defn
it opens png files fine
MrTorque
ggole: yeah, i am trying to learn lisp, so that's not the problem. i just need some keywords for some functions.
boscop
defn: does the modeline say docview?
defn
yes
it's not malformed, ive tried many pdfs
ggole
MrTorque: not quite sure what you mean. You want to know how to get the character at point, add a number to it, etc?
boscop
can others open this pdf?
defn
it should be noted that im on OSX
boscop
what emacs version?
defn
21.1.50.1
err
23.1.50.1
MrTorque
ggole: i thought of looping over all characters of the buffer, move the cursor character-by-character, get a numeric value of the char, modify it (and write it, of course), etc (this will make the file unreadable)
rgr
defn you have ghostscript installed?
dto
hello emacsers
defn
yes
i have mactex installed as well, so all the dvi... utils are there
ggole
MrTorque: you could do that. But, uh, why?
defn
huh, bummer
so no one knows?
MrTorque
ggole: i want to make a file unreadable for humans and the way back. So someone who get's it by chance cant read it.
ggole: it is not like encrypting, since i do not need it this secure...
         

ggole
MrTorque: see rot13-buffer
Er, that should be rot13-region
boscop
how can I use the default color theme for web surfing in emacs-w3m while having another in other windows?
ggole
emacs doesn't really do that
The colour stuff is pretty primitive - everything is global
MrTorque
ggole: ah :) this is nice. I will look into the code of that.
qed
No PNG support is available, or some conversion utility for pdf files is missing.
hmmm
MrTorque
ggole: Thank you. i can work with that :)
boscop
why does chm-view-file fire up firefox?
how do I open it inside emacs?
ah got it working
jordanb
rudybot: quote
rudybot
People who name their children 'aspen' and 'sierra' need taken out back and shot.
MisterN
test almost working.
damn client bug sent this message to the wrong channel
qed
can anyone help me figure out why emacs on osx wont let me open pdf documents?
http://pastie.org/private/d1qbbvr92sneqqyu3czrsg
offby1
qed: my guess is you've got a variable named something like "pdf-viewer-program" that is set to nil, when it should instead either not be bound at all, or else bound to a string like "acroread"
qed
offby1: where would i find that and change it?
offby1
maybe the source to the function doc-view-mode-initiate-display would have a clue
doc-view-pdftotext-program
it's supposed to default to "pdftotext"
qed
yeah i installed pdftotext just for the hell of it
and im still getting nothing
offby1
that should fix it, at least, if you restart emacs
qed
did that
offby1
that's a bug in docview; it should not just gack
you'll have to do some debugging, I guess
qed
offby1: the locate-file debug line doesn't list my full path
err all of the palces it should be searching
offby1
I don't understand
qed
how do i alter emacs PATH
should emacs just inherit my PATH, or can I force it to check in other places?
ive installed pdftotext to /usr/local/bin
but that's not listed in the 'locate-file' section of the debug
offby1
you can set the variable "exec-path".
,df executable-find
fsbot
executable-find is a compiled Lisp function in `files.el'.
(executable-find COMMAND)
Search for COMMAND in `exec-path' and return the absolute file name.
Return nil if COMMAND is not found anywhere in `exec-path'.
offby1
see how the docs for executable-find tell you that? :-|
qed
sorry :\
offby1
just teachin' ya to fish :)
so if your pdftotext is in some weird directory, you could put this in your .emacs: (add-to-list 'exec-path "/weird/directory")
qed
could I (setq exec-path ("current list of stuff", "blah", "my stuff"))
offby1
you could indeed
I have a vague feeling that using add-to-list is cleaner, but I can't articulate why
qed
does it need to be setq 'exec-path?
offby1
no, you don't need a ' with setq
in fact, the "q" in setq stands for "quote"
qed
welp, either way, i fixed it :)
offby1
hooray
welcome to Lisp
qed
thanks for your help man :)
offby1
.oO("blinkenshell"?)
(Action) watches das blinkenlights
qed
it's a silly free shell i got
they're probably stealing my passwords and identity as we speak
man this is so awesome -- reading a programming PDF in my editor with a slime repl right next door
*this* is the way to learn programming
ggole
Hmm, I use tiling wms for that
laurus
How do I launch Calc in Emacs?
qed
i use xmonad on my laptop
but on osx there's no good way to fit xmonad into the mix
froog
laurus: M-x calc ?
ggole
Yeah, fair enough
laurus
froog, fantastic, thank you
offby1
calc always struck me as the most impressive thing inside emacs
infinite-precision math, reasonably fast ... in elisp!
sshelagh
the question is how to you get rid of calc once you've got it open?
offby1
q, I think
sshelagh: you seem to have grown an extra "s" since I last saw you
froog
offby1: I can just never remember the keybindings for it
laurus
Yeah, q does it offby1 :)
sshelagh
Do you like it?
jordanb
Infinite precision?
offby1
froog: C-h m tells all
jordanb: I think so
jordanb
You mean arbitrary precision?
offby1
sshelagh: it makes your butt look big
(Action) slaps thigh
jordanb: I dunno. Maybe.
froog
offby1: I know
jordanb
If I divide 1 by 3 I don't run out of memory, do I?
It stops calculating that out at some point, surely.
laurus
Heh, this is going to take some getting used to ;)
sshelagh
offby1: I was hoping for a different effect.
ggole
jordanb: how do you think it works? By storing each decimal?
jordanb
It would have to, to represent real numbers.
ggole
It couldn't represent them as, say, a pair of numbers?
jordanb
That may work for rational numbers
But not for real numbers.
ggole
Rational numbers like 1 / 3
jordanb
So if I do a calculation to work out pi, I run out of memory eh?
offby1
I just figured jordanb was being all pedantic about my terminology.
ggole
jordanb: calculations can only approximate pi
offby1
,(expt 10 100)
fsbot
0 ..(integer)
jordanb
Arbitrary precision means some arbitrarly-setable precision
offby1
now, in calc, you'd get the right answer for that.
jordanb
Infinite precision means you either work out the number exactly, or you run out of memory.
offby1
jordanb: ok, 1/3 won't make you run out of memory, but (expt 10 (expt 10 100)) will.
if you see what I mean
jordanb
offby1: That's a little different then talking about precision though, infinite precision means exactly represented real numbers.
ggole
You can't exactly represent (all) real numbers
By definition
jordanb
You can with infninite precision
By definition.
offby1
jordanb: well, regardless of my incorrect terminology, you now know what I'm talkin' bout
ggole
That's not an exact representation
jordanb
Real numbers have at most a countably infinite number of digits.
Infinite precision therefore means exact representation of real numbers
ggole
No matter which concrete representation you choose, there's a method to obtain a real number that can't be represented by it
A la Cantor
That pretty much rules out an exact represenation, although at this point we'll just begin to quibble about what 'exact' means
jordanb
My point is that you're arguing a weird definition of 'infinite.'
ggole
Not really
jordanb
"infinite precision" means that you should run out of memory trying to represent abritrary real numbers.
Even small ones
ggole
Why would that be the case?
Representing 1 / 3 exactly isn't hard
jordanb
Because 'infinite precision' means you don't stop calculating it out at some arbitrary point.
offby1
but that's not an interesting real. I assume jordanb means irrationals.
ggole
I'm not sure what you mean by "calculating it out". You don't need to exactly print a number in decimal in order to represent it
defn
anyone here use shell-fm?
jordanb
offby1: Since there are vastly more real numbers that aren't rational than that are, 'an arbitrary real number' tends to imply an irrational one.
defn
I compiled it for OSX, installed it, but everytime I try to start it it says that the subprocess is dead
offby1
sshelagh: http://www.cartoonbank.com/2001/This-first-quarter-projected-earnings-report-does-it-make-my-butt-look-big/invt/120334
jordanb
Flash comics!
offby1
sshelagh: sorry but I just think that's the world's best joke
jordanb: presumably so I can't copy it
Chicago
Hi, I am trying to use emacs as a "BBS Client". I have tried M-x ansi-term (which offers me /bin/bash) and then I can run telnet... as well as M-x telnet... but when I connect to the BBS, the gext is unreadable. and full of garbage like ^[[14;44H^[[0m^[[31m\337^[[4A^[[1;51m\337
jordanb
offby1: Can't copy it without the 'screen capture hole'.
offby1
Chicago: any chance I can talk you out of even trying?
ggole
Wow, calc almost hangs emacs when I undo
Chicago
offby1, sure. Is there an alternative?
ggole
Is that a bug?
offby1
Chicago: er, yeah; don't do it from emacs :)
just use a real terminal
Chicago: I assume that sufficient fiddling with the TERM environment variable will let it work
Chicago
offby1, this is a difficult to google on topic. It seems to be old knowledge.
jordanb
http://hafd.org/~jordanb/fu*k-the-new-yorker.jpg
Chicago
offby1, are you saying to try it in emacs by fiddling with TERM? Or are you saying you know the better way?
jordanb
Chicago: Are you using ansi-term?
offby1
Chicago: I'm saying a) try taking emacs out of the picture entirely, and simply connect to the BBS from gnome-terminal, xterm, or whatever; or b) if you must use ansi-term, then fiddle with TERM inside of it
Chicago
jordanb, I am trying to use ansi-term. I also am trying the built in telnet client.
jordanb
Oh right.
shabble
Chicago: you're seeing unhandled terminal escape sequences. Which means either emacs can't handle them, or you haven't told it to handle them in the right way.
offby1
and c), no I don't know the right answer; I'd tell you if I did (honest).
Chicago: oh, and d) forget about M-x telnet, too
shabble
changing your TERM will (hopefully) instruct the server to send the right codes, but offhand I have no idea what that setting is.
offby1
TERM=xterm is what I'd try first
maybe TERM=vt100
jordanb
You could make an xterm terminal with just the right shape and no decorations, and then stick it where the buffer would be in your emacs window.
offby1
:)
it'd be just as good
if not better
shabble
jordanb: emacs wm? :)
Chicago
offby1, when do I export TERM=xterm or vt100? Before or after M-x ansi-term?
« prev 1 2 3 4 5 next »