Samuel Wales | 18 Apr 22:40 2014
Picon

how to stop the mouse pointer highlighting in agenda?

i find the highlighting of lines upon mouse pointer movement and the
echo area notification to be distracting.

i don't understand the code at all, but i tried
(remove-text-properties 1 1 '(mouse-face nil)).  didn't work.

my goal is to make moving the mouse pointer do nothing in the agenda.

--

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.

Alan Schmitt | 18 Apr 22:27 2014

org-review-schedule

Hello,

I've just finished writing a little bit of code that allows the
scheduling of reviews. The basic idea is that every task that is
supposed to be reviewed has a LAST_REVIEW property (a date when the
task / project was last reviewed), and optionally a REVIEW_DELAY
property (with a configurable default value). If the current date is
after LAST_REVIEW + REVIEW_DELAY, then the task is considered up to
review.

I've written a small function to show these tasks in the agenda, and
a sorting function to allow them to be sorted from "this had to be
review so long ago" to "this has just been available to review". Another
function allows to set the LAST_REVIEW property to the current date (or
a chosen date if called with C-u).

I attach the code. It's the first time I'm contributing something like
this, so I don't really know how to do it. The header of the file is
basically the same one as from `contrib/org-expiry.el', and I tried to
keep a similar structure.

Please don't hesitate to comment & criticize the code, I'm still
learning my way around emacs-lisp and org-mode.

Thanks,

Alan

Attachment (org-review-schedule.el): application/emacs-lisp, 9 KiB
(Continue reading)

torben.lehoff | 18 Apr 22:08 2014
Picon

Bug: clocktable does not respond to :wstart [7.9.3f (release_7.9.3f-17-g7524ef <at> /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/org/)]


I'm trying to get a weekly clocktable report starting on Sunday using
this specification:

#+BEGIN: clocktable :maxlevel 2 :scope agenda-with-archives  :wstart 2 :block thisweek-1 :step day
:fileskip0 :narrow 20!
#+END:

The problem is that no matter which argument I use for :wstart the
report starts on Monday.

Let me know if you need more information from me.

Cheers,
Torben

Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.2, NS apple-appkit-1265.00)
 of 2014-03-03 on pique.local
Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef  <at>  /usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/org/)

current state:
==============
(setq
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers)
(Continue reading)

Bastien | 18 Apr 13:29 2014
Picon

Re: emacs regex work done within literate org-mode?

Hi Lawrence,

Lawrence Bottorff <borgauf <at> gmail.com> writes:

> But could the results of running literate code then be fed into the
> next section of literate code?

Definitely, see this section of the manual:

  (info "(Org) Noweb reference syntax")

HTH,

--

-- 
 Bastien

Alan Schmitt | 18 Apr 13:20 2014

How do I define `org-agenda-cmp-user-defined'?

Hello,

I'm working on a way to schedule reviews of projects, and I would like
to have them ordered by age in an agenda view. It seems that I want to
write my own `org-agenda-cmp-user-defined' function to do so.
Unfortunately I cannot find an example of such a function.

More precisely, given this:

,-----------------------------------------------------------------
| (defun org-review-schedule-compare (a b)                        
|   "Compares the date of scheduled review for the two agenda     
|   entries. Returns +1 if A has been scheduled for longer, nil if
|   they have been scheduled for the same length of time, and -1  
|   otherwise."                                                   
|   ())                                                           
`-----------------------------------------------------------------

how can I access a property of `a' and `b'? (The documentation tells me
they are "agenda entries", but it's not clear how I can access their
information.)

Thanks a lot,

Alan

Xavier Garrido | 18 Apr 11:32 2014
Picon

CUA copy/paste within code block

Dear orgers,

I am a CUA mode user and when I want to copy/paste a line or block of 
code within a org-babel code block, I always get back to the beginning 
of the code block after pasting. For example, assume you have the 
following piece of code

echo "coucou"

#+BEGIN_SRC sh
for i in {0..10}
do
   echo $i
done
#+END_SRC

and you want to insert the 'echo "coucou"' line inside the for loop 
within the code block, by using the CTRL-C/CTRL-V combination keys, the 
cursor gets back to the beginning of the code block and does not stay 
where the paste is done. Here it is not a real problem since the code 
block is pretty small but when I have a long code block, the cursor is 
pretty far from where I have done the paste. Btw, selecting with the 
mouse and pasting with the middle click works just fine i.e. the cursor 
remains at the same position.

I do not know if it is a bug or a feature but is it possible to get rid 
of such behavior.

Thanks for your help/advice,
Xavier
(Continue reading)

Leonard Randall | 18 Apr 11:02 2014
Picon

Re: Feature Request. org-bibtex-tags-are-keywords inherit tags




