Big problem: org agenda freezes my process

2021-04-30 Thread Tory S. Anderson
I've been trying to debug a nearly show-stopping issue for a few weeks now; the 
next step is a more thorough bisection of my setup, but I wanted to send this 
in case anyone else experiences this or already knows the solution.

Lately, when I try to view an orgmode agenda it seems that two things make it 
cause my emacs CPU threat to spin to max and freeze up, which is a huge problem 
since I'm an exwm user and live in my agenda view. As far as I've been able to 
tell, when an item from today is clocked into multiple times in the same day, 
it prompts most agenda actions to result in a freeze and some kind of loop that 
is binding up my system. It has some gaps, so if I spam C-g I will eventually, 
usually, escape given 30 seconds to 2 minutes.

I first ran into this problem thinking it was because I had an entry with a 
"+1d" note on it, so it would always show up; but inconsistent results led me 
to the more precise discovery that it's apparently when it is logged in to 
multiple times in the day AND when it is shown with =(org-agenda-show-log t)=, 
which I had on my default. At its worst, even moving the cursor in the agenda 
buffer would trigger the freezing, let alone actually clocking in/out of 
anything. However, when I am not showing the log, it seems like it's ok. I've 
tried =toggle-debug-on-quit" but I don't recognize anything in the stack trace 
that actually tells me what it is doing when it spins to a halt.

I'm currently on org mode version 9.3.7. I've tried with different versions but 
without a change in behavior. This, combined with the fact that the issues seem 
to have begun in the past month, indicates that it probably isn't orgmode 
itself causing this issue, but I haven't located what it IS yet. If anyone has 
ideas on how to debug this without a bisection, or an has dealt with this 
before, I'm more than eager to hear it; in the meanwhile, I'll perform a more 
thorough bisection of my init file as time permits.

- Tory



Agenda clock-report-mode doesn't observe agenda filters

2020-12-14 Thread Tory S. Anderson
I love org-agenda-clockreport-mode . However, I have several files that include 
my work projects, and they all have my :WORK: tag on them. I want to get the 
number of hours put into :WORK: for the period and understand that the way is 
supposed to be to just filter my agenda view to be what I am interested in, 
then look at the associated clockreport at the bottom. However, the clockreport 
seems to always calculate everything, regardless of my agenda filters (showing 
time results for things NOT showing with my current filters). Looks like a bug, 
unless I misunderstood something.

- Tory



Re: Reply-All noise

2020-10-09 Thread Tory S. Anderson
I do use reply-to-all (gnus-style), but I don't notice doubles. It might be 
because I have my client set up to do deduping, though.

 writes:

> Hi,
>
> I had this discussion in several mailinglists but gave up.
>
> But I am suprised to see this phenomenon in a emacs related (means:
> "super nerdy") mailinglist, too.
>
> So tell me please how do you handle this "problem"? Or do I setup
> something wrong with my list account?
>
> From my point of view, the problem is that most of you press "Reply
> All" when answering to a mailinglist posting. But that is IMO wrong
> because you answer to the list AND to the thread opener in that case.
>
> So the thread opener receive two (nearly) identical messages.
>
> Do you receive double mails? Doesn't it bother you?



Re: recursive checkbox counting

2020-10-01 Thread Tory S. Anderson
The way I've made this work is with the following property:

   :COOKIE_DATA: ALL

But I suppose I haven't tried if that's fully recursive.

HTH,
- Tory

Alan Schmitt  writes:

> Hello,
>
> I'm trying to recursively count checkboxes, with intermediate counting:
>
> * [0/0] 2020
> :PROPERTIES:
> :COOKIE_DATA: checkbox recursive
> :END:
> ** [1/1] Week 39
> - [X] [[file:2020-09-29.org][§:2020-09-29 (Tuesday)]]
> ** [2/2] Week 36
> - [X] [[file:2020-09-08.org][§:2020-09-08 (Tuesday)]]
> - [X] [[file:2020-09-07.org][§:2020-09-07 (Monday)]]
>
> Unfortunately I don't know what property I need to set on the top-level
> node to recursively count everything. I would like to see [3/3] there.
> Is there a way to do it?
>
> Thanks,
>
> Alan



Re: Problem in 9.3: (next-error) broken

2020-08-29 Thread Tory S. Anderson
Perhaps I was on an old version, although I don't think it was that old.

In any case, I keep having org-occur-next-match set away from nil, and I'm 
actually having trouble figuring out which hook will fix it, since 
org-mode-hook doesn't seem to be doing it. Instead I end up manually evaluating 
=(setq next-error-function nil)= every time I need next-error.

Any suggestions?

Kyle Meyer  writes:

> Tory S. Anderson writes:
>
>> I discovered teh cause of this error is that new versions of orgmode
>> sets next-error-function and so breaks the. I've added a hook to clear
>> this in orgmode and I can navigate my grep properly again.
>
> I'm not having any luck triggering the issue, but in any case there
> seems to be something missing from that explanation.  Org has set
> next-error-function to org-occur-next-match since dd2346134 (Implement
> next-error and previous-error functionality for sparse trees,
> 2011-01-06), and the definition of org-occur-next-match hasn't changed
> substantially since.



Re: Problem in 9.3: (next-error) broken

2020-08-24 Thread Tory S. Anderson
I discovered teh cause of this error is that new versions of orgmode sets 
next-error-function and so breaks the. I've added a hook to clear this in 
orgmode and I can navigate my grep properly again.

"Tory S. Anderson"  writes:

> Running 9.3 as included in emacs 27, I have found a breaking error that I am 
> not sure how to debug any further. Here's my workflow:
>
> 1 or 2. Execute (find-grep) for something that brings results
> 1 or 2. Switch to an orgmode buffer
> 3. Attempt C-` (next-error)
>
> Result: user-error: No more matches
>
> Switch to a non-org buffer and try again -- it works properly, even without 
> re-grepping.
>
> This error DID occur in emacs -Q, so it shouldn't be the result of any 
> competing packages.
>
> Any suggestions to recover my workflow?
>
> Thanks,
>
> - Tory



Problem in 9.3: (next-error) broken

2020-08-22 Thread Tory S. Anderson
Running 9.3 as included in emacs 27, I have found a breaking error that I am 
not sure how to debug any further. Here's my workflow:

1 or 2. Execute (find-grep) for something that brings results
1 or 2. Switch to an orgmode buffer
3. Attempt C-` (next-error)

Result: user-error: No more matches

Switch to a non-org buffer and try again -- it works properly, even without 
re-grepping.

This error DID occur in emacs -Q, so it shouldn't be the result of any 
competing packages.

Any suggestions to recover my workflow?

Thanks,

- Tory



begin_quote

2020-06-06 Thread Tory S. Anderson
A couple questions here.

when I type =

How to annotate past clock entries so the note shows in agenda?

2020-06-05 Thread Tory S. Anderson
Hello all,

When I clock out of an entry I have a pop up from (org-add-log-note); I can add 
a note which will appear in my agenda right after the clock item. Often times, 
though, I want to go back through my day's agenda and add these; for example, 
upon marking "done" on a task it automatically clocks me out and does not 
invite me to take a note. Or at journaling time at day's end I'd like to add 
such a note that would be visible in my agenda.

The prompt comes from org-store-log-note called by org-add-log-note. The latter 
checks org-log-note-purpose. That's as far as my sleuthing has been able to go, 
though; I can manually call the function to receive the prompt for adding a 
clock-out note, but it doesn't stick it anywhere useful.

How can I add clock-out notes after the event? Must I manually go to the clock 
event and type in my note there, or can I utilize the same prompt somehow?

Thanks for any help!

- Tory



org-clip-link should be included in core

2020-05-16 Thread Tory S. Anderson
Per alphapapa's suggestion to bring this up to this list, it seems that 
everyone (doom, spacemacs, and individuals) are rolling their own of a 
functionality that should be included in core: the ability to de-linkify text 
at point, leaving just the text without orgmode surroundings. One person claims 
it's already in there, but I don't see anything like =clip-link= in the actual 
code from https://code.orgmode.org/bzg/org-mode/src/master/lisp.

Discussion happening here:
https://www.reddit.com/r/emacs/comments/gjm8q6/delinking_orgmode_text/



Re: [O] Orgmode repeater intervals with end date

2018-01-30 Thread Tory S. Anderson
I was very pleased to find, when browsing the manual for a 
different reason, the 'orgmode' solution to the problem, which 
provides daily customization ability and also maintains 
exportability: `org-clone-subtree-with-timeshift`[1], with which I 
can easily accomplish my goals and even consolidate my 
notes-for-that-event-instance. I'm just writing this here because 
it has totally upgraded my planning experience and I wish I'd 
known about it sooner!


Thanks all!

- Tory

Footnotes: 
[1]  https://orgmode.org/manual/Structure-editing.html





Re: [O] Orgmode repeater intervals with end date

2018-01-17 Thread Tory S. Anderson

Thanks; oddly, that works.

--8<---cut here---start->8---
*** TODO Personal Meeting
   DEADLINE: <2018-01-10 Wed 16:00 .+2w>--<2018-04-18 Wed>
--8<---cut here---end--->8---

I still get a daily count on every day in the interim:

--8<---cut here---start->8---
(8/99):  TODO Personal Meeting
--8<---cut here---end--->8---

But I suppose I can work around that. Oddly, it doesn't seem to 
work with plain dates or with SCHEDULED: . Any idea why?


"numbch...@gmail.com" <numbch...@gmail.com> writes:


You can try this:
```
* Test repeat time range with end date
DEADLINE: <2018-01-01 Mon 12:00 .+2d>--<2018-01-13 Sat>
```
This will repeat, and end on the day 13. Also deadline works 
fine.


[stardiviner]     GPG key ID: 
47C32433
IRC(freeenode): stardiviner     Twitter:  
@numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 
2433

Blog: http://stardiviner.github.io/

On Thu, Jan 11, 2018 at 7:37 PM, <li...@wilkesley.net> wrote:

On 2018-01-10 18:24, ed...@openmail.cc wrote:
   
Message: 8

Date: Tue, 09 Jan 2018 22:16:56 -0700
From: torys.ander...@gmail.com (Tory S. Anderson)
To: orgmode list <emacs-orgmode@gnu.org>
Subject: [O] Orgmode repeater intervals with end 
date

Message-ID: <87incamgxj@byu.edu>
Content-Type: text/plain; format=flowed
   
Hi all,
   
When repeater intervals are set on on org dates (eg 
=

<2018-01-10
                                                    
Wed
16:00 +2w>=) the output is exported nicely to ical 
and

appears
nicely in agenda. Is there anyway to put an end-date 
on

org dates
so that the +2w will not just continue forever?
   
I could use org-class, but then it wouldn't be 
exported

to ical
nicely. I was hopefully with <2018-01-10 Wed 16:00
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put 
the

range as
counting every day in the interim. Is there an 
existing

way to
have an end-date on a repeating cycle?
   
- Tory
   
   
Have you tried with DEADLINE:? I seem to remember to 
have

read
something like that somewhere. Don't trust me. If it 
helps, I

am glad,
but I am not sure.
   
   
   
Have a look at https://www.gnu.org/software/emacs/manual/
html_node/emacs/Sexp-Diary-Entries.html However, I am not 
sure if

you can use an Emacs sexp to specify an end date.
   
Ian.
   




Re: [O] Orgmode repeater intervals with end date

2018-01-10 Thread Tory S. Anderson

I just tried

--8<---cut here---start->8---
   DEADLINE: <2018-04-19 Thu>
   <2018-01-10 Wed 16:00 +2w>
--8<---cut here---end--->8---

But unfortunately entries were still appearing after the 
deadline. 


ed...@openmail.cc writes:


Message: 8
Date: Tue, 09 Jan 2018 22:16:56 -0700
From: torys.ander...@gmail.com (Tory S. Anderson)
To: orgmode list <emacs-orgmode@gnu.org>
Subject: [O] Orgmode repeater intervals with end date
Message-ID: <87incamgxj@byu.edu>
Content-Type: text/plain; format=flowed

Hi all,

When repeater intervals are set on on org dates (eg 
=<2018-01-10
Wed 16:00 
+2w>=) the 
output is 
exported 
nicely to 
ical and 
appears
nicely in agenda. Is there anyway to put an end-date on org 
dates

so that the +2w will not just continue forever?

I could use org-class, but then it wouldn't be exported to ical
nicely. I was hopefully with <2018-01-10 Wed 16:00
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put the range as
counting every day in the interim. Is there an existing way to
have an end-date on a repeating cycle?

- Tory


Have you tried with DEADLINE:? I seem to remember to have read 
something like that somewhere. Don't trust me. If it helps, I am 
glad, but I am not sure.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email 
out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  15GB 
disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  




[O] Orgmode repeater intervals with end date

2018-01-09 Thread Tory S. Anderson

Hi all,

When repeater intervals are set on on org dates (eg =<2018-01-10 
Wed 16:00 +2w>=) the output is exported nicely to ical and appears 
nicely in agenda. Is there anyway to put an end-date on org dates 
so that the +2w will not just continue forever?


I could use org-class, but then it wouldn't be exported to ical 
nicely. I was hopefully with <2018-01-10 Wed 16:00 
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put the range as 
counting every day in the interim. Is there an existing way to 
have an end-date on a repeating cycle?


- Tory



Re: [O] Org citations, CSL and citeproc-el

2018-01-05 Thread Tory S. Anderson
Just a second on this; it's a fantastic and useful idea. 


Richard Lawrence  writes:


Dear Simonyi,

Simonyi András  writes:

a few days ago I've released the first public version of 
citeproc-el (https://github.com/andras-simonyi/citeproc-el), a 
CSL 1.01 citation processor library for Emacs.


Wow!  I don't know if you are aware, but we had discussed the 
possibility of building something like this on the list a few 
years back.  At the time it seemed like a lot more work than 
anyone was willing to do, and so the effort stalled.  Thanks so 
much for working on this -- it looks like you've done a ton of 
work!


The resulting link syntax is rather cumbersome so I'd like to 
ask your opinion about introducing an alternative org-mode 
citation syntax that handles all of these elements.  One option 
would be to use something very similar to pandoc's citation 
syntax (which I tried to follow as much as possible in the cite 
link descriptions of citeproc-orgref). 


We had a (very) long discussion about implementing a new 
citation syntax for Org in the spring of 2015.  Most of it took 
place in February and March; see:


https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/threads.html
https://lists.gnu.org/archive/html/emacs-orgmode/2015-03/threads.html 

And here is how I summarized the state of that discussion in 
June:


https://lists.gnu.org/archive/html/emacs-orgmode/2015-06/msg00426.html

The upshot was that we came to agreement on quite a few points 
about what citation syntax should look like, and those points 
have been implemented in Org syntax in the wip-cite branch of 
the Org repo.  (This branch is now long out of date and at the 
very least in need of a rebase onto current master, I suspect.) 
It would be really great to get things moving again.  Using your 
code to provide citation processing during Org export for the 
syntax that's already been implemented would be the place to 
start.


There are other aspects of the syntax we agreed on that are not 
implemented yet; as I recall, the idea was to get a minimal 
agreeable subset working, and then add to it based on real-world 
experience and feedback.


A more general question I'd like to raise how (or whether) you 
see citeproc-el's (and CSL's) potential place in the org-mode 
ecosystem.  There are a lot of directions which the further 
development could take (BibLaTeX support, citeproc-YAML 
bibliographies, CSL editing and CSL extensions etc.) and I'd be 
grateful to receive your input on which ones I should focus 
on. 


Here's my two cents on this. From what I recall about the 
discussion (it's hard to believe it's already been almost three 
years...), I would focus on two things:


1) BibLaTeX support.  Most Org users who want citation support 
want it primarily for LaTeX export, and BibLaTeX provides a good 
model of what we should try to achieve in Org citation support.


2) org-bibtex support.  Org-bibtex is a library that represents 
citation data via Org's property syntax.  Some people use this 
and it would be great to have it integrated with the new 
citation syntax and export.  That would provide an end-to-end 
citation solution that is completely native to Org and Emacs. 

Again, thanks for jump-starting this effort!  I look forward to 
contributing to it this spring.




Re: [O] org to static site?

2017-12-01 Thread Tory S. Anderson
I've got a single-chord setup with Hugo, adapted from: 
http://www.holgerschurig.de/en/emacs-blog-from-org-to-hugo/


I'm very pleased with it.

- Tory

George myglc2 Clemmer  writes:


On 05/31/2017 at 12:00 Matt Price writes:

I'm trying to wean myself off of Wordpress for next year's 
teaching websites, and am wondering what solutions other people 
are using for turning a collection of org pages and/or subtrees 
into a static html site. I am leaning towards Hugo but honestly 
not for any sensible reason; I've seen other people use Jekyll,
though the fact that Github doesn't support direct conversion 
from org-mode removes some of Jekyll's appeal; and I know there 
are a number of other solutions too. 


So, I would love to hear what you all recommend.

[...]

No doubt too late for your teaching website, but you may find 
this interesting ...


https://github.com/myglc2/emacsite

HTH - George




Re: [O] Footnotes-per-element?

2017-11-01 Thread Tory S. Anderson
THanks for this; it may be a workable solution. The trick is, I 
didn't generate the footnotes myself -- I have concatenated a 
bunch of html -> orgmode pandoc outputs. Still an elisp 
find-and-replace might do what I need. I was just hoping for a 
quick switch to flip for localized footnotes.


Thanks!
- Tory

Kaushal Modi <kaushal.m...@gmail.com> writes:


On Fri, Oct 27, 2017 at 8:12 AM Tory S. Anderson <
torys.ander...@gmail.com> wrote:

I have a single org file that represents a collection of
articles;
each article starts with a first-level heading and includes 
its
own footnotes, always restarting from 0. I have a ** 
Footnotes
section in each article with the appropriate footnotes, but 
it
isn't respected when I follow one of the footnote 
references;
following [fn:3] in the any article, for example, will take 
me to

[fn:3] of the first article's footnotes. What's the best way
around this, so that each article will use its own footnotes
section?


I just increment the footnotes across all the articles. So, for
example, if article 1 has footnotes 1 and 2, article 2 will 
continue
from footnote number 3. The beauty is that if you export article 
2,

it will auto-reset the footnote reference to number 1.

The key is to not manually number the footnotes and let C-c C-x 
f

(bound to org-footnote-action) do its thing.

Hope that helps. 
--

Kaushal Modi




[O] Footnotes-per-element?

2017-10-27 Thread Tory S. Anderson
I have a single org file that represents a collection of articles; 
each article starts with a first-level heading and includes its 
own footnotes, always restarting from 0. I have a ** Footnotes 
section in each article with the appropriate footnotes, but it 
isn't respected when I follow one of the footnote references; 
following [fn:3] in the any article, for example, will take me to 
[fn:3] of the first article's footnotes. What's the best way 
around this, so that each article will use its own footnotes 
section?


Thanks in advance,
- Tory



Re: [O] Ediff org files starts folded

2017-10-25 Thread Tory S. Anderson
I've wondered the same thing. Normally I just manually  and 
open all bullets before ediffing, but this assumes, of course, 
that the file is already open. 


Alex Branham  writes:


Hello -

Whenever I ediff an org file, the three windows start with the 
content folded and out of site. I have to navigate to windows A, 
B, and C and hit S- until everything is visible. Does 
anyone know a way to start org mode files unfolded when ediffing 
them?


Thanks!
Alex




Re: [O] helm-org-clock for using helm rather than orgmode select menu

2016-11-10 Thread Tory S. Anderson
Are you sure? In my org 9.0 box, I still see a non-helm 
"org-agenda" menu (one of the things I haven't gotten around to 
helm-ifying yet). 


cesar mena <cesar.m...@gmail.com> writes:


"Tory S. Anderson" <torys.ander...@gmail.com> writes:

I've made the following adjustment to org-clock-select-task 
that 
allows you to (optionally) use helm to select, rather than 
orgmode's built in screens. Eventually I'd like to see all 
orgmode 
commands have the option of using helm rather than their custom 
screens, as Helm is a great package. Until then, hopefully you 
can 
find this useful or give useful suggestions.


https://github.com/WorldsEndless/helm-org-clock


from the 9.0 changelog it looks like this was done?

 Remove all options related to ido or iswitchb

 This includes org-completion-use-iswitchb and
 org-completion-use-ido. Instead Org uses regular functions, 
 e.g.,

 completion-read so as to let those libraries operate.

best,
- cm




[O] helm-org-clock for using helm rather than orgmode select menu

2016-11-10 Thread Tory S. Anderson
I've made the following adjustment to org-clock-select-task that 
allows you to (optionally) use helm to select, rather than 
orgmode's built in screens. Eventually I'd like to see all orgmode 
commands have the option of using helm rather than their custom 
screens, as Helm is a great package. Until then, hopefully you can 
find this useful or give useful suggestions.


https://github.com/WorldsEndless/helm-org-clock



[O] Specifing an agenda org-class time without hours in headline

2016-11-10 Thread Tory S. Anderson
The documentation [1] says that hour times can be specified on a 
recurring object with a given syntax, but I have never been able 
to make it work. Is the documentation wrong? I try:


