Re: [O] malformed function

2018-07-11 Thread hymie!
On Wed, Jul 11, 2018 at 11:35:14AM +0200, Joost Kremers wrote:
> 
> Note that the documentation for `flet' says that it has been obsolete since
> Emacs 24.3 and that you should be using `cl-flet' instead (or `cl-letf', but
> that doesn't seem to be what you want). So best thing to do is to replace
> `flet' with `cl-flet' and then add `(require 'cl-lib)' somewhere at the top
> of your init file, and you should be good to go.

Looks like that solved it.  Thanks much!

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net



[O] malformed function

2018-07-09 Thread hymie!
Greetings.

I know this is technically an emacs problem and not an Orgmode problem,
but maybe you guys will see the error that I can't find.

I have two different machines.  One is a Linux machine running
Orgmode 9.1.13 under Emacs 25.3.1 , and one is a Windows 10 machine
running Orgmode 9.1.13 under Emacs 24.5.1 .  Both have the same .emacs
file as far as I can tell.

The Linux machine is getting this error:

Warning (bytecomp): ‘(extract-window (line) (let ((start
(get-text-property 1 (quote time-of-day) line)) (dur (get-text-property
1 (quote duration) line))) (cond ((and start dur) (cons start
(org-time-from-minutes (+ dur (org-time-to-minutes start) (start
start) (t nil’ is a malformed function

As far as I can tell, the parens and quotes are all matched properly, and
the Windows machine is not displaying this error.

Here is the relevant part of my .emacs file.  Maybe you guys can see the
error I don't see?

= 8< =
; http://orgmode.org/worg/org-hacks.html
(defun org-time-to-minutes (time)
  "Convert an HHMM time to minutes"
  (+ (* (/ time 100) 60) (% time 100)))
(defun org-time-from-minutes (minutes)
  "Convert a number of minutes to an HHMM time"
  (+ (* (/ minutes 60) 100) (% minutes 60)))
(defadvice org-agenda-add-time-grid-maybe (around mde-org-agenda-grid-tweakify
  (list ndays todayp))
  (if (member 'remove-match (car org-agenda-time-grid))
  (flet ((extract-window
  (line)
  (let ((start (get-text-property 1 'time-of-day line))
(dur (get-text-property 1 'duration line)))
(cond
 ((and start dur)
  (cons start
(org-time-from-minutes
 (+ dur (org-time-to-minutes start)
 (start start)
 (t nil)
(let* ((windows (delq nil (mapcar 'extract-window list)))
   (org-agenda-time-grid
(list (car org-agenda-time-grid)
  (cadr org-agenda-time-grid)
  (remove-if
   (lambda (time)
 (find-if (lambda (w)
(if (numberp w)
(equal w time)
  (and (>= time (car w))
   (< time (cdr w)
  windows))
   (caddr org-agenda-time-grid)
  ad-do-it))
ad-do-it))
(ad-activate 'org-agenda-add-time-grid-maybe)
===== 8< =

Thanks.

--hymie!     http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-14 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Óscar Fuentes , who said:

> While trying to create a demo file I noticed that decryption works fine
> as long as the content was relatively new, while it fails for content
> that was encrypted years ago.

"Years ago" ?  Sounds like maybe you lost the key?

Can you take the encrypted text, put it into its own file, and
use gpg to decrypt that?  If not, it should give you a more robust
verbose message.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] General advice beyond Org

2018-05-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  ed...@openmail.cc <ed...@openmail.cc>, who said:

> I am in graduate school, and I keep having issues with my 
> advisor for my strong inclination to use free software. [...]
>
> Is anyone here aware of a place where they do computational human 
> biomechanics, mechanics, materials or finite elements where I could 
> interact with free software?

First question -- it sounds like you are doing very specific research
with very specific tools, software, equations, and things like that.
Are you sure that free software exists that will do what you want?

For example, good luck finding free software that will do your taxes.

> Do you just nod and wave your freedom good bye?

Second question -- you keep using that word "free".  Are you really "free"
in this situation?  You said you are getting tuition covered and a
stipend.  The way employment typically works is that, in return for
salary and/or compensation, you give your full devotion to your employer's
wants and needs instead of your own.  Using your employer's software is
not a huge jump.

I don't mean this as a personal attack.  That's how it works.  I am
"free" to wear a t-shirt that says "F**K THE POLICE" on it, but the
person who pays my salary would prefer if, for 40 hours each week, I
wear a different shirt.  I am "free" to ignore his request.  He is "free"
to stop paying my salary.

So I'm afraid that's my answer.  Suck it up and do what the nice person
who is giving you lots of money wants you to do, they way he/she wants
you to do it.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] emacs , windows, gpg, org-crypt

2018-03-29 Thread hymie!

Thank you!  Your suggestion led me to the answer.

In our last episode, the evil Dr. Lacto had captured our hero,
  Jonathan Leech-Pepin <jonathan.leechpe...@gmail.com>, who said:

> On 29 March 2018 at 09:59, hymie! <hy...@lactose.homelinux.net> wrote:
>
>> Greetings.
>>
>> I set this all up years ago, I just got a new computer, I'm not an expert
>> with Windows, and I've been unable to find my problem with Google.
>>
>> I have Windows 10, I have emacs, I have Org 9.0.3 (yes, I need to update),
>> and I have GPG4Win.  I have entries in my .emacs file:

I missed the most important entry in my .emacs file:
  (setq exec-path '("C:\\Program Files (x86)\\GNU\\GnuPG"))

The file path has changed on my new computer
  (setq exec-path '("C:\\Program Files (x86)\\GnuPG\\bin"))

and now gpg.exe is in emacs's local exec-path.

> I'd take a look at ~C-h v -gpg TAB~ -> possible suggestion is
> epg-gpg-program which points to "gpg" by default.

This was the variable I couldn't figure out.  TIL that you can tab-complete
in the middle of a variable too.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] emacs , windows, gpg, org-crypt

2018-03-29 Thread hymie!
Greetings.

I set this all up years ago, I just got a new computer, I'm not an expert
with Windows, and I've been unable to find my problem with Google.

I have Windows 10, I have emacs, I have Org 9.0.3 (yes, I need to update),
and I have GPG4Win.  I have entries in my .emacs file:

 (require 'org-crypt)
 (org-crypt-use-before-save-magic)
 (setq org-tags-exclude-from-inheritance (quote ("crypt")))
 [...]
 (setq org-crypt-key "")
   ;; GPG key to use for encryption
 [...]
 (global-set-key "\C-cd" 'org-decrypt-entry)
 (global-set-key "\C-ce" 'org-encrypt-entry)

But when I try to decrypt something, I get this error:

  Searching for program: no such file or directory, gpg

The only responses I can find are to add gpg to my %PATH% , but
I don't think my employer's GPO will let me.

I was hoping to find a place in org-crypt where "gpg" is defined so that
I can specify a full path instead, but as yet, I haven't found it.

Can somebody give me a push?

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] org-crypt: GPG error: "no usable configuration"

2017-01-03 Thread hymie!
Greetings.

I'm running Orgmode 9.0.3 under emacs 25.1.2 on Microsoft Windows 7.

I think this is really an emacs issue and not an orgmode issue; but
other than orgmode, I don't use emacs, and I don't know where else to
turn.

For a year or so, I've been using org-crypt like this:

(setq exec-path '("C:\\Program Files (x86)\\GNU\\GnuPG"))
(require 'org-crypt)
(org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-crypt-key "65B20F70")
(global-set-key "\C-cd" 'org-decrypt-entry)
(global-set-key "\C-ce" 'org-encrypt-entry)

...and it's worked fine, until I recently updated from emacs 24.5 to 25.1
and orgmode from 8.3.5 to 9.0.3 .

Now I get this error:
GPG error: "no usable configuration", OpenPGP

Apparently, it might be related to this bug

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24229

but the eventual work-around:
>
>  Setting this variable directly does not have any effect;
>  instead use \\[customize] or .
>
>IMO that's all that's needed here too.

makes no sense to me at all.

Can somebody help me get GPG working again?

--hymie!




Re: [O] force italic mode?

2016-11-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Aaron Ecay <aarone...@gmail.com>, who said:
> You can accomplish this by using an entity that expands to nothing.  The
> closest entry in org-entities is \zwj (zero width word-joining space):
>
> foo\zwj{}/bar/\zwj{}baz

This doesn't work for me. :(

It works to the left of the zwj, such as
=foo=\zwj{}bar

...but not to the right as you did above.

It's hard to read the value I have for org-emphasis-regexp-components
but it looks like } is in there, so I guess it should be working?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] force italic mode?

2016-11-17 Thread hymie!
Greetings.

(My first question is, can I post from gmane?)

I know how to make text italic by /surrounding/ it with /slashes/.

I know that there's a variable (org-emphasis-regex-components) that
specifies what characters are allowed before or after the markup
characters.

But let's say I don't want to mess with my document defaults.  I just
want to specify, in this one particular place, that I have the word

fuzzywuzzywuzzabear

and I want "wuzzy" to be italic.  Is there a way I can do that?

--hymie!




Re: [O] How to export to latex from command line?

2016-06-23 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Giacomo M <jackja...@gmail.com>, who said:
> Dear all,
>
> I would like to export an org file to either tex or pdf from bash.

I have been using this:
${EMACS} $filename -f org-html-export-to-html -f kill-emacs

There are similar functions org-latex-export-to-pdf and
org-latex-export-to-latex.  I don't think org does plain TeX; I'd be
thrilled if it does.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] scheduled task without headline?

2016-03-01 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Michael Strey <mst...@strey.biz>, who said:
> On Mo, 2016-02-22 at 21:09, hymie! wrote:
>
>> I'd really like to have my specific "note" listed in the agenda, but
>> what I need to do is so minor that I don't want it to have a "headline"
>> in my notes.  Is this possible?
>
> Have you already checked the so called inline tasks?
>
> C-h f org-inlinetask-insert-task
>
> Best regards

Ooh. I think that's exactly what i need.  Thanks!

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] scheduled task without headline?

2016-02-22 Thread hymie!
Greetings.

I've got my notes organized mostly like this:
* major task
  - note
  - note
  - note
** minor task
   - note
   - note
** minor task
   - note
   - note

Now I have a "note" that I need to attach a "schedule" to (something I
have to do tomorrow).  However, when I try to do something like this:

  - TODO note
  SCHEDULED <2016-02-23 Tue>

the agenda shows me the nearest headline
  Scheduled: minor task

I'd really like to have my specific "note" listed in the agenda, but
what I need to do is so minor that I don't want it to have a "headline"
in my notes.  Is this possible?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] org-crypt: Secure encrypted message against inadvertent change

2015-09-08 Thread Hymie!
AW  t-online.de> writes:


> Dear John,
> 
> thank you. I simply changed "read_only" to "crypt" in the functions you 
> developed. This functions prevent a change of encrypted text, which I
think is 
> really an improvment.

This is awesome.  But I have a follow-up questions.

This function marks my buffer as "modified".  Is there any way to
automatically have the org-mark-readonly function turn off the modified flag?

This isn't a major problem, just a nicety.

--hymie!



> 
> (defun org-mark-readonly ()
>   (interactive)
>   (org-map-entries
>(lambda ()
>  (let* ((element (org-element-at-point))
> (begin (org-element-property :begin element))
> (end (org-element-property :end element)))
>(add-text-properties begin (- end 1) '(read-only t
>"crypt")
>  (message "Made readonly!"))

> 
> (add-hook 'org-mode-hook 'org-mark-readonly)





[O] 8.3.1 bug or misunderstanding -- inline archive

2015-08-20 Thread Hymie!
I have a few items in my org file that are tagged ARCHIVE.  They show up
grey in my emacs window.

If I sit the cursor on the * bullet and hit TAB, I get a message that says
Subtree is archived and stays closed.  Use C-tab to cycle it anyway.

However, if I sit the cursor on the actual headline and hit TAB, I get the
same message, but the subtree is also expanded.

I don't recall offhand how it worked in 8.2.x, but I'm pretty sure it
refused to expand the subtree no matter where the cursor was.

--hymie!




[O] export to HTML with nbsp

2015-06-17 Thread hymie!
Greetings.

I tried searching for this, because I think I've seen it before, but
searching for nbsp brings up dozens of false-positives.

So my underlying problem is that I'd like to combine markups

~commandname option1 /option2/~

and end up with options2 being both monospace and italic.  I couldn't get
the borders and prematch and postmatch working correctly.  I also failed to
figure out how to create my own monospace-and-italic markup style.  So I
eventually gave up and settled for

~commandname option1 /option2/ \nbsp~

which works great inside emacs, and works with export to ASCII.

But when I export to HTML, the \nbsp is not being converted to   like
the docs say it should.  It is just being left as \nbsp .

I just noticed this comment in the doc

Text in the code and verbatim string is not processed for Org mode specific
syntax, it is exported verbatim.

However, again, \nbsp is properly processed when I export to ASCII.  So I'm
confused as to why it's different for export to HTML.

Am I doing something wrong?  Or is there something I need to do to make this
export correctly?

Thanks.

--hymie!

Re: [O] [OT] A short (less than a minute), informal survey about LaTeX

2015-03-23 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Marcin Borkowski mb...@wmi.amu.edu.pl, who said:
,
| The goal of the savetrees package is to pack as much text as
| possible onto each page of a LaTeX document. Admittedly, this
| makes the document far less attractive. Nevertheless,
| savetrees is a simple way to save paper when printing draft copies
| of a document.
`

I typically want my draft to look like my finished copy will look, so

2. Would you find it useful when producing PDF files other that
scientific articles (using Org-mode or not)?

No.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
My fitbit says I've walked 3381 steps today (as of 10:58).




Re: [O] [OT] A short (less than a minute), informal survey about LaTeX

2015-03-23 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  hy...@lactose.homelinux.net (hymie!), who said:
In our last episode, the evil Dr. Lacto had captured our hero,
  Marcin Borkowski mb...@wmi.amu.edu.pl, who said:
,
| The goal of the savetrees package is to pack as much text as
| possible onto each page of a LaTeX document. Admittedly, this
| makes the document far less attractive. Nevertheless,
| savetrees is a simple way to save paper when printing draft copies
| of a document.
`

I typically want my draft to look like my finished copy will look, so

I just realized that I mis-read the original question, so I will just
echo what somebody else said.

I use Org for writing and maintaining documentation, and my documentation
has to be readable to be usable.

2. Would you find it useful when producing PDF files other that
scientific articles (using Org-mode or not)?

Still no.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
My fitbit says I've walked 3381 steps today (as of 10:58).




[O] html preamble

2015-03-23 Thread hymie!
So my next task is to learn about the HTML preamble.

From reading the docs, it looks like all of my org files have to share a
single HTML preamble, which is set in my .emacs file through either the
org-html-preamble variable, the org-html-preamble-format variable, or the
org-publish-project-alist variable.  There is no way to tell a specific Org
file This is your HTML preamble.  Is that correct?

Why are there two different variables org-html-preamble-format and
org-html-preamble if the org-html-preamble variable can perform all of the
tasks of org-html-preamble-format and more?

Finally, how do I get the current date into the preamble?  I see that I can
specifically set a date, and I see the current date in a comment at the top
of my exported HTML, but I can't figure out how to get the current date out
of the comment and into my preamble.

Thanks.

--hymie!




Re: [O] export code with backslashes

2015-03-18 Thread hymie
Charles C. Berry writes:
   (defun org-export-ascii-filter-code (text back-end info)
   Replace `\\n' with `\\' in ascii code.
 (if (eq back-end 'ascii)
 (replace-regexp-in-string
  \n \\\n
  (org-babel-chomp
   (org-export-string-as text 'ascii t))
  nil t)
   text))
   (add-to-list 'org-export-filter-code-functions
'org-export-ascii-filter-code)

Just for the record.

I had an open running emacs.  I changed my .emacs file, applied the change
with M-x load-file .emacs , and it worked perfectly.

But today, I opened emacs fresh, and was greeted with an error

Symbol's value as variable is void: org-export-filter-code-functions

I got the same error when I tried to M-x load-file .emacs

But

After I did an ascii export (in which the backslashes do not appear), I could
then M-x load-file .emacs, no error, and the backslashes worked.

I added 
(require 'ox)
to my .emacs file, and that resolved the problem.

This error only happens on my Windows machine.  On my Unix machine, it
appears to work correctly the first time, and I do not see any differences
between the .emacs files on the two machines.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net



[O] export code with backslashes

2015-03-16 Thread hymie!
Greetings.

I'm only asking this question because it seems that Orgmode can do
anything, although I admit that what I'm asking for is probably outside
the normal scope.

I have snips of code in my org files, denoted as ~code~.  I prefer ~code~ to
BEGIN_SRC blocks, because I don't like the big grey text boxes in my
exported documents.  Sometimes my code is very long and includes long lists
of options and arguments and such; for example:

~useradd -U -G wheel -p
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
accountname~

This is all one line.

Then I use C-c C-e t A to export this into an ascii buffer, the sole
reason being to remove the tilde characters and provide me an easy
cut-n-paste option.   I end up with this:

useradd -U -G wheel -p newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//'
newline
accountname newline

I would really really really like it if, in addition to the newlines that
are added, a backslash could be added as well.  Hey, this is a line
enclosed in tildes.  I'm going to add line-breaks.  Each line-break except
for the one at the end needs a backslash

useradd -U -G wheel -p \newline
'$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \newline
accountname newline

Is such a thing possible?

--hymie!




Re: [O] export code with backslashes

2015-03-16 Thread hymie
Charles C. Berry writes:
On Mon, 16 Mar 2015, hymie! wrote:

 useradd -U -G wheel -p \newline
 '$6$wcMRrkcdGeNHLT5b$password0ISmGZSsILOyV/WJnpassword//' \newline
 accountname newline

 Is such a thing possible?

Yes.

#+BEGIN_SRC emacs-lisp
   (defun org-export-ascii-filter-code (text back-end info)
   Replace `\\n' with `\\' in ascii code.
 (if (eq back-end 'ascii)
 (replace-regexp-in-string
  \n \\\n
  (org-babel-chomp
   (org-export-string-as text 'ascii t))
  nil t)
   text))
   (add-to-list 'org-export-filter-code-functions
'org-export-ascii-filter-code)
#+END_SRC

Awesome -- this is perfect.  (Note that, to be perfect, the
continuation lines need at least one leading space.)

When I run this on your example, I get only one line break, but it is 
preceeded by a backslash.

My original post had a much much longer password string, but the
web-to-news gateway demanded 80 characters or less, so I trimmed the
password but left in the line breaks.

Naturally, you will need to adapt this up for other backends as a single 
backslash might not be what is wanted.

I hope my programming skills are up to the task.  But it's certainly
a great jumping-off point.

Thank you.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
My fitbit says I've walked 7009 steps today (as of 19:02).



[O] BUG? Text in the code and verbatim string is not processed

2015-02-23 Thread hymie!
So the documentation says

You can make words *bold*, /italic/, _underlined_, =verbatim= and ~code~,
and, if you must, ‘+strike-through+’. Text in the code and verbatim string is
not processed for Org mode specific syntax, it is exported verbatim. 

However, that is not the behavior I am seeing.

In this construct:

  - ~cd ~/test~
  - ~cp foo foo1~

The tilde in the path ~/test is hidden when org-hide-emphasis-markers is
turned on.  Maybe that is confusing org, so I changed it to this construct:

  - =cd ~/test=
  - ~cp foo foo1~

In this case, the word cd is formatted as verbatim, but the word /test
along with the - on the next line are all formatted as code.

Am I misunderstanding what is supposed to happen, or is this a bug?

--hymie!

Re: [O] markup text with leading, trailing spaces

2015-02-23 Thread hymie!
Sorry to resurrect an old thread, but this isn't actually working.

hymie! hymie at lactose.homelinux.net writes:

 
 hymie! hymie at lactose.homelinux.net writes:
 
  So while I strongly prefer the exported version of
  - ~command1~
  - ~command2~
  - ~command3~
  it's hard to copy-n-paste with the tildes in the way.
 
 org-hide-emphasis-markers is the answer.  Setting this to true, the tildes
 disappear.  

The tildes disappear from the visual screen, but when I copy-n-paste, the
tildes are still copied. :(

Still looking for a solution that I like.

--EbH




Re: [O] markup text with leading, trailing spaces

2015-02-14 Thread hymie
darc...@gmail.com writes:
However, if if I can ssh to a server called myserver I can change the
code block to

#+begin_src sh :dir /myserver:~/
  hostname
#+end_src

Now if I run the code block the code is executed in myserver and I get

#+RESULTS:
: myserver_host_name

That is a very neat feature.  However

if I can ssh to a server called myserver 

I cannot.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net

 hymie! writes:
 
  I'd like to be able to have a series of commands in my raw org
  file that I can copy-n-paste into my shell window.  But I also
  like to export my org files to HTML so that I can make ePubs and
  keep them in my iPad.
 
  And this
 
  #+BEGIN_SRC
command1
command2
command3
  #+END_SRC
 
  is just IMO ugly.

 It's not that the font is ugly.  It's that
 * (in the epub) the source code appears in a box
 * (in the html/epub) it's impossible to tell the difference between two
 different commands and a single command that was too long and word wrapped
 to fit in the box
 * (in the html/epub) I can't have non-monospace comments between/attached
 to/within the code without drawing four or five separate boxes around my
 code
 * (in the org file) For whatever reason, monospace code appears as a
 light-gray font, which is hard to read against a white background.  I'm
 sure that can be changed, but I haven't had time to figure it out yet.




Re: [O] markup text with leading, trailing spaces

2015-02-14 Thread hymie!
Jorge A. Alfaro-Murillo jorge.alfaro-murillo at yale.edu writes:

 
 hymie! writes:
 
  I think you are making the incorrect assumption that the machine 
  on which I maintain my Org files is the same machine that I wish 
  to execute commands on.
 
 Yes, or that you can ssh to it.

Unfortunately, it is still an incorrect assumption.

  adduser username -d /data/chroot/home/username -s  /usr/bin/rssh 
  -m -k /dev/null -g rssh pssh -x '-q -t -t' -I -i --hosts 
  hosts_linux_rhel6 'sudo -S wget 
  puppet/puppet/pub/system_patch.pl -O 
  /usr/local/bin/system_patch.pl'  hostnamefile
 
 You could add a \ at the end of each line that does not end the 
 command.

The only problem there is that I need to know in advance what my line length
limit is.  That's why I'm really hoping for something that I can use
standard automatic word-wrapping instead of verbatim mode.

--hymie!




Re: [O] markup text with leading, trailing spaces

2015-02-14 Thread hymie!
hymie! hymie at lactose.homelinux.net writes:

 So while I strongly prefer the exported version of
 - ~command1~
 - ~command2~
 - ~command3~
 it's hard to copy-n-paste with the tildes in the way.

org-hide-emphasis-markers is the answer.  Setting this to true, the tildes
disappear.  

--hymie!







Re: [O] tasks, clocks, and notes

2015-02-13 Thread hymie
That is perfect!  Thank you!

--hymie!http://lactose.homelinux.net/~hymie hy...@lactose.homelinux.net
My fitbit says I've walked 1582 steps today (as of 08:54).

Subhan Michael Tindall writes:
Try
'(org-log-note-clock-out t)

This gives you something like this:
* WORK break
This is my break log
   CLOCK: [2015-02-04 Wed 11:20]--[2015-02-04 Wed 11:30] =3D  0:10
   - coffee
   CLOCK: [2015-02-04 Wed 09:52]--[2015-02-04 Wed 10:16] =3D  0:24
   - coffee, walk
   CLOCK: [2015-02-03 Tue 09:35]--[2015-02-03 Tue 09:45] =3D  0:10
   - walk



[O] markup text with leading, trailing spaces

2015-02-13 Thread hymie!
Greetings.

My next SNAFU involves mark-up text.

I'd like to be able to have a series of commands in my raw org file that I
can copy-n-paste into my shell window.  But I also like to export my org
files to HTML so that I can make ePubs and keep them in my iPad.

So while I strongly prefer the exported version of
- ~command1~
- ~command2~
- ~command3~
it's hard to copy-n-paste with the tildes in the way.

Unfortunately, this
- ~ command1 ~
- ~ command2 ~
- ~ command3 ~
does not mark up the text in my exported-to-html version.

And this
#+BEGIN_SRC
  command1
  command2
  command3
#+END_SRC
is just IMO ugly.

Is there something I can do, where I can get output similar to
- ~command1~
- ~command2~
- ~command3~
without the tildes blocking my text?

--hymie!




Re: [O] markup text with leading, trailing spaces

2015-02-13 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo), who said:
hymie! writes:

 I'd like to be able to have a series of commands in my raw org 
 file that I can copy-n-paste into my shell window.  But I also 
 like to export my org files to HTML so that I can make ePubs and 
 keep them in my iPad.
 
 And this
 
 #+BEGIN_SRC
   command1
   command2
   command3
 #+END_SRC

 is just IMO ugly.

It shouldn't be. Try adding the word shell after BEGIN_SRC, so 
that it fontifies the code correctly (the variable 
org-src-fontify-natively should be set to t, but that has been 
default for a while)

It's not that the font is ugly.  It's that
* (in the epub) the source code appears in a box
* (in the html/epub) it's impossible to tell the difference between two
different commands and a single command that was too long and word wrapped
to fit in the box
* (in the html/epub) I can't have non-monospace comments between/attached
to/within the code without drawing four or five separate boxes around my code
* (in the org file) For whatever reason, monospace code appears as a
light-gray font, which is hard to read against a white background.  I'm
sure that can be changed, but I haven't had time to figure it out yet.

Also, add shell to the loaded babel 
languages, so that you can execute the code and get the results 
right away in org:

No need for copy-n-paste, just do C-c C-c where you have your 
commands. 

I think you are making the incorrect assumption that the machine on
which I maintain my Org files is the same machine that I wish to execute
commands on.

Try copying this example into an org file, it should fontify it 
nicely, both in the org file and in the html exported.

If my commnds were all 8 characters long or less, it would be fine.
Some of my commands look like this:

adduser username -d /data/chroot/home/username -s /usr/bin/rssh -m -k /dev/null 
-g rssh

useradd -U -G wheel -p 
'$6$wcMRrkcdGeNHLT5c$0s4qezb00ISmGZSsILOyV/WJn3RnuZPkSEknwoSZ22HvbgkBTe4TQwCz/mpG.3zby.1Jwnmtsq1B.uCbyg5l./'
 username

pssh -x '-q -t -t' -I -i --hosts hosts_linux_rhel6 'sudo -S wget 
puppet/puppet/pub/system_patch.pl -O /usr/local/bin/system_patch.pl'  
hostnamefile

While I admit that the useradd command is an extreme example,
this becomes horribly ambiguous:

adduser username -d /data/chroot/home/username -s 
/usr/bin/rssh -m -k /dev/null -g rssh
pssh -x '-q -t -t' -I -i --hosts hosts_linux_rhel6
'sudo -S wget puppet/puppet/pub/system_patch.pl -O
/usr/local/bin/system_patch.pl'  hostnamefile

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] tasks, clocks, and notes

2015-02-12 Thread hymie!
Greetings.

I have a funny feeling I asked this before, but I can't remember and I
couldn't find it in a search.

So let's say I have a task -- fix a computer.  I add some memory, I test the
new memory and that doesn't solve the problem, and then I finally figure out
it was the video driver.

I could log that this way:

* fix the computer
**  added memory to the machine
CLOCK: [2015-01-28 Wed 12:36] -- [2015-01-28 Wed 13:14]
**  memory didn't resolve the problem
CLOCK: [2015-01-28 Wed 13:28] -- [2015-01-28 Wed 13:53]
**  finally found it -- it was the video driver
CLOCK: [2015-01-29 Thu 09:12] -- [2015-01-29 The 11:30]

but then my Agenda will have pretty disjoint notes about added memory to
the machine.  I'd prefer that the Agenda either say fix the computer
or (even better) fix the computer -- added memory to the machine.

Is there something I can do that would add notes to an individual clock
entry, something like

* fix the computer
CLOCK: [2015-01-28 Wed 12:36] -- [2015-01-28 Wed 13:14]
added memory to the machine
CLOCK: [2015-01-28 Wed 13:28] -- [2015-01-28 Wed 13:53]
memory didn't resolve the problem
CLOCK: [2015-01-29 Thu 09:12] -- [2015-01-29 The 11:30]
finally found it -- it was the video driver

that would still leave the clock lines attached to the main task, but
still keep some individual notes about the various pieces of the task?

--hymie!




Re: [O] Other editors supporting Org-Mode

2014-10-08 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Manuel Schneckenreither manuel.schneckenreit...@student.uibk.ac.at, who 
said:
Hi fellows,

I couldn't find anything on the web about it. Therefore, I like to ask
you if anyone knows a program (another editor) which supports Org mode.

I would suggest, rather than adapting more editors to support Org,
creating a stand-alone program that compiles and manages Org functions
separate from the act of editing them.

The same way that I edit a TeX file, and then run tex to process
it into a DVI file that I can view; or the same way that I edit an
HTML file, and then pull it up in Firefox to view it.  I can edit
my Org file, then I can run my Org processor and view the file,
view my agenda...

I realize that there is a lot of functionality that gets lost, but I
think that much of what is lost is shortcuts.  I can easily, for example,
change the word TODO to DONE in my editor, or add a SCHEDULED line...
On the other hand, you already have emacs as the supported Org editor,
while adding do-it-yourself support for other editors as well.

It just seems to me that writing Org For Emacs, Org For Vim, Org For
Notepad, Org For Whatever Mac Uses, Org for Vile ... is duplicating
too much effort that a single Org For Java might simplify.

Anyway, just thinking out loud.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
---




[O] Export to Latex, multi-line headlines

2014-10-07 Thread hymie!
So the more I use orgmode, the more I'm enjoying it.

I'm now learning how to export my notes into LaTeX and/or PDF.  (I'm a
TeX user, so I don't know all of the intricacies of LaTeX, but I can
manage if I have to.)

Anyway, to the question.

When I have a long line in my notes, I keep it formatted like this for
easy reading:

*** This is a very long line which is way too long to fit on a single line
so I have it broken up into smaller lines so that I can read it
but still have the indentation lined up, so it's obvious (to me) that
this is all designed to be a single sentence.

There is a hard return at the end of each line, because using emacs's
standard word-wrapping would put the text into a left-aligned paragraph
and I lose my outline structure.

The coloring of the second through fourth lines doesn't match the coloring
of the first line, so it appears that Org considers this to be a
single-line headline with some supporting text underneath it.

When I export to LaTeX, that concept continues.  The phrase
This is a very long line which is way too long to fit on a single line
is my headline, in big bold letters, while the rest of the text is
below it in smaller letters (formatted as a single paragraph).

Is there a way that I can specify, either to Orgmode in general or to
the LaTeX exporter specifically, that I want this to be considered
a single headline?

Alternative question -- is there a way that Orgmode (or emacs) can combine
line-wrapping with indent levels, so that if I were to write this all as
a single line, the word-wrapping would put the text in the correct column?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net
---




Re: [O] Export to Latex, multi-line headlines

2014-10-07 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Thorsten Jolitz tjol...@gmail.com, who said:
hy...@lactose.homelinux.net (hymie!) writes:

 *** This is a very long line which is way too long to fit on a single line
 so I have it broken up into smaller lines so that I can read it
 but still have the indentation lined up, so it's obvious (to me) that
 this is all designed to be a single sentence.

This looks pretty 'unidiomatic', so to say, better use

In other words, Don't do that. :)  Keep my headings short.

Fair enough.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] agenda time grid -- default time slot lines

2014-10-03 Thread hymie!
Greetings.  I have two questions about the default time slots in the Agenda.

First question

When I open the Agenda Day View, I get a bunch of blank lines at the
default times 8am, 10am, 12noon, 2pm, 4pm, and so on.

Friday  3 October 2014
   8:00.. 
   8:50.. now - - - - - - - - - - - - - - - - - - - - - - - - -
  10:00.. 
  12:00.. 
  14:00.. 
  16:00.. 
  18:00.. 
  20:00.. 

Then I did a few tasks, so my agenda for today looks like this:

Friday  3 October 2014
   8:00.. 
  tasks:   8:45- 9:10 Clocked:   (0:25) first attempt failed
  tasks:   9:10- 9:45 Clocked:   (0:35) troubleshoot
  tasks:   9:45-10:45 Clocked:   (1:00) restore image
  10:00.. 
  tasks:  10:45-11:25 Clocked:   (0:40) second attempt
  12:00.. 
  13:20.. now - - - - - - - - - - - - - - - - - - - - - - - - -
  14:00.. 

Is there a way that I can suppress the 10:00 line in this case?

None of the org-agenda- variables that I found seemed to do this.

Second question

My Agenda for a-week-from-next-Tuesday looks like this:

Tuesday14 October 2014
   8:00.. 
  10:00.. 
  12:00.. 
  tasks:  14:00-15:00 IT-Security meeting
  14:00.. 
  16:00.. 

Assuming that I cannot suppress the 14:00 line in this case ...
shouldn't the task line be **below** the 14:00 line?  I can force
it by changing the meeting time from 14:00 to 14:01, but it seems like
this is the wrong way to list them.  The meeting is not between 12:00
and 14:00.  It's between 14:00 and 16:00.

Thanks.

--EbH




Re: [O] list of agenda files in a file

2014-09-19 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Thorsten Jolitz tjol...@gmail.com, who said:

Read again! =

| If the value of the variable is not a list but a single file name,
| then^

That's what I did.

   (setq org-agenda-files (quote (~/org/agenda.file.list)))

A single file name.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] list of agenda files in a file

2014-09-19 Thread hymie
Eric S Fraga writes:

(setq org-agenda-files (quote (~/org/agenda.file.list)))

which sets the variable to a list of one string, which is *not* what you
want.  Try
(setq org-agenda-files ~/org/agenda.file.list)

Oh.  Thank you very much.

I have and/or see things like this:
 (setq org-tags-exclude-from-inheritance (quote (crypt)))
 org-agenda-span (quote month)
 org-agenda-files (quote (~/org/project.org))

and I know that cons makes a list.  I didn't realize that quote
also makes a list.

TIL.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net



[O] inconsistency -- agenda, jump to specific day

2014-09-19 Thread hymie!
So I think I found an inconsistency in the agenda and/or in the docs.
Maybe it's just my lack of understanding as usual, but here goes.

Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
Package: Org-mode version 8.2.7c (8.2.7c-dist @ 
c:/ProgramData/Microsoft/Windows/Start Menu/Programs/emacs-24.3/lisp/org/)

According to the docuemntation:
v d or short d (org-agenda-day-view)
v w or short w (org-agenda-week-view)
v t (org-agenda-fortnight-view)
v m (org-agenda-month-view)
v y (org-agenda-year-view)
v SPC (org-agenda-reset-view)
Switch to day/week/month/year view. When switching to day or
week view, this setting becomes the default for subsequent agenda
refreshes. Since month and year views are slow to create, they do not
become the default. A numeric prefix argument may be used to jump
directly to a specific day of the year, ISO week, month, or year,
respectively. For example, 32 d jumps to February 1st, 9 w to ISO
week number 9.

d, however, does not work that way.  Using a numberic prefix before
d jumps to that specific day of the **month**, not of the year.
So when I'm looking at the current agenda (for week 15 Sep - 21 Sep),
5d takes me to Sept 5th, 26d takes me to Sept 26th, 35d takes me
to October 5th (the 35th day of September).

Note that the current month had changed, so now, 5d takes me to
October 5th, not September 5th any more.  To me that's another
inconsistency, but I could see where it's a feature and not a bug.

This is a problem for me because my employer actually **uses** Day Of Year.
So something happening today (19 sep 2014), I would log it as 2014-262.
Being able to jump directly to day 262 would be a very handy feature
for me.

Then, the documentation says
When setting day, week, or month view, a year may be encoded in the
prefix argument as well. For example, 200712 w will jump to week 12
in 2007.  If such a year specification has only one or two digits,
it will be mapped to the interval 1938-2037.

This does not work with day.  1407w indeed takes me to the 7th week of
2014.  From there, 1407d takes me to December 8th 2017, which I haven't
counted but I think is the 1407th day of February 2014.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] list of agenda files in a file

2014-09-18 Thread hymie!
Greetings.

I'd like to add my _archive files to my agenda.  I don't need the entries
clogging up my day-to-day .org files, but I want the items to still
appear in my agenda.

I found this in the org manual:

The information to be shown is normally collected from all agenda files,
the files listed in the variable org-agenda-files[98].

[98] If the value of that variable is not a list, but a single file name,
then the list of agenda files will be maintained in that external file.

So based on that, I put this in my .emacs file:
  (setq org-agenda-files (quote (~/org/agenda.file.list)))
but I cannot seem to get this to work.

When that file has a plain old list of filenames in it, I get an error
Agenda file ~/org/agenda.file.list is not in `org-mode'

When that file is empty, then there is nothing in my agenda.  I then
tried using C-c [ to add a file to the list, and I end up with
 '(org-agenda-files (quote (~/org/file.org ~/org/agenda.file.list)))
in my .emacs file.

Am I misunderstanding?  The manual sounds like I can maintain a file
that contains a list of files that the agenda should use.  But I can't
seem to make that happen, either automatically or manually.

What am I doing wrong?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] clock-in clock-out problems

2014-08-19 Thread hymie!
IMPORTANT NEW DISCOVERY

By default, I use emacs in a terminal window (emacs -nw)

When I use emacs as an X program, the clock persistence works successfully
and I do not get any errors.

Only when I use emacs with the -nw flag do I get the clock persistence
error below.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net

In our last episode, the evil Dr. Lacto had captured our hero,
  hy...@lactose.homelinux.net (hymie!), who said:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (cond ((and org-clock-in-resume (looking-at (concat ^[  ]*
org-clock-string  \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} 
*\\sw+.? +[012][0-9]:[0-5][0-9]\\)\\][ ]*$))) (message Matched %s
(match-string 1)) (setq ts (concat [ (match-string 1) ])) (goto-char
(match-end 1)) (setq org-clock-start-time (apply (quote encode-time)
(org-parse-time-string (match-string 1 (setq org-clock-effort
(org-entry-get (point) org-effort-property)) (setq org-clock-total-time
(org-clock-sum-current-item (org-clock-get-sum-start ((eq
org-clock-in-resume (quote auto-restart)) (message Cannot restart clock
because task does not contain unfinished clock) (ding) (sit-for 2)
(throw (quote abort) nil)) (t (insert-before-markers \n)
(backward-char 1) (org-indent-line) (if (and (save-excursi
 on (end-of-line 0) (org-in-item-p))) (progn (beginning-of-line 1)
(org-indent-line-to (- (org-get-indentation) 2 (insert
org-clock-string  ) (setq org-clock-effort (org-entry-get (point)
org-effort-property)) (setq org-clock-total-time
(org-clock-sum-current-item (org-clock-get-sum-start))) (setq
org-clock-start-time (or (and org-clock-continuously org-clock-out-time)
(and leftover (y-or-n-p (format You stopped another clock %d mins ago;
start this one from then?  (/ ... 60))) leftover) start-time
(org-current-time org-clock-rounding-minutes t))) (setq ts
(org-insert-time-stamp org-clock-start-time (quote with-hm) (quote
inactive)




Re: [O] clock-in clock-out problems

2014-08-19 Thread hymie!
OK.

I downloaded emacs v 24.4.50.1 .

I think I still had the problem the first time I ran it, but now I'm not
sure if maybe I ran the old version by mistake.

Anyway, I commented out my entire .emacs file, run 24.4.50.1, and
the clock persistence worked.  I restored my .emacs a few lines at a
time, and it continued working the entire time.

I restored my .emacs file, 24.4.50.1 was still working correctly.
Then for giggles I tried 24.3, got the error, returned to 24.4.50.1, and
no error.  Then I removed 24.3 completely and installed 24.4.50.1  , and I
haven't had the error since then.

In our last episode, the evil Dr. Lacto had captured our hero,
  hy...@lactose.homelinux.net (hymie!), who said:
In our last episode, the evil Dr. Lacto had captured our hero,
  Nick Dokos ndo...@gmail.com, who said:
hy...@lactose.homelinux.net (hymie!) writes:

Are you sure the two instances run the same version of emacs? And what
version is that?

Emacs  : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.13)
 of 2014-06-17 on herman
Package: Org-mode version 8.2.7c (8.2.7c-dist @ /home/hymie/org-mode/lisp/)

FWIW, I cannot reproduce the problem either with -nw or without. In
fact, I'm baffled as to what could explain this: as a I pointed out
before, (match-string 1) says one thing and (match-end 1) says another
and AFAICT that's impossible. The only explanation I can come up with
is a bug in emacs's regexp matching code - a very unlikely scenario IMO.

Solar flares.

Anyway, thanks very much for all of the help.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] clock-in clock-out problems

2014-08-18 Thread hymie!
Greetings.

I've discovered a problem with clocking-in and clocking-out.  I think
this used to work in the past (when I ran 8.2.7a and/or 8.2.7b), but
I've had the same problem twice (both with 8.2.7c) .

I have a TODO scheduled for today:
* TODO run clamav on machine
  SCHEDULED: 2014-08-18 Mon 09:00

I get to work and start it with C-c C-x C-i
* TODO run clamav on machine
  SCHEDULED: 2014-08-18 Mon 09:00
  CLOCK: [2014-08-18 Mon 08:55]

I save the file, exit emacs, and go off to do other things that may or
may not include playing larn.  This seems to be the important part
(saving and exiting the file, not playing larn).

I get back to my desk, run emacs, and try to clock out of the task
with C-c C-x C-o.  I get an error No active clock.  I get this same
error whether my cursor is on the TODO line or the CLOCK line.

Now it gets weird.  I try to clock in again with C-c C-x C-i.
I get a warning of a Dangling clock started 60 minutes ago and
I'm asked to Select a Clock Resolution Command.  So clearly it
sees that there is an open clock that needs to be resolved somehow,
except C-c C-x C-o still maintains No active clock.

I don't have the self-confidence to ask How do I file a bug report?
Instead I will ask What did I do wrong?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] clock-in clock-out problems

2014-08-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Joost Helberg jo...@snow.nl, who said:
Dear Hymie,

The customizable variable: 
 org-clock-persist

is used for solving this.

Thanks for the info.  However, when I tried it out, I get asked
Resume clock (test) (y or n)  If I answer n then the problem recurs
(as I would expect).  If I answer y, then I get an error
(lines cut to 75-ish, but I can try to send the full entire error message
if needed)

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (cond ((and org-clock-in-resume (looking-at (concat ^[   ]* org-cloc
  (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (
  (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back
  (save-excursion (if (and selected-task (marker-buffer selected-task)) (pro
  (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) 
  (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clo
  org-clock-in()
[...]

In either case, No active clock.

I'm honestly not sure in what circumstances I would **not** want the
clock to be persistent, but oh well.

BTW: why do you leave emacs?

There is a certain flame war that I do not wish to invoke.  Let's just
say that I've been using a different editor for xxVIi years and I've
grown accustomed to it.  The only thing I currently use emacs for is
org-mode.

But sometimes I have to log out. Sometimes my work network drops and it
logs me out for me.  Sometimes I move from machine to machine and have
to edit my files from elsewhere.  There are tons of reasons why I can't
just leave emacs running.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net


  I've discovered a problem with clocking-in and clocking-out.  I think
  this used to work in the past (when I ran 8.2.7a and/or 8.2.7b), but
  I've had the same problem twice (both with 8.2.7c) .

  I have a TODO scheduled for today:
  * TODO run clamav on machine
SCHEDULED: 2014-08-18 Mon 09:00

  I get to work and start it with C-c C-x C-i
  * TODO run clamav on machine
SCHEDULED: 2014-08-18 Mon 09:00
CLOCK: [2014-08-18 Mon 08:55]

  I save the file, exit emacs, and go off to do other things that may or
  may not include playing larn.  This seems to be the important part
  (saving and exiting the file, not playing larn).

  I get back to my desk, run emacs, and try to clock out of the task
  with C-c C-x C-o.  I get an error No active clock.  I get this same
  error whether my cursor is on the TODO line or the CLOCK line.

  Now it gets weird.  I try to clock in again with C-c C-x C-i.
  I get a warning of a Dangling clock started 60 minutes ago and
  I'm asked to Select a Clock Resolution Command.  So clearly it
  sees that there is an open clock that needs to be resolved somehow,
  except C-c C-x C-o still maintains No active clock.

  I don't have the self-confidence to ask How do I file a bug report?
  Instead I will ask What did I do wrong?

  --hymie!http://lactose.homelinux.net/~hymie   




Re: [O] clock-in clock-out problems

2014-08-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Nick Dokos ndo...@gmail.com, who said:
hy...@lactose.homelinux.net (hymie!) writes:

 In our last episode, the evil Dr. Lacto had captured our hero,
   Joost Helberg jo...@snow.nl, who said:
Dear Hymie,

The customizable variable: 
 org-clock-persist

is used for solving this.

 Thanks for the info.  However, when I tried it out, I get asked
 Resume clock (test) (y or n)  If I answer n then the problem recurs
 (as I would expect).  If I answer y, then I get an error
 (lines cut to 75-ish, but I can try to send the full entire error message
 if needed)

 Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
   goto-char(nil)
   (cond ((and org-clock-in-resume (looking-at (concat ^[   ]* org-cloc
   (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (
   (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back
   (save-excursion (if (and selected-task (marker-buffer selected-task)) (pro
   (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) 
   (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clo
   org-clock-in()
 [...]

I added the following to my .emacs

--8---cut here---start-8---
(require 'org-clock)
(setq org-clock-persist t)
(org-clock-persistence-insinuate)
--8---cut here---end---8---

I didn't have (require 'org-clock) ; just added it; no help.

If you get an error, then it might be a bug in your version. Post the
version along with the complete backtrace (preferably using
org-submit-bug-report).

The entry that I'm using is just

* TODO clock test
  CLOCK: [2014-08-18 Mon 16:20]

(This is the Messages that you asked for in the other post)

(emacs zz.org)
For information about GNU Emacs and the GNU system, type C-x h C-a.
Restoring clock data
Loading /home/hymie/.emacs.d/org-clock-save.el (source)...done
Resume clock (clock test) (y or n)  y
Matched 2014-08-18 Mon 16:20
Entering debugger...
Quit

(This is the org-submit-bug-report)

Emacs  : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.13)
 of 2014-06-17 on herman
Package: Org-mode version 8.2.7c (8.2.7c-dist @ /home/hymie/org-mode/lisp/)

current state:
==
(setq
 org-agenda-log-mode-items '(closed clock state)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-clock-in-resume 'auto-restart
 org-agenda-skip-scheduled-if-done t
 org-clock-persist t
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-habit org-info
   org-irc org-mhe org-rmail org-w3m)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-clock-auto-clock-resolution nil
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-skip-deadline-if-done t
 org-mode-hook '(org-clock-load
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append)
   (quote local))
  )
 org-babel-result-hide-spec org-babel-hide-all-hashes
 turn-on-font-lock)
 org-directory ~
 org-from-is-user-regexp \\hymie!\\
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-todo-keywords '((sequence TODO(t) WAIT(w@/!) | DONE(d!)
  CANCELED(c@))
 )
 org-agenda-files '(~/org/)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] clock-in clock-out problems

2014-08-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Nick Dokos ndo...@gmail.com, who said:
hy...@lactose.homelinux.net (hymie!) writes:

 (This is the Messages that you asked for in the other post)

 (emacs zz.org)
 For information about GNU Emacs and the GNU system, type C-x h C-a.
 Restoring clock data
 Loading /home/hymie/.emacs.d/org-clock-save.el (source)...done
 Resume clock (clock test) (y or n)  y
 Matched 2014-08-18 Mon 16:20
 Entering debugger...
 Quit


Sorry.  I missed the backtrace.  I hope this works, the lines are
longer than the permitted 78 characters.

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (cond ((and org-clock-in-resume (looking-at (concat ^[   ]* 
org-clock-string  \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}  *\\sw+.? 
+[012][0-9]:[0-5][0-9]\\)\\][   ]*$))) (message Matched %s (match-string 1)) 
(setq ts (concat [ (match-string 1) ])) (goto-char (match-end 1)) (setq 
org-clock-start-time (apply (quote encode-time) (org-parse-time-string 
(match-string 1 (setq org-clock-effort (org-entry-get (point) 
org-effort-property)) (setq org-clock-total-time (org-clock-sum-current-item 
(org-clock-get-sum-start ((eq org-clock-in-resume (quote auto-restart)) 
(message Cannot restart clock because task does not contain unfinished clock) 
(ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers \n) 
(backward-char 1) (org-indent-line) (if (and (save-excursion (end-of-line 0) 
(org-in-item-p))) (progn (beginning-of-line 1) (org-indent-line-to (- 
(org-get-indentation) 2 (insert org-clock-string  ) (setq 
org-clock-effort (org-entry-get (point) org-e
 ffort-property)) (setq org-clock-total-time (org-clock-sum-current-item 
(org-clock-get-sum-start))) (setq org-clock-start-time (or (and 
org-clock-continuously org-clock-out-time) (and leftover (y-or-n-p (format You 
stopped another clock %d mins ago; start this one from then?  (/ ... 60))) 
leftover) start-time (org-current-time org-clock-rounding-minutes t))) (setq ts 
(org-insert-time-stamp org-clock-start-time (quote with-hm) (quote inactive)
  (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or 
interrupting (move-marker org-clock-interrupted-task nil)) (run-hooks (quote 
org-clock-in-prepare-hook)) (org-clock-history-push) (setq 
org-clock-current-task (nth 4 (org-heading-components))) (cond ((functionp 
org-clock-in-switch-to-state) (looking-at org-complex-heading-regexp) (let 
((newstate (funcall org-clock-in-switch-to-state (match-string 2 (if 
newstate (org-todo newstate ((and org-clock-in-switch-to-state (not 
(looking-at (concat org-outline-regexp [ ]* 
org-clock-in-switch-to-state \\ (org-todo 
org-clock-in-switch-to-state))) (setq org-clock-heading (cond ((and 
org-clock-heading-function (functionp org-clock-heading-function)) (funcall 
org-clock-heading-function)) ((nth 4 (org-heading-components)) 
(replace-regexp-in-string \\[\\[.*?\\]\\[\\(.*?\\)\\]\\] \\1 
(match-string-no-properties 4))) (t ???))) (org-clock-find-position 
org-clock-in-resume) (cond ((and org-clock-in-resu
 me (looking-at (concat ^[ ]* org-clock-string  
\\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}  *\\sw+.? 
+[012][0-9]:[0-5][0-9]\\)\\][   ]*$))) (message Matched %s (match-string 1)) 
(setq ts (concat [ (match-string 1) ])) (goto-char (match-end 1)) (setq 
org-clock-start-time (apply (quote encode-time) (org-parse-time-string 
(match-string 1 (setq org-clock-effort (org-entry-get (point) 
org-effort-property)) (setq org-clock-total-time (org-clock-sum-current-item 
(org-clock-get-sum-start ((eq org-clock-in-resume (quote auto-restart)) 
(message Cannot restart clock because task does not contain unfinished clock) 
(ding) (sit-for 2) (throw (quote abort) nil)) (t (insert-before-markers \n) 
(backward-char 1) (org-indent-line) (if (and (save-excursion (end-of-line 0) 
(org-in-item-p))) (progn (beginning-of-line 1) (org-indent-line-to (- 
(org-get-indentation) 2 (insert org-clock-string  ) (setq 
org-clock-effort (org-entry-get (point) org-effort-property)) (setq org-clo
 ck-total-time (org-clock-sum-current-item (org-clock-get-sum-start))) (setq 
org-clock-start-time (or (and org-clock-continuously org-clock-out-time) (and 
leftover (y-or-n-p (format You stopped another clock %d mins ago; start this 
one from then?  ...)) leftover) start-time (org-current-time 
org-clock-rounding-minutes t))) (setq ts (org-insert-time-stamp 
org-clock-start-time (quote with-hm) (quote inactive) (move-marker 
org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker 
(save-excursion (org-back-to-heading t) (point)) (buffer-base-buffer)) (setq 
org-clock-has-been-used t) (if (or (eq org-clock-clocked-in-display (quote 
mode-line)) (eq org-clock-clocked-in-display (quote both))) (progn (or 
global-mode-string (setq global-mode-string (quote ( (or (memq (quote 
org-mode-line-string) global-mode

Re: [O] MobileOrg documentation?

2014-08-07 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Eric Abrahamsen e...@ericabrahamsen.net, who said:

I use it, but only in one direction -- computer to tablet. And mostly
just for having meeting/appointment data with me as I wander around
looking for whoever it is I'm supposed to meet.

I don't do the other direction (tablet to computer). Syncing has caused
me enough difficulties in the past that I'm only comfortable using
uni-directional syncing, not bi-directional.

Ditto.  Syncing works great computer-to-tablet.  Going tablet-to-computer,
not so much.  I'm not sure if the problem is
* my unfamiliarity with OrgMode
* my unfamiliarity with WebDav
* permissions are too strict
* MobileOrg not creating the sync files correctly
* OrgMode not processing the sync files correctly
but it's just not that important to me right now.  I have my notes (mostly
tasks) available, and that's what counts.  I can update them whenever.

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] More detail in the agenda logbook?

2014-08-06 Thread hymie!
Hi again.

So I've got a few repetitive tasks, for example

* TODO machine backups
** TODO machine 1
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 2
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 3
*** TODO create backup
*** TODO copy backup to DVD
** TODO machine 4
*** TODO create backup
*** TODO copy backup to DVD

It's the same set of tasks for each machine.

When I complete these tasks and look at the Agenda Logbook, I see
this:

  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE create backup
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD
  State: (DONE) DONE copy backup to DVD

I'd really like to see something along the lines of
  State: (DONE) DONE machine backups / machine 1 / create backup
  State: (DONE) DONE machine backups / machine 2 / create backup
  State: (DONE) DONE machine backups / machine 3 / create backup
  State: (DONE) DONE machine backups / machine 4 / create backup

or

  State: (DONE) DONE machine backups 
 machine 1 
 create backup
  State: (DONE) DONE machine backups 
 machine 2 
 create backup
  State: (DONE) DONE machine backups 
 machine 3 
 create backup
  State: (DONE) DONE machine backups 
 machine 4 
 create backup

Is this possible?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




[O] Agenda, Deadline, DONE

2014-08-05 Thread hymie!
Greetings.  I'm new to OrgMode, and I'm still working my way through.  It
has a lot of the old functionality and features of the PalmPilot Bonsai
program, which I miss terribly, and I hope you take that as a compliment.

Anyway, I'm not sure if I'm doing something wrong or I just don't yet
understand the OrgMode way.

I have a TODO that looks like this (I had to pull out the details, of course):

** DONE task number 3
   SCHEDULED: 2014-07-30
   - State DONE   from TODO   [2014-07-30 Wed 14:47]
   DEADLINE: 2014-08-08

In my Agenda, I see this:

Friday  8 August 2014
  file:   Deadline:   DONE task number 3

It seems to me that, if the task is already completed, then I no longer care
about the deadline.  It's done.  So I'd rather not see it in the Agenda.

I guess I could just remove the deadline from the task itself, but I kinda
like having the historical info (that I finished a week and a half early).

Is there a way to remove deadlines for DONE tasks from the Agenda?

hymie!
hy...@lactose.homelinux.net




Re: [O] Agenda, Deadline, DONE

2014-08-05 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  SabreWolfy sabrewo...@gmail.com, who said:
 (setq org-agenda-skip-deadline-if-done t)

Perfect!  Thanks!

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net