I
t was indeed easier than I had thought. I tested the modified function on my reading list file and it works as expected under most conditions (It plays well with other variables etc.). The only exception was the previously mentioned issue with nonstandard bibtex types. If I have time this weekend, I will try to look into this problem. (I think it might be time to break down and actually learn lisp.)

Attached is the requested diff. In addition to adding the new variable `org-bibtex-tags-inherit' and editing the function `org-bibtex-headline', I modified a couple of customize doc strings to reflect the change. I also edited one doc string that seemed to refer to an old variable that is no longer in use.


On 17 April 2014 15:25, Bastien <bzg <at> gnu.org> wrote:
Hi Leonard,

Leonard Randall <leonard.a.randall <at> gmail.com> writes:

> Unfortunately, my knowledge of lisp is particularly rudimentary so I
> can't offer to do it myself.

I think you certainly underestimate yourself and can start hacking :)

1. install Git on your machine
2. ~$ git clone git://orgmode.org/org-mode.git
3. ~$ cd org-mode/
4. Edit lisp/org-bibtex.el
5. Use C-x C-e at the end of the edited functions and check it works

When you're done, simple C-x v = in the edited buffer, C-x o to go to
that buffer, then save it and send it to us.

Otherwise let's wait someone with a better understanding than mine
can hack it together.  But I'm sure you can give us something that
will be useful enough.

Best,

--
 Bastien


diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index ed645e5..848d0e4 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
 <at>  <at>  -270,20 +270,31  <at>  <at>  with underscores, and characters that are not permitted in org
 tags will be removed.

 If t, local tags in an org entry will be exported as a
-comma-separated string of keywords when exported to bibtex.  Tags
-defined in `org-bibtex-tags' or `org-bibtex-no-export-tags' will
-not be exported."
+comma-separated string of keywords when exported to bibtex. If
+`org-bibtex-inherit-tags' is t, inherited tags will also be
+exported as keywords. Tags defined in `org-bibtex-tags' or
+`org-bibtex-no-export-tags' will not be exported."
   :group 'org-bibtex
   :version "24.1"
   :type 'boolean)

 (defcustom org-bibtex-no-export-tags nil
   "List of tag(s) that should not be converted to keywords.
-This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
+This variable is relevant only if `org-bibtex-tags-are-keywords' is t."
   :group 'org-bibtex
   :version "24.1"
   :type '(repeat :tag "Tag" (string)))