--8<---cut here---start->8---
** [#A] 17:30 Parent Time
  <%%(org-class 2016 2 7 2016 12 31 4)> 5:30pm-8:30pm Parent Time
--8<---cut here---end--->8---

but if I remove the 17:30 from the title, it receives no time at 
all. Any help? 



Footnotes: 
[1]  http://orgmode.org/worg/org-faq.html#org-class





Re: [O] org-contacts bug when completing tags in gnus

2016-11-10 Thread Tory S. Anderson
Yeah, I dodge around these sort of problems a lot with 
org-contacts. It is in need of a curator and probably a rewritten 
version; it also doesn't play nice with Helm. I haven't tried it 
with org 9.0 yet, though. 


Alan Schmitt  writes:


Hello,

I'm giving org-contacts a try, and I'm having an error when I'm 
trying
to complete a tag (something should be a sequence but it's a 
number).

Digging a little into it, it seems that the problem is during
hilighting, where a fontified string is returned by 
all-completions
instead of a list (in `completion-pcm--all-completions' in 
minibuffer.el),
which then make `completion-hilit-commonality' fail because it 
expects a
list. I'm only seeing this problem with org-contacts, so I'm 
wondering

if it might be the reason for this problem in emacs code.

My contacts file looks like this:

* Test 
:test:

:PROPERTIES:
:EMAIL: alan.schm...@polytechnique.org
:END:

To reproduce, save this in some path/contacts.org file, do the 
following


  (require 'org-contacts)
  (org-contacts-gnus-insinuate)
  (setq org-contacts-files (list "path/contacts.org"))
  
then start an email in gnus, in the To field write +, then hit 
TAB.


I'm using org-mode 9 and emacs 25.1.1. Is this a known problem 
with

them?

Thanks,

Alan




[O] Useful Org Agenda Function: Add "Today" to event

2016-10-27 Thread Tory S. Anderson
My regular org workflow often sees me having unfinished tasks 
during a day (be it an email request, a phone call, a 
long-standing one-off, etc). In these cases I find it useful to 
add a timestamp for "today" to the item so that I still have 
original scheduling/deadline information, but it shows up on 
today's daily view. This is especially handy since timestamp 
entries can be stacked without interfering with each other, so I 
can keep a record of all past instances as well. I have this 
working fine for me via a keyboard macro to be used in agenda 
mode, which goes to the org file of the event, moves to the 
heading, moves down a couple lines, and inserts the deadline, and 
returns. Certainly a non-macro way would be fine here, but this 
was the easiest and fastest for me and meets my 
needs. Improvements are welcome! Otherwise, hopefully this 
function is useful. (Please let me know if some other function 
already does this)


--8<---cut here---start->8---
(fset 'tsa/org-agenda-add-today
 (lambda ( arg) "Keyboard macro." (interactive "p")
   (kmacro-exec-ring-item (quote ([return 3 16 14 5 return 21 
   3 46 return 24 98 return] 0 "%d")) arg)

   (message "Gave event \"TODAY\" date")))
(with-eval-after-load 'org-agenda (define-key org-agenda-mode-map 
(kbd "C-c .") 'tsa/org-agenda-add-today))
(with-eval-after-load 'org-agenda (define-key org-agenda-mode-map 
(kbd "C-c C-.") 'tsa/org-agenda-add-today))

--8<---cut here---end--->8---

- Tory



[O] Why does Helm break org-contact group add?

2016-09-06 Thread Tory S. Anderson
I thoroughly enjoy Org Contact for managing my contacts. One of 
its features is the ability to enter + and have an 
entire group of contacts added to the To: or Cc: . Unfortunately, 
when global-helm-mode is enabled, it doesn't work; when `+ 
TAB` is entered, an error occurs:


Lisp error: (wrong-type-argument sequencep 65)

I'm new enough to debugging elisp that the lengthy error trail 
isn't very decipherable. Can anyone give me a hand on how to get 
the TAB working with the contact-fill? 



[O] Duplicating DEADLINE and date in capture templates

2016-05-03 Thread Tory S. Anderson
I have some capture templates that supply both a deadline and a 
regular date. This is because I want the days-in-advance notice of 
deadlines when I view in my agenda, but deadlines are not exported 
to ICAL so I need a regular date as well. However, these two are 
always the same value. Any suggestions on how to clone them so I 
only need to enter them once?


--8<---cut here---start->8---
;; in my setq org-capture-templates
("tT" "Soon (tomorrow) TODO" entry (file+headline 
"/home/torysa/emacs/org/td.org" "Tomorrow")

 "* TODO %^{prompt}
			%^{Insert}T	DEADLINE: %^{Deadline}T%?" 
:prepend t)

--8<-------cut here---end--->8---

--
Tory S. Anderson
Computational Cognitive Narratologist & Application Developer
http://toryanderson.com



Re: [O] tables, comment in one line, export to html

2016-04-26 Thread Tory S. Anderson
Second the suggestion to make | / | columns ignored for export in 
mainstream orgmode. 


Uwe Brauer <o...@mat.ucm.es> writes:


> Hi Uwe
> On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer 
> <o...@mat.ucm.es> wrote:



> I have the same need now and just hacked something simple 
> together to

> export

> | / | /  ||  |
> |   | 1n | 2y |  3y |

Great!! thanks, I just tested it. So all columns having a / 
header are
ignored, at least for html and latex export. This is really 
great.
Thanks again. I'd say that code should be somehow included in 
mainstream

orgmode, if you don't mind?

regards

Uwe





--
Tory S. Anderson
Computational Cognitive Narratologist & Application Developer
http://toryanderson.com



Re: [O] State of things: Email with orgmode?

2016-04-26 Thread Tory S. Anderson
Gnorb looks really interesting, but is lacking a crucial "using 
it" section on the github [1], so I don't know what it can 
actually do or what a use-case would be. Does it do what org-mime 
does? 


Eric Abrahamsen <e...@ericabrahamsen.net> writes:


torys.ander...@gmail.com (Tory S. Anderson) writes:

For ages I've been hearing about people doing or wanting email 
with
orgmode. I've been using gnus for years, but am curious as to 
what is

possible with orgmode. My search engines aren't revealing any
explanations, but orgmode navigation combined with the 
composition
possiblities with things like html export and integration with 
orgmode
power seems like  nice potential. Orgmode already has a very 
useful
facility with taking links to Gnus messages, and the highly 
useful org
contacts; what else is out there? Is there a way to write and 
send
emails from orgmode, without just doing copy/paste/attach? 


I've got a package in Elpa called Gnorb, that provides some 
integration

between Org and Gnus. It also includes a function
`gnorb-org-email-subtree' that lets you export a subtree as a 
text or

file, and send it as an email. That might also be useful.






Footnotes: 
[1]  https://github.com/girzel/gnorb


--
Tory S. Anderson
Computational Cognitive Narratologist & Application Developer
http://toryanderson.com



[O] State of things: Email with orgmode?

2016-04-25 Thread Tory S. Anderson
For ages I've been hearing about people doing or wanting email 
with orgmode. I've been using gnus for years, but am curious as to 
what is possible with orgmode. My search engines aren't revealing 
any explanations, but orgmode navigation combined with the 
composition possiblities with things like html export and 
integration with orgmode power seems like  nice potential. Orgmode 
already has a very useful facility with taking links to Gnus 
messages, and the highly useful org contacts; what else is out 
there? Is there a way to write and send emails from orgmode, 
without just doing copy/paste/attach? 



[O] Duplicating Capture Times

2016-03-21 Thread Tory S. Anderson
I use orgmode capturing to schedule events. The date ends up going 
in to three places: since my agenda file has things scheduled in a 
tree, it asks where in the tree to put it. Then it asks, what 
regular date to insert for the schedule; then it asks what date to 
use for the deadline. I use deadlines because of how they function 
in orgmode, and I use regular dates so they are exported properly 
for Google Calendar. But how can I cause two or even all three of 
these to use the answer from just one prompting of the date, so I 
don't have to specify so many times?


Thanks,
- Tory



Re: [O] TODO items which do not appear in the agenda?

2015-10-30 Thread Tory S. Anderson
I'm a little confused; for me, by default, TODO items do NOT 
appear in the agenda. They only appear if connected to a deadline, 
date, or schedule item. I have files of hundreds of TODO items 
that don't appear in agenda unless I give them a date. I think 
this is the default behavior. 


Marcin Borkowski  writes:


Hi all,

I would like to have some TODO items, so that I can mark some 
tasks as
incomplete; however, I don't want them to appear in the agenda, 
so that

it's not too cluttered.  Use case:

* Blog
** DONE Blog post idea 1
** TODO Blog post idea 2

I know about (setq org-agenda-todo-list-sublevels nil). 
However,
marking the whole "Blog" headline as DONE only so that I don't 
see the

individual post ideas in my agenda seems hackish.

I also know that I could define my own TODO items and use 
filtering
(maybe even with a custom agenda command).  Maybe this is the 
way to go,

but somehow I'd prefer a simple set of TODO keywords
(TODO/DONE/CANCELED, for instance).

So, does the Org hive mind have any other ideas how to implement 
"TODO

items which do not appear in the agenda"?

TIA




Re: [O] Favorite way of syncing?

2015-09-11 Thread Tory S. Anderson
At the moment I'm using a self-hosted OwnCloud to do syncing; it's 
super easy (takes care of itself), but sometimes conflicts are a 
problem (particularly when I forget to save my buffers before 
leaving work); if you notice it, though, it provides a conflict 
version (and has automatic versioning a la Dropbox). 


Eric Abrahamsen <e...@ericabrahamsen.net> writes:


jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:


Tobias Frischholz writes:

I was wondering what is your favorite way of syncing your org 
files
and everything. 
[...] 
I’ve also read about org-sync and magit (git is an option for 
me).

And now I’m starting the get confused.


magit is just the emacs mode for git, if you don't have it and 
use git
you should really install it. But it does not sync anything you 
still
have to M-x magit  F F and M-x magit  P P, for 
pull and

push.

I have several computers and synchronize my org files with 
git. I
think it is the best option because I do not have to worry 
about the
sync not working (for example when I do not have a connection) 
and

conflicts in the files.


I do this, too. I don't think Magit helps much, in fact I'd be 
better
off writing functions for `emacs-startup-hook' and 
`kill-emacs-hook'

that do my pushes and pulls for me.

But for now, I just try to remember to commit and push before I 
leave a

machine.

This way, you also really learn to appreciate using "git fetch" 
and "git

status", rather than doing a blind "git pull".

Eric





--
Tory S. Anderson
Computational Cognitive Narratologist
http://toryanderson.com



[O] Org-Contacts skip archived contacts

2015-09-01 Thread Tory S. Anderson
It would be useful to mark a contact as "archived" so that it 
won't auto-fill in an email, as when I may want to look someone up 
in the future but don't need to contact them now. Judging by the 
docstring I thought the answer would be with 
`org-contacts-matcher` but I can't quite make sense of how this 
thing works. Is there a line I should add to this to tell it to 
ignore `:archive:` tags, or can someone think of an easier way? 


--8<---cut here---start->8---
(defcustom org-contacts-matcher
 (mapconcat 'identity (list org-contacts-email-property
 org-contacts-alias-property
 org-contacts-tel-property
 org-contacts-address-property
 org-contacts-birthday-property)
 "<>\"\"|")
 "Matching rule for finding heading that are contacts.
This can be a tag name, or a property check."
 :type 'string
 :group 'org-contacts)
--8<---cut here---end--->8---




[O] Suggestions on sync algorithms

2015-09-01 Thread Tory S. Anderson
I'm planning to make a mode that allows me to manage my Pivotal 
Tracker projects from orgmode; Pivotal Tracker exposes a rich JSON 
API and the basic task of mapping Pivotal data types to Org syntax 
is conceptually straight forward. But I'm trying to decide on the 
best way to perform syncronization so that changes on pivotal 
(which may be made by team members) are correctly synced with my 
local changes, and vice versa. I'm hoping for suggestions (links 
OK) on a clean way to perform this synchronization. One option 
would be to convert local and remote to org and then ediff the 
products; is there a more automatic way of which I should be 
aware?


- Tory



[O] Collaborative Team Project Management with Orgmode?

2015-08-21 Thread Tory S. Anderson
I've relied on Orgmode heavily for over half a decade, and I'm 
loathe to leave it. But what solutions have been found out there 
for using it collaboratively (where others are not using emacs), 
rather than just for personal task management (where it excels)? 
It has some integration with Trello, I know; some of my co-workers 
are advocating BaseCamp (...) and PivotalTracker. PivotalTracker 
looks pretty good, but I would rather find a way to leverage 
orgmode in a way that facilitates collaboration. What has worked 
for you? 



[O] org-agenda-custom-commands with org-agenda-filter-by-regexp

2015-08-20 Thread Tory S. Anderson
I've previously had success with using 
`org-agenda-tag-filter-preset` in `org-agenda-custom-commands` but 
I wanted to include OR logic on two different tags, which seemed 
beyond th tag-filter (which seems to use AND logic). In my agenda 
view I can use `=` to use a conditional on two tags, but I can't 
seem to duplicate that behavior in a custom command. With no 
errors it simply doesn't seem to work, and googling around has 
proved fruitless for giving examples; I've tried a number of 
different syntax without effect.


--8---cut here---start-8---
(setq org-agenda-custom-commands
 '((w.Work)
(wd Work Day
	 ((agenda  ((org-agenda-span 1) 
	 (org-agenda-start-on-weekday nil) 
	 (org-agenda-filter-by-regexp 
	 '(:\\(ODH\)\\|\\(AGENDA\\):

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


What's the proper way to get a working regexp filter in my 
custom-command? Thanks!




Re: [O] org-ref helm-bibtex notes

2015-06-16 Thread Tory S. Anderson
Yeah, helm bibtex is awesome. This has been a major topic of discussion in the 
module development. See: https://github.com/tmalsburg/helm-bibtex/issues/40

Last I talked with the developer, he was thinking hard about it and had maybe 
even started development on single-note file options. 

Julian Burgos jul...@hafro.is writes:

 Dear list,

 I have been using org-ref for a while, using reftex to insert citations in
 my org documents.  Now I am switching to helm-bibtex, which is pretty
 awesome.  I have a couple of question about the note files.  Org-ref uses
 a single file to keep notes (e.g. notes.org), but helm-bibtex assumes that
 notes are kept in separate files, one per article.  My questions are:

 a) Do you have a preference in the single file vs multiple files question?
  Are advantages/disadvantages?  I tend to prefer the single file option,
 it makes search easy and also I can add TODO items that later I can pull
 out in the agenda view.  With multiple files this would not be as easy. 
 Do you agree?

 b) Helm-bibtex identifies which references have a note file, adding a
 symbol on the reference list.  Can we make helm-bibtex look into a single
 file (say the notes.org file), look for the :Custom_ID: properties of
 the entries, and use that to mark the reference list?  I am teaching
 myself emacs-lisp but this is above my capacity right now.

 Many thanks,

 Julian



Re: [O] Javascript syntax highlighting?

2015-05-25 Thread Tory S. Anderson
I use somethign similar for blogs I write in orgmode. In my case, it depends on 
having a server-side library for syntax highlighting: I use 
google-code-prettify[1] on the server side and then just paste the exported 
code from orgmode, and it works for me. 

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

 If I edit a JavaScript file in emacs, I get beautiful syntax 
 highlighting. However, if I put the same code in a .org file between

 #+BEGIN_SRC Javascript
 ...
 #+END_SRC

 I get nothing but plain black text. Is there any way to get the syntax 
 highlighting in HTML output, so I can use it in a blog post?

 Thanks,
 -pd

Footnotes: 
[1]  https://code.google.com/p/google-code-prettify/




Re: [O] org-clock-persistence-insinuate not working anymore (25.0.5)

2015-05-25 Thread Tory S. Anderson
How about any suggestions on how to debug this, since it isn't actually 
throwing any errors (and I'm a novice emacs-debugger)? The tasks  list will 
contain interrupted task and recent task but none of the actual task names. 
(this comes from passing a single arg to org-clock-in)

torys.ander...@gmail.com (Tory S. Anderson) writes:

 I've been using the following code for several months to make it easy to 
 clock back in to my frequent tasks as I track my time usage:

 (org-clock-persistence-insinuate)
 (setq org-clock-persist t)

 A few days ago I updated emacs to the dev master and my clock is no longer 
 persisting; the list of recent tasks is perpetually nil. Any ideas on how 
 to fix this, or what happened?



[O] org-clock-persistence-insinuate not working anymore (25.0.5)

2015-05-23 Thread Tory S. Anderson
I've been using the following code for several months to make it easy to clock 
back in to my frequent tasks as I track my time usage:

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

A few days ago I updated emacs to the dev master and my clock is no longer 
persisting; the list of recent tasks is perpetually nil. Any ideas on how to 
fix this, or what happened?




[O] completing-read for org-clock-select-task: It works!

2015-03-24 Thread Tory S. Anderson
In my first attempt at actually adding functionality to an existing emacs 
library, I've written some code to make `org-clock-select-task' use 
completing-read instead of the built-in org menu if you set 
`org-select-task-completing', for those who would find this useful (it now 
works with Helm). It seems like my functions, which are backed by a hash table, 
ought to be more capable of removing (non-adjacent) duplicates from the list 
since the table keys are the strings themselves, but I still see them 
appearing. Why doesn't the hash table merge the entries (they seem to have 
identical keys)?

Should this adjustment be useful to anyone else, what would I do next to 
contribute? As this is a first forray into more public-use elisp, I'm also open 
to any other suggestions or tips. 

Code at: 
http://www.toryanderson.com/files/helm-org-clock.el



[O] Org-Timer has nice popups; how can I use them elsewhere?

2015-03-23 Thread Tory S. Anderson
So, orgmode timers have a nice popup when they run out; on my KDE, it's gentle 
GUI-box (not emacs) that nicely rises and falls. I would love to have this as 
how my appt reminders work, instead of the ugly minibuffer screeching; but 
looking through the org-timer code didn't give me any ideas. How can I achieve 
this? 



[O] Footnotes as links?

2015-03-21 Thread Tory S. Anderson
I guess this is either a feature request or a discussion point, but is there a 
good reason that footnotes aren't considered as links for the purposes of 
things like `org-next-link` (despite being displayed like links)? From where 
I'm sitting, this would be very useful for the sake of things like ace-links, 
which allows you to quickly navigate to on-screen links. 



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Tory S. Anderson
I'd love to. Unfortunately, search engines were unable to give me decisive 
answer on what an ECM is. 

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 After I use `org-clock-in` (using a C-u modifier and keyed globally), I 
 receive a message like the following: 
 Entry repeats: DEADLINE: 2015-03-04 Wed 14:00 +1w

 This message does not correspond to either the task I clocked out from or 
 the task I clocked in to. I assume this is a (minor) bug.

 Could you provide an ECM for this?

 Thank you.


 Regards,



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Tory S. Anderson
Alright; because of the need for a fully loaded agenda (which probably needs to 
include periodic appointments), I've been unable to duplicate this from `emacs 
-Q`. However, I can toggle it's happening in my working setup.

With a functional agenda including periodic files, with `(setq 
org-log-note-clock-out t)`, upon completing a note after clock-out I receive 
unidentified messages such as,
Entry repeats: DEADLINE: 2015-03-13 Fri 20:00 +1w 

This seems to occur regardless of the buffer I am accessing at the time of 
clock-out.
Can anyone else verify this happening in their working setup when clocking 
notes are enabled, as per above? 

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

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 I'd love to. Unfortunately, search engines were unable to give me
 decisive answer on what an ECM is.

 Heh.  I guessed what it meant, but not what it stood for, and found:

   http://orgmode.org/worg/org-faq.html

 Some users call this an ECM, a French acronym that means a
 minimal complete example.

 Cheers,
 -Brett.



Re: [O] What to use for tables with lengthy text in cells?

2015-03-05 Thread Tory S. Anderson
Not a bad idea, but this would be incompatible with the existing useof 
horizontal lines to separate sections and export to visual lines, right? 

Skip Collins skip.coll...@gmail.com writes:

 Here's another suggestion. There could be an optional org table mode
 in which horizontal lines are used to separate rows:

 | Lorem ipsum dolor sit amet,         | foo |
 | consectetur adipiscing elit. Sed    |     |
 | sit amet luctus sapien. Phasellus   |     |
 | malesuada, ipsum et hendrerit       |     |
 | mattis, neque neque sodales risus,  |     |
 | hendrerit consectetur enim ipsum eu |     |
 | felis.                              |     |
 |-+-|
 | Vestibulum ante ipsum primis in     | bar |
 | faucibus orci luctus et ultrices    |     |
 | posuere cubilia Curae; Nulla dictum |     |
 | iaculis sodales. Sed elementum      |     |
 | semper leo, venenatis lacinia odio  |     |
 | eleifend vitae. Aliquam lectus      |     |
 | felis, tempor nec lacus ut,         |     |
 | consequat tincidunt nisl.           |     |
 |-+-|
 | Fusce eu nunc sit amet orci         | baz |
 | lobortis accumsan. Vivamus laoreet  |     |
 | ante pellentesque, scelerisque      |     |
 | tellus nec, ultrices nibh. Etiam    |     |
 | scelerisque lobortis erat, in       |     |
 | consectetur nisi tincidunt a. Duis  |     |
 | eu est elit. Pellentesque fringilla |     |
 | gravida ligula, non convallis       |     |
 | ligula viverra sollicitudin.        |     |

 Perhaps adding the required machinery to allow in-cell paragraph
 filling would not be too difficult?



Re: [O] clocktables include \emsp - how to get rid of that?

2015-03-04 Thread Tory S. Anderson
This effect has been discussed here: 
http://comments.gmane.org/gmane.emacs.orgmode/90292

It exports nicely, so I believe that's the reason it was made this way. You can 
replace them with spaces using `org-toggle-pretty-entities`, although it will 
throw off the width of your table. Otherwise you can edit the code that inserts 
them, which is mentioned in the linked thread.

- Tory

Rainer Stengele rainer.steng...@online.de writes:

 Hi,

 I am getting \emsp in my clocktable reports.
 I use

 #+BEGIN: clocktable :maxlevel 4 :fileskip0 t :tcolumns 0 :level nil :scope 
 agenda-with-archives :timestamp nil :block 2015-03 :step day :link t  
 :stepskip0 t
 #+END:

 to create these clocktable


 Daily report: [2015-03-02 Mo]
 | File  | Headline
  |   Time |
 |---+--+|
 |   | ALL *Total time*
  | *9:00* |
 |---+--+|
 | Projectmanagement.org | *File time* 
  | *2:45* |
 |   | \emsp [[..][Project Managament: Weekly meetings 
 etc.]]   |   2:45 |
 |   | \emsp\emsp [[..][TODO *00 - Project Managament 
 -...]]|   2:45 |

 Anybody has an idea where this comes from and how to get rid of it?

 Thank you.
 Regards, Rainer



Re: [O] What to use for tables with lengthy text in cells?

2015-03-03 Thread Tory S. Anderson
It's not a perfect solution (many of us have wished for some way of doing 
multi-line cells in orgmode, but there's no clear solution...) but I use a 
combination of width restraints[1] and toggle-truncate-lines, which I've bound 
to F5. If it comes to the worst, I would probably pull out csv-mode and use a 
CSV file. I think the problem is that there's no simple way to wrap within just 
a cell in Emacs. 

Charles C. Berry ccbe...@ucsd.edu writes:

 On Mon, 2 Mar 2015, Charles C. Berry wrote:

 On Mon, 2 Mar 2015, Matt Price wrote:

 I have a project which will require me to enter about a paragraph in each
 of 5 fields several times a day. I would use org tables, but I need to be
 able to see the table contents in the buffer, and org hides long lines. I
 tried using table.el but it feels incredibly clumsy - for instance, I can't
 find a way to add a row to the end of the table, which seems crazy.
 
 I am wondering  what other people do in this situation - I guess I could
 use a spreadsheet or an odt document but I would much rather stay in emacs
 if I can.

 I sometimes use babel blocks for this purpose.


 But I did not give an example of filling in a table using that
 strategy.

 So here is an example of how you would use that strategy to fill out a
 table with fields that get edited. Obviously, you can use the string
 resulting from org-fill-template in other ways than in the example
 below.


 * Not exported   
 :noexport:

 Define a table template (and put it out of the way in a subtree that
 is not exported)

 #+name: tmplt
 #+BEGIN_SRC org
| Never change me | %a|
| %b  | Dont modify me either |
 #+END_SRC

 Define the fill-in cells and be sure they are not exported:

 #+name: pcta
 #+BEGIN_SRC org
 this is ~a~.
 #+END_SRC

 #+name: pctb
 #+BEGIN_SRC org
 this is *b*.
 #+END_SRC


 * This gets exported

 #+HEADER: :var a=pcta() :var b=pctb() :var tm=tmplt() 
 #+BEGIN_SRC emacs-lisp :wrap latex :exports results
(org-export-string-as
 (org-fill-template tm `((a . ,a)(b . ,b)))
 'latex t)
 #+END_SRC

 #+RESULTS:
 #+BEGIN_latex
 \begin{center}
 \begin{tabular}{ll}
 Never change me  this is \verb~a~.\\
 this is \textbf{b}.  Dont modify me either\\
 \end{tabular}
 \end{center}
 #+END_latex

 HTH,

 Chuck

Footnotes: 
[1]  
http://orgmode.org/manual/Column-width-and-alignment.html#Column-width-and-alignment




Re: [O] Notifications-notify for org-mode scheduled items?

2015-03-02 Thread Tory S. Anderson
I was actually just playing with this. If you don't mind adding your whole 
daily schedule to the notify list, you can use

(org-agenda-to-appt)

Unrelated to agenda, there is (appt-add)

As far submitting just a single item from the agenda for a pop-up reminder, I'm 
still at a loss.
- Tory

Leo Ufimtsev lufim...@redhat.com writes:

 Hello folks,

 I would like to receive desktop notifications (1* e.g below) for scheduled 
 items. 
 E.g if I schedule like this:

 * Make Coffee 
   SCHEDULED: 2015-03-02 Mon 01:30

 Then I would like a desktop notification to pup up at 1:30 telling me to make 
 coffee.

 I saw the org-notify package, but besides this post:
 http://permalink.gmane.org/gmane.emacs.orgmode/59339
 I didn't see any documentation on it, making it somewhat tricky to configure. 

 I'd be willing to spend time figuring out the package, but I'm wondering, has 
 someone got something like this to work already?
 And if so, would you be willing to share a 'high-level' overview? (I'd be 
 happy to figure out the details).

 Thank you


 1* I get a desktop notification if I run this command:
 (notifications-notify
:title Title
:body This is bimportant/b.
:actions '(Confirm I agree Refuse I disagree)
:on-action 'my-on-action-function
:on-close 'my-on-close-function)
 ref:
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Desktop-Notifications.html


 Leo Ufimtsev | Intern Software Engineer @ Eclipse Team



[O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-02-26 Thread Tory S. Anderson
-on-weekday nil)
  (org-agenda-tag-filter-preset (quote 
(+THESIS
 )
)
   )
  )
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file ~/org~/Work/nrl_notes.org
 org-capture-templates '((c Contacts entry (file ~/contacts.org)
  * %(org-contacts-template-name)\n  
:PROPERTIES:\n  :EMAIL: %(org-contacts-template-email)\n
  :END:)
 )
 org-drawers '(PROPERTIES HIDDEN NOTE COMMENT CODE CLOCK LOGBOOK)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-odt-format-headline-function 'ignore
 org-from-is-user-regexp \\Tory S\\. Anderson\\
 org-icalendar-timezone America/New_York
 org-html-postamble nil
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-html-head-include-default-style nil
 org-mode-hook '(org-clock-load
 #[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-odt-format-inlinetask-function 'ignore
 org-clock-persist t
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 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-finalize-hook '(org-agenda-property-add-properties)
 org-export-before-parsing-hook '((lambda (backend)
   (if (eq backend (quote odt))
(progn (goto-char (point-min))
 (if
  (re-search-forward
   (rx-to-string
(quote
 (one-or-more
  (or (in (0 . 8)) (in (11 . 12)) (in 
(14 . 31)) (in (55296 . 57343)) (in (65534 . 65535))
   (in (1114112 . 4194303)))
  )
 )
)
   nil t)
  (progn (replace-match  t t)))
 )
)
   )
  )
 org-html-text-markup-alist '((bold . strong%s/strong) (code . 
code%s/code) (italic . i%s/i)
  (strike-through . del%s/del) (underline . 
span class=\underline\%s/span)
  (verbatim . kbd%s/kbd))
 org-cycle-include-plain-lists integrate
 org-modules '(habits org-w3m org-bbdb org-bibtex org-docview org-gnus org-info 
org-irc org-mhe org-rmail)
 org-agenda-window-setup 'current-window
 org-agenda-span 'day
 org-catch-invisible-edits 'smart
 org-confirm-elisp-link-function 'yes-or-no-p
 org-html-preamble nil
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function '(lambda (name contents) contents)
 org-html-head style type=\text/css\\n !--/*--![CDATA[/*!--*/\n  
.title  { text-align: center; }\n  .todo   { font-family: monospace; color: 
red; }\n  .done   { color: green; }\n  .tag{ background-color: #eee; 
font-family: monospace;\npadding: 2px; font-size: 80%; font-weight: 
normal; }\n  .timestamp { color: #bebebe; }\n  .timestamp-kwd { color: #5f9ea0; 
}\n  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }\n  
.left   { margin-left: 0px;  margin-right: auto; text-align: left; }\n  .center 
{ margin-left: auto; margin-right: auto; text-align: center; }\n  .underline { 
text-decoration: underline; }\n  #postamble p, #preamble p { font-size: 90%; 
margin: .2em; }\n  p.verse { margin-left: 3%; }\n  pre {\nborder: 1px solid 
#ccc;\nbox-shadow: 3px 3px 3px #eee;\npadding: 8pt;\nfont-family: 
monospace;\noverflow: auto;\nmargin: 1.2em;\n  }\n  pre.src {\n
position: relative;\noverflow: auto;\npadding-top: 1.2em;\n  }\n  
pre.src:before {\ndisplay: none;\nposition: absolute;\n
background-color: white;\ntop: -10px;\nright: 10px;\npadding: 
3px;\nborder: 1px solid black;\n  }\n  pre.src:hover:before { display: 
inline

[O] org-agenda-to-appt interactively with multiple args?

2015-02-24 Thread Tory S. Anderson
So I've been playing around with org appointments and found the 
org-agenda-to-appt function; but upon calling it, it loads my whole day into 
the appointment queue. I have various questions, such as how I can view and 
edit the current queue, but more importantly, I read the following as part of 
the doc string:

(org-agenda-to-appt optional REFRESH FILTER rest ARGS)

Activate appointments found in `org-agenda-files'.
With a C-u prefix, refresh the list of
appointments.

If FILTER is t, interactively prompt the user for a regular
expression, and filter out entries that don't match it.

If FILTER is a string, use this string as a regular expression
for filtering entries out.

Now, is this function not primarily meant to be called interactively? Or, after 
all these years in emacs, am I going to learn how to pass multiple args to an 
interactive function? Because the fact is, I don't always want EVERYTHING in 
the appointment list. I just want an alarm for those one or two things...

Sheepishly yours,
- Tory



Re: [O] Org mode for the new guy.

2015-02-21 Thread Tory S. Anderson
I think you might like the orgmode reference cards (pick your format):

http://orgmode.org/worg/orgcard.html
http://orgmode.org/orgcard.pdf
http://orgmode.org/orgcard.txt

shameless-plug You might also be interested in my screencast/blog series, 
NOn-Programmer's Emacs
https://www.youtube.com/watch?v=Q8AqHdZTgNIindex=1list=PLGSBMyq5kLRZOPH4GlMqwskuyQ8AHmUwL

Welcome to Emacs for study; for university, I've lived on it.
- Tory

Garrett Fuller garrett...@gmail.com writes:

 I am still learning how to use emacs. When I was learned about org
 mode, I was really excited. I found it very difficult to extract the
 basic usage of org mode from the resources available on the website.
 The resources available are both plentiful and VERY thorough, but all
 I wanted was a rundown of basic use commands so I could play with it
 and get comfortable.

 I eventually got there, and wrote myself a little ,org cheat sheet of
 controls and commands. I wanted to share what I worked out with other
 beginners somehow, but I have absolutely no idea how to go about
 that.

 So, I figured I would share it with you guys. Maybe you can make it
 available for beginners? 

 Org mode is cooler than sliced bread, btw. Love it. I am now taking
 notes in all of my classes with it. Thanks alot!

 --
 The more I learn, the more I know I don't know.
 Garrett Fuller



Re: [O] orgmode-contacts wrong type arguments

2015-02-17 Thread Tory S. Anderson
Thanks Nick for the tip; I've recently learned about debug-on-entry, which I 
attempted to use to no avail last night, but the functions listed in the info 
manual you cited are useful. Following them I have found that the problem seems 
to be a conflict bewteen Org-Contacts and Helm; loading without helm enabled 
fixes the problem. Unfortunately, this seems like a lose-lose tradeoff to 
disable helm or go without mailing list functionality. I'm open to any 
suggestions, now that I know that a Helm conflict is apparently causing the 
listp error. 

Nick Dokos ndo...@gmail.com writes:

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 Presumably this is related to my having upgraded to:
 Org-mode version 8.2.10 (8.2.10-33-g880a2b-elpa)
 GNU Emacs 25.0.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 
 2015-02-10 on localhost.localdomain

 I use org-contacts[1] to autofill addresses in GNUs. Normally can use
 +CATEGORY to add all names in a category; but now that particular
 functionality seems to be broken (although the package is otherwise
 functional). In my efforts to improve my elisp, can anyone tell me why
 the code doesn't work, and what might have changed to cause it to
 break?

 Error: 
 completion-in-region: Wrong type argument: listp, #(NAME
 addr...@gmail.com, NAME addr...@aol.com, NAME addr...@gmail.com,
 NAME addr...@gatech.edu 0 15 (fontified nil org-category
 contacts) 44 65 (fontified nil org-category contacts) 88 99
 (fontified nil org-category contacts) 127 141 (fontified nil
 org-category contacts))

 Footnotes: 
 [1]  https://julien.danjou.info/projects/emacs-packages#org-contacts


 When you get an error, the first thing you should do is get a backtrace:

(info (org) Feeback) 

 It's far more likely that you can find the error (or somebody can find
 it for you) with a backtrace in hand.



[O] Org open link in new window

2015-02-17 Thread Tory S. Anderson
Navigating through the labyrinth of org commands and wrappers, I've not been 
able to find out if there's already a way to open a link (particularly a 
footnote link) in a new window, so that I could retain my in-line location and 
context while reading the linked/footnoted text. I realize this functionality 
is probably out there, but I'm not seeing it in the manual section on links. 
How can I open links in new window (splitting my screen)? 



[O] orgmode-contacts wrong type arguments

2015-02-16 Thread Tory S. Anderson
Presumably this is related to my having upgraded to:
Org-mode version 8.2.10 (8.2.10-33-g880a2b-elpa)
GNU Emacs 25.0.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 
2015-02-10 on localhost.localdomain

I use org-contacts[1] to autofill addresses in GNUs. Normally can use 
+CATEGORY to add all names in a category; but now that particular 
functionality seems to be broken (although the package is otherwise 
functional). In my efforts to improve my elisp, can anyone tell me why the code 
doesn't work, and what might have changed to cause it to break?

Error: 
completion-in-region: Wrong type argument: listp, #(NAME addr...@gmail.com, 
NAME addr...@aol.com, NAME addr...@gmail.com, NAME addr...@gatech.edu 0 
15 (fontified nil org-category contacts) 44 65 (fontified nil org-category 
contacts) 88 99 (fontified nil org-category contacts) 127 141 (fontified 
nil org-category contacts))

Footnotes: 
[1]  https://julien.danjou.info/projects/emacs-packages#org-contacts




Re: [O] Citation syntax: a revised proposal

2015-02-15 Thread Tory S. Anderson
+1

Thanks for the work substantiating the idea. 

Richard Lawrence richard.lawre...@berkeley.edu writes:

 Hi everyone,

 Since discussion seems to have petered out on the previous thread (see:
 http://thread.gmane.org/gmane.emacs.orgmode/94524), I took some time to
 go back over the discussion and write up a concrete proposal for
 citation syntax.

 This proposal represents my attempt to formulate a syntax that is easy
 to read, easy to parse, and covers all the use-cases that people
 mentioned as being important.  It is surely not perfect, but I learned a
 lot from the previous thread, and I hope something like this will serve
 the community's needs.

 The proposal is below, both inline (for easy quoting) and attached (for
 easy reading).  To keep it relatively short, I have mostly not explained
 my reasoning for the choices I made, but I am happy to do so here if
 anyone has questions.

 I welcome feedback, comments, criticisms, and objections on any point.
 However, since we've already had a long discussion about this, I
 respectfully request that we try to keep this thread focused.  To that
 end, I suggest:

   1) If you have criticisms or objections, please try to indicate
  whether you think they are `substantive' (e.g., you see a problem
  that would prevent you from using this syntax, or prevent Org from
  implementing it) or not (e.g., you would prefer a slightly
  different but equivalent way of expressing something).

   2) If you wish to express an opinion about the proposal without
  offering further comments, let us know by just replying with +1
  (meaning you'd like to see this syntax, or something reasonably
  similar to it, be adopted), 0, or -1 (meaning you'd prefer not to
  see this syntax or anything similar to it adopted).

 I guess this is my Valentine to the Org community. :) Thanks for reading!

 Best,
 Richard

 #+TITLE: Citation syntax, a revised proposal
 #+DATE: 2015-02-14 Sat

 #+AUTHOR: Richard Lawrence
 #+EMAIL: richard.lawre...@berkeley.edu

 #+LANGUAGE: en
 #+SELECT_TAGS: export

 #+EXCLUDE_TAGS: noexport

 * Citation syntax
 ** Requirements
 A citation is a textual reference to one or more individual works,
 together with other information about those works, grouped together in
 a single place.  

 Within a citation, each reference to an individual work needs to be
 capable of containing:
   1) a database key that references the cited work
   2) prefix / pre-note
   3) suffix / post-note
  
 Whole citations also need:
   4) [@4] a way of specifying whether the citation is in-text or
  parenthetical
   5) a way of representing a common prefix and suffix, if the citation
  is a multi-cite
   6) a way of specifying whether the citation should produce a
  complete bibliography entry in-place
   7) an extensible way of specifying formatting properties to export
  filters and/or specific export backends 
  
 ** Citation definitions
 *** Citation keys; bibliography references vs. complete entries 
 A citation key consists of a unique label preceded by a flag, which is
 optionally preceded by a hyphen.

 The flag is either `@' or `'.  `@' indicates that the citation should
 produce a normal reference to the bibliography entry for the cited
 work (in whatever style the document uses), located elsewhere.

 The `' flag indicates that the citation should produce a complete
 bibliography entry for the cited work in the place where the citation
 appears.

 The optional hyphen (`-') indicates that the author's name should be
 suppressed from the rendered citation.  (Note that this is only useful
 in author-X citation styles; it should have no effect in numeric
 styles.)

 *** Basic citations: Parenthetical vs. in-text 
 There are two basic types of citation: /parenthetical/ and /in-text/.
 Each of these may contain references to one or more individual works.

 The difference between parenthetical and in-text citations is
 expressed using parentheses around the /first/ citation key.  A
 parenthetical citation has such parentheses around the first citation
 key; an in-text citation lacks them.  (Parentheses around non-initial
 keys are permitted for visual consistency and to keep the grammar
 simple, but have no meaning.)

 A citation thus consists in general of a bracketed list, beginning
 with `cite:', of one or more individual references, each of which:
   - may contain a prefix,
   - must contain a citation key, which may or may not be surrounded by `(...)'
   - and may contain a suffix
 Individual references are separated by semi-colons.

 There are also two special cases to make simple-but-common uses very
 easy to type and read:
   1) a parenthetical citation for a single work with no prefix and
  suffix may be written by just surrounding the key with brackets,
  like: [@Doe99].
   2) an in-text citation for a single work with no prefix and suffix
  may be written as a /bare/ key, without brackets, like: @Doe99.
 

