[O] Images in tables?

2014-03-28 Thread Peter Davis


I'm finishing a PDF document that will contain a number of screen shots. 
I'd like to put them in a table to avoid just having them arranged 
vertically on the page. Is there a way to do that?


Specifically, I'm using

#+ATTR_LATEX: :height 6cm

to set the heights of the images. Can that work with a table somehow?

Thanks!

-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Images in tables?

2014-03-29 Thread Peter Davis


On 3/28/14, 10:58 PM, Feng Shu wrote:

Peter Davis p...@pfdstudio.com writes:


I'm finishing a PDF document that will contain a number of screen
shots. I'd like to put them in a table to avoid just having them
arranged vertically on the page. Is there a way to do that?

#+MACRO:  p   \includegraphics[scale=1]{$1}

| {{{p(a.png)}}} | {{{p(b.png)}}} |
| {{{p(c.png)}}} | {{{p(d.png)}}} |


Excellent! Thank you.

-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Using Emacs Org-mode on a server with ssh on an iPad

2014-04-03 Thread Peter Davis
On Wed, Apr 02, 2014 at 03:10:28PM +0200, Pere Quintana Seguí wrote:
 As I mentioned in a previous message, I recently bought an iPad.
 
 I'm considering the possibility to not use Mobileorg and use Emacs on a
 server (Digital Ocean) with an ssh client and a bluetooth keyboard.
 
 Is anyone using Emacs and org-mode this way regularly? Which ssh client
 are you using? Which bluetooth keyboard?
 

When I had an iPad, I used iSSH and a Logitech Ultrathin Keyboard/Cover. That 
seemed to be a pretty successful combination, though there are other apps out 
there.


-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Keeping up to date

2014-04-29 Thread Peter Davis
A while ago, I switched from ELPA to Git as my Org-mode source. However, I now 
have three Macs I'm trying to keep in sync, and doing Git updates is definitely 
more labor
intensive. Any suggestions for good ways to keep three machines all up-to-date 
with Emacs and Org?

I suppose the best thing would be to put all my emacs stuff in a Dropbox folder 
and run from that, but I haven't managed to overcome the inertia to get that 
working.

Org-mode is now my most heavily used emacs mode by far (though that may change 
if I ever get back to coding in a real programming language.)


Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Keeping up to date

2014-04-29 Thread Peter Davis
Thanks, John (and Greg) for your replies.

At some point, I'm going to have to bite the bullet and put all my emacs stuff 
in a Dropbox folder, so all my Macs will be in sync all the time. Apart from 
org-mode versions, I
have inconsistencies in init files, etc. that cause me headaches. John, I'm 
inclined to agree that getting all my init stuff sync'ed is more important, but 
I think part of that is
having all packages in one place so they're in sync as well.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Questions about mail, MIME, etc.

2014-05-08 Thread Peter Davis
I'd love to get mail working so I could send MIME messages right from org mode. 
However, I have a couple of issues/questions:

 1) I tried using org-mime http://orgmode.org/worg/org-contrib/org-mime.html, 
but when I try the command org-mime-org-buffer-htmlize, I get the error:
Symbol's function definition is void: org-export-grab-title-from-buffer
I think I followed the setup described on that page. Is this meant for an 
older version of orgmode? (I'm running 8.2.5g)

 2) I actually use a number of email programs (MH, mutt, etc.), but not gnus or 
VM. Is there a way to get org to export the mime to a message file that I can 
send (as a message,
not as an attachment) from some other program?

 3) What I'd really like is a multipart/alternative message where one part is 
text/plain, and looks exactly like the emacs buffer display, and the other part 
is text/html, and 
looks like what org would export to html, complete with tables, images, etc.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Questions about mail, MIME, etc.

2014-05-08 Thread Peter Davis
On Thu, May 08, 2014 at 10:34:26PM +0800, Eric Abrahamsen wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I'd love to get mail working so I could send MIME messages right from org 
  mode. However, I have a couple of issues/questions:
 
   1) I tried using org-mime 
  http://orgmode.org/worg/org-contrib/org-mime.html, but when I try the 
  command org-mime-org-buffer-htmlize, I get the error:
  Symbol's function definition is void: org-export-grab-title-from-buffer
  I think I followed the setup described on that page. Is this meant for 
  an older version of orgmode? (I'm running 8.2.5g)
 
 Yeah I got that error too, a while ago, and your message prompted me to
 look at it. It seems like org-mime is just a bit behind the state of
 org-export, and fixing that one dead function link is enough to make it
 work again. I've attached a patch.

Thanks, Eric! I'll give it a try.

   2) I actually use a number of email programs (MH, mutt, etc.), but not 
  gnus or VM. Is there a way to get org to export the mime to a message file 
  that I can send (as a message,
  not as an attachment) from some other program?
 
 Generating a message buffer is pretty much hard-coded into org-mime.
 Once you're in that buffer, though, the (non-interactive) function
 mml-generate-mime will return the fully encoded mime message as a
 string -- you could save that to a file and do something else with it.
 I'm not 100% confident that's the simplest way to do that.

Thanks. I suppose I can use gnus to send a message, even if I'm not using it to 
read mail.

   3) What I'd really like is a multipart/alternative message where one part 
  is text/plain, and looks exactly like the emacs buffer display, and the 
  other part is text/html, and 
  looks like what org would export to html, complete with tables, images, 
  etc.
 
 As far as I know, that's exactly what org-mime does!

Great!

Thank you.

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Questions about mail, MIME, etc.

2014-05-08 Thread Peter Davis
On Thu, May 08, 2014 at 10:34:26PM +0800, Eric Abrahamsen wrote:
 Peter Davis p...@pfdstudio.com writes:
 
 Yeah I got that error too, a while ago, and your message prompted me to
 look at it. It seems like org-mime is just a bit behind the state of
 org-export, and fixing that one dead function link is enough to make it
 work again. I've attached a patch.

Excellent! That worked. Thank you!

 
 Generating a message buffer is pretty much hard-coded into org-mime.
 Once you're in that buffer, though, the (non-interactive) function
 mml-generate-mime will return the fully encoded mime message as a
 string -- you could save that to a file and do something else with it.
 I'm not 100% confident that's the simplest way to do that.

Ok, I was able to send the message through gnus, even though I don't (normally) 
use it as a mail reader.

   3) What I'd really like is a multipart/alternative message where one part 
  is text/plain, and looks exactly like the emacs buffer display, and the 
  other part is text/html, and 
  looks like what org would export to html, complete with tables, images, 
  etc.
 
 As far as I know, that's exactly what org-mime does!

Almost. It looks like org-mime puts the actual contents of the buffer into the 
text/plain part, including links, etc. that would normally be hidden on 
display. I think it would be
more useful to make the text/plain part contain what would be output from 
exporting to text. But maybe that's just my preference.

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Questions about mail, MIME, etc.

2014-05-10 Thread Peter Davis
One more follow-on question. When I run org-mime-org-buffer-htmlize, I get a 
buffer in message mode with a nice MIME message almost ready to
go. I have not specified org-mime-library, so it defaults to mml, as expected 
for gnus. But when I type C-c C-c to send the message, I get
prompted for via with three options (which I don't remember offhand, but it 
was something like 'transport', 'sendmail' and 'smtp'.

However, if I had previously run and quit gnus in that session, it just sends 
the message, badda-boom-badda-bing.

Is there some minimal configuration I can add to .emacs to have the effect of 
running and quitting gnus to messages will send? I realize
this is not so much an org-mode question, but it's related.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Questions about mail, MIME, etc.

2014-05-11 Thread Peter Davis
On Sun, May 11, 2014 at 11:05:30AM +0800, Eric Abrahamsen wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  One more follow-on question. When I run org-mime-org-buffer-htmlize, I get 
  a buffer in message mode with a nice MIME message almost ready to
  go. I have not specified org-mime-library, so it defaults to mml, as 
  expected for gnus. But when I type C-c C-c to send the message, I get
  prompted for via with three options (which I don't remember offhand, but 
  it was something like 'transport', 'sendmail' and 'smtp'.
 
  However, if I had previously run and quit gnus in that session, it just 
  sends the message, badda-boom-badda-bing.
 
  Is there some minimal configuration I can add to .emacs to have the effect 
  of running and quitting gnus to messages will send? I realize
  this is not so much an org-mode question, but it's related.
 
 I have these variables set, I'll bet it's one or the other that makes
 the difference (probably the second).
 
 (setq mail-user-agent 'gnus-user-agent)
 (setq message-send-mail-function 'message-send-mail-with-sendmail)
 

Ah! Using these lines, or even just the first one, did get rid of the via: 
prompt, but the messages never got delivered, even though emacs
said they had been sent.

Then it occurred to me ... D'oh! I just added

(load-file ~/.gnus.el)

That worked! Sorry for the oversight.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Superscript and subscript in HTML?

2014-05-28 Thread Peter Davis
Is there any markup which will let me get superscripts and subscripts in 
HTML export?


It would be great if the HTML exporter recognized ^{...} and _{...} so 
the same markup would work for both LaTeX/PDF and for HTML.


Thanks,
-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Superscript and subscript in HTML?

2014-05-28 Thread Peter Davis
On Wed, May 28, 2014 at 08:50:20AM -0400, Rick Frankel wrote:
 On 2014-05-28 07:47, Peter Davis wrote:
 Is there any markup which will let me get superscripts and subscripts
 in HTML export?
 
 It would be great if the HTML exporter recognized ^{...} and _{...} so
 the same markup would work for both LaTeX/PDF and for HTML.
 
 It does for me. I believe it always has. Are you sure your options are
 set correctly? Also, are you sure that the html source doesn't contain
 sup/ and sub/ tags that aren't being styled?
 
 Here's a example and the output
 
 #+BEGIN_SRC org
 ,#+OPTIONS: toc:nil
 ,* Super and subscript
 this is a super^{1} script. and a sub_{2} script.
 
 another super^3 and another sub_4
 #+END_SRC
 
 and the results (C-c C-e C-b h H)
 
 #+BEGIN_EXAMPLE
 div id=outline-container-sec-1 class=outline-2
 h2 id=sec-1Super and subscript/h2
 div class=outline-text-2 id=text-1
 p
 this is a supersup1/sup script. and a subsub2/sub script.
 /p
 
 p
 another supersup3/sup and another subsub4/sub/p
 /div
 /div
 
 #+END_EXAMPLE
 

Here's what I get for the body, using your example:

+==
div class=org-src-container

pre class=src src-orgspan style=color: #b2;#+OPTIONS: toc:nil/span
span style=color: #ff;* Super and subscript/span
this is a super^{1} script. and a sub_{2} script.

another super^3 and another sub_4
/pre
/div
+==

Leaving out the #+BEGIN_SRC/#+END_SRC doesn't work either. This is with emacs 
24.3.3, org-mode 8.2.5g

Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Superscript and subscript in HTML?

2014-05-28 Thread Peter Davis
On Wed, May 28, 2014 at 09:29:44AM -0400, Rick Frankel wrote:
 
 The begin/end src lines are just that, markers to show where the org
 source starts and end. What you have formatted is a source code
 listing, not the source code.

If you're giving an example of org buffer contents, #+BEGIN_SRC and #+END_SRC 
are probably not the best delimiters to use to set off your
example, since they're valid org markup.

Anyway, it turns out some options I had enabled were preventing the 
superscript/subscript markup from being recognized. I had this

#+OPTIONS:   H:5 \n:nil @:t ::t |:t ^:nil -:t f:t *:t :t

at the top of the buffer. Removing that line seems to get me proper HTML markup.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Printable calendar?

2014-05-30 Thread Peter Davis
I'm trying to make a printable calendar of my bike commuting trips during the 
month of May. I don't need any fancy calendar functions, so I figured a simple 
table would do it. I
created the ord file whose contents are below, but when I export to HTML, there 
are some quirks ...

 1) Some of the dates are right aligned within the cells, and others left.
 2) I'd like to have full borders on the table

Also, is there a better way to do this? I know emacs has calendar tools, and 
org has diary and agenda tools, but they seemed like overkill for trying to get 
a simple calendar page
printed. 

Thanks,
-pd


 cut here 
#+STARTUP: showeverything logdone
#+options: num:nil toc:nil
#+author: Peter Davis
#+title: Every Day in May 2014

|  Sun | Mon | Tue | Wed | Thu | Fri | Sat  |
|--+-+-+-+-+-+--|
|  | | | | 1   | 2   | 3|
|  | | | | | |  |
|  | | | | AM: 3.6 | AM: 3.6 | AM: 7.6  |
|  | | | | PM: 3.7 | PM: 3.7 | AM: 7.6  |
|--+-+-+-+-+-+--|
|4 | 5   | 6   | 7   | 8   | 9   | 10   |
|  | | | | | |  |
| AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1  |
|  | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 |  |
|--+-+-+-+-+-+--|
|   11 | 12  | 13  | 14  | 15  | 16  | 17   |
|  | | | *BIKE*  | | | AM: 7.6  |
|  | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1   |
|  | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 |
|--+-+-+-+-+-+--|
|   18 | 19  | 20  | 21  | 22  | 23  | 24   |
|  | | | | | |  |
|  | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5  |
|  | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | |  |
|--+-+-+-+-+-+--|
|   25 | 26  | 27  | 28  | 29  | 30  | 30   |
|   *BIKE* | | | *TRIKE* | | |  |
| AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 |  |
|  | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | |  |
|--+-+-+-+-+-+--|
 cut here 



-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Printable calendar?

2014-05-30 Thread Peter Davis
Ok, I was able to get the column rules I want. (See below)

I'm still puzzled by the right/left alignment. In the org buffer the columns 
appear correctly aligned, but in HTML output, the left (Sun) and right (Sat) 
columns are right-aligned,
while all the others are left-aligned.

Clues?

Thanks,
-pd


 cut here 
#+ATTR_HTML: :border 2 :frame border
| Sun  | Mon | Tue | Wed | Thu | Fri | Sat  |
|--+-+-+-+-+-+--|
| /|   |   |   |   |   ||
|  | | | | 1   | 2   | 3|
|  | | | | | |  |
|  | | | | AM: 3.6 | AM: 3.6 | AM: 7.6  |
|  | | | | PM: 3.7 | PM: 3.7 | AM: 7.6  |
|--+-+-+-+-+-+--|
| 4| 5   | 6   | 7   | 8   | 9   | 10   |
|  | | | | | |  |
| AM: 11.4 | AM: 3.7 | AM: 3.7 | AM: 5.1 | AM: 3.6 | AM: 3.3 | AM: 5.1  |
|  | PM: 3.3 | PM: 3.3 | | PM: 3.3 | PM: 3.3 |  |
|--+-+-+-+-+-+--|
| 11   | 12  | 13  | 14  | 15  | 16  | 17   |
|  | | | *BIKE*  | | | AM: 7.6  |
|  | AM: 3.7 | AM: 3.7 | AM: 9.2 | AM: 3.7 | AM: 3.7 | M: 6.1   |
|  | PM: 3.3 | PM: 3.3 | PM: 9.7 | PM: 3.3 | PM: 3.3 | PM: 13.3 |
|--+-+-+-+-+-+--|
| 18   | 19  | 20  | 21  | 22  | 23  | 24   |
|  | | | | | |  |
|  | AM: 3.7 | AM: 3.6 | AM: 3.7 | AM: 3.7 | AM: 7.0 | AM: 5.5  |
|  | PM: 3.2 | PM: 3.3 | PM: 3.3 | PM: 3.3 | |  |
|--+-+-+-+-+-+--|
| 25   | 26  | 27  | 28  | 29  | 30  | 30   |
| *BIKE*   | | | *TRIKE* | | |  |
| AM: 16.2 | | AM: 3.6 | | AM: 3.8 | AM: 3.6 |  |
|  | PM: 5.1 | PM: 3.3 | PM: 7.3 | PM: 3.3 | |  |
|--+-+-+-+-+-+--|
 cut here 


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Printable calendar?

2014-05-31 Thread Peter Davis
On Fri, May 30, 2014 at 01:20:21PM -0400, Nick Dokos wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  Ok, I was able to get the column rules I want. (See below)
 
  I'm still puzzled by the right/left alignment. In the org buffer the
  columns appear correctly aligned, but in HTML output, the left (Sun)
  and right (Sat) columns are right-aligned,
  while all the others are left-aligned.
 
  Clues?
 
 
 You can force the misbehaving columns to behave - more or less: the M
 value on the 17th will cause problems (btw, I prefer
 to have a non-exported zeroth column for things like / and !
 that are basically table metadata - see (info (org) Advanced features)
 for details):
 

Thanks, Nick. That worked beautifully (once I noticed that May has 31 days 
instead of 30 twice.)

 The misbehaviour is caused by the heuristic used in
 org-export-table-cell-alignment:
 
 ,
 | Return alignment as specified by the last alignment cookie in the
 | same column as TABLE-CELL.  If no such cookie is found, a default
 | alignment value will be deduced from fraction of numbers in the
 | column (see `org-table-number-fraction' for more information).
 `
 
 You can play around with org-table-number-fraction (default: 0.5) to
 change the behaviour. A value of 0.25 will right-align them all, whereas
 a value of 0.75 will left-align them all. But I wouldn't want to bet my
 life on that: it depends on the contents of the table so it seems like a
 fragile solution at best.
 
 BTW, the 0.25 and 0.75 values above are purely trial-and-error (actually
 derived from the smallest ratio I found edebugging over the columns:
 6/21).
 
 Nick
 
 Footnotes:
 
 [fn:1] The heuristic counts empty cells as numbers if the non-empty row
above it is a number, so for the first column for example, there
are 21 cells and 11 of them are numbers.


Interesting, but it sounds to me like org is trying to be too smart for its own 
good here, making inferences based on the contents of the
cells. I'll stick with the 'l' notation, which seems more reliable.

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis
I've used org-mode-org-mime-htmlize in the past to send email from org, 
via Gnus. However, recently I've discovered that after I edit the To: 
field and enter C-c C-c, I get Sending via mail... in the mini-buffer, 
and then emacs just sits there, apparently hung. Typing C-g enough times 
brings it back, but the mail never gets sent.


I have started running Gnus in a different emacs concurrently on the 
same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus in 
Aquamacs), using the same .gnus.el, but I would not expect that to cause 
any problems.


Any suggestions as to what may be going on here, or how to trouble shoot 
it? I really like sending nicely formatted emails from org.


Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis

Thank you, Thorsten,

Thorsten Jolitz tjol...@gmail.com writes:

 Peter Davis p...@pfdstudio.com writes:

 I've used org-mode-org-mime-htmlize in the past to send email from
 org, via Gnus. However, recently I've discovered that after I edit the
 To: field and enter C-c C-c, I get Sending via mail... in the
 mini-buffer, and then emacs just sits there, apparently hung. Typing
 C-g enough times brings it back, but the mail never gets sent.

 Does Emacs really hang or is it still responsive? Did you try moving
 point or so? These messages sometimes don't disappear although the work
 is long finished.  Did you try

Actually, Emacs itself does not hang, but the sending process appears to
hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
never changes and the operation never completes. (I've noticed on
another system that after the Sending via mail... message, the
mini-buffer displays other messages as the message is sent.)

 ,
 | top
 `

 on the command-line to see if Emacs uses 100pc CPU?

I don't think it's using 100%, but it's using enough CPU that the Mac
keeps displaying the spinning beachball as I hover over the Emacs window.

 I have started running Gnus in a different emacs concurrently on the
 same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
 in Aquamacs), using the same .gnus.el, but I would not expect that to
 cause any problems.

 Any suggestions as to what may be going on here, or how to trouble
 shoot it? I really like sending nicely formatted emails from org.

 Just had a similar problem.
 Try this, if Emacs actually really hangs:

 1. M-x load-library RET org-elements.el

 2. do as described (- make Emacs hang)

 3. send from command line

 ,
 | kill -s usr2 4352
 `

 (get the PID with 'ps -e | grep emacs')

 or, equivalently (?)

 ,
 | pkill --signal usr2 emacs
 `

 4. go back to emacs and check/copysend the *Backtrace* buffer

Emacs isn't hung, but maybe there's some useful information somewhere
else?

Thanks very much!

-pd




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis
On more observation: I tried quitting Aquamacs, and then quitting and 
re-starting Emacs. The same problem occurred.


I also looked in the *trace of SMTP session to ... * buffer, and it was 
empty.


Thanks!
-pd


On 7/21/14, 10:14 AM, Peter Davis wrote:

Thank you, Thorsten,

Thorsten Jolitz tjol...@gmail.com writes:


Peter Davis p...@pfdstudio.com writes:


I've used org-mode-org-mime-htmlize in the past to send email from
org, via Gnus. However, recently I've discovered that after I edit the
To: field and enter C-c C-c, I get Sending via mail... in the
mini-buffer, and then emacs just sits there, apparently hung. Typing
C-g enough times brings it back, but the mail never gets sent.

Does Emacs really hang or is it still responsive? Did you try moving
point or so? These messages sometimes don't disappear although the work
is long finished.  Did you try

Actually, Emacs itself does not hang, but the sending process appears to
hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
never changes and the operation never completes. (I've noticed on
another system that after the Sending via mail... message, the
mini-buffer displays other messages as the message is sent.)


,
| top
`

on the command-line to see if Emacs uses 100pc CPU?

I don't think it's using 100%, but it's using enough CPU that the Mac
keeps displaying the spinning beachball as I hover over the Emacs window.


I have started running Gnus in a different emacs concurrently on the
same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
in Aquamacs), using the same .gnus.el, but I would not expect that to
cause any problems.

Any suggestions as to what may be going on here, or how to trouble
shoot it? I really like sending nicely formatted emails from org.

Just had a similar problem.
Try this, if Emacs actually really hangs:

1. M-x load-library RET org-elements.el

2. do as described (- make Emacs hang)

3. send from command line

,
| kill -s usr2 4352
`

(get the PID with 'ps -e | grep emacs')

or, equivalently (?)

,
| pkill --signal usr2 emacs
`

4. go back to emacs and check/copysend the *Backtrace* buffer

Emacs isn't hung, but maybe there's some useful information somewhere
else?

Thanks very much!

-pd



--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis

Thank you, Nick.


On 7/21/14, 12:23 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


On more observation: I tried quitting Aquamacs, and then quitting and
re-starting Emacs. The same problem occurred.

I also looked in the *trace of SMTP session to ... * buffer, and it
was empty.


C-h v message-send-mail-function RET

What the value is depends on which package you use to send mail.  For
smtpmail, this is probably `message-smtpmail-send-it' which just
executes a hook and then calls `smtpmail-send-it'.


Actually, it was set to just smtpmail-send-it (no message-). I tried 
changing it back but that seems to have made no difference. For some 
reason, my .gnus.el had this:


+
| (setq send-mail-function 'smtpmail-send-it
|  message-send-mail-function 'smtpmail-send-it)
+

I changed the second one, so it's now:

+
| (setq send-mail-function 'smtpmail-send-it
|   message-send-mail-function 'message-smtpmail-send-it)
+

Still no good.



I would edebug this
function and step through it until it goes off the rails, then do the
same thing on the next level down until you either find the culprit or
give up in disgust. Even a partial descent into it however should be
helpful to whoever you can beg/coerce to look at the problem (most
probably you :-) )

If not smtpmail, then do the same thing with whatever function
you *do* use.

Check any buffers generated and watch out for any debug settings as you
follow the flow. You might want to set any debug variables you find
before doing it again for the Nth time where 2 = N ...

At least, that's how I would go about it.


Alas, despite years of emacs abuse, I have not managed to master even 
the rudiments of emacs lisp, and don't even know how to edebug.


Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis


On 7/21/14, 2:25 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


At least, that's how I would go about it.

Alas, despite years of emacs abuse, I have not managed to master even
the rudiments of emacs lisp, and don't even know how to edebug.


So this is your opportunity to learn!


Learning emacs lisp is definitely on my bucket list, but not, I confess, 
at the top.


;^)

-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-22 Thread Peter Davis
Alan Schmitt alan.schm...@polytechnique.org writes:

 On 2014-07-21 19:45, Peter Davis p...@pfdstudio.com writes:

 Alas, despite years of emacs abuse, I have not managed to master even
 the rudiments of emacs lisp, and don't even know how to edebug.

 To get you started, you could try the following.

 - set up two emacs frames
 - in one frame, do a M-x describe-function then type the name of the
   function of interest (smtpmail-send-it iirc)
 - there will be a link to smtpmail.el, follow it
 - this will take you to the definition of the function, there type C-u
   C-M-x to tell emacs you want to edebug it
 - now in the other frame, do what you need to do to trigger the bug
 - when the function is called, you should see a small triangle in the
   fringe showing the point being executed. You can step through the
   different instructions by hitting space, and you will see in the echo
   area the results of the computations

 You can interrupt the debugging at any time by hitting 'q'. And if you
 no longer want to debug that function, hit C-M-x while in the
 function's source code, or restart emacs.

 Try it, it's fun! ;-)

This sounds like something even I could do! Thanks, Alan. I'll give it a
shot.

-pd



[O] Importing from Oddmuse?

2013-10-25 Thread Peter Davis
I'm comparatively new to Org mode (actually, I've used it for years, but
only a small subset of its functionality). I've used Oddmuse for years to
maintain my own personal Wiki, but now I'm looking to move to Org mode.

I know there are lots of tools for exporting or publishing from Org mode to
Oddmuse, but how about the other direction? Any tools or tips for importing
a large number of Oddmuse pages into Org mode? Ideally, I'd like to keep
them as separate files, with links converted to file links, etc.

Ideas?

Thanks!

-pd


-- 

The Tech Curmudgeon
http://www.techcurmudgeon.com


Re: [O] Importing from Oddmuse?

2013-10-28 Thread Peter Davis
Just to answer my own question, I shamelessly took Alex Schroeder's 
raw.pl script and hacked it up a bit to do some conversion from Oddmuse 
markup to org-mode. The attached Perl script should run through all the 
pages in an Oddmuse Wiki and generate .org versions of them in a 
separate directory.


This is still very much a work in progress, but I think the general 
framework is useful. On thing I have to fix is the hyperlinks. Right 
now, if the Wiki page is one two.pg, this script will generate a file 
named one_two.org, but any links will refer to [[file:one 
two.org][one two]]


I concentrated on the small subset of Oddmuse markup that I'm using, but 
I think it's easily extensible.


Let me know if this is at all useful to anyone else.

-pd


On 10/25/13 10:54 AM, Peter Davis wrote:
I'm comparatively new to Org mode (actually, I've used it for years, 
but only a small subset of its functionality). I've used Oddmuse for 
years to maintain my own personal Wiki, but now I'm looking to move to 
Org mode.


I know there are lots of tools for exporting or publishing from Org 
mode to Oddmuse, but how about the other direction? Any tools or tips 
for importing a large number of Oddmuse pages into Org mode? Ideally, 
I'd like to keep them as separate files, with links converted to file 
links, etc.





--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

#! /usr/bin/perl -w

# Copyright (C) 2005, 2007  Alex Schroeder a...@emacswiki.org
#
# Portions copyright (c) 2013, Peter Davis p...@pfdstudio.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see http://www.gnu.org/licenses/.

sub ParseData {
  my $data = shift;
  my %result;
  while ($data =~ /(\S+?): (.*?)(?=\n[^ \t]|\Z)/sg) {
my ($key, $value) = ($1, $2);
$value =~ s/\n\t/\n/g;
$result{$key} = $value;
  }
  return %result;
}

sub FixMarkUp {
my $data = shift;
my $orgout = #+STARTUP: showeverything logdone\n#+options: num:nil\n\n;
my $csvMode = 0;
foreach (split /\n/, $data) {
	if (length($_)) {
	s/\r//g;
	# csv tables
	if ($_ =~ /csv/) {
		$csvMode = 1;
		s/csv/#+ATTR_HTML: :border 2 :rules all :frame border/g;
	} elsif ($_ =~ /^\s*$/) {
		$csvMode = 0;
	} elsif ($csvMode) {
		s/^/|/g;
		s/,/|/g;
		s/$/|/g;
	}
	# hyperlinks
	s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g;
	# strike through
	s/\/?s/+/g;
	# verse
	s/:::/#+BEGIN_VERSE/g;
	# bold and italic
	s/'''/*/g;
	s/''/\//g;
	# bullet lists
	s/^\*\*\*\*/*/g;
	s/^\*\*\*/   */g;
	s/^\*\*/  */g;
	s/^\*/ */g;
	# headers
	s/^\=\=\=\=//g;
	s/^\=\=\=/***/g;
	s/^\=\=/**/g;
	s/^\=/*/g;
#	s/ \=?$//g;
	s/ \=\=\=\=$//g;
	s/ \=\=\=$//g;
	s/ \=\=$//g;
	s/ \=$//g;
	s/^# / 1. /g;
	} else {
	$csvMode = 0;
	}
	$orgout = $orgout . $_ . \n;
}
return $orgout;
}

sub main {
  my ($regexp, $PageDir, $OrgDir) = @_;
  # include dotfiles!
  local $/ = undef;   # Read complete files
  foreach my $file (glob($PageDir/*/*.pg $PageDir/*/.*.pg)) {
next unless $file =~ m|/.*/(.+)\.pg$|;
my $page = $1;
next if $regexp  $page !~ m|$regexp|o;
$page = $page . .org;
mkdir($OrgDir) or die Cannot create $OrgDir directory: $!
  unless -d $OrgDir;
open(F, $file) or die Cannot read $page file: $!;
my $data = F;
close(F);
my $ts = (stat($OrgDir/$page))[9];
my %result1 = ParseData($data);
my $result2 = FixMarkUp($result1{text});
if ($ts  $ts == $result1{ts}) {
  print skipping $page because it is up to date\n if $verbose;
} else {
  print writing $page because $ts != $result{ts}\n if $verbose;
  open(F, $OrgDir/$page) or die Cannot write $page org file: $!;
  # print F $result1{text};
  print F $result2;
  close(F);
  utime $result1{ts}, $result1{ts}, $OrgDir/$page; # touch file
}
  }
}

use Getopt::Long;
my $regexp = undef;
my $page = 'page';
my $dir = 'org';
GetOptions (regexp=s = \$regexp,
	page=s   = \$page,
	dir=s= \$dir,
	help = \$help);

if ($help) {
  print qq{
Usage: $0 [--regexp REGEXP] [--page DIR] [--dir DIR]

Writes the org wiki text into plain text files.

--regexp selects a subsets of pages whose names match the regular
  expression. Note that spaces have been translated to underscores.

--page designates the page directory. By default this is 'page' in the
  current directory. If you run this script in your

Re: [O] Importing from Oddmuse?

2013-10-28 Thread Peter Davis


On 10/28/13, 2:12 PM, Achim Gratz wrote:

Peter Davis writes:

# hyperlinks
s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g;

Try this to fix the links maybe:

# hyperlinks
s/\[\[([^]]*)\]\]/
 my $l = $1;
 $l =~ s: :_:g;
 [[file:$l.org][$l]]/gex;


Excellent! I modified it slightly to keep the spaces in the display string:

 # hyperlinks
 s/\[\[([^]]*)\]\]/
 my $l = $1;
 my $orig = $1;
 $l =~ s: :_:g;
 [[file:$l.org][$orig]]/gex;

Thanks, Achim!

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Importing from Oddmuse?

2013-10-28 Thread Peter Davis


On 10/28/13, 3:18 PM, Achim Gratz wrote:

Peter Davis writes:

Excellent! I modified it slightly to keep the spaces in the display
string:

This is better, I'd think:

# hyperlinks
s/\[\[([^]]*)\]\]/
my $l = $1;
$l =~ s: :_:g;
[[file:$l.org][$1]]/gex;


That was the first thing I tried, and Perl complained about an undefined 
variable. I may have made a typo though.


Thanks!

Cheers,
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Importing from Oddmuse?

2013-10-28 Thread Peter Davis
On Mon, Oct 28, 2013 at 4:26 PM, Achim Gratz strom...@nexgo.de wrote:

 Peter Davis writes:
  That was the first thing I tried, and Perl complained about an
  undefined variable. I may have made a typo though.

 Nope, my error.  $1 gets clobbered by the second replacement.  So you'd
 want what you wrote or somewhat shorter:

 # hyperlinks
 s/\[\[([^]]*)\]\]/
   my ($l, $o) = ($1, $1);
   $l =~ s: :_:g;
   [[file:$l.org][$o]]/gex;


Yes, that works beautifully, and is nice and concise.

Thank you!

-pd

-- 

The Tech Curmudgeon
http://www.techcurmudgeon.com


Re: [O] Importing from Oddmuse?

2013-10-30 Thread Peter Davis
On Thu, Oct 31, 2013 at 02:38:48AM +0530, Jambunathan K wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I've used Oddmuse for years to maintain my own personal Wiki, but now
  I'm looking to move to Org mode.
 
 I am in the process of adding Org-mode markup support to the Oddmuse

That would be great. I'd love to use the same markup everywhere.

Thanks,
-pd


 One can also look at the churnings happening here:
 
http://repo.or.cz/w/orgmuse.git



[O] Org version mix-up

2013-11-17 Thread Peter Davis
I've been running Org-mode 8 on my MacBook, and Org-mode 7.something on 
my office Mac. I've tried to upgrade the office one to 8 using the 
'list-packages', and it seems to install, but org-version always shows 
up as 7.something afterwards.


Now, completely outside emacs, I installed some software and my MacBook 
using MacPorts. But now somehow the org-mode on my MacBook as been 
downgraded to 7.9.3f and, of course, using list-packages to upgrade 
doesn't work.


Does anyone have any clue what's going on here? I'd like to upgrade to 
8.whatever on all machines.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Org version mix-up

2013-11-18 Thread Peter Davis


On 11/18/13, 4:27 AM, Bastien wrote:
Please read the Installation section of the manual carefully. If you 
install from ELPA, you need to do it from a fresh Emacs session where 
Org has not been loaded. Otherwise I'd suggest installing from git 
directly. HTH, 


I never had to install it before, since it was included with the OS X 
emacs I installed. I tried the fresh session (emacs -nw 
--no-init-file), but still was not able to get list-packages to update it.


The git install appears to have worked.

Thanks!

-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




[O] Getting checkboxes in HTML output?

2013-11-27 Thread Peter Davis
I noticed that HTML output contains [ ] and [X], just like the
mark-up. Wouldn't it make sense to use actual unchecked or checked
checkboxes in HTML?

Is there a simple way to do this that I've overlooked?

Thanks,
-pd




Re: [O] Getting checkboxes in HTML output?

2013-11-27 Thread Peter Davis
On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I noticed that HTML output contains [ ] and [X], just like the
  mark-up. Wouldn't it make sense to use actual unchecked or checked
  checkboxes in HTML?
 
  Is there a simple way to do this that I've overlooked?
 
 
 A cursory glance through ox-html.el uncovered this:
 
 --8---cut here---start-8---
 (defun org-html-checkbox (checkbox)
   Format CHECKBOX into HTML.
   (case checkbox (on code[X]/code)
   (off code[#xa0;]/code)
   (trans code[-]/code)
   (t )))
 --8---cut here---end---8---
 
 Maybe you can redefine this function to do what you want?

Yes, this works:

--8---cut here---start-8---
(defun org-html-checkbox (checkbox)
  Format CHECKBOX into HTML.
  (case checkbox (on input type=\checkbox\ checked /)
  (off input type=\checkbox\ /)
  (trans code[-]/code)
  (t )))
--8---cut here---end---8---


Thank you!

-pd



Re: [O] Getting checkboxes in HTML output?

2013-11-28 Thread Peter Davis


On 11/28/13, 8:33 AM, Rick Frankel wrote:

On Wed, Nov 27, 2013 at 01:20:59PM -0500, Peter Davis wrote:

On Wed, Nov 27, 2013 at 11:03:38AM -0500, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


I noticed that HTML output contains [ ] and [X], just like

the

mark-up. Wouldn't it make sense to use actual unchecked or

checked

checkboxes in HTML?

Is there a simple way to do this that I've overlooked?


A cursory glance through ox-html.el uncovered this:

--8---cut here---start-8---
(defun org-html-checkbox (checkbox)
   Format CHECKBOX into HTML.
   (case checkbox (on code[X]/code)
 (off code[#xa0;]/code)
 (trans code[-]/code)
 (t )))
--8---cut here---end---8---

Maybe you can redefine this function to do what you want?

Yes, this works:

--8---cut here---start-8---
(defun org-html-checkbox (checkbox)
   Format CHECKBOX into HTML.
   (case checkbox (on input type=\checkbox\ checked /)
   (off input type=\checkbox\ /)
   (trans code[-]/code)
   (t )))
--8---cut here---end---8---

For xhtml compatibility, it would need to be 'checked=checked'. I've
done a quick look at the html dtd, and i does look like input elements
are allowed outside of forms, but i would need to double
check... Also, the fallback to [-] for the partially checked state
is a bit inconsistent, perhaps changing background color or other
attributre of the checkbox would be better.

I would be willing to make this change (as an option?) to the html
exporter if others agree.
Thanks, Rick. Adding a value for the checked attribute is no problem. I 
didn't have a good solution for the partially checked state. One 
possibility would be adding the 'disabled=disabled' attribute, which 
would make it appear gray. However, I've considered adding that 
attribute in all cases, since the HTML output is really for display and 
not input.


I'd love to see this as an option in the main code, so I don't have to 
keep retrofitting it into succeeding versions.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Getting checkboxes in HTML output?

2013-11-29 Thread Peter Davis


On 11/29/13, 11:11 AM, Rick Frankel wrote:

On 2013-11-28 16:58, Matt Price wrote:

On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban
sva-n...@mygooglest.com wrote:
Achim Gratz wrote:
Rick Frankel writes:
For xhtml compatibility, it would need to be 'checked=checked'. I've
done a quick look at the html dtd, and i does look like input elements
are allowed outside of forms, but i would need to double
check... Also, the fallback to [-] for the partially checked state
is a bit inconsistent, perhaps changing background color or other
attributre of the checkbox would be better.

I'd much prefer if you'd be using character entities for that since you
can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH
LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good
candidates).  That probably makes it UTF-8 only since I don't think
these symbols are defined for plain (X)HTML, so for other encodings
things should probably stay as they are.

FWIW, here's what I do for the HTML export:

In JS:

#+begin_src js
$(function () {
$('li  code:contains([X])')
.parent()
.addClass('checked')
.end()
.remove();
$('li  code:contains([-])')
.parent()
.addClass('halfchecked')
.end()
.remove();
$('li  code:contains([ ])')
.parent()
.addClass('unchecked')
.end()
.remove();
});
#+end_src

In CSS:

#+begin_src css
li.checked {
list-style-image: url('../images/checked.png');
}

li.halfchecked {
list-style-image: url('../images/halfchecked.png');
}

li.unchecked {
list-style-image: url('../images/unchecked.png');
}
#+end_src

with 3 nice pictures of green V, red X, and blue || (line pause on
recorders).



so, I don't know if I'm the only one here who feels this way, but I
would like to be able to export to an HTML file with ACTUAL HECKBOXES
that I cna check off, say on a phone, when I put the milk in the
shopping art, or pack the swim goggles in the vacation bag, or
whatever.  Maybe though I should be thinking in terms of some other
export application, remember the milk or something.  Am I describing a
different use case than other users here, perhaps?


My 3 cents:

I don't see that active checkboxes would help since i don't see a use
case where you can save the html back with the modified input. The
github usecase mentioned in anothre thread requires a bunch of
javascript to work (and write-out the modified file).

While Sebastien's solution is visually appealing, i don't think
requiring image assets is viable for the core exporter (note that it
could be done w/o javascript, another dependency i would like to
avoid).

I've attached an html file which shows the various possible options. My
comments:

1. As mentioned above, I don't see active checkboxes as useful
since the modified state is transient.
2. I don't really like the disabled checkboxes visually.
3. Either of the other two approaches (the list item style, which
parallels Sebastien's approach w/o using images) works for me.
Visually I like the list item style solution, but doesn't really
make the intent clear.

So, my vote is to change the exporter to use the BALLOT BOX and BALLOT
BOX WITH CHECK instead of the ascii character currently used and
indicate partially checked boxes ([-]) with greyed text.

Opinions?

rick



Thanks for the handy comparison page, Rick. Visually, I'm happy with 
either actual HTML input ... checkbox elements or the Unicode BALLOT 
BOX and BALLOT BOX WITH CHECK characters. Semantically, I suppose it's 
better to avoid having active input elements, since, as you point out, 
they're completely transient, and so potentially misleading.


Unfortunately, I don't think any of the partial options is very clear. 
They graying out is not particularly clear. But I could live with it if 
no better alternatives are found.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Getting checkboxes in HTML output?

2013-12-02 Thread Peter Davis

I've now changed ox-html.el to include this:

(defun org-html-checkbox (checkbox)
  Format CHECKBOX into HTML.
  (case checkbox (on #9746;)
(off #9744;)
(trans #9745;)
(t )))


This is sort of close to using
 [ ] for unchecked
 [/] for partially checked
 [X] for checked

To my aging eyes, the check in U#9745 looks almost like a forward slash. 
Certainly, though, this would be potentially confusing, especially if no 
[X] boxes were present, so that only [ ] or [/] were visible.


-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Getting checkboxes in HTML output?

2013-12-03 Thread Peter Davis
On Mon, Dec 02, 2013 at 08:11:25PM -0500, Nick Dokos wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I've now changed ox-html.el to include this:
 
 
 As an FYI: you don't need to change ox-html.el. You can just load a file
 containing the redefinition *after* you've loaded ox-html. Something
 like this (untested):
 
 (eval-after-load ox-html
   (defun org-html-checkbox (checkbox)
 ))
 
 That way, you have pristine sources *and* you get the redefined
 function.
 

Thanks, Nick. That's definitely cleaner!

-pd



Re: [O] Getting checkboxes in HTML output?

2013-12-03 Thread Peter Davis


On 12/3/13, 10:24 AM, Sebastien Vauban wrote:

Rick Frankel,

Rick Frankel wrote:

This is sort of close to using
[ ] for unchecked
[/] for partially checked
[X] for checked

To my aging eyes, the check in U#9745 looks almost like a forward
slash. Certainly, though, this would be potentially confusing,
especially if no [X] boxes were present, so that only [ ] or [/] were
visible.

Right. I am going to make this a configurable option in ox-html,
although consensus is that trying to emulate the partial checkbox
([-]) w/ other unicode symbols is too confusing, so we will simply use
an empty ballot box.

You mean no difference between unchecked and partially checked?  If yes, this
is wrong IMO.

I did not search for long, but there should be usable unicode characters. To
name a few:

- U+25EB White square with vertical bisecting line
- U+25F1 White square with lower left quadrant


I think Rick's proposal of treating partially completed checkboxes as 
empty is appropriate. It's kind of the graphical equivalent of the 
floor function.


The problem is that we really need three symbols which clearly and 
unambiguously represent three states of completion: none, partial and 
full. Unicode doesn't seem to give us any triplets like that, and trying 
to kludge otherwise unrelated symbols is not going to be satisfactory.


That said, one possibility that strikes me would be:
U+25A1 White square
U+25E7 Square with left half black
U+25A0 Black square

The drawback, as I see it, is that if only white squares or only black 
squares appear, they would simply look like some kind of stylish bullet 
characters.


-pd


--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




[O] email - TODO items?

2014-01-05 Thread Peter Davis
I've been using org-mode for a few years, but only for a few limited
purposes. I keep TODO lists for work-related stuff, and I compose blog
posts which I then export to HTML, cut from the browser and paste into
Blogger.

Sometimes it's much quicker and easier to email myself notes on things
to do. I'd like to be able to import individual email messages, and
turn them into TODO items in one of my .org files. I use half a dozen
email clients, including mutt, which lets me easily pipe a message to
a script. I figured I could write something that would parse the
message and add a line to a .org file like:

* TODO [[file:subject'.org][subject]]

Then it would create the subject'.org file, insert a standard
preamble I use, and put the body of the email into that
file. (subject' is a filename-safe version of the message's subject
line.)

There are one or two complications, like checking for duplicate file
names, etc., but on the whole, it seems pretty straightforward. I
could do this in Perl relatively quickly. I'm not an elisp guy, but I
imagine there would be a way to pipe the message to emacsclient (or a
temp file) and do it with a macro.

Does something like this already exist? Or is there an easier way?

Thanks very much!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] email - TODO items?

2014-01-06 Thread Peter Davis

On Mon, Jan 6, 2014, at 05:51 AM, Karl Voit wrote:
 * Peter Davis p...@pfdstudio.com wrote:
 
  Sometimes it's much quicker and easier to email myself notes on things
  to do. 
 
 Using email for a todo management system has many disadvantages. I
 read a *lot* about those attempts.
 
 For the purpose you were mentioning, I am using MobileOrg (Android)
 to quickly capture notes about todos. This way, I get those todos in
 my inbox.org and refile them every other day.
 

Thanks for the suggestions. I'll look into them.

Strictly speaking, these are not TODO items, but ideas and notes for
blog posts I may want to write. The email approach has been ok, but
since I typically expand on these short notes in org-mode, it would be
useful to be able to import them directly. But I'll certainly look at
these alternatives.

Thanks!

-pd


-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] email - TODO items?

2014-01-13 Thread Peter Davis
Nick Dokos ndo...@gmail.com writes:

 Brett Viren b...@bnl.gov writes:

 Peter Davis p...@pfdstudio.com writes:

 I use half a dozen email clients, including mutt, which lets me easily
 pipe a message to a script.

 The need to support multiple clients may rule out my suggestion but
 capturing a TODO or a note while visiting a GNUS message and thus
 preserving the link back to the article that spawned my task/idea is
 fantastically useful.

 In your pipe scheme maybe there is some way you can preserve this link
 back.


Thanks, Brett. I've added Gnus to my repertoire, but I'm still just
learning the ropes on that. My current breakdown is:

GMail - GMail Web reader
IMAP - Gnus, Thunderbird, dedicated Web mail app
local MH folders - Mutt, MH


 There were a few discussions about mutt integration with org some years
 back. In particular

   http://thread.gmane.org/gmane.emacs.orgmode/18950

 describes an implementation (or maybe two) of a mutt link type.

 Searching the ML with mutt links will uncover a few more such discussions.

aitor aitors2...@gmail.com writes:

 If you are using mutt, check out this link:

 http://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/


Thanks Nick and aitor. I'm looking into these mutt/org-mode integration
efforts. Looks like what I want may already exist, or at least major
pieces of it.

Thanks all!

-pd



Re: [O] .emacs (init.el) on Dropbox: Ho to access it?

2014-01-18 Thread Peter Davis


On 1/18/14, 1:44 PM, Renato wrote:

Hi,
I use org mode on two pc:
- windows (from work)
- Debian (at home)

How can have just one .emacs/init.el file?

I would store the file on a Dropbox folder that I access from both 
devices.



There are a few options, described in more detail here:

http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html

You can set HOME to point to your Dropbox directory, or use the -u 
command line argument to start emacs with a different init file. Or you 
can put an init file on each machine that simple does


(load /My/Dropbox/folder/.emacs)

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




[O] Nested ordered lists?

2014-01-21 Thread Peter Davis
Is there any way to create nested, ordered lists in org-mode?

I'm thinking of something that would result in:

1) item 1
  a) item 1a
  b) item 1b
  c) item 1c
2) item 2
  a) item 2a
  b) item 2b
3) item 3
4) etc.
...

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Nested ordered lists?

2014-01-21 Thread Peter Davis
On Tue, Jan 21, 2014 at 08:20:07PM +0100, Bastien wrote:
 Hello Peter,
 
 Peter Davis p...@pfdstudio.com writes:
 
  1) item 1
a) item 1a
b) item 1b
c) item 1c
  2) item 2
a) item 2a
b) item 2b
  3) item 3
  4) etc.
  ...
 
 Yes!
 
 (setq org-list-allow-alphabetical t)
 
 Then insert
 
 1) item 1 = M-RET
 2) ...
 
 or
 
 1) item 1
   a) item 1a  = M-RET
   b) ...
 
 HTH,
 
 -- 
  Bastien

Thanks, Bastien, but I seem to be having a problem with this. I tried
setting the variable in my .emacs, but the help says it must be set
before org-mode loads. It then gives a line of code

(when (featurep 'org-element) (load org-element t t))

to set this in a running Emacs, but when I do this, I get

Symbol's value as variable is void: org-drawers

I tried customizing the variable, but the result is the same.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Nested ordered lists?

2014-01-21 Thread Peter Davis
On Tue, Jan 21, 2014 at 02:40:11PM -0500, Peter Davis wrote:
 On Tue, Jan 21, 2014 at 08:20:07PM +0100, Bastien wrote:
  
  (setq org-list-allow-alphabetical t)
  
 
 Symbol's value as variable is void: org-drawers
 

Ok, quitting and re-starting emacs has almost gotten it working. I'm
not getting the error, and I am getting nested lists, but all the
numbering is numeric.

My test file had

#+STARTUP: showeverything logdone
#+options: num:nil

1) item 1
   a) item 1a
   b) item 1b
   c) item 1c
2) item 2
   a) item 2a
   b) item 2b
3) item 3
4) etc.

but my html output had all list items numbered.

ol class=org-ol
liitem 1
ol class=org-ol
liitem 1a
/li
liitem 1b
/li
liitem 1c
/li
/ol
/li
liitem 2
ol class=org-ol
liitem 2a
/li
liitem 2b
/li
/ol
/li
liitem 3
/li
lietc.
/li
/ol


Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-24 Thread Peter Davis


I'm trying to get org-article working so I can create PDFs with 
something other than Computer Modern, but I keep getting the error


Unknown LaTeX class `org-article'

when I use this in the file:

#+LaTeX_CLASS: org-article
#+LaTeX_CLASS_OPTIONS: 
[article,letterpaper,times,12pt,listings-bw,microtype]


I've been following the instructions here:

http://orgmode.org/worg/org-contrib/babel/examples/article-class.html

but I haven't found any way past this error.

I also found the variable org-export-latex-packages-alist was not 
defined, so perhaps that's a clue to some other piece I'm missing? I 
added this to get around that:


(unless (boundp 'org-export-latex-packages-alist)
  (setq org-export-latex-packages-alist nil))

Other ideas?

Thanks!
-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-24 Thread Peter Davis
On Fri, Jan 24, 2014 at 01:58:19PM +0100, Michael Strey wrote:
 Peter,
 
 p...@pfdstudio.com writes:
 
  Other ideas?
 
 Did you check the availability of org-article.cls in the TeX tree
 using `kpsewhich org-article.cls'?

Yes, I get:

[pdavismbp15:~] pdavis% kpsewhich org-article.cls
/usr/local/texlive/2012/../texmf-local/tex/latex/base/org-article.cls

 
 Do you have an entry for org-article in org-export-latex-classes?

Yes, like this:

(add-to-list 'org-export-latex-classes
  '(org-article
 \\documentclass{org-article}
 [NO-DEFAULT-PACKAGES]
 [PACKAGES]
 [EXTRA]
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))

I don't even know if this error is coming from emacs or LaTeX. 

Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-24 Thread Peter Davis
On Fri, Jan 24, 2014 at 04:32:38PM +, Eric S Fraga wrote:
 Peter Davis p...@pfdstudio.com writes:
 
 [...]
 
  Do you have an entry for org-article in org-export-latex-classes?
 
  Yes, like this:
 
  (add-to-list 'org-export-latex-classes
'(org-article
 
 what version of org are you using?  in org v8, this variable has been
 renamed to org-LaTeX-classes.

Aha! I'm using org 8.2.3c, and substituting org-latex-classes and 
org-latex-packages-alist
worked! (NB: the variable names are all lower case.)

Thank you!

-pd

-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-24 Thread Peter Davis
On Fri, Jan 24, 2014 at 01:54:20PM -0500, Peter Davis wrote:
 On Fri, Jan 24, 2014 at 04:32:38PM +, Eric S Fraga wrote:
  Peter Davis p...@pfdstudio.com writes:
  
  [...]
  
   Do you have an entry for org-article in org-export-latex-classes?
  
   Yes, like this:
  
   (add-to-list 'org-export-latex-classes
 '(org-article
  
  what version of org are you using?  in org v8, this variable has been
  renamed to org-LaTeX-classes.
 
 Aha! I'm using org 8.2.3c, and substituting org-latex-classes and 
 org-latex-packages-alist
 worked! (NB: the variable names are all lower case.)
 

Ok, something weird is going on. This worked on my office MacBook, but when I 
try on the home one, also with org 8.2.3c, org-export-latex-classes is defined, 
but org-latex-classes is not.

Any clues?

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-25 Thread Peter Davis
On Sat, Jan 25, 2014 at 12:34:34PM +, Eric S Fraga wrote:
 Peter Davis p...@pfdstudio.com writes:
 
 [...]
 
  Ok, something weird is going on. This worked on my office MacBook, but
  when I try on the home one, also with org 8.2.3c,
  org-export-latex-classes is defined, but org-latex-classes is not.
 
  Any clues?
 
 this sounds like a mixed installation.  do you have an old version of
 org lying around, maybe as part of the emacs installation?  are the two
 systems running different versions of emacs?
 

Both running emacs 24.3.1, same build

 where does M-x find-library RET org RET take you?

locate-library shows

~/.emacs.d/elpa/org-20140104/org.elc

on the home machine, and

~/.emacs.d/elpa/org-20131118/org.elc

on the work machine. But both show org-version as 8.2.3c, and the work machine, 
with the seemingly older org folder, seems to have the newer variable names.

Maybe .../org-mmdd/org.elc just reflects the installation date?

Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-26 Thread Peter Davis
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Peter Davis p...@pfdstudio.com writes:

 [...]

  Ok, something weird is going on. This worked on my office MacBook, but
  when I try on the home one, also with org 8.2.3c,
  org-export-latex-classes is defined, but org-latex-classes is not.
 
  Any clues?
 
 this sounds like a mixed installation.  do you have an old version of
 org lying around, maybe as part of the emacs installation?  are the two
 systems running different versions of emacs?
 

 Both running emacs 24.3.1, same build

 Ummm, strange.  What happens if you 
   
   C-h v org-export-latex-classes RET

 e.g.  does it show is a variable defined in  some file?  If so, where
 do you end up if you hit RET on that file name?

It does say the variable is define in org-latex.el, and clicking on that
name takes me to the definition in org-latex.el.gz.

Perhaps that one file is out of sync somehow? Strange.

Thanks,
-pd



[O] Exporting text

2014-01-26 Thread Peter Davis
Well, I don't know how messed up my org-mode installation is, but in addition 
to my problems with LaTeX, even text exporting fails. When I try C-c C-e t A, I 
get:

Symbol's value as variable is void: org-drawers

Any clues what the problem might be?

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export: Unknown LaTeX class `org-article'

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 09:55:52AM +, Eric S Fraga wrote:
 Peter Davis p...@pfdstudio.com writes:
 
 [...]
 
  It does say the variable is define in org-latex.el, and clicking on that
  name takes me to the definition in org-latex.el.gz.
 
 Just to confirm what Nick has said: this file is out of date.  There is
 no org-latex.el in v8 of org.  The equivalent file is now
 ox-latex.el.  Check your load-path to ensure you load the right version
 of org.  Maybe put a (require 'ox-latex)  in your initialisation as
 well.

Thanks!

Unfortunately, something seems very screwed up on my system. I installed OS X 
emacs 24.3.1, which included org-mode 7-something.

Last November, I installed org-mode 8-something via git.

Earlier this month, I updated to org-mode 8.2.5a via the emacs package 
installer.

Somehow, in the course of this, I must have left remnants lying around which 
are incorrect. Now org-version tells me it's 8.2.5a. However, the variable 
org-latex-classes is not defined, so my .emacs file is failing. I'm trying to 
set this variable in order to use the org-article class, as described here:

http://orgmode.org/worg/org-contrib/babel/examples/article-class.html

(Earlier today, I explicitly renamed the original org-mode 7 directory that 
came with emacs so it would no longer be on the search path. I then explicitly 
added the org-mode 8.2.5a directory to the search path. I guess emacs package 
management still leaves of lot of manual cleaning up to do.)

I'm open to any and all suggestions on how to clean this up.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 10:05:29AM -0500, Peter Davis wrote:
 
  I suggest you install Org through git, as explained in the manual.
  
  Don't forget to ~$ make autoloads or just ~$ make
  
 
 I'll try re-installing via git.
 

Ok, I tried making org from git, but I'm still having problems with
latex. When I start emacs, I get 

Symbol's value as variable is void: org-latex-classes

NOTE that when I try locate library, I still see the elpa location

Library is file ~/.emacs.d/elpa/org-20131118/org.elc

Though I don't know how that's even getting in the load path. It's not
in my .emacs anywhere. Something else? Is desktop saving this
out-of-date load somehow?

GNU Emacs 24.3.1
org version 8.2.5g

Thanks!
-pd



-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Sun, Jan 26, 2014 at 11:14:28PM +0100, Bastien wrote:
 Hi Peter,
 
 Peter Davis p...@pfdstudio.com writes:
 
  Well, I don't know how messed up my org-mode installation is, but in
  addition to my problems with LaTeX, even text exporting fails. When I
  try C-c C-e t A, I get:
 
  Symbol's value as variable is void: org-drawers
 
  Any clues what the problem might be?
 
 You don't give us a lot to chew on :)

Sorry.

 How did you install Org?

Org 7.something came with the OS X emacs 24.3.1 that I installed. In
November, I installed org 8 using git. Earlier this month, I installed
the 1/4/2014 update using the emacs package installer. I'm guessing
that last was what screwed me up.

 I suggest you install Org through git, as explained in the manual.
 
 Don't forget to ~$ make autoloads or just ~$ make
 

I'll try re-installing via git.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 11:19:09AM -0500, Peter Davis wrote:
 On Mon, Jan 27, 2014 at 10:05:29AM -0500, Peter Davis wrote:
  
   I suggest you install Org through git, as explained in the manual.
   
   Don't forget to ~$ make autoloads or just ~$ make
   
  
  I'll try re-installing via git.
  
 
 Ok, I tried making org from git, but I'm still having problems with
 latex. When I start emacs, I get 
 
 Symbol's value as variable is void: org-latex-classes
 
 NOTE that when I try locate library, I still see the elpa location

Ok, so two other changes seem to have me working again:

1) move the elpa directory out of the way, and
2) explicitly load ox-latex

Now emacs starts up without errors, and I can export to latex without
errors.

However, the latex output looks like complete rubbish ... just
headers, overlapping each other vertically.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 12:00:52PM -0500, Nick Dokos wrote:
 
 Use a minimal .emacs, something like this (adjust path to suit your
 situation):
 
 --8---cut here---start-8---
 (add-to-list 'load-path ~/src/emacs/org/org-mode/lisp)
 
 (require 'org-loaddefs)
 --8---cut here---end---8---

Thanks, Nick,

I had to use this to get all the org-... stuff defined:

--8---cut here---start-8---
(add-to-list 'load-path ~/src/org-mode/lisp)
(add-to-list 'load-path ~/src/org-mode/contrib/lisp)
;;(add-to-list 'load-path ~/src/emacs/org/org-mode/lisp)
(require 'org-loaddefs)
(require 'ox-latex)
(add-to-list 'org-latex-classes
  '(org-article
 \\documentclass{org-article}
 [NO-DEFAULT-PACKAGES]
 [PACKAGES]
 [EXTRA]
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))
--8---cut here---end---8---


 
 Then  start emacs with
 
emacs -q -l /path/to/minimal/.emacs
 
 Visit an org file and try latex exporting. If that works, then
 your init file is screwed up. If it doesn't, then your org-mode
 installation is screwed up.

The output is still screwed up, in what appears to be the same way.

Interestingly, the .tex file looks ok, at least from a cursory glance,
but most of its contents don't show up on the PDF. I tried compiling
it from the command line, but it didn't understand \hyperset{...} and
perhaps some other things, so I'm assuming org prepends some
definitions. 

The org file starts with:

--8---cut here---start-8---
#+STARTUP: showeverything logdone
#+options: num:nil
#+OPTIONS:   H:5 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t :t
#+LaTeX_CLASS: org-article
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
--8---cut here---end---8---

The org-article class is from:

http://orgmode.org/worg/org-contrib/babel/examples/article-class.html


Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 01:06:53PM -0500, Nick Dokos wrote:
 
 ...what happens if you replace org-article with just plain boring old
 article? 
 

Yeah, that worked. Unfortunately, though, I didn't get the Times font
I was after.

Actually, Times was just going to be a stepping stone to what I really
want ... a) sans-serif headings and b) Palatino as the base font.

I'd welcome any suggestions on how to achieve those.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 05:09:02PM -0500, Nick Dokos wrote:
 
 Why were you using org-article in the first place? Was it supposed to
 help with the font choices? Bear in mind that I know nothing about
 org-article.

I found org-article when trying to find out how to control fonts,
etc. Basically, I have my own LaTeX template I use when
hand-constructing documents, and I was hoping to be able to use those
same settings when org creates a LaTeX document for me. I thought
org-article would give me that degree of control, but it probably
hasn't been updated since some prior version of org (based on the
variable names), and so is probably broken.

 
 So you have a choice to make: either fix org-article and continue using
 it or throw it away and find some other way to do what you want.
 
 For example, all you have to do to get Times is
 
 #+LATEX_HEADER: \usepackage{times}
 
 Getting finer control should also be possible using basic latex
 techniques. Whether that's a better way to go is of course
 debatable: it depends on a lot of variables.

Since most of these settings I'll want to use in *all* my documents,
putting all the parameters in each org file would be pretty
tedious. I'll keep looking for a more elegant solution. I'll be happy
to post here when I find something (that works!)

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Exporting text

2014-01-27 Thread Peter Davis
On Mon, Jan 27, 2014 at 03:41:29PM -1000, Thomas S. Dye wrote:
 Aloha Peter,

Aloha!

 
 The Koma scripts for LaTeX use sans-serif headings.  Try this:

Excellent! Thank you, Thomas!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

I can place images in my document, suitably scaled, with constructs like:

#+ATTR_LATEX: :height 4.5cm
[[/path/to/image.jpg]]

However, if I try to put two images side-by-side:

#+ATTR_LATEX: :height 4.5cm
| [[/path/to/image1.jpg]] | [[/path/to/image2.jpg]] |

the height attribute is ignored.

Is there a way to do this?

Thanks!

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

Hi, Bastien,

On 1/29/14, 7:00 PM, Bastien wrote:


Is there a way to do this?

Not really.  But you can use `org-latex-image-default-height'
for all pictures in your file.

Thanks. I don't think setting an emacs variable is going to work for me. 
Too much manual setting/unsetting. I may give it a try if I get 
desperate though.


Thanks!
-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis
On Wed, Jan 29, 2014 at 06:29:37PM -0600, John Hendy wrote:
 
 This has come up before, and the answer is that it's not currently
 possible with just Org. See the following [probably] duplicate
 questions:
 - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
 - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html
 
 There were some suggestions there you might try (e.g. using the LaTeX
 subfig package).

Thanks, John. I'll take a look.

Meanwhile. for the current need, I'll probaby just compose the images
in Photoshop or GIMP, and place the resulting composite in the
document.

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Arranging images on a LaTeX page?

2014-01-30 Thread Peter Davis
On Thu, Jan 30, 2014 at 08:59:11AM +0100, Andreas Leha wrote:
 
 This is not solving your original problem.  But the following might
 spare you from some manual work.  It is a simple hack that uses
 =imagemagick= to do the side-by-side composition.

Thanks very much, Andreas! This is a real education in what org-mode can do.

For my current needs, the images are different sizes and aspect ratios, so I'm 
probably better off laying them out by hand.

But I'm definitely saving this example for future reference.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] LaTeX export controls

2014-01-30 Thread Peter Davis
I'm finding the documentation on LaTeX export a bit thin. Where, for example, 
does the author's name come from? I noticed my documents do have my correct 
name, but I don't know where it's coming from. I want to add some information. 
I tried

#+LATEX_HEADER: \author{Peter Davis (addl info)}

but it seemed to have no effect.


Thank you!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] LaTeX export controls

2014-01-31 Thread Peter Davis


On 1/30/14, 9:04 PM, John Hendy wrote:
#+author: Peter Davis (addl info) 


Aha! That also lead me to #+title:, which I also needed.

Thank you! I kept looking for LaTeX-specific options, instead of more 
global export ones.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Emacs Mac Port

2014-02-13 Thread Peter Davis
On Wed, Feb 12, 2014 at 09:26:42PM -0600, Marcelo de Moraes Serpa wrote:
 Hey guys,
 
 If you are on a Mac, you *should* start using this:
 
 https://github.com/railwaycat/emacs-mac-port
 
 I've been having some serious issues with the vanilla Cocoa Emacs lately on 
 Mavericks, including a nasty memory leak that would somehow trigger distnoted 
 and put the CPU usage
 at 100% every hour or so.
 
 Besides being quite stable, it has some nice usability improvements made 
 specifically to make Emacs integrate better with OSX. My orgmode experience 
 has been much better since
 I started using it!
 
 Thought I'd share :)

Wow! Thanks, Marcelo. If this is indeed the cause of the performance
problems I've been seeing, this will save me many agonizing hours. I
never suspected emacs in these problems, but I've certainly seen
distnoted turn into a complete CPU hog. I have emacs running all the
time, so if that's the cause, this will be a huge relief.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Space around tables in LaTeX export?

2014-02-14 Thread Peter Davis
I'm trying to export a document to PDF via LaTeX, but my tables appear with no 
preceding or trailing whitespace, even if I put several blank lines before and 
after. For example:

---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---
blah blah blahbeddy-blah and still more blah


|+--+|
|| Some | Stuff  |
|+--+|
| First row  | yes  | n/a|
| 2nd row| no   | maybe  |
|+--+|


blah blah blahbeddy-blah and still more blah
---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---cut---

In the resulting PDF, there's no space between the table and the surrounding 
text.

I couldn't find anything here 
[[http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-13]] on how 
to fix this.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Space around tables in LaTeX export?

2014-02-14 Thread Peter Davis
On Fri, Feb 14, 2014 at 12:18:20PM -0500, Charles Millar wrote:
 Peter Davis wrote:
 In the resulting PDF, there's no space between the table and the surrounding 
 text.
 how about
 
 #+BEGIN_LATEX
 \vspace{/somelength}/
 #+END_LATEX
 

Ok, but I was hoping for a more org-mode-y solution.

Thanks!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Space around tables in LaTeX export?

2014-02-14 Thread Peter Davis
On Fri, Feb 14, 2014 at 06:27:28PM +0100, Rasmus wrote:
 
 It will become a float if you give it a caption.  That's probably what
 you want.  You can still force it to be at a particular location.
 

Ah! Yes, that works, even with a blank caption.

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Tables with line wrapping?

2014-02-22 Thread Peter Davis
I'm using org-mode to prepare a document that will ultimately be
exported to PDF. Unfortunately, I need to include a table whose contents
will wrap as needed. The options I can see are:

1) Do everything I can in org-mode, then export and edit the
intermediate .tex file, or

2) Create the table with some other tool, and include it as an image
into the org document

Am I missing anything? Are there other (better?) ways? As I expect to be
revising both the table and the rest of the document for a while, the
uni-directional workflow in #1 above would be difficult.

Thanks!

-pd


-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Tables with line wrapping?

2014-02-22 Thread Peter Davis
On Sat, Feb 22, 2014 at 11:01:45AM -1000, Thomas S. Dye wrote:
 
 You can set the :align attribute.  Something like this will wrap the
 second column in the pdf file:
 
   #+ATTR_LATEX :align lp{6cm}
   | col | wrapcol |

Hi, Thomas,

Excellent! Sorry I was completely unaware of this. That solves my problem 
perfectly.

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Tables with line wrapping?

2014-02-22 Thread Peter Davis
On Sat, Feb 22, 2014 at 01:05:34PM -0800, Richard Lawrence wrote:
 
 What about just maintaining the table as an embedded LaTeX block? e.g.
 
 ... your Org text here ...
 #+BEGIN_LATEX
 \begin{tabular} % or wrap with \begin{table} if you need, etc.
 % ...
 \end{tabular}
 #+END_LATEX
 
 That way, at least, you can edit your document and the table at the same
 time and in the same file, though it means giving up Org's nice table
 editing features.

Thank you, Richard! I was not aware of this, but it seems like it would have a 
slew of uses. (My first thought it to embed pstricks graphics into my 
documents, but then I'd have to bypass pdflatex and use xelatex or something 
instead.)

Thank you!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Tables with line wrapping?

2014-02-23 Thread Peter Davis
On Sun, Feb 23, 2014 at 10:30:57AM +0530, Jambunathan K wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  I'm using org-mode to prepare a document that will ultimately be
  exported to PDF. Unfortunately, I need to include a table whose contents
  will wrap as needed.
 
 You can export to PDF via ODT.  Use list tables.  See the links at the
 end of the following post.
 

Hi, Jambunathan,

This looks really interesting also. Is this feature going to fund its way to 
the trunk at some point?

Thanks!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Include on file open?

2014-02-25 Thread Peter Davis

I'd like to put a kind of menu bar at the top of most of my .org pages, so I 
can quickly jump around the most commonly edited files. I can do something like:

| [[file:first.org][first]] | [[file:second.org][second]] | ...

and simply include that in all my files. However, if I change the menu, I have 
to go back and update all those files. A better approach would be to include an 
up-to-date menu file
when each org file is opened, and maybe even reload to update the menu.  
However, the #+INCLUDE: option only works at export time.

Is there a way to automatically include an external file when I open/reload a 
.org file? Or is there a better way to create a menu or frequently visited 
files?

Thanks!
-pd

-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Include on file open?

2014-02-26 Thread Peter Davis
On Wed, Feb 26, 2014 at 02:07:22PM +0800, Eric Abrahamsen wrote:
 
 I think org-toc in the contrib/lisp directory is meant to do just this,
 automatically. I haven't tried it, though...
 


Ah! Excellent!

Thanks very much!

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] trunc fill modes?

2014-02-27 Thread Peter Davis

This is probably more an emacs question than org-mode, but ...

On my MacBook Pro at work, running Aquamacs 3.0a, in Org mode the mode 
line shows


Org Trunc Fill

However, on my MacBook at home, it shows

Org Trunc Spc

I like the way the first one works. How can I make the second one have 
the same modes by default as the first?


Thanks!

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




[O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


I'm writing a short paper containing tables, images, etc., but I'm 
getting a blank page in the PDF output. That is, it's completely blank 
*except* for the page number.


Any suggestions on how to trouble-shoot or fix this?

If I could get rid of the page number on the blank page, I would just 
delete the page in Acrobat, but as it is, that would leave pages 1-5, 7-9.


Thanks!

-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 12:03 PM, John Hendy wrote:

On Fri, Feb 28, 2014 at 10:59 AM, Peter Davis p...@pfdstudio.com wrote:

I'm writing a short paper containing tables, images, etc., but I'm getting a
blank page in the PDF output. That is, it's completely blank *except* for
the page number.

Any suggestions on how to trouble-shoot or fix this?

Probably related to image/table float placement. I've had an image on
one page trigger a blank page after it, and if your options or the
size of the image on the next place won't fit on a single page, it
might be skipping that blank one entirely and moving along to the
next.

Is it possible to share the document, or could you try to copy that
.org file, remove the contents of p. 1-4 and 8-9, and then share the
.org file that generates pages 5, 6 (blank), and 7?


Thanks, John. I figured it has something to do with LaTeX float 
behavior, but I'm trying to understand how to control it through 
org-mode. I'm attaching a small sample that reproduces the problem.


Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

#+STARTUP: showeverything logdone
#+options: num:nil
#+OPTIONS:   H:5 num:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t :t
#+LaTeX_CLASS: koma-article
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
#+LATEX_HEADER: \setlength{\topsep}{-10pt}
#+LATEX_HEADER: \setlength{\partopsep}{0pt}
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+author: Peter Davis (pdavis)
#+title: My Title

#+ATTR_LATEX: :height 5in
[[/Users/peterdavis/Dropbox/Tufts/COMP171/force_a_page_break.png]]

#+ATTR_LATEX: :height 6cm
[[/Users/peterdavis/Dropbox/Tufts/COMP171/AS3_2.png]]

/NOTE:/ User actions are indicated in lowercase letters. Software responses are 
indicated in UPPERCASE LETTERS.

* Lexical Analysis

The following table contains the word blah a lot.

#+CAPTION:
#+ATTR_LATEX: :align lp{2.75in}p{2.75in}
|+--+-|
| *blah* | *blah blah blah* | 
*blah blah blah blah*   |
|+--+-|
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
|+--+-|

* Storyboard

#+ATTR_LATEX: :height 8.5in
[[/Users/peterdavis/Dropbox/Tufts/COMP171/Storyboard.png]]



Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 12:26 PM, Peter Davis wrote:


Thanks, John. I figured it has something to do with LaTeX float 
behavior, but I'm trying to understand how to control it through 
org-mode. I'm attaching a small sample that reproduces the problem.




I'd also like to get rid of that stupid empty table of contents, which 
may in itself solve the problem.


Thanks!
-pd


--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 12:37 PM, John Hendy wrote:

I was going to try and get back to you quickly, but I don't have
koma-article defined and don't have the images you're using, so I
won't be much help to you. Intuitively, I'd suggest you try playing
with the image sizes to see if you can shrink them and make the
problem go away.


Thanks, John. You shouldn't need the images, since their heights are 
specified in the .org file. But I guess it would not be reproducible 
without koma-article.




You can also try:

#+latex: \scriptsize % or \small, \footnotesize, or \tiny

before your table to make it smaller as well if you think that's contributing.


These seem like things to try after the content is completely locked 
down. Any edits after this could conceivably re-introduce the problem, 
requiring further tweaks.



Just saw your other email come in, and the TOC will be fixed by
modifying your existing options at the top of the document:

#+options: num:nil toc:nil


Thanks again! Yes, this works, and seems to eliminate the blank page 
(for now)!


Cheers,
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 1:19 PM, Peter Davis wrote:


On 2/28/14, 12:37 PM, John Hendy wrote:

You can also try:

#+latex: \scriptsize % or \small, \footnotesize, or \tiny

before your table to make it smaller as well if you think that's 
contributing.


These seem like things to try after the content is completely locked 
down. Any edits after this could conceivably re-introduce the problem, 
requiring further tweaks.




I just found that adding or removing num:nil from the #+options: 
changes whether or not the blank page appears. I would have thought 
header numbering only affects horizontal line length (None of the 
headers wrap to more than one line), but apparently I'm wrong. Setting 
toc:nil got rid of the blank page, but removing num:nil 
re-introduced it.


Weird.

Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 7:38 PM, Nick Dokos wrote:

John is correct, I think, although latex's behavior in leaving an empty
page does not make much sense to me. Nevertheless, when I reduce
the height of the last image to less than about 7.85 inches, the empty
page goes away. AFAICT, num: and toc: settings do not affect this
behavior.



Thanks, Nick, but I have confirmed that adding num:nil eliminates the 
blank page, and removing that re-introduces the blank page. No other 
changes to the .org file were made. I was wondering if LaTeX has some 
predisposition to handle numbered section headings differently from 
unnumbered ones as far as pagination.


I'll try to make a simple, clean sample that reproduces it, but it's 
going to take some trial-and-error testing.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis
Attached is a simple file that demonstrates this. As is, it does not 
leave a blank page. But if you remove the num:nil option from the second 
line of this file, you do get a blank page.


You (probably) need koma-article class for this. (I didn't install 
anything. It just worked for me.) You don't need the images.


-pd

On 2/28/14, 8:21 PM, Peter Davis wrote:


On 2/28/14, 7:38 PM, Nick Dokos wrote:

John is correct, I think, although latex's behavior in leaving an empty
page does not make much sense to me. Nevertheless, when I reduce
the height of the last image to less than about 7.85 inches, the empty
page goes away. AFAICT, num: and toc: settings do not affect this
behavior.



Thanks, Nick, but I have confirmed that adding num:nil eliminates the 
blank page, and removing that re-introduces the blank page. No other 
changes to the .org file were made. I was wondering if LaTeX has some 
predisposition to handle numbered section headings differently from 
unnumbered ones as far as pagination.


I'll try to make a simple, clean sample that reproduces it, but it's 
going to take some trial-and-error testing.


-pd



--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

#+STARTUP: showeverything logdone
#+options: num:nil toc:nil

#+LaTeX_CLASS: koma-article
#+LATEX_HEADER: \setlength{\parskip}{2ex plus 4pt minus 2pt}
#+LATEX_HEADER: \setlength{\parindent}{0pt}
#+LATEX_HEADER: \renewcommand{\baselinestretch}{1.0}
#+LATEX_HEADER: \setlength{\topsep}{-10pt}
#+LATEX_HEADER: \setlength{\partopsep}{0pt}
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+author: Peter Davis (pdavis)
#+title: My Title

#+ATTR_LATEX: :height 6in
[[/Users/peterdavis/force_a_page_break.png]]

#+ATTR_LATEX: :height 6cm
[[/Users/peterdavis/AS3_2.png]]

/NOTE:/ User actio]ns are indicated in lowercase letters. Software responses 
are indicated in UPPERCASE LETTERS.

* Lexical Analysis

The following table contains the word blah a lot.

#+CAPTION:
#+ATTR_LATEX: :align lp{2.75in}p{2.75in}
|+--+-|
| *blah* | *blah blah blah* | 
*blah blah blah blah*   |
|+--+-|
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
| blah   | blah blah blah   | 
blah blah blah blah |
|+--+-|

* Storyboard

#+ATTR_LATEX: :height 8.5in
[[/Users/peterdavis/tall_image.png]]



Re: [O] Blank page in LaTeX/PDF output

2014-02-28 Thread Peter Davis


On 2/28/14, 10:32 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


Attached is a simple file that demonstrates this. As is, it does not
leave a blank page. But if you remove the num:nil option from the
second line of this file, you do get a blank page.


Not for me: in both cases, I get a blank page 3.

Interesting. I wonder what's different in our setups.


You (probably) need koma-article class for this. (I didn't install
anything. It just worked for me.) You don't need the images.


You need *some* images in order to compile it. I just replaced all
the image links with

[[./foo.png]]


I did not need any images. In fact, the version I posted I had just 
tested, and the image links in there are completely bogus. I just get 
empty boxes of the height I specified.



where foo.png is the emacs logo.

And my koma-article is a copy of the article class, except the document class
is scrartcl instead of article.


I don't know where that came from. I can post my copy of koma-article, 
if that would help.


-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Blank page in LaTeX/PDF output

2014-03-01 Thread Peter Davis


Here are the two LaTeX files. The only differences, apart from creation 
time, are the the use of \section* instead of \section, so perhaps this 
is a LaTeX bug.


Anyone know how to report that?

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



no-blank-page-bug.tex
Description: TeX document


blank-page-bug.tex
Description: TeX document


Re: [O] Blank page in LaTeX/PDF output

2014-03-03 Thread Peter Davis

On Sat, Mar 1, 2014, at 02:19 PM, John Hendy wrote:
 I can confirm Peter's results, ...

Thanks, John.

 
 I searched things like latex page break 'section*' vs section with
 no obvious lead on why the two section styles would be different.
 Regarding a bug report, if that's what this is, I just googled latex
 bugs and got this page as the first hit:
 - http://latex-project.org/bugs.html
 


Unfortunately, that site says they can't accept bugs that use any third
party packages, and the org-exported LaTeX file starts:

\documentclass[article,letterpaper,times,12pt,listings-bw,microtype]{scrartcl}
   \usepackage{microtype}
\usepackage{mathpazo}
   \usepackage[scale=.9]{tgheros}
   \usepackage{tgcursor}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}


Thanks!
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com



Re: [O] Blank page in LaTeX/PDF output

2014-03-03 Thread Peter Davis
On Mon, Mar 03, 2014 at 07:08:35PM -0600, John Hendy wrote:
 
 On Mar 3, 2014 6:51 PM, Peter Davis p...@pfdstudio.com wrote:
 
 
  On Sat, Mar 1, 2014, at 02:19 PM, John Hendy wrote:
   I can confirm Peter's results, ...
 
  Thanks, John.
 
  
   I searched things like latex page break 'section*' vs section with
   no obvious lead on why the two section styles would be different.
   Regarding a bug report, if that's what this is, I just googled latex
   bugs and got this page as the first hit:
   - http://latex-project.org/bugs.html
  
 
 
  Unfortunately, that site says they can't accept bugs that use any third
  party packages, and the org-exported LaTeX file starts:
 
 
 Can you delete all of those lines, recompile with pdflatex, and still 
 reproduce?
 
 If so, you're still good to go!
 

Unfortunately, it gets a lot of errors if I remove all the \usepackage lines, 
and I don't know which packages are third party or not.

-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Blank page in LaTeX/PDF output

2014-03-04 Thread Peter Davis

On Mon, Mar 3, 2014, at 10:46 PM, John Hendy wrote:
[snip]
 On Mon, Mar 3, 2014 at 7:13 PM, Peter Davis p...@pfdstudio.com wrote:
 From my fiddling:
 - As-is produces 4 pages, blank 3rd
 - Commenting out the hyperref package does *not* produce a blank 3rd page
 - Using \section* does *not* product a blank 3rd page

Thanks, John. It certainly seems that hyperref is at least partially to
blame here. I'll have to check on what the developers consider a 3rd
party package. hyperref itself loads a bunch of other packages, so it
gets very complicated.

 I added a comment linking to Wikipedia's Linux penguin that I used as
 ./image.png, just to make sure it wasn't possibly related to errors
 related to no image being found.

I first saw the problem when I was using actual images, so I knew it
wasn't that.

 I wondered if it had something to do with the numbered sections being
 treated as links (since hyperref was the culprit package). I fiddled
 with removing \label{sec-n}, but that didn't have an effect. I
 wondered if that was triggering something due to it having links sort
 of ready for the TOC even though none is present... no idea!

Seems plausible.

 Anyway, as long as graphicx and hyperref are not considered 3rd
 party, I think you could still submit the report. You may be told
 that since there are overfull hbox and vbox's that it's not their
 problem, but I'd still expect the results to be the same with \section
 vs. \section*, and with[out] hyperref.

Thanks again, John. I'll look into this and report back whatever I find.

Best,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com



[O] In-line code, italics, quotation marks, etc.

2014-03-04 Thread Peter Davis
I'm trying to create an org page that contains a list of instructions, some of 
this include code and/or URLs. I'm having a dickens of a time trying to get 
this to format correctly,
and the documentation isn't much help. For example:

 - I want to have a numbered list with some of the steps being or containing 
code, in monospaced text:

 7) =something abc=

   However, the second quote seems to prevent the =...= notation from being 
recognized.

 - I want a URL that does NOT get converted to a link, and in which I can place 
italics to indicate that parts of the sample URL should be replaced with other 
text:
   http://localhost:port number/path/to/file/file.html
   In this case, port number and probably /path/to/file/ should be 
italicized.

 - Of course, combining these, I get situations like:
   =var str1 = replace me some other text.=
   Embedded equal signs, quotation marks and emphasized text make this a 
nightmare.

Can this be done, or is this just more complicated than org was designed to 
handle? I can, of course, edit the exported files, but that's pretty limiting.

Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Tables with line wrapping?

2014-03-08 Thread Peter Davis

On Sat, Mar 8, 2014, at 08:08 PM, Marcin Borkowski wrote:
 Dnia 2014-02-22, o godz. 23:08:23
 Peter Davis p...@pfdstudio.com napisał(a):
 
  [...] but then I'd have to bypass pdflatex and
  use xelatex or something instead.)
 
 Or not.  http://www.ctan.org/pkg/pdftricks
 

Interesting! I'll definitely have a look at this.

Thank you!

-pd


-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com



Re: [O] Hiring a programmer

2015-01-12 Thread Peter Davis
Yuri Niyazov yuri.niya...@gmail.com writes:

 I'd like to hire a programmer to hack on some things in org-mode for
 my use. If these improvements are contributed back the main org-mode
 repository, would the copyright assignment have to come from me, or
 from the programmer?

It actually depends on the terms of hiring. In the U.S., a work for
hire contract means you own all rights to the results of the work, so
assigning rights to someone else would come from you.

Other arrangements are possible, and you can specify in the terms who
owns what rights, assuming your programmer agrees.

-pd




[O] Vertically aligning table row contents

2015-01-06 Thread Peter Davis
I'm trying to create a simple two-column table. The left column will 
show images of symbols used in the document, and the right column will 
explain what those images mean. So far, I have


--8---cut here---start-8---

#+MACRO:  p   \includegraphics[scale=.35]{$1}
#+CAPTION: Document Symbols
#+ATTR_LATEX: :align lp{5in} :float nil :border 2 :frame border
| {{{p(./GreenDot.png)}}}  | This symbol indicates that the associated 
item is in a /normal/ or /successful/ state. |
| {{{p(./YellowDots.png)}}} | This symbol denotes a state of /concern/ 
or /potential trouble/ for the associated item.   |
| {{{p(./RedDots.png)}}}   | This symbol indicates that the associated 
item is in a /severely troubled/ or /non-functioning/ state. |


--8---cut here---end---8---


But what I'm getting is:

misaligned table

Is there a way to get both columns centered?

Thank you.

-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Vertically aligning table row contents

2015-01-06 Thread Peter Davis


On 1/6/15 7:14 PM, John Hendy wrote:



On Jan 6, 2015 5:52 PM, Peter Davis p...@pfdstudio.com 
mailto:p...@pfdstudio.com wrote:


 I'm trying to create a simple two-column table. The left column will 
show images of symbols used in the document, and the right column will 
explain what those images mean. So far, I have


 --8---cut here---start-8---

 #+MACRO:  p   \includegraphics[scale=.35]{$1}
 #+CAPTION: Document Symbols
 #+ATTR_LATEX: :align lp{5in} :float nil :border 2 :frame border
 | {{{p(./GreenDot.png)}}}  | This symbol indicates that the 
associated item is in a /normal/ or /successful/ state. |
 | {{{p(./YellowDots.png)}}} | This symbol denotes a state of 
/concern/ or /potential trouble/ for the associated item.   |
 | {{{p(./RedDots.png)}}}   | This symbol indicates that the 
associated item is in a /severely troubled/ or /non-functioning/ state. |


 --8---cut here---end---8---


 But what I'm getting is:



 Is there a way to get both columns centered?


Assuming you mean vertically?



Yes, I did mean vertically. Sorry.

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Vertically aligning table row contents

2015-01-06 Thread Peter Davis


On 1/6/15 7:19 PM, John Hendy wrote:


The top three Google hits for align images and text table latex seem 
helpful. The first two suggest \raisebox.


Hopefully they help!
John




Thanks, John. Is there an org-mode way to do this?

Thank you.

-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Vertically aligning table row contents

2015-01-06 Thread Peter Davis


On 1/6/15 9:33 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


Maybe that's the right track, but the obvious solution doesn't seem to work:

--8---cut here---start-8---

#+MACRO:  p   \raisebox{-.5\height}{\includegraphics[scale=.35]{$1}}

Try

#+MACRO: p @@latex:\raisebox{-.5\height}{\includegraphics[scale=.35]{$1}}@@

See (info (org) Quoting LaTeX code)
That's it! I'm afraid the original macro definition was taken from an 
earlier response on this list, and I used it without totally 
understanding its details.


Thank you!
-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Vertically aligning table row contents

2015-01-06 Thread Peter Davis


On 1/6/15 8:15 PM, John Hendy wrote:



On Jan 6, 2015 7:00 PM, Peter Davis p...@pfdstudio.com 
mailto:p...@pfdstudio.com wrote:



 On 1/6/15 7:19 PM, John Hendy wrote:


 The top three Google hits for align images and text table latex 
seem helpful. The first two suggest \raisebox.


 Hopefully they help!
 John



 Thanks, John. Is there an org-mode way to do this?


I've not used macros, but could you just add the raisebox code to it?

Like ... \raisebox{0.5\height}{\includegraphics[...]{$1}

instead of the current?

Just a stab in the dark as I'm unfamiliar with you org tackle code and 
the latex solution!


John



Maybe that's the right track, but the obvious solution doesn't seem to work:

--8---cut here---start-8---

#+MACRO:  p   \raisebox{-.5\height}{\includegraphics[scale=.35]{$1}}
#+CAPTION: Document Symbols
#+ATTR_LATEX: :align lp{5in} :float nil :border 2 :frame border
| {{{p(./GreenDot.png)}}}   | This symbol indicates that the associated 
item is in a /normal/ or /successful/ state. |
| {{{p(./YellowDots.png)}}} | This symbol denotes a state of /concern/ 
or /potential trouble/ for the associated item.   |
| {{{p(./RedDots.png)}}}| This symbol indicates that the associated 
item is in a /severely troubled/ or /non-functioning/ state. |


--8---cut here---end---8---




 Thank you.


 -pd

 --
 
 Peter Davis
 The Tech Curmudgeon
 www.techcurmudgeon.com http://www.techcurmudgeon.com




--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Redacting text in HTML export

2015-01-08 Thread Peter Davis
On Thu, Jan 08, 2015 at 10:34:44AM +0100, Rasmus wrote:
 Peter Davis p...@pfdstudio.com writes:
 
  Is there any way to completely redact text in HTML export, so it just
  looks like black boxes?
 
 I'm not sure I fully understand, but it this what you are looking for?
 
 #+MACRO: redact @@html:span class=redact style=color:black; 
 background-color:black;$1/span@@
 to {{{redact(redact)}}} or not to {{{redact(redact)}}} that is the question.

Oh! That would have done it! I wound up editing the span ... and /span tags 
into the html by hand. This was for a blog post
http://www.techcurmudgeon.com/2015/01/editorial-policies.html, so I didn't 
have a lot of control over style sheets, fonts, etc.

Thank you!
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



[O] Redacting text in HTML export

2015-01-07 Thread Peter Davis

Is there any way to completely redact text in HTML export, so it just
looks like black boxes?

Thank you.

-pd




[O] Resume: Squeezing lines tighter in LaTeX output?

2015-04-17 Thread Peter Davis

Hi

I'm trying to get a single .org file I can use to general PDF, HTML or 
even (gasp!) Word format versions of my resume. The problem I'm having 
now is that the PDF is 7 pages, compared with the 4 pages I get from my 
directly editing LaTeX file. One big difference is that individual jobs, 
titles, etc. are in a separate left column in the LaTeX version, while 
they're just subheaders and subsubheaders in the org version. I think 
this will be easier for on-line resume upload systems to parse correctly.


Beyond that, though, the org output has lots of white space. While it 
looks beautiful, I'd like to squeeze together:

 1) the headers, subheaders, etc.
 2) The items in a bullet list
 3) Lists and surrounding paragraphs.

Is there a way to do this in org?

Thank you!
-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] Resume: Squeezing lines tighter in LaTeX output?

2015-04-17 Thread Peter Davis


On 4/17/15 2:13 PM, John Hendy wrote:
Definitely look at paralist and enumitem for tweaking spacing as a 
starting point. Hope that helps. John 

Thanks, John. This

#+LATEX_HEADER: \usepackage{enumitem}
#+LATEX_HEADER: \setlist{nolistsep}

produced nice tight lists, though there is still a lot of white space 
before/after the headings. I'll dig around.


Also, is there a way to get orgmode to stop output the author and date 
lines in maketitle?


Thanks,
-pd

--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




  1   2   3   4   >