[O] Capture feature suggestion: place the mark from a template

2012-04-24 Thread Colin Fraizer
I use a capture template like this:

(t Todo entry (file+headline todo.org Tasks) 
  * TODO %?\n  :HIDDEN:\n  %U\n  :END:\n%! :prepend t)

to create todo items.  I want the cursor to be at the end of the
headline so I can type that in, but then I want to be able to quickly
jump to the end so I can type any details that I want.

I use the mark for that purpose, so I can type C-x C-x to jump
right where I want.  So I modified the function
org-capture-place-entry to add the following lines:

(goto-char beg)
(if (re-search-forward %! end t)
(progn
  (push-mark nil t nil)
  (replace-match )))

just before the final (goto-char beg) that will put the cursor
position at %?.

(I guess I could have put that following ``(goto-char beg)'' inside
that ``(progn ...)''.)

Would anyone else find this a useful addition to the capture template
mechanism?





Re: [O] question about org-latex-regexps

2012-02-28 Thread Colin Fraizer
Wow, I think I'm an org pariah. Did my email violate some org cultural norm? :-)

If so, I apologize.

Anyone have strong feelings about whether a change like this is advisable?


On Feb 27, 2012, at 12:32 PM, Colin Fraizer orgm...@cfraizer.com wrote:

 The variable org-latex-regexps has an element
 