+(defcustom org-bibtex-inherit-tags nil
+  "This variable controlls whether inherited tags are included
+when converting org tags to bibtex keywords. It is relevant only
+if `org-bibtex-tags-are-keywords' is t. Tag inheritence itself is
+controlled by `org-use-tag-inheritence' and
+`org-exclude-tags-from-inheritence'"
+  :group 'org-bibtex
+  :version "24.1"
+  :type 'boolean)
+
 (defcustom org-bibtex-type-property-name "btype"
   "Property in which to store bibtex entry type (e.g., article)."
   :group 'org-bibtex
 <at>  <at>  -332,7 +343,9  <at>  <at>  This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
 					  (append org-bibtex-tags
 						  org-bibtex-no-export-tags))
 			    tag))
-			(org-get-local-tags-at))))))
+			(if org-bibtex-inherit-tags
+			    (org-get-tags-at)
+			  (org-get-local-tags-at)))))))
     (when type
       (let ((entry (format
 		    " <at> %s{%s,\n%s\n}\n" type id
Brady Trainor | 18 Apr 01:43 2014

sharing my firsts, org babel tangle and "init" .org file


Have you migrated your init files into .org file(s)? What's your setup?

Below is my first setup for fellow newbs, or for the interested 
developer. And please let me know if I'm missing some logic or 
conventions/practices.

In the short history of my Emacs init file evolution (~ oct '13), I had 
considered packages like dot-emacs.org, but for some reason had not 
succeeded (I thought it had demanded Emacs 24.3.50+, but I don't see 
that in the description now).

So when I recently felt motivated to try such a .org Literation of my 
init files (my project of making agenda custom commands and capture 
templates was starting to topple), I tried let's say a more basic approach.

I worked mostly from the tutorial in
     Babel: Introduction / Emacs Initialization with Babel

http://orgmode.org/worg/org-contrib/babel/intro.html#emacs-initialization

It took just a little wrestling with a clean tty2 Emacs, but here is my 
interpretation of a "minimal" setup for initializing via org babel 
tangling:

  ____________
/

;;;; make sure org has been installed in an "emacs -q"

(require 'package)
(package-initialize)
(require 'org)

;; declare org indentation before we might manually open org to tangle
(setq org-startup-indented t)
(setq org-hide-block-startup t)
;; declare source indentation before we might manually open org to tangle
(setq org-src-fontify-natively t)
(setq org-edit-src-content-indentation 0)

;; default I/O in windows is undecided-dos/unix for de/encoding respectively
(prefer-coding-system 'utf-8-unix)

;; load org initialization files
(require 'ob-tangle)
(org-babel-load-file "/e/emacs-config/dot-emacs-test.org")

\____________

Some of those aren't necessary but for aesthetics before manually 
stepping through lines for testing the initialization (starting emacs -q 
tangling and/or executing one-by-one).

The character encoding is there as I have some utf-8 Fahrenheit symbols 
in my (.org) init file.

Initially (while troubleshooting) I had some dired customizations 
(vertical omit, horizontal hide), font family and color-theming in this 
code block, as I have a hard time looking at plain Emacs for too long.

You may also want to toggle some tangles in your (first ever) init file, 
this can be done per file, subtree or source block, via

#+PROPERTY: header-args :tangle yes
  or
:PROPERTIES:
:header-args: :tangle no
:END:
  or
#+BEGIN_SRC emacs-lisp :tangle no

And the latter take precendence.

TWIMC, HTH

Brady

Thorsten Jolitz | 17 Apr 22:59 2014
Picon

Re: emacs regex work done within literate org-mode?

Lawrence Bottorff <borgauf <at> gmail.com> writes:

> A while back I declared war against what I call "tunneling" i.e., the
> typical programmer practice of just working along on something without
> making any sort of notes or comments . . . 

When learning about [[http://software-lab.de/doc/ref.html][PicoLisp]] I
noticed that some of the very best programmers actually prefer just
reading code with minimal distraction by comments, so 'tunneling' is
probably not bad per se but rather a question of taste.

> Basically, I'm looking for something better than the typical Emacs
> REPL session where you have the option of simply saving the entire
> session's REPL buffer. But I don't want it to be so cumbersome that I'm
> writing a tutorial, either -- even though that's what I'm sort of
> doing. The dream would be that a whole day's work could be contained
> in org-mode files -- both the code and the description of what's going
> on and how things came (in)to be(ing).

When its about programming work with just one language, you might try
outshine.el with outorg.el, if you work with several languages or its
more about publishing then actual programming, Org (Babel) should be
perfectly capable to do what you want. 

--

-- 
cheers,
Thorsten

Lawrence Bottorff | 17 Apr 21:53 2014
Picon

emacs regex work done within literate org-mode?

A while back I declared war against what I call "tunneling" i.e., the typical programmer practice of just working along on something without making any sort of notes or comments . . . and that day's "Werdegang" as they say in German (steps, procedure, process?) being only as good as your memory of it. I see org mode as capable of is beating tunneling by actually writing a story of your day's work inside an org-mode file.

For example, I'm working on a database project where I'd like to do lots of emacs regex to get a file of comma delimited lines turned into sql INSERT-ready statements. Here's what the VALUES of my INSERT look like:

(UPPER (SUBSTRING(MD5(RAND()) FROM 1 FOR 6)), ,'P',1)

the first part up until ...FOR 6)) is just a six-place hex id generator (mysql syntax) for the record, then comes an empty field, then 'P' etc. So I'm looking to shove a chunk of text from my comma delimited file into the empty field. e.g.,

(...FROM 1 FOR 6)),'new thing 1','P',1)

where 'new thing 1' came from a line in the comma delim file. Right, so I can do this with Emacs' regex in a one-off tunneling sort of way, but how could I do this inside an org-mode file? I'm guessing I would need to use elisp (perl, lisp, etc) in a literate way, i.e., my org-mode file would have code sections and results sections. But could the results of running literate code then be fed into the next section of literate code? I need to run code on data, get results, run more code on that -- all while interactively composing my org-mode file. Is this possible?

Basically, I'm looking for something better than the typical Emacs REPL session where you have the option of simply saving the entire session's REPL buffer. But I don't want it to be so cumbersome that I'm writing a tutorial, either -- even though that's what I'm sort of doing. The dream would be that a whole day's work could be contained in org-mode files -- both the code and the description of what's going on and how things came (in)to be(ing).

LB
Rustom Mody | 17 Apr 19:13 2014
Picon

Bug? (was Request for worg page -- escaping questions)

On Thu, Apr 17, 2014 at 9:42 PM, Bastien <bzg <at> gnu.org> wrote:
Hi Rustom,


>  3. How to enter a '|' into tables

IIRC this is a FAQ: http://orgmode.org/worg/org-faq.html

Trying to dig a bit into this -- some table issues -- I seem to have stumbled onto a bigger issue: org seems to be crashing emacs.

Ive checked it about 4 times.
I cant exactly give the exact offending file because once it goes into 100% cpu mode theres nothing I can do but to kill emacs from a shell.

1 Started org with: make vanilla in org directory
2 version is 8.2.5e
3. Now I edit something.org (to get into org mode):
4 Now type as follows
* Intro
|a|b|c^
5. (point is at ^)Hit C-c C-c
emacs hangs (ie gets unresponsive, cpu 100% needs to be killed from outside)

Gmane