Re: [O] navigating org-clock-in recent work list

2015-02-14 Thread Tory S. Anderson
So being new to elisp, I'm hoping there's a simple hack to disable the 
org-clock-select-task menu and go to a default (e.g. `C-x b' or `C-x f') style 
type your option interface that will would be populated with and return the 
same thing as the select-task-menu? 

I've been looking at the elisp behind the buffer switching functions and I'm 
afraid it's beyond me; perhaps the default of invoking a prompt and passing 
autocompletion values isn't as simple as I'd hoped? 

torys.ander...@gmail.com (Tory S. Anderson) writes:

 As per a recent discussion on the mailing list, I'm using the following to 
 enable persistence and extended length of the clock history:

 ;; Org clock-in
 (org-clock-persistence-insinuate)
 (setq org-clock-persist t)
 ;;; * Orgmode Modules
 (add-to-list 'org-modules 'habits)
 ;; Number of clock tasks to remember in history.
 (setq org-clock-history-length 35)  ; 1 to 9 + A to Z

 It works great, with one annoying problem: now that I have a list that goes 
 to M, it can be hard to figure out which shortcut goes to which item. I can 
 think of two possible solutions:

 1. Alternately highlight lines, or underline (spreadsheet/table style)
 2. Preferably, since I use Helm, if there were simply an autocomplete prompt 
 (like switch-buffer; no shortcut keys) this would actually be easiest.

 Can I disable the special pop-up screen (i.e. `org-clock-select-task') and 
 just use an shortcut-less autocomplete prompt (which, with helm will be 
 facilitated)? 



[O] Orgmode → ODT: Certain chars break export

2015-02-13 Thread Tory S. Anderson
While we're on the topic of ODT export problems: I was in the process of 
converting PDF to Text to Org to ODT/DocX and discovered that certain 
characters seem to break exported odt documents, which fail with a line and col 
number. So far the only one I know for sure is the  (Char: C-l (12, #o14, 
#xc)). Hopefully a single fix can handle all such cases. 

You probably don't need it, but I verified with the following file:
http://toryanderson.com/files/breakorg.org

Org-mode version 8.2.10 (8.2.10-32-gddaa1d-elpa)



Re: [O] Orgmode → ODT: Certain chars break export

2015-02-13 Thread Tory S. Anderson
From a user perspective just stripping the characters seems best to me, but 
finding out what the characters seems obnoxious. Neither a quick search nor 
skimming the ODT doc specification[1][2] seem to give any insight into a set 
of illegal characters. Does elisp have anything similar to Java's 
isWhitespace[3] that could be used to check character features? 

Rasmus ras...@gmx.us writes:

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 While we're on the topic of ODT export problems: I was in the process
 of converting PDF to Text to Org to ODT/DocX and discovered that
 certain characters seem to break exported odt documents, which fail
 with a line and col number. So far the only one I know for sure is the
  (Char: C-l (12, #o14, #xc)). Hopefully a single fix can handle
 all such cases.

 You probably don't need it, but I verified with the following file:
 http://toryanderson.com/files/breakorg.org

 The export is fine, but the produced XML is invalid since it contains an
 illegal character.  But how to resolve this?  Should ox strip illegal
 charterers (if so what are they)?  If so, could they be used for entities?

 —Rasmus

Footnotes: 
[1]  https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office
[2]  
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415196_253892949
[3]  http://www.fileformat.info/info/unicode/char/000c/index.htm




[O] navigating org-clock-in recent work list

2015-02-13 Thread Tory S. Anderson
As per a recent discussion on the mailing list, I'm using the following to 
enable persistence and extended length of the clock history:

--8---cut here---start-8---
;; Org clock-in
(org-clock-persistence-insinuate)
(setq org-clock-persist t)
;;; * Orgmode Modules
(add-to-list 'org-modules 'habits)
;; Number of clock tasks to remember in history.
(setq org-clock-history-length 35)  ; 1 to 9 + A to Z
--8---cut here---end---8---

It works great, with one annoying problem: now that I have a list that goes to 
M, it can be hard to figure out which shortcut goes to which item. I can think 
of two possible solutions:

1. Alternately highlight lines, or underline (spreadsheet/table style)
2. Preferably, since I use Helm, if there were simply an autocomplete prompt 
(like switch-buffer; no shortcut keys) this would actually be easiest.

Can I disable the special pop-up screen (i.e. `org-clock-select-task') and just 
use an shortcut-less autocomplete prompt (which, with helm will be 
facilitated)? 



Re: [O] Orgmode → ODT: Certain chars break export

2015-02-13 Thread Tory S. Anderson
There is a helpful wiki page now that you found XML; it even mentions my 
specific character.[1] The main source seems to be at the w3.org spec.[2]

Rasmus ras...@gmx.us writes:

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 From a user perspective just stripping the characters seems best to
 me, but finding out what the characters seems obnoxious. 

 But maybe there is a valid way to represent such characters in XML?  At
 the very least entities must be replaced before stripping these...

 Neither a quick search nor skimming the ODT doc specification[1][2] seem
 to give any insight into a set of illegal characters. Does elisp have
 anything similar to Java's isWhitespace[3] that could be used to check
 character features?

 It's an XML thing.  When I tried to open the contents.xml with Firefox it
 also says broken XML.  But I also don't know which are the characters that
 are not supported by XML.

 —Rasmus

Footnotes: 
[1]  https://en.wikipedia.org/wiki/Valid_characters_in_XML#XML_1.1

[2]  http://www.w3.org/TR/xml11/#charsets




[O] Table formulas: daily hour * rate = cost

2015-02-12 Thread Tory S. Anderson
I have the followign table, which should speak for itself. First the cost 
column needs to be calculated, which is hours * rate, and then the hrs and 
ttl fields should be filled in based on sums of their columns. However, I'm 
not sure why $cost isn't being evaluated; I've tried it with column names as 
well as indices but unless I specify each field individually (e.g. @3$5) I 
can't get a result here. Formula debugging seems to ignore it, too. But I've 
been trying to follow the example on the advanced feature page[1] as closely 
as possible; what's the problem?

--8---cut here---start-8---
   |   | Date| Hours | Rate | Cost |
   | ! | | hours | rate | cost |
   |---+-+---+--+--|
   |   | February 9  |  4.00 |   38 |0 |
   |   | February 10 |  4.00 |   38 |0 |
   |   | February 11 |  4.00 |   38 |0 |
   |   | February 12 |  4.00 |   38 |0 |
   |   | February 13 |  4.00 |   38 |0 |
   |---+-+---+--+--|
   |   | |   20. |  |0 |
   | ^ | |   hrs |  |  ttl |
   #+TBLFM: $5=$hours*$rate::$hrs=vsum(@I..@II)::$ttl=vsum(@I..@II)
--8---cut here---end---8---

Footnotes: 
[1]  http://orgmode.org/org.html#Advanced-features




[O] [DONE] Re: Org Linking to Bookmark [+]

2015-02-11 Thread Tory S. Anderson
Thanks, Drew; I have it now. To all concerned, it's easy to add bookmark+ link 
support to org-mode with the following:

--8---cut here---start-8---
;;; * bmkp links http://orgmode.org/manual/Adding-hyperlink-types.html
 (org-add-link-type bmkp 'org-bmkp-open)
 (add-hook 'org-store-link-functions 'org-bmkp-store-link)
 
 (defcustom org-bmkp-command 'bookmark-jump
   The Emacs command to be used to display a bmkp page.
   :group 'org-link
   :type '(choice (const bookmark-jump) (const bookmark-jump-other-window)))

 (defun org-bmkp-open (path)
   Visit the bmkppage on PATH.
 PATH should be a bookmark name that can be thrown at the `bookmark-jump' 
function.
   (funcall org-bmkp-command path))
 
 (defun org-bmkp-store-link ()
   Store a link to a bmkp bookmark.
   (when (memq major-mode '(bookmark-bmenu-mode))
 (let* ((bookmark (bookmark-bmenu-bookmark))
(link (concat bmkp: bookmark))
(description (format Bookmark: %s bookmark)))
   (org-store-link-props
:type bmkp
:link link
:description description
--8---cut here---end---8---




Drew Adams drew.ad...@oracle.com writes:

  (defun org-bmkp-store-link ()
Store a link to a bmkp bookmark.
(when (memq major-mode '(bookmark-bmenu-mode))
  (let* ((bookmark (org-bmkp-get-bookmark-name))
 
   |
   v
  (bookmark-bmenu-bookmark)

 It looks like you are trying to get the name of the bookmark at
 point in buffer `*Bookmark List*'.  To do that, just evaluate
 (bookmark-bmenu-bookmark).

 For Bookmark+, if you pass that function a non-nil arg then you
 get the full bookmark record, not just the name.  (But anyway,
 most bookmark functions accept either the name or the bookmark.)

 (No relation with Org links, but you can also create simple, 
 non-persistent bookmark links using `bmkp-insert-bookmark-link'.
 Dunno whether that will help with what you want to do.
 http://www.emacswiki.org/emacs/BookmarkPlus#BookmarkLinks)



[O] With Sticky Agenda, org-calendar-goto-agenda doesn't work

2015-02-11 Thread Tory S. Anderson
Bug, I suppose. If I have sticky agenda mode enabled, later going to my 
calendar and pressing c (`org-calendar-goto-agenda') on a date just takes me 
to whatever date is currently displayed in my agenda. I have to 
`org-toggle-sticky-agenda' before it it will work. 



[O] Org Linking to Bookmark [+]

2015-02-11 Thread Tory S. Anderson
I have weekly TODO items that link to something that needs to be updated; for 
instance, I write a weekly letter to my daughter where  each week the actual 
file for the letter will change. Right now I have to manually update that link 
in the org file, which is quite cumbersome. If I could just link to a bookmark 
then periodic updates of the bookmark would take care of any problem with 
updating the todo item. So, I've been tryin to kludge a solution based on the 
orgmode manual; while any suggestions would be useful for my budding elisp 
skills, in particular I'm not sure how to write the last function 
(org-bmkp-get-bookmark-name). Any suggestions? 

--8---cut here---start-8---
;;; * bmkp links http://orgmode.org/manual/Adding-hyperlink-types.html
 (org-add-link-type bmkp 'org-bmkp-open)
 (add-hook 'org-store-link-functions 'org-bmkp-store-link)
 
 (defcustom org-bmkp-command 'bmkp
   The Emacs command to be used to display a bmkp page.
   :group 'org-link
   :type '(choice (const bookmark-jump) (const bookmark-jump-other-window)))
 
 (defun org-bmkp-open (path)
   Visit the bmkppage on PATH.
 PATH should be a bookmark name that can be thrown at the `bookmark-jump' 
function.
   (funcall org-bmkp-command path))
 
 (defun org-bmkp-store-link ()
   Store a link to a bmkp bookmark.
   (when (memq major-mode '(bookmark-bmenu-mode))
 (let* ((bookmark (org-bmkp-get-bookmark-name))
(link (concat bmkp: bookmark))
(description (format Bookmark)))
   (org-store-link-props
:type bmkp
:link link
:description description
 
 (defun org-bmkp-get-bookmark-name () ;; TODO
   Get the bookmark name at point (from bookmark list).
   (if (string-match  \\(\\S-+\\)\\* (buffer-name))
   (match-string 1 (buffer-name))
 (error Cannot create link to this bmkp bookmark)))
--8---cut here---end---8---



Re: [O] Simple in-buffer links?

2015-02-09 Thread Tory S. Anderson
Hi Lawrence, 

Welcome to org-mode! I think what you're looking for is footnote 
funcationality[1]. To get started, just use `C-c C-x f' in your orgmode 
document. Then use it again to go back to where you were. There's more you can 
do and the page I've cited will get you started. 

HTH,
- Tory

Lawrence Bottorff borg...@gmail.com writes:

 I'm a beginner and I can't figure out how to build a simple link. All
 I want to do is have numbered footnotes throughout my org file that,
 when clicked, jump down to that footnote. Eg:

 -- This is in my org file and I'm describing Emacs fill (1). You can
 also do auto-fill (2)

 .
 .
 .

 (1) A fill is text formatting to look like a block.
 (2) Auto-fill sets fill for the whole life of the buffer.

 This is all I want to do. I might also like these footnote
 elaborations at the bottom to be in another location (another file).

 LB

Footnotes: 
[1]  http://orgmode.org/manual/Footnotes.html




[O] Automatically entering org blocks?

2015-02-09 Thread Tory S. Anderson
Is there a command for automatically entering org blocks (such as for quotes or 
src), the same way there's a command for inserting drawers? I'm sure there must 
be, but I've searched the block and insert command lists and don't see 
anything that seems promising.

--8---cut here---start-8---
#+BEGIN_QUOTE
Deeply insightful quotation!
#+END_QUOTE
--8---cut here---end---8---

I'm sure I'm missing something; it's a pain to have to manually begin and close 
these things every time. I guess I'm getting spoiled by so much of the org mode 
goodness that makes things easier. 



[O] Adding Google Code Prettify support to exported code blocks

2015-02-07 Thread Tory S. Anderson
I've started using Google Code Prettify on my blog and needed to add better 
support in the exports I'm getting out of org-mode. In particular, on my block 
prettify seems to do a poor job of guessing the language; so I've edited 
org-html-src-block to add the prettify tags (which are similar to the already 
exported src tags). But, ever the lisp learner, I'm open to suggestions for 
improvements. Following are code and an example. 

--8---cut here---start-8---
;; Exporting code blocks suitable for google code prettify 
(https://code.google.com/p/google-code-prettify/)
(defun org-html-src-block (src-block contents info)
  Transcode a SRC-BLOCK element from Org to HTML.
CONTENTS holds the contents of the item.  INFO is a plist holding
contextual information.
Modified to work with google code prettify (if installed on site)
  (if (org-export-read-attribute :attr_html src-block :textarea)
  (org-html--textarea-block src-block)
(let ((lang (org-element-property :language src-block))
  (caption (org-export-get-caption src-block))
  (code (org-html-format-code src-block info))
  (label (let ((lbl (org-element-property :name src-block)))
   (if (not lbl) 
 (format  id=\%s\
 (org-export-solidify-link-text lbl))
  (if (not lang) (format pre class=\example\%s\n%s/pre label code)
(format
 div class=\org-src-container\\n%s%s\n/div
 (if (not caption) 
   (format label class=\org-src-name\%s/label
   (org-export-data caption info)))
 ;; add prettyprint and lang- tags to exports
 (format \npre class=\prettyprint lang-%s src src-%s\%s%s/pre 
lang lang label code))
--8---cut here---end---8---

This allows this org block: 
--8---cut here---start-8---
#+BEGIN_SRC lisp
;; saving views
(setq org-agenda-custom-commands
  '((c . Weekly class agendas 2015-S)
(c6 LMC 6215
 ((agenda  ((org-agenda-span 7) (org-agenda-start-on-weekday nil) 
(org-agenda-tag-filter-preset '(+LMC_6215 -SCHEDULE))
(c8 CS 8803
 ((agenda  ((org-agenda-span 7) (org-agenda-start-on-weekday nil) 
(org-agenda-tag-filter-preset '(+CS_8803 -SCHEDULE
#+END_SRC
--8---cut here---end---8---

to produce this (prettifiable) output: 

--8---cut here---start-8---
div class=org-src-container
pre class=prettyprint lang-lisp src src-lisp
!-- you get the idea; code ommitted --
/pre
/div
--8---cut here---end---8---

Upon pasting, it looks good on my blog. 



[O] Auto-complete overrides org-contacts for address fields

2015-02-07 Thread Tory S. Anderson
I use the excellent org-mode contacts module[1] for auto-completion of 
addresses in my messages. Now I'm starting to play around with 
autocomplete-ispell and would like to use it in message mode, but I find it 
overrides the suggestions for my address fields. Does anyone know a way around 
this, so that addresses are still handled by org-contacts and not 
auto-complete? 

Footnotes: 
[1] https://julien.danjou.info/projects/emacs-packages#org-contacts




Re: [O] Help: Saving Agenda Views

2015-02-05 Thread Tory S. Anderson
That's the winner! I was able to get exactly what I wanted with the prefilter 
option: 

--8---cut here---start-8---
(setq org-agenda-custom-commands
  '((c . Weekly class agendas 2015-S)
(c6 LMC 6215
 ((agenda  ((org-agenda-span 7) (org-agenda-tag-filter-preset 
'(+LMC_6215 -SCHEDULE))
(c8 CS 8803
 ((agenda  ((org-agenda-span 7) (org-agenda-tag-filter-preset 
'(+CS_8803 -SCHEDULE
--8---cut here---end---8---

Thanks! Somehow I wasn't even checking that variable; preset turned me off of 
it. 
- Tory

Subhan Michael Tindall subh...@familycareinc.org writes:

 -Original Message-
 From: Tory S. Anderson [mailto:torys.ander...@gmail.com]
 Sent: Thursday, February 05, 2015 3:39 AM
 To: Subhan Michael Tindall
 Cc: orgmode list
 Subject: Re: [O] Help: Saving Agenda Views
 
 THanks for the good tips and examples; I'll keep them handy. So, listing the
 org-agenda variables the one I want to edit is org-agenda filter; however,
 changing this in my function does NOT change my agenda view the way it
 should. Here's what I'm trying:
 
 --8---cut here---start-8---
 ;; saving views
 (setq org-agenda-custom-commands
   '((c Class agendas
 ; ((agenda  ((org-agenda-span 7) (org-agenda-tag-filter
 +LMC_6215))) ;; No different results
   ((agenda  ((org-agenda-span 7) (org-agenda-tag-filter
 '(+LMC_6215 ;; in the agenda, org-agenda-tag-filter remains nil no
 matter what --8---cut here---end---8---
 
 Why is `org-agenda-tag-filter` being ignored when `org-agenda-span` is
 working?

 Hard to say, it appears org-agenda-tag-filter is an undocumented variable, 
 which I've never used. Glancing through the code it looks like an internal 
 variable that will likely have any externally set values overwritten

 You might try org-agenda-tag-filter-preset instead:
 (defvar org-agenda-tag-filter-preset nil)

   A preset of the tags filter used for secondary agenda filtering.
 This must be a list of strings, each string must be a single tag preceded
 by \+\ or \-\.
 This variable should not be set directly, but agenda custom commands can
 bind it in the options section.  The preset filter is a global property of
 the entire agenda view.  In a block agenda, it will not work reliably to
 define a filter for one of the individual blocks.  You need to set it in
 the global options and expect it to be applied to the entire view.

 Note that this will need to go in a different position syntactically to be a 
 global option for the view


 
 Subhan Michael Tindall subh...@familycareinc.org writes:
 
  Well, to start with your syntax is WAY off. Org custom agendas can be
 pretty arcane.
  I'd start with setting up some custom agendas using the customizer, saving
 them, and then looking at how they are structured.
  Next,  C-h v org-agenda TAB in an org buffer should get you a list of the
 various settings you can use in a custom block.  Note that not all variables 
 are
 valid in all types of blocks.
  And finally, take a look at the documentation for
  org-agenda-skip-function, as I believe this is what you will need to
  use to accomplish the goals you set below
 
  And, as a bonus, here's a snippet out of my emacs showing a couple of
 different custom agendas with mulitiple blocks.
  ;;This one does a sorted list of all my TODOs, followed by an agenda
  block for 1 day (D Todos+Clock ((alltodo  ((org-agenda-sticky nil)

  (org-agenda-sorting-strategy (quote
 ((agenda category-up todo-state-up deadline-up time-up))
   (agenda  
  ((org-agenda-sticky nil)
   
  (org-agenda-sorting-strategy (quote
 ((agenda habit-down time-up priority-down category-keep
   
  (org-agenda-span 1)
   
  (org-agenda-use-time-grid t)
   
  (org-agenda-show-log (quote
 clockcheck))
 
  (org-agenda-clockreport nil)
 
  ;; this one does all todos of type RECURRING, then a tags search for
  everything with a STYLE property (tags does many things), followed by a 
  list
 of all my todos using alltodo, using a skip function to screen out anything 
 not
 matching the regex , followed by a list of TODOs from a specific file (I use
 multiple project files for most things) (R Recuring+Habits
 
((todo RECURRING)
 
 (tags STYLE={.+})
 
 (alltodo  (
 
  (org-agenda-skip-function (lambda nil
 (org-agenda-skip-entry-if
 
 
 (quote

Re: [O] Help: Saving Agenda Views

2015-02-05 Thread Tory S. Anderson
)
   
 
 Hope this helps, there are not that many good complex agenda examples out 
 there


 -Original Message-
 From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
 [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
 Behalf Of Tory S. Anderson
 Sent: Wednesday, February 04, 2015 1:28 PM
 To: orgmode list
 Subject: Re: [O] Help: Saving Agenda Views
 
 Okay, I've attempted to use my newbie elisp skills to hack together a 
 solution
 but it doesn't work, yelling at me about wrong number of arguments (why?).
 Here's what I've put together (clearly inspired by the `org-agenda-filter-by-
 tag` function). Can anyone help me piece together what's wrong here?
 
 --8---cut here---start-8---
 ;; saving views
 (setq org-agenda-custom-commands
   '((x agenda)
  (y agenda*)
  (c Class agendas
   ((agenda  ((org-agenda-span 7)))
(my-org-agenda-filter-by-tag LMC_6215 -))
   ;;(org-agenda-filter-apply +LMC_6215 tag) ;; This one doesn't
 work because I can't see what  tag should be
   ;; (org-agenda-redo)) ;; would be needed after org-agenda-filter-
 apply
   )
   ))
 
 ;; For my usage
 (defun my-org-agenda-filter-by-tag (tag char)
   A non-interactive version for use in custom commands.  Keep only those
 lines in the agenda buffer that have a specific tag. Char should be + or -,
 filtering or narrowing.
 ;  (interactive P)
   (let* ((alist org-tag-alist-for-agenda)
   (tag-chars (mapconcat
   (lambda (x) (if (and (not (symbolp (car x)))
(cdr x))
   (char-to-string (cdr x))
 ))
   alist ))
   (efforts (org-split-string
 (or (cdr (assoc (concat org-effort-property _ALL)
 org-global-properties))
 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00
 )))
   (effort-op org-agenda-filter-effort-default-operator)
   (effort-prompt )
   (inhibit-read-only t)
   (current org-agenda-tag-filter)
   maybe-refresh a n tag)
 (when (member char '(?+ ?-))
   ;; Narrowing down
   (cond ((equal char ?-) (setq strip t narrow t))
  ((equal char ?+) (setq strip nil narrow t
 (cond
  ((equal char ?/)
   (org-agenda-filter-show-all-tag)
   (when (get 'org-agenda-tag-filter :preset-filter)
  (org-agenda-filter-apply org-agenda-tag-filter 'tag))
   (setq maybe-refresh t))
 
 
  ((equal char ?. )
   (setq org-agenda-tag-filter
  (mapcar (lambda(tag) (concat + tag))
  (org-get-at-bol 'tags)))
   (org-agenda-filter-apply org-agenda-tag-filter 'tag)
   (setq maybe-refresh t))
  ((or (equal char ?\ )
(setq a (rassoc char alist))
(and (= char ?0) (= char ?9)
 (setq n (if (= char ?0) 9 (- char ?0 1))
   tag (concat effort-op (nth n efforts))
   a (cons tag nil)))
(and (= char ??)
 (setq tag ?eff)
 a (cons tag nil))
(and tag (setq a (cons tag nil
   (org-agenda-filter-show-all-tag)
   (setq tag (car a))
   (setq org-agenda-tag-filter
  (cons (concat (if strip - +) tag)
(if narrow current nil)))
   (org-agenda-filter-apply org-agenda-tag-filter 'tag)
   (setq maybe-refresh t))
  (t (error Invalid tag selection character %c char)))
 (when maybe-refresh
   (org-agenda-redo
 --8---cut here---end---8---
 
 
 
 
 torys.ander...@gmail.com (Tory S. Anderson) writes:
 
  I'm trying to save an agenda view that I can arrive at in the following 
  way:
 
  1. Load agenda (default 1-day view)
  2. / TAB English_Class   (reduce to only entries tagged English_Class)
 
  3. \ - TAB schedule  (further reduce by removing entries 
  having a
 :schedule tag)
  4. w   (load a 7-day span, week-view)
 
  However, I've been unable to grok the directions at
  http://orgmode.org/worg/org-tutorials/org-custom-agenda-
 commands.html
 
  The closest I've come is this:
 
  --8---cut here---start-8---
  (setq org-agenda-custom-commands
'((c Class agendas agenda 
 ((org-agenda-tag-filter '(+LMC_6215))
  (org-agenda-span 7)
  --8---cut here---end---8---
 
  But while this successfully sets the span, it fails to filter the buffer 
  (let alone
 getting to my second filter). Where am I going wrong?


 This message is intended for the sole use of the individual and entity to 
 which it is addressed and may contain information that is privileged, 
 confidential and exempt from disclosure under applicable law. If you

[O] Help: Saving Agenda Views

2015-02-04 Thread Tory S. Anderson
I'm trying to save an agenda view that I can arrive at in the following way: 

1. Load agenda  (default 1-day view)
2. / TAB English_Class(reduce to only entries tagged English_Class)   
3. \ - TAB schedule   (further reduce by removing entries having a 
:schedule tag)
4. w(load a 7-day span, week-view)

However, I've been unable to grok the directions at 
http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html 

The closest I've come is this: 

--8---cut here---start-8---
(setq org-agenda-custom-commands
  '((c Class agendas agenda  
((org-agenda-tag-filter '(+LMC_6215))
 (org-agenda-span 7)
--8---cut here---end---8---

But while this successfully sets the span, it fails to filter the buffer (let 
alone getting to my second filter). Where am I going wrong? 



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Yes. I use the following (possibly relevant) code definition, which sets my 
diary to agenda.org. 

--8---cut here---start-8---
(setq org-agenda-include-diary nil)
;; org-agenda
(setq org-agenda-diary-file ~/emacs/agenda.org
  org-special-ctrl-o nil
  org-agenda-span 'day)
--8---cut here---end---8---


e.fr...@ucl.ac.uk writes:

 Have you defined org-agenda-diary-file?



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
I actually rarely visit the diary file; I do everything from the agenda view. 
In the rare cases I do need to visit the agenda file, I just switch buffers 
like usual (`C-x b RET`). 

John Kitchin jkitc...@andrew.cmu.edu writes:

 How do you go back to the agenda from the diary file?

 Tory S. Anderson writes:

 Fragment from my agenda.org; basically, it's almost completely just what is 
 automatically created when you tell agenda to use an org file. It should be 
 similar to what you have; yes, hitting tab or enter takes me to entries just 
 fine.

 --8---cut here---start-8---
 * 2015
 ** 2015-02 February
 *** 2015-02-01 Sunday
  DONE Give John ride to church
  2015-02-01 Sun 09:30
 --8---cut here---end---8---

 My problem is just trying to find my new entry (e.g. Give John ride to 
 church) in the actual agenda view after creating the item; rather than 
 going there by default when I create the item, I have to i-search my point 
 to it.


 Eric S Fraga e.fr...@ucl.ac.uk writes:

 On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
 Yes. I use the following (possibly relevant) code definition, which sets 
 my diary to agenda.org.

 (setq org-agenda-include-diary nil)
 ;; org-agenda
 (setq org-agenda-diary-file ~/emacs/agenda.org
   org-special-ctrl-o nil
   org-agenda-span 'day)

 Ah, yes, sorry.  You said this in another response.

 Maybe post a snippet from your agenda.org file?

 In my case, my diary file is in date-tree format and the entries are
 inserted in the current day's section.  More to the point, the entries
 appear in my agenda and all I have to do is RET or TAB to go to the
 entry in the diary file.

 --
 Professor John Kitchin
 Doherty Hall A207F
 Department of Chemical Engineering
 Carnegie Mellon University
 Pittsburgh, PA 15213
 412-268-7803
 @johnkitchin
 http://kitchingroup.cheme.cmu.edu



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Fragment from my agenda.org; basically, it's almost completely just what is 
automatically created when you tell agenda to use an org file. It should be 
similar to what you have; yes, hitting tab or enter takes me to entries just 
fine. 

--8---cut here---start-8---
* 2015
** 2015-02 February
*** 2015-02-01 Sunday
 DONE Give John ride to church
 2015-02-01 Sun 09:30
--8---cut here---end---8---

My problem is just trying to find my new entry (e.g. Give John ride to 
church) in the actual agenda view after creating the item; rather than going 
there by default when I create the item, I have to i-search my point to it. 


Eric S Fraga e.fr...@ucl.ac.uk writes:

 On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
 Yes. I use the following (possibly relevant) code definition, which sets my 
 diary to agenda.org. 

 (setq org-agenda-include-diary nil)
 ;; org-agenda
 (setq org-agenda-diary-file ~/emacs/agenda.org
   org-special-ctrl-o nil
   org-agenda-span 'day)

 Ah, yes, sorry.  You said this in another response.

 Maybe post a snippet from your agenda.org file?

 In my case, my diary file is in date-tree format and the entries are
 inserted in the current day's section.  More to the point, the entries
 appear in my agenda and all I have to do is RET or TAB to go to the
 entry in the diary file.



[O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
I plan out my days in the agenda using `i d` (org-agenda-diary-entry). I then 
move to the newly added entry to edit todo status, the hour of the item, 
deadlines, tags, and schedules. This would be tremendously facilitated if point 
automatically moved to the newly created item, rather than my having to search 
through my lengthy list of items to find the new entry. How can I implement 
this, and shouldn't it be a default? 



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Your point is on the created entry? When I do `i d` the entry is created 
somewhere down in the midst of my big list, and I have to use C-s to search for 
it and then I add things (such as with `t` for todo, `C-d` for deadline, `` 
for additional time details). The trouble is finding it in the list, which 
seems to require something like `C-s` and searching for some of the text I just 
entered. 

I'm using Org-mode version 8.2.10 (8.2.10-30-gca21b7-elpa). I'm also not using 
regular diary, but the following (perhaps relevant?). I would LOVE to have my 
point automatically go to the newly created item, as yours seems to. 

--8---cut here---start-8---
(setq org-agenda-include-diary nil)
;; org-agenda
(setq org-agenda-diary-file ~/emacs/agenda.org
  org-special-ctrl-o nil
  org-agenda-span 'day)
--8---cut here---end---8---


John Kitchin jkitc...@andrew.cmu.edu writes:

 This sounds interesting, but I don't understand what you are trying to
 do.

 In my agenda, when I press `i d` i get a new diary entry, and the point
 is on that entry. But it is a diary entry with no todo, and no new org
 entry. Do you do something else for that?

 Tory S. Anderson writes:

 I plan out my days in the agenda using `i d` (org-agenda-diary-entry). I 
 then move to the newly added entry to edit todo status, the hour of the 
 item, deadlines, tags, and schedules. This would be tremendously facilitated 
 if point automatically moved to the newly created item, rather than my 
 having to search through my lengthy list of items to find the new entry. How 
 can I implement this, and shouldn't it be a default?

 --
 Professor John Kitchin
 Doherty Hall A207F
 Department of Chemical Engineering
 Carnegie Mellon University
 Pittsburgh, PA 15213
 412-268-7803
 @johnkitchin
 http://kitchingroup.cheme.cmu.edu



[O] org-agenda-other-frame

2015-02-02 Thread Tory S. Anderson
I have a key which calls `gnus-other-frame`, a handy function that not only 
pops up a gnus frame, but also kills the frame when I exit gnus. I'd like 
something similar with my org agenda; the following function is used to pop it 
up, but I'm not sure how to kill the frame when I hit close the agenda (i.e. 
hitting `q`). The result should work whether I'm using sticky agenda or not. 
Any suggestions? 

--8---cut here---start-8---
(defun go-or-make-agenda (optional new-frame)
  (interactive P)
  (let ((buffer org-agenda-buffer-name)
(my-switch-function (if new-frame 'switch-to-buffer-other-frame 
'switch-to-buffer)))
(if (get-buffer buffer)
(funcall my-switch-function buffer)
  (org-agenda-list
--8---cut here---end---8---



Re: [O] Org Agenda Mode Line

2015-01-30 Thread Tory S. Anderson
Hey, thanks for telling me about org-agenda-sticky. I'm going to use that in 
the future! Having tested, I seem to have gotten rid of the 2015-01-24 line; I 
notice, though, that it seems to include those messages of one sort or another 
in every case now. By default it now shows *Org Agenda(a)* and using some other 
agenda function will show something else. Is this behavior from a recent patch? 
I don't remember it previously. 


Kyle Meyer k...@kyleam.com writes:

 torys.ander...@gmail.com (Tory S. Anderson) wrote:
 Suddenly I see my org agenda mode line has, as the buffer name,
 *Org Agenda(a:2015-01-24)

 I've tried closing and restarting agenda but it persists. What does
 this mean?

 That looks like a buffer name generated when org-agenda-sticky is
 non-nil.  The text in parentheses tells you how the command was invoked.
 For example, *Org Agenda(s:term)* means that after calling org-agenda,
 you pressed 's' and searched for 'term'.  In your case, you used the 'a'
 key, but I'm uncertain of how the '2015-01-24' was generated.

 How are you trying to close the buffer?  With a sticky agenda, 'q' will
 just bury the buffer.  You need to press 'Q' or call kill-buffer
 directly to actually kill it.



[O] Org Agenda Mode Line

2015-01-30 Thread Tory S. Anderson
Suddenly I see my org agenda mode line has, as the buffer name,
*Org Agenda(a:2015-01-24)

I've tried closing and restarting agenda but it persists. What does this mean? 
I can't seem to locate this in the documentation. 



Re: [O] Customize html formatting tags for export

2015-01-29 Thread Tory S. Anderson
Thanks. With that info I did this: 

--8---cut here---start-8---
;; convert =C-x=a to kbdC-x/kbd, *awesome* to strongawesome/strong
(setq org-html-text-markup-alist   '((bold . strong%s/strong) ; *text*
(code . code%s/code) ; ~text~
(italic . i%s/i) ; /text/
(strike-through . del%s/del) ; +text+
(underline . span class=\underline\%s/span) ; _text_
(verbatim . kbd%s/kbd))) ; =text=
--8---cut here---end---8---

It seems to work great! I failed finding a way to make this just a buffer local 
change (e.g. only when I'm writing in my tech blog org file), but I can live 
with that. 

Note: I changed b to strong because I'm a web developer and most of the 
time b hurts my soul[1][2][3] ...

Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 On 2015-01-28, at 21:40, Tory S. Anderson torys.ander...@gmail.com wrote:

 Right now I see that =formatted= and ~formatted~ both produce 
 codeformatted/code when exported to html. How can I change one of these, 
 perhaps to a custom tag (in particular, I'm hoping to produce 
 kbdformatted/kbd)? 

 See ox-html.  There are functions org-html-verbatim and org-html-code.
 If you look at those, you can see that (even though it might be
 a quick-and-dirty hack) customizing org-html-text-markup-alist should
 work.  You might even utilize the strike-through, if you never use it.

 Hth,

Footnotes: 
[1]  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong
[2]  http://www.html-5-tutorial.com/strong-and-b-elements.htm
[3]  
http://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em





Re: [O] Japanese popularity of orgmode

2015-01-29 Thread Tory S. Anderson
That's amazing! As others here have mentioned, it would be interesting and 
instructive to see a sample of the configuration  org markup that made 
something like that possible. In any case, I guess it makes sense to see more 
about orgmode if it was replacing LaTeX and Word as front-ends in demanding, 
peer-reviewed situations.  

hero...@gentoo.org writes:

 Hey Tory,

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 There seems to be (and has been for a while) a growing Japanese
 presence online with orgmode materials, documentation, addons,
 etc. Most recenlty I found this blog:
 http://paper.li/highfrontier/1300501273 . I had also noticed many of
 the page titles on the orgmode website/wiki had Japanese content. This
 has me curious. Does anyone know the story of what's causing it to
 take off in Japan, or whether taking off is even the right word? Is
 it just a few people or a department at a university that are using
 it?

 Well, just my 2 cents.  I attended a Japanese university and wrote my
 PhD thesis in org-mode.

 Cheers,
 Benda



[O] Table: Insert Cell

2015-01-29 Thread Tory S. Anderson
Does anyone know a solution for the surely common case of needing to insert a 
cell (not a column or row) into an orgmode table? Spreadsheet programs allow 
the option of pushing the column down or pushing the cells right in this case. 
How can this be achieved in orgmode? 



Re: [O] Table: Insert Cell

2015-01-29 Thread Tory S. Anderson
Wow! That's great! One of my next projects is going to have to be putting that 
little sequence into a function!

Marco Wahl marcowahls...@gmail.com writes:

 jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:
 Tory S. Anderson writes:

 Does anyone know a solution for the surely common case of needing to
 insert a cell (not a column or row) into an orgmode table?
 Spreadsheet programs allow the option of pushing the column down or
 pushing the cells right in this case. How can this be achieved in
 orgmode? 

 I do not think that there is a command for that. For pushing the row,
 it is trivial just write the new cell

 | 1 | 2 | 3 |
 | 4 | 5 | 6 |
 | 7 | 8 | 9 |

 | 1 | 2 | 3 |
 | 4 | here|5 | 6 |
 | 7 | 8 | 9 |

 [...]

 For pushing the column, you can use kill-rectangle after inserting
 another row

 | 1 | 2 | 3 |
 | 4 | 5 | 6 |
 | 7 | 8 | 9 |

 TAB on the 9 cell
[...]
 Finally, C-c C-c, gives you what you want

 | 1 | 2 | 3 |
 | 4 |   | 6 |
 | 7 | 5 | 9 |
 |   | 8 |   |

 This could be the day of org-table-transpose-table-at-point.

  | 1 | 2 | 3 |
  | 4 | 5 | 6 |
  | 7 | 8 | 9 |

 org-table-transpose-table-at-point

  | 1 | 4 | 7 |
  | 2 | 5 | 8 |
  | 3 | 6 | 9 |

  | 1 | 4 | 7 |
  | 2 || 5 | 8 |
  | 3 | 6 | 9 |

 C-c C-c

  | 1 | 4 | 7 |   |
  | 2 |   | 5 | 8 |
  | 3 | 6 | 9 |   |

 org-table-transpose-table-at-point

  | 1 | 2 | 3 |
  | 4 |   | 6 |
  | 7 | 5 | 9 |
  |   | 8 |   |


 Regards,  Marco



Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Tory S. Anderson
Excellent answers, on both fronts. Thanks! I couldn't spot 
`org-clock-history-length` in the code. That does the trick!

Thanks for the answer about the ?A. It's devilishly hard to Google that kind 
of thing... time to RTM. 

Marco Wahl marcowahls...@gmail.com writes:

 Hi!

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 2) As Peter originally mentioned, I see only five tasks on the list; I
 have more than that each week. Can this be expanded with some
 variable?

 AFAICS this is variable org-clock-history-length.

 Having looked into problem 2 by going to `org-clock-select-task` in
 'org-clock.el', I found the following which is mostly beyond my
 current elisp capabilities:

  (insert (org-add-props Recent Tasks\n nil 'face 'bold))
  (mapc
   (lambda (m)
 (when (marker-buffer m)
   (setq i (1+ i)
 s (org-clock-insert-selection-line
(if ( i 10)
(+ i ?0)
  (+ i (- ?A 10))) m))
   (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s
   (push s sel-list)))
   och)

 While I'd love it if someone could explain to me what the ? operator
 means with ?0 and ?A, one thing I get out of this is that a list
 length of something less than 10 seems hardcoded (right?). What would
 it take to be able customize this with a variable?

 ?0 is the integer representing character 0 see (info (elisp)Basic
 Char Syntax).  The above is a possibility to map the numbers 0, 1,...,
 9, 10, ... onto the characters '1', '2', ..., 'A', 'B',  AFAICS.

 The letters should come into play when you have more than 9 items in the
 clock-history.


 HTH,  Marco



Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Tory S. Anderson
Now I'm loving this tool but I'm looking for two tweaks that would make a big 
difference. 

1) I use work.org to track my weekly work hours; each week is mostly the same 
tasks, but new time frames. I need to be able to make sure my recent clock 
list is talking about the item for this week, not the identically named item 
for a previous week. If I could see the tree-path of the items (in the same way 
putting the point over an item in agenda shows you the hierarchy) that would be 
great. 

2) As Peter originally mentioned, I see only five tasks on the list; I have 
more than that each week. Can this be expanded with some variable? 

Having looked into problem 2 by going to `org-clock-select-task` in 
'org-clock.el', I found the following which is mostly beyond my current elisp 
capabilities: 

(insert (org-add-props Recent Tasks\n nil 'face 'bold))
(mapc
 (lambda (m)
   (when (marker-buffer m)
 (setq i (1+ i)
   s (org-clock-insert-selection-line
  (if ( i 10)
  (+ i ?0)
(+ i (- ?A 10))) m))
 (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s
 (push s sel-list)))
 och)

While I'd love it if someone could explain to me what the ? operator means 
with ?0 and ?A, one thing I get out of this is that a list length of 
something less than 10 seems hardcoded (right?). What would it take to be able 
customize this with a variable? 


Sebastien Vauban sva-n...@mygooglest.com writes:

 Peter Münster wrote:
 On Sat, Jan 24 2015, Peter Münster wrote:

 - There are duplicates in the list.

 Not reproducible.

 I still do have duplicates in my list as well.  It never has been fixed,
 but I don't have either a reproducible recipe.

 See https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00568.html.

 Best regards,
   Seb



[O] Customize html formatting tags for export

2015-01-28 Thread Tory S. Anderson
Right now I see that =formatted= and ~formatted~ both produce 
codeformatted/code when exported to html. How can I change one of these, 
perhaps to a custom tag (in particular, I'm hoping to produce 
kbdformatted/kbd)? 



[O] Japanese popularity of orgmode

2015-01-27 Thread Tory S. Anderson
There seems to be (and has been for a while) a growing Japanese presence online 
with orgmode materials, documentation, addons, etc. Most recenlty I found this 
blog: http://paper.li/highfrontier/1300501273 . I had also noticed many of the 
page titles on the orgmode website/wiki had Japanese content. This has me 
curious. Does anyone know the story of what's causing it to take off in Japan, 
or whether taking off is even the right word? Is it just a few people or a 
department at a university that are using it?  



[O] Agenda Holiday face doesn't work (crashes Agenda)

2015-01-27 Thread Tory S. Anderson
Hello. I've been using Julien Danjou's code to good effect: 
https://julien.danjou.info/blog/2010/org-mode-and-holidays

Basically, it just advocates adding the following function, which then marks 
holidays with weekend face for clear viewing: 

(require 'cl-lib)
(setq org-agenda-day-face-function
  (defun jd:org-agenda-day-face-holidays-function (date)
Compute DATE face for holidays.
(unless (org-agenda-todayp date)
  (cl-dolist (file (org-agenda-files nil 'ifmode))
(let ((face
   (cl-dolist (entry (org-agenda-get-day-entries file date))
 (let ((category (with-temp-buffer
   (insert entry)
   (org-get-category (point-min)
   (when (or (string= Holiday category)
 (string= Vacation category))
 (return 'org-agenda-date-weekend))
  (when face (return face)))

Now, however, it has stopped working. Once again I'm receiving the error, 
cl-return-from: No catch for tag: --cl-block-nil--, org-agenda-date-weekend

Previously I repaired this by requiring 'cl-lib and making dolist into 
cl-dolist; but it no longer seems to be working. I'm not sure what's changed. 
Any suggestions? 



Re: [O] Japanese popularity of orgmode

2015-01-27 Thread Tory S. Anderson
Thanks for the answer!

Takaaki Ishikawa tak...@ieee.org writes:

 Dear Tory,

 Good point. I don’t know “taking off” is the correct word, but as you 
 mentioned, it’s still growing. I can see several reasons why you think 
 Japanese content has been increasing in the Web. First, some students use 
 Emacs in their university because their teacher also uses Emacs. Then, the 
 students use Emacs to write papers for graduation. I know a super student. He 
 wrote his thesis using Emacs with org-mode! After graduation, they will be 
 programmers, engineers, and researchers with high-level technical skills 
 enough to distribute their knowledge through their blog and twitter. Second, 
 We have several workshops related to Emacs and org-mode. At least, two 
 workshops are held a few times a year at Kyoto and Tokyo. The participants of 
 the workshops write blog entries and release some emacs-lisp actively. An 
 Emacs advent calendar is a good example. Finally, we have many Japanese 
 translated materials, manual, tutorial, org-web, and twitter bot, to know 
 org-mode quickly and easily. And of course, the primary reason is that 
 org-mode is very useful tool to do anything with Emacs :-)

 Best regards,
 Takaaki Ishikawa


 Jan 27, 2015 11:16 PM、Tory S. Anderson torys.ander...@gmail.com のメール:
 
 There seems to be (and has been for a while) a growing Japanese presence 
 online with orgmode materials, documentation, addons, etc. Most recenlty I 
 found this blog: http://paper.li/highfrontier/1300501273 . I had also 
 noticed many of the page titles on the orgmode website/wiki had Japanese 
 content. This has me curious. Does anyone know the story of what's causing 
 it to take off in Japan, or whether taking off is even the right word? Is 
 it just a few people or a department at a university that are using it?  
 



Re: [O] truncate-lines for org tables, visual-line-mode for rest?

2015-01-26 Thread Tory S. Anderson
I solve this problem in my tables by using a table length-constraining 
parameter:

| my table | long-cell  |
|  | 10   |
|  | tons of text that should be cut off at a reasonable length (just 
10 chars) and not run on forever   |
|  |
 |


produces:

| my table | long-cell  |
|  | 10   |
|  | tons of te |
|  ||


Vladimir Alexiev vladimir.alex...@ontotext.com writes:

 I use visual-line-mode to wrap long lines on display.
 But for org tables, wrapping makes the display very confused.
 Is it possible to have truncate-lines ONLY for lines that represent tables?



Re: [O] HTML -- Org-mode?

2015-01-26 Thread Tory S. Anderson
Using the magic wizard program Pandoc, I just had success with a simple little 
example: 

pandoc -o test.org test.html

Input test.html:
html
  body
  strongTEST strong!/strong
div class='table'
  div class='cell'Cell 1/div
  div class='cell'Cell 2/div
  div class='cell'Cell 3/div
  div class='cell'Cell 4/div
/div
  /body
/html

Output test.org:
*TEST strong!*
Cell 1
Cell 2
Cell 3
Cell 4

I'm not sure how sophisticated the strings you are dealing with, but pandoc 
might do the trick for you. 
- Tory


Matt Price mopto...@gmail.com writes:

 Hmm,

 Looks like I asked this about a year ago and didn't follow up on it.
 Does anyone know a way to generate org-mode syntax from an html
 string? I would like to extend zotxt slightly (see my last post) and
 at present zotxt can pull citations 7 bibliography entries from Zotero
 only in plain-text and HTML form. The plaintext form loses
 information, so I would like to translate the HTML into org-mode
 syntax. 

 Since this would have to happen in the context of an 

 (org-add-link-type )

 invocation, it would be best if this could be done directly in emacs
 somehow... 

 Thanks as always,

 Matt



Re: [O] org-clock-select-task: how does it work?

2015-01-24 Thread Tory S. Anderson
Ah; nice potential functionality hiding there. Unfortunately, although it 
prompts me for a task, it just ends up clocking me in to whatever task is at 
point in the current buffer (probably the same behavior you are getting with 
problem #3); the practical result is the same as C-c C-x TAB. Has this ever 
worked correctly? 

I don't see any duplicates in the list. And I assume you're right with problem 
#1, but since my sessions usually span days or weeks I don't have any problem 
with that. 

Peter Münster pmli...@free.fr writes:

 On Sat, Jan 24 2015, Tory S. Anderson wrote:

 Peter, on my run Org-mode version 8.2.10, I see just what you are describing:
 a numbered list with the most recent things at the top.

 Ok, 8.2.10 seems to work. My version is git HEAD and my list is empty.


 It just doesn't seem to do anything after that.

 Indeed. Please try (org-clock-in (org-clock-select-task)) or
 C-u M-x org-clock-in-last (or C-u C-c C-x C-x).


 After switching to 8.2.10, I have 3 other problems:

 - I get a list with some items, but only very few (only items, where
   I've clocked in in this same emacs session).
 - There are duplicates in the list.
 - When selecting an item, another one is clocked in.

 TIA for any help,



[O] Error when trying to use --batch to export agenda ical: cl-block-nil error

2015-01-24 Thread Tory S. Anderson
When I try to export my agenda to ics (ical) from the command line, I use the 
following command:
emacs --batch --user $USER --eval (progn (org-agenda-list nil nil 'year) 
(org-icalendar-combine-agenda-files))

But this fails because, it says
No catch for tag: --cl-block-nil--, org-agenda-date-weekend

and it fails to produce an ics file. 

However, when I'm actually executing the year-view and 
`org-icalendar-combine-agenda-files` in my running session of emacs, it works 
fine. I used to have that problem but someone here helped me solve it by adding 
'(require 'cl-lib) to one of my init files. But why isn't this working to 
prevent the cl-block error when I run the batch mode? Ideas? 




Re: [O] Error when trying to use --batch to export agenda ical: cl-block-nil error

2015-01-24 Thread Tory S. Anderson
Okay, so the obvious fix was to load my org init file as in the following: 
emacs --batch --user $USER --eval (progn (org-agenda-list nil nil 'year) 
(org-icalendar-combine-agenda-files))

Now, the wiki page at http://www.emacswiki.org/emacs/BatchMode mentinos that 
packages don't get loaded, so that is where the obvious fix comes from. But 
then my question becomes, how does it know what my agenda files are in the 
first place? And why does org seem to break out-of-the-box with the cl-block 
error if I don't manually do a '(require 'cl-lib) ? 


torys.ander...@gmail.com (Tory S. Anderson) writes:

 When I try to export my agenda to ics (ical) from the command line, I use the 
 following command:
 emacs --batch --user $USER --eval (progn (org-agenda-list nil nil 'year) 
 (org-icalendar-combine-agenda-files))

 But this fails because, it says
 No catch for tag: --cl-block-nil--, org-agenda-date-weekend

 and it fails to produce an ics file. 

 However, when I'm actually executing the year-view and 
 `org-icalendar-combine-agenda-files` in my running session of emacs, it works 
 fine. I used to have that problem but someone here helped me solve it by 
 adding '(require 'cl-lib) to one of my init files. But why isn't this working 
 to prevent the cl-block error when I run the batch mode? Ideas? 



Re: [O] org-clock-select-task: how does it work?

2015-01-24 Thread Tory S. Anderson
Wow; I didn't know about this function and am also intrigued. When I run it I 
get what looks like a nice list of my recent clocked projects, with numbers to 
select them. When I press a number, though, it seems to finish without doing 
anything. I hoped maybe it would clock me in without me visiting that buffer, 
but no such luck. There also seems to be little documentation on this that I 
can find. 

Peter, on my run Org-mode version 8.2.10, I see just what you are describing: a 
numbered list with the most recent things at the top. It just doesn't seem to 
do anything after that. 

- Tory

Peter Münster pmli...@free.fr writes:

 Hi,

 How does this function work please?

 When I start this function, I get a *Clock Task Select* buffer with the
 line Recent Tasks and this prompt in the minibuffer: Select task for
 clocking:. There is no more cursor and whatever I type (TAB for
 example), I get user-error: Invalid task choice. Attached is a
 screenshot of my emacs after M-x org-clock-select-task.

 I would like to get a list of the most recent clocked tasks (most recent
 at first) and then chose one.

 TIA for any hints,



[O] Orgstruct failed M-Ret org-insert-heading

2015-01-21 Thread Tory S. Anderson
I'm trying out orgstruct mode for the first time and have added it for some of 
my .el files. It seems to work (collapses sections nicely) except when I 
attempt to add a section with M-Ret with point on a header. I receive the 
message:
org-insert-heading: This should not happen

If I manually use org-insert-heading, it works just fine. Any solutions? I'm 
using GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 
2014-09-30 on buildvm-10.phx2.fedoraproject.org. 



[O] How do I un-spare tree a buffer?

2015-01-21 Thread Tory S. Anderson
Silly question, but I can't find it in the manual or in the command list. After 
creating a sparse tree (C-c / /) I cannot return to the original view; I even 
tried replacing the sparse tree with a match-all regexp, which was a mistake... 

How do I un-sparsify my org buffer? 



[O] Org Ical export doesn't work for 2015?

2015-01-21 Thread Tory S. Anderson
I use a shell script to look over my agenda and export an ical file, which I 
then upload and bring into my google calendar. But it no longer seems to be 
working; mostly, none of my agenda items I've created since 2015 (or maybe a 
little before, it's hard to tell) are showing up (although some of the items 
that take place IN 2015 but were created earlier are still present). Any idea 
what the problem is? The principle line I'm running is this: 

emacs --batch --user $USER --eval (progn (org-agenda-list nil nil 'year) 
(org-icalendar-combine-agenda-files))

As I said, it was working just fine last year. What's changed? 



Re: [O] How do I un-spare tree a buffer?

2015-01-21 Thread Tory S. Anderson
Ah! Thanks. That should really be documented more clearly. 

Michael Strey mst...@strey.biz writes:

 On Mi, 2015-01-21, Tory S. Anderson wrote:

 [...]

 How do I un-sparsify my org buffer? 

 C-c C-c



  1   2   >