($ \\([^$]\\|^\\)\\(\\(\\$\\([^
 \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^
 \r\n,.$]\\)\\$\\)\\)\\([-.,?;:'\)\000]\\|$\\) 2 nil)
 
 The 6th nested subexpression (starts with \\([-) prevents conversion of
 some latex math-mode stuff.
 
 Is there a reason for that subexpression to be so restrictive? Because I
 mostly write UTF-8 org-mode documents, I often have $some math$ followed
 immediately by an EN DASH or EM DASH (U+2013 or U+2014). Is there a reason
 why those characters could not be inserted in that character class?
 
 That is, could I change that subexpression to be \\([---
 .,?;:'\)\000]\\|$\\) ?
 
 [I've tried it with a couple of files and didn't notice any problems.
 
 Thanks,
 --Colin
 
 



[O] question about org-latex-regexps

2012-02-27 Thread Colin Fraizer
The variable org-latex-regexps has an element

($ \\([^$]\\|^\\)\\(\\(\\$\\([^
\r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^
\r\n,.$]\\)\\$\\)\\)\\([-   .,?;:'\)\000]\\|$\\) 2 nil)

The 6th nested subexpression (starts with \\([-) prevents conversion of
some latex math-mode stuff.

Is there a reason for that subexpression to be so restrictive? Because I
mostly write UTF-8 org-mode documents, I often have $some math$ followed
immediately by an EN DASH or EM DASH (U+2013 or U+2014). Is there a reason
why those characters could not be inserted in that character class?

That is, could I change that subexpression to be \\([---
.,?;:'\)\000]\\|$\\) ?

[I've tried it with a couple of files and didn't notice any problems.

Thanks,
--Colin




[O] export subtree-specific headers?

2011-10-28 Thread Colin Fraizer
I want to use particular LaTeX headers when I export a subtree. Is there a
way to do this? (EXPORT_TEXT is close, but I need stuff in the LaTeX
preamble, not in the document itself.)

 

--Colin



Re: [O] Bug Report: latex export interaction with inlinetasks

2011-10-09 Thread Colin Fraizer
Hi, Nicolas,

Please pardon my ignorance, but I don't know how to generate a patch for
distribution.

Since I sent that e-mail, I added a few more items from the opt-plist to
include :todo, :todo-keywords, :tags, and :priority.

The output from diff for my new version against the one I grabbed from the
git repository follows (enclosed in an org example block).

--Colin

#+begin_example
3c3
 ;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
---
 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
7c7,8
 ;; Author: Bastien Guerry bzg AT gnu DOT org
---
 ;; Version: 7.7
 ;; Author: Bastien Guerry bzg AT altern DOT org
404c405
   '(\\begin{verbatim}\n . \\end{verbatim})
---
   '(\\begin{verbatim}\n . \\end{verbatim}\n)
1472a1474,1478
 :tasks (plist-get opt-plist :tasks)
 :todo (plist-get opt-plist :todo)
 :todo-keywords (plist-get opt-plist :todo-keywords)
 :tags (plist-get opt-plist :tags)
 :priority (plist-get opt-plist :priority)
1839c1845
   (insert \\end{verbatim}\n))
---
   (insert \\end{verbatim}\n\n))
2769a2776,2777
 
 ;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
#+end_example

-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of
Nicolas Goaziou
Sent: Sunday, October 09, 2011 8:06 AM
To: Colin Fraizer
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] Bug Report: latex export interaction with inlinetasks

Hello,

Colin Fraizer orgm...@cfraizer.com writes:

 I have a file like this:

  

 * Item 1

   - list1a

   - list1b

 * Item 2

   - list2a

 *** TODO Test

 *** END

   - list2b

 * Item 3

  

 (1)If I export the whole file to LaTeX, everything works fine.

 (2)If I export the subtree * Item 2 to HTML, everything works fine.
 (I see my list and the inlinetask in that list.)

 (3)If I export the subtree * Item 2 to LaTeX, the inlinetask is
 removed. (All inlinetasks are removed from list2.)


 This is apparently caused by the fact that:

 1.   org-export-latex-first-lines matches all of list2 (because there
 are no headlines under * Item 2); AND

 2.   org-export-preprocess-string is called with limited parameters on
 those first lines. Those parameters do not include my value for :tasks.

 Is there a reason why we could not (or should not) change the defun 
 org-export-latex-first-lines like the following.  I only add the line

 :tasks (plist-get opt-plist :tasks)

 I'm not familiar enough with the guts of org to know if that will have 
 terrible consequences elsewhere.

 (defun org-export-latex-first-lines (opt-plist optional beg end)
:
:
   (prog1
  (org-export-latex-content
   (org-export-preprocess-string
(buffer-substring pt end)
:for-backend 'latex
:emph-multiline t
:add-text nil
:comments nil
:skip-before-1st-heading nil
:LaTeX-fragments nil
:tasks (plist-get opt-plist :tasks)  ;; *** I PROPOSE ADDING
THIS LINE
:timestamps (plist-get opt-plist :timestamps)
:footnotes (plist-get opt-plist :footnotes)))
:
:
) ; end of defun

I think this should be safe. Do you want to make a patch for that?

Regards,

--
Nicolas Goaziou





[O] Bug Report: latex export interaction with inlinetasks

2011-10-08 Thread Colin Fraizer
I have a file like this:

 

* Item 1

  - list1a

  - list1b

* Item 2

  - list2a

*** TODO Test

*** END

  - list2b

* Item 3

 

(1)If I export the whole file to LaTeX, everything works fine.

(2)If I export the subtree * Item 2 to HTML, everything works fine.
(I see my list and the inlinetask in that list.)

(3)If I export the subtree * Item 2 to LaTeX, the inlinetask is
removed. (All inlinetasks are removed from list2.)

 

NOTE: I'm exporting the subtrees with C-c C-e 1 d (or C-c C-e 1 L).

 

This is apparently caused by the fact that:

1.   org-export-latex-first-lines matches all of list2 (because there
are no headlines under * Item 2); AND

2.   org-export-preprocess-string is called with limited parameters on
those first lines. Those parameters do not include my value for :tasks.

 

Is there a reason why we could not (or should not) change the defun
org-export-latex-first-lines like the following.  I only add the line

:tasks (plist-get opt-plist :tasks)

 

I'm not familiar enough with the guts of org to know if that will have
terrible consequences elsewhere.

 

(defun org-export-latex-first-lines (opt-plist optional beg end)

   :

   :

  (prog1

 (org-export-latex-content

  (org-export-preprocess-string

   (buffer-substring pt end)

   :for-backend 'latex

   :emph-multiline t

   :add-text nil

   :comments nil

   :skip-before-1st-heading nil

   :LaTeX-fragments nil

   :tasks (plist-get opt-plist :tasks)  ;; *** I PROPOSE ADDING THIS
LINE

   :timestamps (plist-get opt-plist :timestamps)

   :footnotes (plist-get opt-plist :footnotes)))

   :

   :

   ) ; end of defun

 



[O] Bug in inlinetask export or latex export?

2011-04-20 Thread Colin Fraizer
I have a document that looks like the following.

 

If I export the whole file, I get the whole file. (I'm exporting to LaTeX
using C-c C-e d.)

 

If I move to the line ** Level 2 A and export that subtree using C-c C-e 1
d, the inline tasks are omitted.

 

Is this a bug or have I just misconfigured this somehow?

 

It seems to be caused by the fact that those inline tasks are treated as
lines before the first headline and that org-export-latex-first-lines
calls org-export-preprocess-string with a more-or-less hardcoded opt-plist
that doesn't include :tasks.

 

Is there a reason not to modify this section of
org-export-latex-first-lines:

 (org-export-latex-content

  (org-export-preprocess-string

   (buffer-substring pt end)

   :for-backend 'latex

   :emph-multiline t

   :add-text nil

   :comments nil

   :skip-before-1st-heading nil

   :LaTeX-fragments nil

   :tasks (plist-get opt-plist :tasks);; --
this is the line I want to add

   :timestamps (plist-get opt-plist :timestamps)

   :footnotes (plist-get opt-plist :footnotes)))

 

--

* Level 1 A

** Level 2 A

test

*** TODO Test 1

*** END

*** TODO Test 2

*** END

*** TODO Test 3

*** END

test2

and more

 

** Level 2 B

--



Re: [O] Continuation of main section text after subsections

2011-04-18 Thread Colin Fraizer
Was there ever a conclusion from this discussion?

I think I want something very similar to what Mr. van der Boom requested. I 
have outlines that contain varying amounts of text (paragraphs) and then, to 
avoid forgetting some task, I add a TODO item somewhere in the middle. That 
TODO item absorbs all the text following it until the next headline at the same 
or higher level.

For example, if I have an outline like

--
* Section 1
* Section 2
Paragraph 1
:
:
Paragraph 10
* Section 3
---

If I insert a TODO item after paragraph 3 and then collapse the outline, it 
hides paragraphs 4-10 as if they were part of that TODO item, even if they are 
unrelated.

I understand that this is not proper outline structure, but I was under the 
impression many people used org-mode for outlining /and/ for TODOs. ;-)

Syntax like ** END to end the TODO (or other subtree) would, I think, do what 
I want. Based on my cursory look at it, I imagine one could simply change 
org-end-of-subtree to treat ^** END specially (where the number of stars is 
the level). Normally, it would end with point at the beginning of the line ^** 
END (treating as the next headline at the same or higher level) and return 
that as end of the tree.. However, I'd like for it to put point at the 
beginning of the line following that fake headline.

Then, you could suppress export of ^\\*+ END$.

I don't really see a reason not to do this, but perhaps I'm naively overlooking 
a big problem.

--Colin


-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org 
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of 
Sébastien Vauban
Sent: Monday, March 28, 2011 3:09 AM
To: emacs-orgmode@gnu.org
Subject: [O] Re: Continuation of main section text after subsections

Hi,

Samuel Wales wrote:
 Perhaps we could have a tag like :noexport: except that it exports 
 body. It does not export the header. Optionally, it would be replaced 
 with a blank line.

 Then he can put headers anywhere he wants.

 Would this work for the OP's use case?

I really am not (yet?) convinced by the need -- as I don't really see how it 
fits in LaTeX/HTML.

However, just to answer one detail point, would such a new tag globally exist, 
it would have to be :ignoreheading: (it does already exist in Org-Beamer for 
anonym columns).

Best regards,
  Seb

--
Sébastien Vauban






Re: [O] Continuation of main section text after subsections

2011-04-18 Thread Colin Fraizer
Wow, I missed that part of the discussion, but it sounds very much like what
I want.

Thank you.

-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of
Marcel van der Boom
Sent: Monday, April 18, 2011 12:17 PM
To: emacs-orgmode@gnu.org
Subject: Re: [O] Continuation of main section text after subsections


On ma 18-apr-2011 11:34
Colin Fraizer orgm...@cfraizer.com wrote:

 Was there ever a conclusion from this discussion?

My personal conclusion was, given proper outlining and no or very few
assumptions about indentation preferences, it would be very difficult or
confusing to implement. 

The amount of alternatives given in the thread gave me enough food for a
while to try out if those would be sufficient. So far, the inline tasks (see
below) seem to fit my need the best, although their use feels a bit like a
hack to me.
 
 I think I want something very similar to what Mr. van der Boom 
 requested. I have outlines that contain varying amounts of text
 (paragraphs) and then, to avoid forgetting some task, I add a TODO 
 item somewhere in the middle. That TODO item absorbs all the text 
 following it until the next headline at the same or higher level.

This specific functionality might be already available by using the 'inline
tasks' I mentioned above See the function 'org-inlinetask-insert-task'. 

marcel

--
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV-- http://www.hsdev.com
So! web applications -- http://make-it-so.info
Cobra build  -- http://cobra.mrblog.nl





[O] document structure question

2011-04-01 Thread Colin Fraizer
If I have an org document like the one below, is there a way to tell org
that a subtree has ended such that the text that starts Finally is part of
the logical unit that starts with Headline 1, but *not* part of the subunit
Subheadline 1.2?

With lists I can use two blank lines to end the list item. Is there a
similar mechanism for subtrees?

--BEGIN--
* Headline 1
I have some text.

And more text.

** Subheadline 1.1
Some subtext.

** Subheadline 1.2
Additional subtext.

Finally, I'd like more text that is considered part of the logical Headline
1, but not part of Subheadline 1.2.

* Headline 2
Additional text.
--END--

Thanks,
--Colin Fraizer




[Orgmode] Bug Report: refile and attachments

2010-07-23 Thread Colin Fraizer
1.   Exactly what I did

I created an entry in an org file.

I added an attachment to that entry.

I used refile (C-c C-w) to move the entry to another org file.

I visited that file and attempted to open the attachment (C-c C-a o).

2.   What I expected:

Because there was only one attachment associated with the entry, I expected
it to open.

3.   What happened instead:

I was prompted for an attachment name. Hitting tab showed no match in
the minibuffer.

 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Feature Request for new capture feature

2010-07-23 Thread Colin Fraizer
I love the new Capture feature. Much better than the old Remember (though I
liked that too!).

 

However, would it be possible to have a C-u C-c C-w that completes the
capture and switches to the target buffer?

 

 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] RE: Bug Report: refile and attachments

2010-07-23 Thread Colin Fraizer
I know it's not _exactly_ the same, but I re-filed it back to the original
file (C-c C-w) and then opened it successfully (C-c C-a o).  It didn't
prompt me (because there was only one attachment).

I just tried it with a new entry and attachment file (of the same type) and
it worked.  Hmn.

Oh, I see the problem.  In the failing case, the org files are in different
directories.  (I didn't realize it because they are both agenda files and I
was using the path-oriented interactive refilling.) I would expect the
refile to move the attachments to the target's attachment directory
regardless.

[Sorry I didn't have time to debug the elisp myself.  I may look later if no
one jumps in before me.  I don't want to be a leech. 8-]

-Original Message-
From: Noorul Islam K M [mailto:noo...@noorul.com] 
Sent: Friday, July 23, 2010 6:58 AM
To: Colin Fraizer
Cc: 'emacs-orgmode Mailinglist'
Subject: Re: Bug Report: refile and attachments

Colin Fraizer orgm...@cfraizer.com writes:

 1.   Exactly what I did

 I created an entry in an org file.

 I added an attachment to that entry.

 I used refile (C-c C-w) to move the entry to another org file.


Before doing this, can you try opening it from initial org file itself.

using C-c C-a o

Thanks and Regards
Noorul


 I visited that file and attempted to open the attachment (C-c C-a o).

 2.   What I expected:

 Because there was only one attachment associated with the entry, I
expected
 it to open.

 3.   What happened instead:

 I was prompted for an attachment name. Hitting tab showed no match in
 the minibuffer.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


RE: [Orgmode] Re: Org-mode release 7.01

2010-07-20 Thread Colin Fraizer
Love the new capture!  Thank you, Carsten and other contributors for
continuing to making my working life better.

Best regards,
--Colin Fraizer
Indianapolis, IN, USA(, Earth)

-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of
Matt Lundin
Sent: Monday, July 19, 2010 8:48 AM
To: Carsten Dominik
Cc: emacs-orgmode Mailinglist
Subject: [Orgmode] Re: Org-mode release 7.01

Carsten Dominik carsten.domi...@gmail.com writes:

 This is a major release, and we have worked months on getting
 it together.  Most important is of cause the complete integration
 of Org Babel into  Org mode.  Many thanks to Eric Schulte and
 Dan Davison who have worked tirelessly to make this happen.
 Thomas S. Dye gets credit here as well because he did a lot of
 work on documentation and function/variable docstrings.

Thanks, Carsten, for another brilliant release! And a special thanks to
Eric Schulte for taking into account my concerns about security and
org-babel and for finding a very graceful solution.

Best,
Matt

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


RE: [Orgmode] Display inline images patch

2010-06-09 Thread Colin Fraizer
I use org-mode on Windows 7. It seems that the regexp for image files
excludes the : (colon) character. Could it be added to this:
[-+./_0-9a-zA-Z]+
to make this
[-+./:_0-9a-zA-Z]+
?

-Original Message-
From: emacs-orgmode-bounces+orgmode=cfraizer@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer@gnu.org] On Behalf Of
Carsten Dominik
Sent: Tuesday, June 01, 2010 9:37 AM
To: Russell Adams
Cc: emacs-orgmode
Subject: Re: [Orgmode] Display inline images patch

Hi Russel,

looks like you are not running the latest version, I think this is  
already fixed


- Carsten

On May 31, 2010, at 9:30 PM, Russell Adams wrote:

 I got irritated by my point jumping to the end of the buffer every
 time I toggled inline image display, so lets save excursion. ;]

 $ diff -Narub org.el~ org.el
 --- org.el~   2010-05-20 10:12:45.0 -0500
 +++ org.el2010-05-31 14:28:21.0 -0500
 @@ -15489,6 +15489,7 @@
 is how it will work for export.  When INCLUDE-LINKED is set, also
 links
 with a description part will be inlined.
   (interactive P)
 +  (save-excursion
   (org-remove-inline-images)
   (goto-char (point-min))
   (let ((re (concat \\[\\[\\(file:\\|\\./\\)\\(~?
   [-+./_0-9a-zA-Z]+
 @@ -15501,7 +15502,7 @@
   (setq ov (make-overlay (match-beginning 0) (match-end 0)))
   (overlay-put ov 'display (create-image file))
   (overlay-put ov 'face 'default)
 -  (push ov org-inline-image-overlays)
 +  (push ov org-inline-image-overlays))

 (defun org-remove-inline-images ()
   Remove inline display of images.






 --
 Russell Adamsrlad...@adamsinfoserv.com

 PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

 Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode