Re: [O] org-mobile-push fails

2012-10-24 Thread Jorge A. Alfaro Murillo
This is strange, since I get the whole emacs from a repository
(http://emacs.naquadah.org/ unstable/ ). I should not have to compile
anything.

I guess there must be a bug in the package from the repository.

What do you recommend me to do? Install the org from source?

On Wed, Oct 24, 2012 at 5:35 AM, Bastien  wrote:
> Hi Jorge,
>
> "Jorge A. Alfaro Murillo"  writes:
>
>> Hi, I am having trouble with org-mobile-push, it fails and gives the
>> following error:
>> org-mobile-create-index-file: Symbol's function definition is void:
>> org-prepare-agenda-buffers
>
> The function `org-prepare-agenda-buffers' has been renamed to
> `org-agenda-prepare-buffers'.
>
>> It might be related to the fact that now when run org-version the result is:
>> Org-mode version 7.9.2 (7.9.2-GNU-Emacs-24-3 @ org-install.el can not be 
>> found!)
>
> Bingo!  It is related.  :)
>
>> My emacs version is:
>> GNU Emacs 24.2.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of
>> 2012-10-18 on dex, modified by Debian
>>
>> I updated today and since then the issue has come up.
>
> You certainly need to run make && make install so that the correct
> functions' names are autoloaded when Emacs fires up.
>
> See http://orgmode.org/worg/dev/org-build-system.html for details.
>
>> This is also my first post to this list, which I hope to check out
>> more regularly, since lately org-mode has taken over my life. Thanks
>> for the help, best
>
> Welcome!
>
> --
>  Bastien



Re: [O] org-mobile-push fails

2012-10-25 Thread Jorge A. Alfaro Murillo
I think I figured it out. I think it was a problem of having "upgraded" org
from the package manager once, when I had another version of emacs. I
removed the package, reinstall emacs-snapshot and now it is working again.

Thanks.
On Oct 25, 2012 4:02 AM, "Bastien"  wrote:

> Hi Jorge,
>
> "Jorge A. Alfaro Murillo"  writes:
>
> > This is strange, since I get the whole emacs from a repository
> > (http://emacs.naquadah.org/ unstable/ ). I should not have to compile
> > anything.
>
> I double-checked and the source on Julien's server are okay.
>
> Can you do
>
> C-h f org-mobile-create-index-file REt
>
> and report where the related source file is located?
>
> Removing it should be enough to clean up your installation.
>
> Best,
>
> --
>  Bastien
>


Re: [O] org-ref in action

2014-06-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke  writes:

> How do people choose today?
>
> Why choose bibtex over biblatex?

For journal submission. With BibTeX you only have to copy paste at the
end of your LaTeX file the contents of the generated .bbl file.
Moreover, journals provide a default style for BibTeX, not biblatex. And
I have never seen a journal that supports biblatex (there might be a
few), but any journal that supports LaTeX supports BibTeX.

> Where do people discuss such questions like this in real life?

In the orgmode list =)




Re: [O] Pushing and pulling to google calendar

2014-06-29 Thread Jorge A. Alfaro-Murillo
"Doyley, Marvin M."  writes:

> Hi Everybody,
>
> Is there a way to sync org-agenda with google calendar so that I can
> exploit googles calendar reminder.
>
> I wish there was a way to send calendar reminders (pop-up, emails,
> text message ) from org-mode rather than going through google.

MobileOrg can synchronize to your google calendar, you can then set up
remainders with the calendar app in your phone.

Check (info "(org) MobileOrg")

Best,

Jorge.




Re: [O] Pushing and pulling to google calendar

2014-06-29 Thread Jorge A. Alfaro-Murillo
Parnell Springmeyer  writes:

> MobileOrg is the best solution so far. But there's no
> bi-directionality, which is annoying, the sync options in MobileOrg
> are pretty solid but getting MobileOrg first setup was enormously
> confusing for me. I've used dropbox and btsync to sync and they aren't
> bad.

I have been using MobileOrg in multiple computers with Dropbox for quite
a while and I do not have any complaints. I generally try to avoid
Google calendar and use it only for remainders in the Google Now App of
my phone, and to share my calendar with other people. But when I have to
create a new item in the calendar I rather use MobileOrg to create a
capture, and let it handle the synchronization just one way.




Re: [O] org-agenda-files and customize

2014-06-29 Thread Jorge A. Alfaro-Murillo
David Masterson  writes:

> 2. I removed org-agenda-files from the custom-set-variables section of
> my .emacs.
> 3. I set org-agenda-files in the standard way (C-c [).
> 4. I notices that org-agenda-files was back in the custom-set-variables
> section of my .emacs.
>
> Is that supposed to happen?

Yes. Where do you expect them to be?

If you do not like the custom-set-variables, you have three options (but
you cannot use 'C-c ['):

#+BEGIN_SRC emacs-lisp
  (setq org-agenda-files
(list "file1" "file2" ...))
#+END_SRC

#+BEGIN_SRC emacs-lisp
  (setq org-agenda-files
"path_to_a_directory_that_contains_all_your_files")
#+END_SRC

#+BEGIN_SRC emacs-lisp
  (setq org-agenda-files
"path_to_a_file_with_the_names_and_location_of_all_your_files")
#+END_SRC




Re: [O] Installing from git

2014-07-02 Thread Jorge A. Alfaro-Murillo
Vicente Vera  writes:

> Hello. I'm quite confused with the installation options.
>
> Recently started out a Debian base system and compiled Emacs from the
> bzr repository. That came out fine, so I ran 'make install' and now
> Emacs 24.4.50 sits in /usr/local/bin, /usr/local/share, etc.
>
> I want to install the master branch of org-mode.

I have both emacs and org-mode from git. For emacs:
#+BEGIN_SRC shell
  git clone git://git.savannah.gnu.org/emacs.git
  make distclean
  ./configure
  make
#+END_SRC

You do not need the "make install", I leave the emacs files where I want
them on my home folder (also useful if I do not have root access in a
server), and create two symbolic links to emacs/lib-src/emacsclient and
emacs/src/emacs in ~/bin/

For org, I once read a discussion in this list about not doing this but
that a lot of people do it, it keeps working for me, so I keep doing it.
I clone the repository:

#+BEGIN_SRC shell
  git clone git://orgmode.org/org-mode.git
  make
#+END_SRC

Then I remove the directory emacs/lisp/org and create a direct link to
org-mode/lisp instead. Also I remove emacs/etc/org (or maybe this
doesn't cause conflicts?)

Also, since the git repository of org has the etc files in a different
location, emacs cannot find them; the following takes care of that:

#+BEGIN_SRC emacs-lisp
  (setq org-odt-data-dir "path_to_org-mode_git_directory/etc/")
#+END_SRC

Finally, this takes care of the documentation:

#+BEGIN_SRC emacs-lisp
  (eval-after-load 'info
'(progn (info-initialize)
(add-to-list 'Info-directory-list 
 "path_to_org-mode_git_directory/doc")))
#+END_SRC

Best,

Jorge.




Re: [O] Installing from git

2014-07-02 Thread Jorge A. Alfaro-Murillo
Achim Gratz  writes:

> It doesn't work, you just haven't run into a problem that you can
> positively identify with that habit yet.  You'd need to re-build Emacs
> each time you update Org if you wanted it to work. 

Why? emacs/lisp points to org-mode/lisp, if I update org it updates in
its org-mode repo, what can I break?

> There really is a reason that all those files get installed, if you
> can't or don't want to write to system-wide directories you are free
> to install them in your home directory instead.

Do you mean the files that "make install" creates? Doesn't "make" alone
create all things necessary for org to work?




Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-12 Thread Jorge A. Alfaro-Murillo
Grant Rettke  writes:

> Octave is an option, too: https://www.gnu.org/software/octave/

Since people are championing python, and R and Octave have been
mentioned, let me throw this one into the discussion:
http://www.sagemath.org/

"Sage is a free open-source mathematics software system licensed under
the GPL. It builds on top of many existing open-source packages: NumPy,
SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more"

"Many more" includes Octave as well. If you know python, then you can
use only python in Sage, no need for learning anything new.

Actually you do not need to install anything to use it:
https://cloud.sagemath.com/

At Sage Math Cloud (SMC) besides Sage, you can access a terminal there
and it has emacs already installed. Also you can ssh to their servers,
and tramp with emacs locally works well connecting to it. That is what I
use for research.

Come to think about it, there is no ob-sage.el yet. I write my papers
directly to LaTeX (and my collaborators write at SMC since they are not
emacs users and it provides direct compilation and shows already the
results) so I never thought about exporting to sage. Does someone have
any plans for this?

Jorge.




Re: [O] a quick way to switch orgmode notes between read-only/editing?

2014-07-17 Thread Jorge A. Alfaro-Murillo
Xebar Saram  writes:

> i keep once and a while screwing up my notes with unintended editing
> (erroneous key presses etc) and was wondering if any one knew of a way
> to to switch orgmode notes between read-only/editing?

Hi Xebar. Use C-x C-q. This works for every file, I use it in particular
for notes that I do not want to edit.

It runs the command read-only-mode which changes whether the current
buffer is read-only. Actually the command switches the local variable
buffer-read-only, so you can use that variable as local for every file
that you do not want to edit by default. At the end of those files add:

#+BEGIN_EXAMPLE
%%% Local Variables:
%%% buffer-read-only: t
%%% End:
#+END_EXAMPLE

And every time that you want to edit them just do C-x C-q

Best,

Jorge.




Re: [O] org-mode

2014-07-24 Thread Jorge A. Alfaro-Murillo
Sharon Kimble  writes:

> How then do I get to use the "8.3 beta" please?

Hi Sharon,

Use the git version, it has had the tag 8.3 beta for about a month.

Follow the instructions in
http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development

Best,

Jorge.




Re: [O] org-mode

2014-07-24 Thread Jorge A. Alfaro-Murillo

Sharon Kimble  writes:

Miguel Ruiz  writes: 

master branch = 

make cleanall #git pull #optional git reset --hard 
origin/master  # warning: removes local changes #make test 
#optional make  #not necessary if make test   
  
maint  branch = 

make cleanall #git pull #optional git reset --hard 
origin/maint  # warning: removes local changes #make test 
#optional make  #not necessary if make test   

Thanks, my "org-mode" script now shows - 

--8<---cut 
here---start->8--- cd ~/git/org-mode git 
reset --hard origin/master # mr update make autoloads make make 
doc sudo make install cd ~ --8<---cut 
here---end--->8--- 


As the website says, it is enough to do:

#+BEGIN_SRC shell 
 make update 
#+END_SRC


this even pulls the git repository.




Re: [O] A gentle introduction to Emacs & Org-mode?

2014-07-29 Thread Jorge A. Alfaro-Murillo

Thanks John,

The links to the other videos are broken. I think that the 
addresses have %3D instead of an equal sign (=).


Best,

Jorge.





Re: [O] What is the best in-Emacs presentation mode for org-files today?

2014-07-29 Thread Jorge A. Alfaro-Murillo

Grant Rettke  writes:

el-get might be a nice option for you. 


There is also doc-present, but you would need to export to beamer 
first: https://github.com/dengste/doc-present/


Some people create there own, for example watch the first 3min of:
http://www.youtube.com/watch?v=p3Te_a-AGqM

Best,

Jorge.





Re: [O] Installing Org 8

2014-07-30 Thread Jorge A. Alfaro-Murillo
Try putting (package-initialize) as the first line of your .emacs, 
that should do the trick. 


Best,

Jorge.




Re: [O] Agenda, Deadline, DONE

2014-08-05 Thread Jorge A. Alfaro-Murillo

hymie!  writes:

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


Welcome.

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

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

In my Agenda, I see this: 

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

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

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


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


I also like to keep the historical info, but in order to keep my 
tasks.org file clean (and save some time while building the 
agenda) I keep it in a separate file. Probably the simplest way is 
something like this:


#+BEGIN_SRC emacs-lisp 
 (setq org-archive-location "~/org/archive.org::") 
#+END_SRC  Now when you do not want to see something anymore, you 
can press C-c C-x C-a from the org file or the agenda to move the 
item to the archive.org file. Check the documentation of 
org-archive-location or (info "(org) Archiving") for more details.


Best,

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-07 Thread Jorge A. Alfaro-Murillo

David Masterson  writes:

Anyone using MobileOrg? 


I use it all the time, but the Android version. I do not think 
that it is a dead project, at the end of last year there were 
quite a few updates.


I generally use it to read my org agenda and TODO list in my 
phone, to automatically transfer the org agenda to the Google 
calendar and to make captures in my phone that I later organize 
into the proper file and heading in my computer. For those three 
tasks it is a five star application.


I still think that it is far from being org-mode in your phone, but you
should not see it that way. If you want to something that allows
complete org functionality in your phone you are better off using
something like JuiceSSH and connecting to one of your computers.

Best,

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-07 Thread Jorge A. Alfaro-Murillo
Also there is a more or less active Google+ page: 


https://plus.google.com/u/0/101083268903948579162/posts

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-08 Thread Jorge A. Alfaro-Murillo

David Masterson  writes:

Not looking for complete org functionality in my phone -- just a 
reasonable ability to edit org outlines while I'm on the road. 


Well you can do that with MobileOrg... sort of. Once you edit and 
save a change, synchronize in your phone and then pull from your 
computer (org-mobile-pull). From (info (org) Pulling from 
MobileOrg):


"Some changes are applied directly and without user interaction. 
Examples are all changes to tags, TODO state, headline and body 
text that can be cleanly applied. Entries that have been flagged 
for further action will receive a tag ‘:FLAGGED:’, so that they 
can be easily found again. When there is a problem finding an 
entry or applying the change, the pointer entry will remain in the 
inbox and will be marked with an error message. You need to later 
resolve these issues by hand."


I do not understand when "cleanly applied" is the case, but my 
experience is that resolving "these issues by hand" is the most 
likely outcome. Even simple edits in the text of an entry in my 
phone generally result in errors of synchronization. Note that 
besides adding a comment of when the file was changed in the 
mobile, the local file does not change. Also you can see the 
differences in the files in the from-org-mobile.org file (or 
whatever you set the org-mobile-inbox-for-pull variable to).


Because of this limitation, I am better off just adding simple 
captures on my phone as remainders to do something in my computer, 
even adding information to a certain file. Then, when I 
synchronize in the phone and pull in my computer, the only file 
that changes is from-org-mobile.org, I open that buffer and use 
org-refile to send things to the right place.  Save all org 
buffers, org-mobile-push and repeat.


I you have access by ssh to a computer that is always on, then I 
recommend leaving an emacsclient open and using JuiceSSH of 
ConnectBot for editing your org files on the go.


Best,

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-08 Thread Jorge A. Alfaro-Murillo
David Masterson writes: 

Hmmm.  Simple question (I think).  Can you edit outlines (at 
least somewhat) from MobileOrg?  For instance, can you add 
outline headers to your Org outline in MobileOrg?  Or is 
MobileOrg only useful for viewing Org outlines and capturing 
items to add to your outlines later? 


Yes.

In MobileOrg of your phone: Settings, Synchronization, check 
Advanced capture. Click over any headline and then use the capture 
button (the circle with a plus inside). Write the new headline, 
save, and synchronize.


Afterwards run org-mobile-pull from your computer, the changes should be
there. At least it works for me under Android.

Best,

--
Jorge.




Re: [O] MobileOrg documentation?

2014-08-08 Thread Jorge A. Alfaro-Murillo
Ken Mankoff writes: 


On iPhone, you cannot add sub-headings.


Another good reason to ditch your iPhone and buy a Nexus =)

Even when the Android and iPhone applications are different, the 
good thing is that the org side (org-mobile.el) is not specific 
for the iPhone or Android (or any external application that uses 
the same conventions).


Perhaps that is why the manual seems to new users so vague, they 
expect that it will explain how to go over the phone installation 
as well. But that is not the job of the org part, but that of the 
phone application IMO.


--
Jorge.




[O] Fwd: Some thoughts on MobileOrg and its development ....

2014-08-13 Thread Jorge A. Alfaro-Murillo

Dear Mat, Henning, Richard and Sean

In case you are not subscribed to email list of orgmode, the 
following thread might be of interest to you.


Matthew Jones and Henning Weiss, and Richard Moreland and Sean 
Escriva are the top contributors for MobileOrg for Android and 
iPhone, respectively.


Best,

Jorge.

--- Begin Message ---
Topics:
   Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
   Re: Some thoughts on MobileOrg and its development 
--- End Message ---
--- Begin Message ---

Hi all,

In light of recent discussions about 'MobileOrg' - which seemingly
actually constitutes two distinct projects for two different platforms -
together with the apparent relative lack of activity of both projects,
despite demand for them, i can't help but wonder if the 'MobileOrg'
endeavour needs a reboot.

More specifically, it seems to me that rebuilding MobileOrg as a single
project on top of Apache Cordova:

https://cordova.apache.org/

might be a way forward, for several reasons:

* It would help ensure that basically the same set of functionality is
  available across platforms, modulo specific limitations/issues with
  specific platforms. And when people add or modify core functionality,
  that functionality would more easily become available to people across
  platforms, rather than the functionality being initially implemented
  on platform X, and people on platform Y having to wait for it to be
  implemented in its entirety.

* Overall, only one lot of end-user documentation would need to be
  maintained.

* It would enable MobileOrg to be made available for mobile platforms
  other than Android and iOS, such as Windows Phone and Blackberry.

* The number of people available to assist with development might well
  be greater, due to the core development environment involving HTML,
  CSS and JavaScript. Barriers to entry for both regular and occasional
  committers would be much lower.

i'm aware that Cordova has various limitations,
including-but-not-limited-to the lack of native 'feel' of Cordova-based
applications. However, i feel that the above advantages, combined with
the my notion that Emacs users are probably less concerned with a
perfectly slick UI than with having access to functionality they
need/want, probably outweighs such limitations.

Unfortunately, due to other existing commitments, i wouldn't be able to
take point on such a reboot. But i'd definitely be willing and able to
help out!  Particularly in the area of contact management and syncing,
of course. :-)

Thoughts/comments/criticisms?


Alexis.



--- End Message ---
--- Begin Message ---
Would love to see a reboot and further development on org-mobile. I am not
a developer myself but would love to help out with testing , writing
documentation etc

best

Z


On Sat, Aug 9, 2014 at 3:56 AM, Alexis  wrote:

>
> Hi all,
>
> In light of recent discussions about 'MobileOrg' - which seemingly
> actually constitutes two distinct projects for two different platforms -
> together with the apparent relative lack of activity of both projects,
> despite demand for them, i can't help but wonder if the 'MobileOrg'
> endeavour needs a reboot.
>
> More specifically, it seems to me that rebuilding MobileOrg as a single
> project on top of Apache Cordova:
>
> https://cordova.apache.org/
>
> might be a way forward, for several reasons:
>
> * It would help ensure that basically the same set of functionality is
>   available across platforms, modulo specific limitations/issues with
>   specific platforms. And when people add or modify core functionality,
>   that functionality would more easily become available to people across
>   platforms, rather than the functionality being initially implemented
>   on platform X, and people on platform Y having to wait for it to be
>   implemented in its entirety.
>
> * Overall, only one lot of end-user documentation would need to be
>   maintained.
>
> * It would enable MobileOrg to be made available for mobile platforms
>   other than Android and iOS, such as Windows Phone and Blackberry.
>
> * The number of people available to assist with development might well
>   be greater, due to the core development environment involving HTML,
>   CSS and JavaScript. Barriers to entry for both regular and occasional
>   committers would be much lower.
>
> i'm aware that Cordova has various limitations,
> including-but-not-limited-to the lack of native 'feel' of Cordova-based
> applications. However,

Re: [O] Refile: refile to any open file.

2014-08-13 Thread Jorge A. Alfaro-Murillo
Isaac writes: 

Similar to this previous post, I am trying to file orgmode items 
to  files/buffers currently opened. Being elisp rookie, I tried 
and came up with  the following: 

(defun opened-buffer-files () 
  "Return the list of files currently opened in emacs" (delq nil 
  (mapcar (function buffer-file-name) (buffer-list))) ) 


Perhaps you should return instead only the org mode files that are 
opened, something like this:


#+BEGIN_SRC emacs-lisp 
 (delq nil  
   (mapcar (lambda (x)  
 (if (and (buffer-file-name x)  
  (string-match "\\.org$" 
  (buffer-file-name x)))  
 (buffer-file-name x)))  
   (buffer-list))) 
#+END_SRC


Best,

--
Jorge.




Re: [O] Some thoughts on MobileOrg and its development ....

2014-08-14 Thread Jorge A. Alfaro-Murillo
Eric Abrahamsen writes: 

Henning Weiss  writes: 
I have been working over the last couple of months on a private 
prototype. I'm currently using it in my daily life and it works 
for me. It uses Git (and only Git) for synchronization and 
doesn't use org-mobile at all. The idea is that you keep all 
org files under git version control. Synchronization of all 
"clients" (apps or Emacs) is done against that repository. It 
is also possible to configure whether to use "ours" or "theirs" 
merge strategy when conflicts occur. I have focused on 
designing an app I can trust. 

It already has an outline view like MobileOrg, an agenda view, 
you can add and edit nodes, synchronize changes with a remote 
repository and synchronize scheduled entries to the calendar. I 
ported some of my code from MobileOrg, but a lot of it is 
written from scratch. 


Sounds great... can't wait!



Maybe you could publish a very basic how-to here, and then we 
could annoy you privately with problems? 


That's a good idea, 1+

--
Jorge.




Re: [O] Orgtbl, Radiotables: ":booktabs t"

2014-08-19 Thread Jorge A. Alfaro-Murillo
Hi Nicolas, 

Are there any news on this? I was just trying to accomplish the 
same thing (get \midrule instead of \hline in a LaTeX orgtbl), but 
adding :booktabs t seems to not be enough.


Best,

Jorge.

On [2013-12-01 Sun 10:18], Nicolas Goaziou wrote:


Hello,

AW  writes:


 #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 :booktabs t
 | Month | Days | Nr sold | per day |
 |
 |---+--+-+-|
 |
 | Jan   |   23 |  55 | 2.4 |
 | Feb   |   21 |  16 | 0.8 |
 | March |   22 | 278 |12.6 |
 |
 |---+--+-+-|
 |
 | S:|   66 | | |

 #+TBLFM: $4=$3/$2;%.1f::@5$2=vsum(@I..II)




The parameter ":booktabs t" would be new.


[...]


So would it be possible to implement the parameter ":booktabs t"
without much trouble?


I don't think :booktabs belong to #+ORGTBL keyword because it is not
specific to radio tables.

I have a half baked patch which allows to use export framework to handle
radio tables. I'll try to complete it by the end of the year and propose
it on the ML.

Since ox-latex supports booktabs extension, radio tables will logically
inherit that feature.


Regards,




Re: [O] Orgtbl, Radiotables: ":booktabs t"

2014-08-19 Thread Jorge A. Alfaro-Murillo
Well for now and until :booktabs t is incorporated this is what I 
am using:


#+BEGIN_SRC emacs-lisp 
 (defun orgtbl-to-latex-booktabs (table params) 
   "Convert the Orgtbl mode TABLE to LaTeX using booktabs 
   package."  (let* ((alignment (mapconcat (lambda (x) (if x "r" 
   "l")) 
org-table-last-alignment "")) 
  (params2 
   (list 
:tstart (concat "\\begin{tabular}{" alignment 
"}\n\\toprule") :tend "\\bottomrule\n\\end{tabular}" 
:lstart "" :lend " " :sep " & " :efmt "%s\\,(%s)" 
:hline "\\midline"))) 
 (orgtbl-to-generic table (org-combine-plists params2 
 params 

 (setq orgtbl-radio-table-templates 
   (delete-if (lambda (x) (equal (car x) 'latex-mode))  
  orgtbl-radio-table-templates)) 

 (add-to-list 'orgtbl-radio-table-templates 
  '(latex-mode "% BEGIN RECEIVE ORGTBL %n\n% END 
  RECEIVE ORGTBL %n\n\\begin{comment}\n#+ORGTBL: SEND 
  %n orgtbl-to-latex-booktabs :splice nil :skip 0\n| 
  | |\n\\end{comment}\n")) 
#+END_SRC


--
Jorge.




Re: [O] Orgtbl, Radiotables: ":booktabs t"

2014-08-19 Thread Jorge A. Alfaro-Murillo

Ups... it should be midrule not midline.
--
Jorge.




[O] [PATCH] org-passwords.el: Improvements

2014-09-01 Thread Jorge A. Alfaro-Murillo

Some development in the password manager.

Best,

Jorge.

* contrib/lisp/org-passwords.el (org-passwords-default-password-size,
org-passwords-default-random-words-number): New variables.
(org-passwords-copy-username, org-passwords-copy-password): Use
org-entry-get to obtain the property value.
(org-passwords-open-url): New function.
(org-passwords): Can be called with universal argument.
(org-passwords-generate-password): Use default size given by
`org-passwords-default-password-size'.
(org-passwords-random-words): Use default number given by
`org-passwords-default-random-words-number'.
(org-passwords-concat-this-with-string): Fix bug.

The patch adds several functionality:

Open the URL property directly from the mode. URLs can be inherit.

Universal argument in org-passwords allows for longer browsing. Two
arguments is used for editing.

There is a default password size and random-words number for faster
password generating.

Fix bug in C-u M-x org-passwords-generate-password.

Commentary in file has more information.

---
contrib/lisp/org-passwords.el | 134 +++---
1 file changed, 88 insertions(+), 46 deletions(-)

diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el
index 7ed8c80..b10a5f7 100644
--- a/contrib/lisp/org-passwords.el
+++ b/contrib/lisp/org-passwords.el
@@ -23,12 +23,14 @@
;;; Commentary:

;; This file contains the code for managing your passwords with
-;; Org-mode.
+;; Org-mode. It is part of org/contrib (see http://orgmode.org/). If
+;; you want to contribute with development, or have a problem, do it
+;; here: https://bitbucket.org/alfaromurillo/org-passwords.el

;; A basic setup needs to indicate a passwords file, and a dictionary
;; for the random words:

-;;   (require org-passwords)
+;;   (require 'org-passwords)
;;   (setq org-passwords-file "~/documents/passwords.gpg")
;;   (setq org-passwords-random-words-dictionary 
"/etc/dictionaries-common/words")

@@ -54,13 +56,12 @@
;;   `org-passwords-random-words-substitutions'.

;; It is also useful to set up keybindings for the functions
-;; `org-passwords-copy-username' and
-;; `org-passwords-copy-password' in the
-;; `org-passwords-mode', to easily make the passwords and usernames
-;; available to the facility for pasting text of the window system
-;; (clipboard on X and MS-Windows, pasteboard on Nextstep/Mac OS,
-;; etc.), without inserting them in the kill-ring. You can set for
-;; example:
+;; `org-passwords-copy-username', `org-passwords-copy-password' and
+;; `org-passwords-open-url' in the `org-passwords-mode', to easily
+;; make the passwords and usernames available to the facility for
+;; pasting text of the window system (clipboard on X and MS-Windows,
+;; pasteboard on Nextstep/Mac OS, etc.), without inserting them in the
+;; kill-ring. You can set for example:

;;   (eval-after-load "org-passwords"
;; '(progn
@@ -69,12 +70,15 @@
;;   'org-passwords-copy-username)
;;(define-key org-passwords-mode-map
;;   (kbd "C-c p")
-;;  'org-passwords-copy-password)))
+;;  'org-passwords-copy-password)
+;;  (kbd "C-c o")
+;;  'org-passwords-open-url)))

-;; Finally, to enter new passwords, you can use `org-capture' and a minimal 
template like:
+;; Finally, to enter new passwords, you can use `org-capture' and a
+;; minimal template like:

;;   ("p" "password" entry (file "~/documents/passwords.gpg")
-;;"* %^{Title}\n  %^{PASSWORD}p %^{USERNAME}p")
+;;"* %^{Title}\n  %^{URL}p %^{USERNAME}p %^{PASSWORD}p")

;; When asked for the password you can then call either
;; `org-passwords-generate-password' or `org-passwords-random-words'.
@@ -87,6 +91,7 @@

(require 'org)

+;;;###autoload
(define-derived-mode org-passwords-mode org-mode
  "org-passwords-mode"
  "Mode for storing passwords"
@@ -97,12 +102,17 @@
  :group 'org)

(defcustom org-passwords-password-property "PASSWORD"
-  "Name of the property for password entry password."
+  "Name of the property for password entry."
  :type 'string
  :group 'org-passwords)

(defcustom org-passwords-username-property "USERNAME"
-  "Name of the property for password entry user name."
+  "Name of the property for user name entry."
+  :type 'string
+  :group 'org-passwords)
+
+(defcustom org-passwords-url-property "URL"
+  "Name of the property for URL entry."
  :type 'string
  :group 'org-passwords)

@@ -117,6 +127,12 @@ string, a number followed by units."
  :type 'str
  :group 'org-passwords)

+(defcustom org-passwords-default-password-size "20"
+  "Default number of characters to use in
+org-passwords-generate-password. It has to be a string."
+  :type 'str
+  :group 'org-passwords)
+
(defcustom org-passwords-random-words-dictionary nil
  "Default file name for the file that contains a dictionary of
words for `org-passwords-random-words'. Each non-empty line in
@@ -124,6 +140,12 @@ the file is considered a word."
  :type 'file
  :group 'org-passwords)

+(defcustom org-passwords-default-random-words-num

Re: [O] org-agenda

2014-09-02 Thread Jorge A. Alfaro-Murillo
David Arroyo Menendez writes: 

I've a recurrent little problem, with a light TODO.org 
org-agenda is fast, but every year or so, I need create a new 
TODO.org, because is so slow. More people with this problem? 
Some solution? 


I keep an archive file, so I get things out of my agenda files 
after they are done with C-c C-x C-a. Check the variable 
`org-archive-location'.


Best,

--
Jorge.




Re: [O] Marking items done in the past

2014-09-02 Thread Jorge A. Alfaro-Murillo
Fletcher Charest writes: 

Have you made any progress? I am also interested. 


Me too.

On 18 August 2014 02:52, Noah Slater  wrote: 
I have a number of habits set up that I regularly fill in the 
day after the activity was done. Is there a way to mark an item 
as done (in a way that hooks into the habits stuff) but for a 
day in the past? 

So instead of doing C-c C-t d (I have "d" set up as "DONE") I 
could get a prompt which asked me for a date. 



Changing the LOGBOOK, and LAST_REPEAT would not be that difficult, 
since you could use something like:


#+BEGIN_SRC emacs-lisp
 (org-entry-put nil "LAST_REPEAT" (concat "[" (org-read-date) 
 "]")) 
#+END_SRC


But changing the SCHEDULED and the 'State "DONE" from "TODO"' part 
would be more complicated. For example I think one would need to 
modify the function org-auto-repeat-maybe to be able to ask for a 
time. Checking at the code of this function the SCHEDULED part 
doesn't look that complicated, but I couldn't understand what 
produces the 'State "DONE" from "TODO"'


Does any of the org-gurus have an idea?

Best,

--
Jorge.




Re: [O] [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols`

2014-09-04 Thread Jorge A. Alfaro-Murillo
Jonathan Leech-Pepin writes: 

Patch attached and inlined (to ensure gmail does not mangle) 


* org-passwords.el 
(org-passwords-generate-password-with-symbols): Do not insert 
password, this matches how 
`org-passwords-generate-password-without-symbols` behaves. 


Thanks, I had forgotten to remove that from -with-symbols.

Best,

--
Jorge.




[O] [PATCH] Refresh appointments from org files exclusively

2014-09-06 Thread Jorge A. Alfaro-Murillo

Hi,

I sometimes use appt-add as an alarm clock, as it is described in 
(info "(emacs) Appointments"). Recently I started using 
org-agenda-to-appt, and I wanted to update my appointments every 
time that I call the agenda, something like:


#+BEGIN_SRC emacs-lisp
 (add-hook 'org-agenda-finalize-hook (lambda () 
 (org-agenda-to-appt t))) 
#+END_SRC


But this removes the entries that appt-add has added, in other 
words it removes my alarms.


The attached patch permits that, when refreshing, only 
appointments that have the text property org-headline set to t are 
deleted. So it would leave any appointments set by appt-add. I do 
not know if all the entries that org-agenda-to-appt adds have an 
org-headline set to t, from my tests it seems like that is the 
case.


The functionality has backward compatibility (uses C-u C-u), but 
perhaps it would make more sense to use C-u for refreshing only 
org entries and C-u C-u for refreshing everything, or even never 
setting appt-time-msg-list to nil from org.


If the patch is approved to refresh the appointments after every 
agenda buffer is built while keeping those appointments added by 
appt-add, you can do:


#+BEGIN_SRC emacs-lisp
 (add-hook 'org-agenda-finalize-hook (lambda () 
 (org-agenda-to-appt '(16 
#+END_SRC


Best,

--  Jorge. 

>From 2a5bf43b8ce112eab30df55f25e1744a7b388d64 Mon Sep 17 00:00:00 2001
From: "Jorge A. Alfaro Murillo" 
Date: Sat, 6 Sep 2014 18:01:20 -0400
Subject: [PATCH] org-agenda.el: Refresh appointments from org files

* lisp/org-agenda.el (org-agenda-to-appt): Double prefix arg refresh
only the list of appointments that come from org files.

Uses the text-properties in appt-time-msg-list to see if an entry has
an org-heading property.

TINYCHANGE
---
 lisp/org-agenda.el | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bcbacf0..ff4a448 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -10046,7 +10046,9 @@ tag and (if present) the flagging note."
 (defun org-agenda-to-appt (&optional refresh filter &rest args)
   "Activate appointments found in `org-agenda-files'.
 With a \\[universal-argument] prefix, refresh the list of
-appointments.
+appointments. With a double prefix arg \\[universal-argument]
+\\[universal-argument], refresh only the list of appointments
+that come from org files.
 
 If FILTER is t, interactively prompt the user for a regular
 expression, and filter out entries that don't match it.
@@ -10076,7 +10078,15 @@ details and examples.
 If an entry has a APPT_WARNTIME property, its value will be used
 to override `appt-message-warning-time'."
   (interactive "P")
-  (if refresh (setq appt-time-msg-list nil))
+  (if (equal refresh '(4))
+  (setq appt-time-msg-list nil))
+  (if (equal refresh '(16))
+  (let (new-appt-time-msg-list)
+	(dolist (entry appt-time-msg-list)
+	  (if (not (text-property-any 1 (length (cadr entry))
+  'org-heading t (cadr entry)))
+	  (add-to-list 'new-appt-time-msg-list entry)))
+	(setq appt-time-msg-list new-appt-time-msg-list)))
   (if (eq filter t)
   (setq filter (read-from-minibuffer "Regexp filter: ")))
   (let* ((cnt 0) ; count added events
@@ -10119,8 +10129,6 @@ to override `appt-message-warning-time'."
  (and (stringp evt-filter)
   (string-match evt-filter evt)))
 	  (wrn (get-text-property 1 'warntime x)))
-	 ;; FIXME: Shall we remove text-properties for the appt text?
-	 ;; (setq evt (set-text-properties 0 (length evt) nil evt))
 	 (when (and ok tod)
 	   (setq tod (concat "00" (number-to-string tod))
 		 tod (when (string-match
-- 
2.0.1



Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Jorge A. Alfaro-Murillo
Thomas S. Dye writes: 

I don't manage my bibliography references in Org mode.  I am 
used to managing a bibtex database and have never found the need 
to move everything to Org. 


Same here.

Bibtex mode has functions for automatic reference key 
generation: 

http://www.jonathanleroux.org/bibtex-mode.html#0630 


You can configure this process.


You can also download the .bib from Google Scholar or whatever and 
then clean the entry, so that your database has the same format.


Either a separate bibtex file for each article, or separate 
bibtex files for each co-author.  


Or better do both...

#+BEGIN_SRC latex 
 \bibliography{/home/you/references/articles.bib}

 % \bibliography{/home/collaborator_1/references/articles.bib}
 % \bibliography{/home/collaborator_2/references/articles.bib}
 ...
 \bibliography{references}

#+END_SRC

When a collaborator_i is working on the file she/he comments the 
first line and uncomments the i-th line AND everybody runs 
reftex-create-bibtex-file (or copy paste the new references for 
the unfortunate non-emacs user) after adding new references and 
finishing editing. Everybody shares a current version of the .tex 
file and the references.bib file.


In general, you'll want to have the bibtex file(s) for an 
article only contain the references that you'll use in the 
article, especially if you intend to distribute the bibtex files 
as part of a reproducible research project. 


Note that when the article is ready the references.bib is the only 
thing you need to compile, since it has all the references, so you 
erase the all the other \bibliography's


There are tools that use the information in your article .tex 
files to create this kind of bibtex file from a larger bibtex 
database. 


Yes, emacs via reftex-create-bibtex-file =)

Best,

--
Jorge.




Re: [O] Managing articles in orgmode and collaboration

2014-09-10 Thread Jorge A. Alfaro-Murillo
Christoph Groth writes: 

My motivation for keeping bibliography in org was to keep all 
local information about a paper (including notes and comments) 
in one place.  This should make it easier to find it. 


In BibTeX if any field contains an entry that is not part of the 
required or optional entries for the field type, that entry is 
ignored.  So you can do want you want in a single bib file, just 
include for every field that you want a "COMMENTS" entry. The 
"NOTE" entry is an optional entry for the field type article and 
book, so you have to use something else, I use "ANNOTE", since it 
is the standard "to be ignored" entry in the emacs BibTeX mode.


I like to keep papers under version control, and the commenting 
that you suggest does not seem to fit this way of working very 
well. 


Then change it to:

#+BEGIN_SRC latex
 \include{personal_references}
 \bibliography{references.bib}
#+END_SRC

And in personal_references.tex, every user has just one line:

#+BEGIN_SRC latex
 \bibliography{the_user_path_to_her/his_references.bib}
#+END_SRC

Add personal_references.tex to the .gitignore file (or the 
equivalent if you are not using git), and then you have version 
control and no more commenting/uncommenting.


Perhaps I am biased because I learned LaTeX and BibTeX before Org, 
but I think that for references BibTeX (plus a little bit of emacs 
configuration) has everything I could need. I guess if you are 
more used to Org, it might be worth to invest time and come up 
with a org-based solution. Please keep us posted, I find this a 
very interesting thread.


Cheers,

--
Jorge.




Re: [O] org-crypt doesn't automatically encrypt on save

2014-09-12 Thread Jorge A. Alfaro-Murillo
Darlan Cavalcante Moreira writes: 

In my case I only have one file where I use org-crypt and I 
define the function below 

--8<---cut 
here---start->8--- (defun 
my-find-senhas-org-heading nil 
  (interactive) (require 'org-crypt) (find-file 
  "~/org/passwords.org") ) 
--8<---cut 
here---end--->8--- 



If you only use one file for your passwords and want it encrypted 
(that you should), you can also check org-passwords.el that is 
included in the contrib directory.


Best,

--
Jorge.




Re: [O] Managing articles in orgmode and collaboration

2014-09-23 Thread Jorge A. Alfaro-Murillo
Christoph Groth writes: 

But not all is good: 

- Scaling: Some simple tests seem to indicate that org mode  
  becomes too sluggish with files of about 50k lines.  This is a 
  dimension that could be easily reached over 10 years if the 
  file  grows by 20 lines per day on average.  This is not a 
  problem in  the beginning, but if the scheme does not scale to 
  a few  thousand entries, this renders the whole idea way less 
  interesting.
- More advanced searching is lacking: AFAIK org mode currently  
  does not support searching for articles of a given author that 
  also contain a given keyword in the notes. 
Any insights about these two problems? Perhaps the scaling could 
be managed by splitting index.org into several files (by year 
for example). But how to search then? It's probably not a good 
idea to add all the bibliography org-files into the agenda. (Is 
there a way to have a secondary list of agenda files?) Perhaps 
the solution for both problems would be to write a fast 
commandline query tool for such org-databases? The tool could 
even use a fast cache if necessary. 


BibTeX provides bibtex-search-entries (in a bib file it is bound 
to C-c C-a), which searches for entries with a certain field 
matching a regexp.  Perhaps you want to take advantage of that 
function to direct your org searches to bib files and back. Check 
also bibtex-files and bibtex-search-entry-globally, since you 
would then be able to split the org files and export into several 
bib files if a single bib file proves too much. My current 
articles.bib is about 14k lines, and it is not sluggish at all, 
but I will have to wait a couple of years until I tell you if a 
50k one would be.


Best,

--
Jorge.




Re: [O] How to get the link the point is on?

2014-09-25 Thread Jorge A. Alfaro-Murillo
Marcin Borkowski writes: 

Hi list, 

my question is as in subject.  It is done by org-open-at-point 
(somehow), but the logic seems to be buried in that function. 
What I'd like to have is a function that would just extract the 
link portion (which is normally invisible) and displayed it in 
the echo area (something like hovering over a link in a web 
browser). 


This returns the link at the line, it assumes one link per line:

#+BEGIN_SRC emacs-lisp
 (defun test ()
   (save-excursion
 (move-beginning-of-line 1)
 (if (search-forward-regexp org-any-link-re 
 (line-end-position) t)

 (let* ((complete-link (match-string 0))
(last-place (string-match "\\]" complete-link)))
   (substring-no-properties complete-link 2 
   last-place


#+END_SRC

Best,

--
Jorge.




Re: [O] How to get the link the point is on?

2014-09-25 Thread Jorge A. Alfaro-Murillo
Rasmus writes: 

If point is on a link you can 

   (org-element-property :raw-link (org-element-context)) 


That's way easier =)

--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

My goal was to set a new keybinding for two keys like this: 

╭ │ (local-set-key (kbd "C-,") (lambda () (interactive) 
(insert " \\larr "))) │ (local-set-key (kbd "C-.") (lambda () 
(interactive) (insert " \\rarr "))) ╰ 

The second works fine. The first does not; it stays bound to 
`org-cycle-agenda-files' instead.


For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you 
have something that sets C-' to C-, globally? 


Best,
--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
 wrote: 
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally? 


Definitely, here in my .emacs.el: 

╭ │ (global-set-key (kbd "C-;") 'vc-next-action) │ 
(global-set-key (kbd "C-'") 'er/expand-region) ╰ 


That is very strange. It is that the line in your .emacs for C-'? 
Outside of org files, does C-, work as expected, or does it expand 
the region?

--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Jorge A. Alfaro-Murillo writes: 

Grant Rettke writes:  

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
 wrote:  
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally?  


Definitely, here in my .emacs.el:  

╭ │ (global-set-key (kbd "C-;") 'vc-next-action) │ 
(global-set-key (kbd "C-'") 'er/expand-region) ╰  


That is very strange. It is that the line in your .emacs for 
C-'?  Outside of org files, does C-, work as expected, or does 
it expand the region? 


I mean the only line in your .emacs for C-'

--
Jorge.




Re: [O] Other editors supporting Org-Mode

2014-10-08 Thread Jorge A. Alfaro-Murillo
hymie! writes: 

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


Perhaps the easiest thing would be an emacs configuration that 
makes emacs just an org editor for Word users:


#+BEGIN_SRC emacs-lisp
 (setq-default major-mode 'org-mode)
 (setq initial-major-mode 'org-mode)
 (setq initial-buffer-choice "~/Untitled.org")
 (setq inhibit-startup-message t)
 (setq initial-scratch-message nil)
 (cua-mode)
 (require 'printing)
 (pr-update-menus)

#+END_SRC

And many many (define-key org-mode-map ...) to change default 
keybindings and make, e.g., C-a mark-whole-buffer, C-s 
save-buffer, C-p pr-txt-buffer, etc. It doesn't matter if the 
bindings lose their default binding as long as there is a way to 
activate the action in the menus.


The menus should be rewritten, and "Tools" and anything that can 
make you lose focus on the current buffer should be removed, 
"Buffers" should be renamed "Files opened", etc. There should be 
one whole menu for Org-export to avoid the *Org Export Dispatch* 
buffer and in general, any "special-mode derived" buffer should be 
avoided.


The toolbar should have many more org-only buttons that emacs-org 
users generally activate with keybindings: DEMOTE/PROMOTE, INSERT 
TIME, INSERT SOURCE BLOCK, etc.


This would be an emacs just to edit org-files (and perhaps also 
running code with babel). There wouldn't be access to the agenda, 
without the user freaking out and not knowing how to exit (unless 
it is always opened on a separate frame I guess). But I think 
achieving agenda capabilities in another editor would also be very 
difficult.


Best,
--
Jorge.




Re: [O] exporting tables + equations to latex

2014-10-09 Thread Jorge A. Alfaro-Murillo
Hi Giuseppe. 


Giuseppe Lipari writes:

The big problem I have is that I do not know how to put 
equations in cells. [...] the underlines are translated as 
underlines, and not as subscript command.


Try adding ":no-escape t" to the #+ORGTBL line

Best,
--
Jorge.




Re: [O] [PATCH] org-passwords.el: Improvements

2014-10-12 Thread Jorge A. Alfaro-Murillo
Bastien writes: 


Can you resend the patch as an attachment?


Sure, it is attached. 

If you have commit access, feel free to push your commit 
directly.


I do not have commit access.

Best, 
--  Jorge.


>From 4b1b7f291af29b94919620f9a824c2da1ce09458 Mon Sep 17 00:00:00 2001
From: "Jorge A. Alfaro Murillo" 
Date: Sun, 12 Oct 2014 16:14:34 -0400
Subject: [PATCH] Improve functionality of org-passwords.el

* contrib/lisp/org-passwords.el (org-passwords-default-password-size):
  New variable.
(org-passwords-default-random-words-number): New variable.
(org-passwords-copy-username, org-passwords-copy-password): Use
`org-entry-get' to obtain the property value.
(org-passwords-open-url): New function.
(org-passwords): Can be called with universal argument.
(org-passwords-generate-password): Use default size given by
`org-passwords-default-password-size'.
(org-passwords-random-words): Use default number given by
`org-passwords-default-random-words-number'.
(org-passwords-concat-this-with-string): Fix bug.

The patch adds several functionality:

Open the URL property directly from the mode. URLs can be inherit.

Universal argument in org-passwords allows for longer browsing. Two
arguments is used for editing.

There is a default password size and random-words number for faster
password generating.

Fix bug in C-u M-x org-passwords-generate-password.

Commentary in file has more information.
---
 contrib/lisp/org-passwords.el | 144 +++---
 1 file changed, 93 insertions(+), 51 deletions(-)

diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el
index 9c3a916..4ebd5a6 100644
--- a/contrib/lisp/org-passwords.el
+++ b/contrib/lisp/org-passwords.el
@@ -23,12 +23,14 @@
 ;;; Commentary:
 
 ;; This file contains the code for managing your passwords with
-;; Org-mode.
+;; Org-mode. It is part of org/contrib (see http://orgmode.org/). If
+;; you want to contribute with development, or have a problem, do it
+;; here: https://bitbucket.org/alfaromurillo/org-passwords.el
 
 ;; A basic setup needs to indicate a passwords file, and a dictionary
 ;; for the random words:
 
-;;   (require org-passwords)
+;;   (require 'org-passwords)
 ;;   (setq org-passwords-file "~/documents/passwords.gpg")
 ;;   (setq org-passwords-random-words-dictionary "/etc/dictionaries-common/words")
 
@@ -54,13 +56,12 @@
 ;;   `org-passwords-random-words-substitutions'.
 
 ;; It is also useful to set up keybindings for the functions
-;; `org-passwords-copy-username' and
-;; `org-passwords-copy-password' in the
-;; `org-passwords-mode', to easily make the passwords and usernames
-;; available to the facility for pasting text of the window system
-;; (clipboard on X and MS-Windows, pasteboard on Nextstep/Mac OS,
-;; etc.), without inserting them in the kill-ring. You can set for
-;; example:
+;; `org-passwords-copy-username', `org-passwords-copy-password' and
+;; `org-passwords-open-url' in the `org-passwords-mode', to easily
+;; make the passwords and usernames available to the facility for
+;; pasting text of the window system (clipboard on X and MS-Windows,
+;; pasteboard on Nextstep/Mac OS, etc.), without inserting them in the
+;; kill-ring. You can set for example:
 
 ;;   (eval-after-load "org-passwords"
 ;; '(progn
@@ -69,12 +70,15 @@
 ;; 	 'org-passwords-copy-username)
 ;;(define-key org-passwords-mode-map
 ;; 	 (kbd "C-c p")
-;; 	 'org-passwords-copy-password)))
+;; 	 'org-passwords-copy-password)
+;; 	 (kbd "C-c o")
+;; 	 'org-passwords-open-url)))
 
-;; Finally, to enter new passwords, you can use `org-capture' and a minimal template like:
+;; Finally, to enter new passwords, you can use `org-capture' and a
+;; minimal template like:
 
 ;;   ("p" "password" entry (file "~/documents/passwords.gpg")
-;;"* %^{Title}\n  %^{PASSWORD}p %^{USERNAME}p")
+;;"* %^{Title}\n  %^{URL}p %^{USERNAME}p %^{PASSWORD}p")
 
 ;; When asked for the password you can then call either
 ;; `org-passwords-generate-password' or `org-passwords-random-words'.
@@ -87,6 +91,7 @@
 
 (require 'org)
 
+;;;###autoload
 (define-derived-mode org-passwords-mode org-mode
   "org-passwords-mode"
   "Mode for storing passwords"
@@ -97,12 +102,17 @@
   :group 'org)
 
 (defcustom org-passwords-password-property "PASSWORD"
-  "Name of the property for password entry password."
+  "Name of the property for password entry."
   :type 'string
   :group 'org-passwords)
 
 (defcustom org-passwords-username-property "USERNAME"
-  "Name of the property for password entry user name."
+  "Name of the property for user name entry."
+  :type 'string
+  :group 'org-passwords)
+
+(defcustom org-passwo

Re: [O] Org-mode Habit with Varying Description

2014-10-20 Thread Jorge A. Alfaro-Murillo

Daya Atapattu writes:

Is there a way to create a habit that picks-up the description 
from a list? 

I like to schedule studying a book: It would be scheduled as 
"Read pages 100-125." Then the next day it should read "Read 
pages 126-150."  The description of the habit varies; org-mode 
picks that up sequentially from a list. 


Maybe you want to take a look at TODO dependencies (info "(org) 
TODO dependencies") set `org-enforce-todo-dependencies' to t, and 
do something like


#+BEGIN_EXAMPLE
 * TODO Read book
 :PROPERTIES:
 :ORDERED:  t
 :END:
 ** TODO Pages 1-150
 ** TODO Pages 151-300
  
#+END_EXAMPLE


Then when closing one of the sub headlines, schedule the next one.

Best,
--
Jorge.




Re: [O] Avoid canceling of events which do have multiple time-stamps

2014-11-07 Thread Jorge A. Alfaro-Murillo

Hi, Karl.

Karl Voit writes:

For other events, I do have one single "* Volleyball" heading 
and multiple time-stamps for each occurrence in its body. 
(method B) 

Unfortunately in the agenda view, both entries are visualized 
the same way. This is causing issues in certain cases. 

For example, when I see an event on my agenda and I know that I 
don't have time for it, I usually cancel the event right away in 
my agenda. 

However, when this time-stamp occured only in the body of a 
heading (method B), cancelling does cancel *all* occurrences. 
For example when I cancel "Volleyball" on the agenda of 
2014-09-06, I'd cancel also 2014-08-30 (in the past) and 
2014-09-13 (in the future). 


And much worse: I do not notice my error.

There is a certain issue with this: how to determine whether or 
not a time-stamp is the only one or if it is mentioned in the 
heading itself. 


I use several time stamps as well, but I use 
org-agenda-follow-mode by default (see the variable 
`org-agenda-start-with-follow-mode') so I can see the entry with 
its multiple entries before archiving or killing it.


Is there a clever way to differ the two methods so that we are 
able to come up with different visualizations?


In the case of something like Volleyball, perhaps you might want 
to look at habits: (info "(org) Tracking your habits")


Another option is to create subheadlines for each activity, and 
avoid multiple timestamps.


Best,

--

Jorge.




[O] org-archive-save-context-info as local variable

2014-11-21 Thread Jorge A. Alfaro-Murillo

Hi list,

I am planning to collaborate on a project with another org-mode 
user (such a joy). For each org file we want to keep an archive as 
well in the git repository. With this work flow it does not make 
sense to keep track of the file property in 
`org-archive-save-context-info', since it will be different 
depending on the location of the repository in each computer. And 
since I did not want force a global configuration for this 
variable, I tried to add the variable as local in the first line 
of the file:


# -*- mode: org; org-archive-save-context-info: (time olpath 
 todo); -*- 

This sets the variable as local fine, but when I call 
`org-archive-subtree', it seems like this command still uses the 
global value of `org-archive-save-context-info' and keeps 
information on the file location in the archive.


Does someone know why setting this variable as local does not work 
with `org-archive-subtree'? Is there another approach for setting 
org-mode variables on a per file basis?


Best,

--
Jorge.




Re: [O] org-archive-save-context-info as local variable

2014-11-21 Thread Jorge A. Alfaro-Murillo

Kyle Meyer writes:

The buffer-local value doesn't continue to shadow the global 
value when org-archive-subtree sets the buffer to the archive 
file. 


Thanks, Kyle! That is the reason. Setting the local variable in 
the archive file as well does the trick.


--
Jorge.




Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Jorge A. Alfaro-Murillo

Andreas Leha writes:

On 2014-11-26, at 20:00, Jacob Gerlach wrote: 


Just my 2 cents: I'd go for LaTeX if heavy math typesetting is 
involved (then amsmath!), maybe for Org otherwise, check 
whether the template imposes a many-file structure (which it 
probably doesn't), and keep everything in one file. 



I would disagree here. I do not see, that writing equations in 
LaTeX is substantially easier than in org. Or put the other way 
round: org's support for equations is quite good.


There is no way that writing equations can be faster in org than 
in AUCTeX, since AUCTeX is designed for that, especially with 
LaTeX-math-mode, two keys write any Greek symbol for example. And 
all the support for completion of commands, environments and 
environment variables, changing fonts, sectioning, integration 
with reftex... 

By the way, AUCTeX supports many packages by default including 
amsmath, so just adding the proper \usepackage{amsmath} in the 
preamble makes AUCTeX fontify in math-mode align, gather, 
multline, and their starred equivalents.


The one thing that org is better at is tables, but for that I use 
radiotables inside of AUCTeX.



And preview-latex is really speeding me up.


I have never been a fan of preview or any WYSIWYG editing, I feel 
like it slows me down, but if you use only org and are not used to 
LaTeX it could be helpful, in AUCTeX it is easier to read math 
because of the fonts used (for example subscripts and superscripts 
are written under and over the symbols). I would also suggest 
compiling with SyncTeX for forward search support, I do not know 
if forward search is possible with org.


That being said there is a learning curve associated with 
TeX/AUCTeX and if you are already very comfortable with org and do 
not have time for learning something new, perhaps it is better to 
stick with org.


If you decide to go with LaTeX, the reason to split your 
dissertation in several chapters is so that the compilation can 
run faster, since when you change a chapter and compile only that 
chapter is compiled again.  This is a substantial gain in 
compilation time with big documents (books, dissertations). If you 
decide to go with several org files and the publishing mechanism 
or a single org file, I think that every time that you export the 
whole document needs to be compiled.


Best,

--
Jorge.




Re: [O] Large LaTeX project in single file or using publishing

2014-11-29 Thread Jorge A. Alfaro-Murillo

Marcin Borkowski writes:

I mostly agree, but the above is not true: see TeX-pin-region 
and TeX-command-region.  Bottom line: IMHO no point in dividing 
into many files.


You are right, you can compile a region in AUCTeX, or export just 
a region in org, but the problem (besides having to select the 
region as compared to a fast C-c C-c C-m) is that the result does 
not have the whole document, just the part you selected, so you 
miss seeing the exported part in context. For example, you miss 
the ability to read before or after in the pdf and use a backward 
search to find the code that corresponds to the next part that you 
want to edit. If you use a main file plus several files in LaTeX, 
the whole document is preserved but the compilation just runs in 
the files with changes, and the backward search from the pdf 
points to the right point in the right file (at least with evince 
it does).


Best,

--
Jorge.




Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Calvin Young writes:

* If the cursor is at the end of a list item, then "Return" 
should 
  insert a new list item (i.e., automatically perform 
  org-meta-return)


M- does this. You do not want  to do that because 
you when you want to finish the list  finishes it.


* If the cursor is at the beginning of an empty list item, then 
  "Return" should outdent the list item (or remove it if it's 
  already at the outer-most indentation level)


I am not sure that I understand this but I assume that you would 
obtain the same with . It goes back and forth between levels 
of list so if you have


- one
- two
 + a
 + CURSOR_HERE

and you hit  then it changes to 


- one
- two
 + a
   + CURSOR_HERE

and then two times  (or S- from the beginning) changes 
it to


- one
- two
 + a
- CURSOR_HERE


* If the cursor is at the beginning of an empty list item, then 
  "Backspace" should delete the list item and move my cursor to 
  the end of the previous list item 


I guess you could remap  to a function that checks if 
you are at the beginning of the list and when that is true it does 
what you want, otherwise it just calls `delete-backward-char'. But 
generally I would do C-a C-k , just two more 
keystrokes.


* It'd be nice of these rules could be applied to checkboxes as 
well


M-S- inserts a check box.

Best,

--
Jorge.




Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Jorge A. Alfaro-Murillo writes:

Calvin Young writes: 


* It'd be nice of these rules could be applied to checkboxes as 
well 


M-S- inserts a check box. 


I forgot to mention that the  S- behavior also works 
with check boxes.


--
Jorge.




Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Calvin Young writes:

;; Starting with this setup: 

- one - two + a[CURSOR_HERE] 

;; Hitting  should produce: 

- one - two + a + [CURSOR_HERE] 

;; Hitting  again would then produce: 

- one - two + a - [CURSOR_HERE] 

;; And hitting  one last time would produce: 

- one - two + a 

[CURSOR_HERE] 


I think there is a confusion here, my understanding is that org 
separates sublists by indentation so if you have:


- a
+ b[CURSOR]

and hit M- it should correct to:

- a
- b
- [CURSOR]

It is different if you have:

- a
 + b[CURSOR]

or

- a
 - b[CURSOR]

or 


1. a
  - b[CURSOR]
2. c

etc

I know we can already achieve this with some combination of 
M-, , and M-S-, but this behavior has 2 
distinct advantages: 

1. The user only needs to remember one key to cycle between all 
of these actions, rather than 3 key combinations.


But the problem is that you lose the functionality of  to 
exit the list. I want to have  to finish a line and  
 to finish a paragraph like I am used everywhere else.


2. This behavior is more consistent with the bulleting behavior 
in other editors


We shouldn't aim to imitate other much inferior editors ;-)

, which could make it feel more intuitive for new org-mode 
users.  [...]
Yes, but for the reasons mentioned above, it'd be nice if we 
could use the  to outdent a new list entry as well. 


I disagree,  and S- for indenting is much more friendly 
than , most modes in emacs behave like that. A new user 
just has to understand that sublists are separated by indentation, 
and learn that M- is for lists, and M-S- is for 
check boxes.



Jorge A. Alfaro-Murillo says:
I guess you could remap  to a function that checks 
if you are at the beginning of the list and when that is true 
it does what you want, otherwise it just calls 
`delete-backward-char'. But generally I would do C-a C-k 
, just two more keystrokes.
Makes sense. This is an easy function to write — just wanted to 
make sure there wasn't something that already does this 
out-of-the-box.


It should save around half a second per use, so if you use it five 
times a day you have about 1 hour to write it... minus the time it 
takes you to read this: http://xkcd.com/1205/ =)


In general, I *believe* a lot of folks use lists and checkboxs 
in similar ways. I certainly do, and I frequently accidentally 
hit M- while editing a checkbox when I really intend to 
insert a new checkbox entry. As a result, it seems desirable to 
create an interface that treats them more similarly (e.g., using 
a single  keypress to auto-insert a new entry).


If this doesn't exist yet, I'd be happy to roll it myself. But 
it'd be nice to avoid re-inventing the wheel here if possible :) 


Maybe, but you would lose the ability to have mixed check boxes 
and items lists. But you are right, it might be a nice 
configuration to allow M- to give you another item with 
check box if you are already in one (and then M-S- gives 
you a plain list item). But it might be even more confusing for a 
new user as to why the behavior is not consistent with M-, 
so probably it shouldn't be default.


Best,

--
Jorge.




Re: [O] Table: Insert Cell

2015-01-29 Thread Jorge A. Alfaro-Murillo

Hi Tory,

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 |

becomes

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


after C-c C-c

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

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


Move below and to the right of the 8

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

C- there, select until the left of the 5

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

And then C-x r k, which cuts the rectangle, should get you to

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

move one cell down and use C-x r y

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

Finally, C-c C-c, gives you what you want

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

Best,

--
Jorge.




Re: [O] Table: Insert Cell

2015-01-29 Thread Jorge A. Alfaro-Murillo

Marco Wahl writes:


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


Argh! Thanks, so simple. I seems like I never took Linear Algebra: 
anything that you can do with rows you can do with columns, by 
transposing, doing, and transposing.


--
Jorge.




Re: [O] Agenda in MobileOrg for Android

2013-04-09 Thread Jorge A. Alfaro Murillo
I think entries of the form
%%(org-class 2013 1 7 2013 4 27 2) 12:00pm-01:15pm TITLE
show up on MobileOrg.

I have org-mobile-agendas set up to 'default and they do for me.

Also the synchronization with Google Calendar is quite good in Android, you
can let then Google Calendar handles the remainders in your phone.

> Marcin Borkowski  writes:
>
>> Dnia 2013-04-07, o godz. 14:16:54
>> David Rogers  napisał(a):
>
>>> I have felt the same way. Is the reason it's not already done (and the
>>> pitfall for you if you take on a project like this) that "re-write
>>> major chunks of Emacs" is a pretty big job?
>>
>> ...
>> Remember that the purpose of something like such an app (as opposed to
>> Org-mode proper) would not be *editing* of text, but (primarily)
>> *entering* texts (and short ones, for that matter), entering
>> timestamps (which is quite convenient with any pointing device,
>> including touchscreens) and things like changing todo states and
>> clocking in and out - and that's basically it.  In other words, a very
>> small subset of Org-mode is needed here (at least for me).

> I see what you mean. That makes more sense than what I said, and I like
> your idea.
>
> The part that I want most from Org-mode on Android is being able to
> automatically get audible reminders for all my appointments, whether
> through a transfer into the phone's own calendar or some other way. The
> current MobileOrg doesn't quite do the job, since it doesn't yet parse
> things like this:

> <%%(org-class 2013 03 01 2013 06 22 5 52 1 12 13)>
>
> ... In fact, last time I checked, it didn't even parse date stamps that
> weren't in the headline...
>
> ... so my whole Org file has to be specially formatted, and some of
> Org-mode's extremely useful features avoided, if I am going to satisfy
> MobileOrg's requirements.
>
> Being able to edit is nice, but that doesn't take advantage of what I
> really have the phone with me for - I see my phone as mainly a reminder
> machine, not mainly an editing machine, and would love to see MobileOrg
> (or some new project) gain the ability to parse every possible agenda
> feature used in Org files, so that I can actually receive reminders for
> all the items in my Org-mode agenda. If it came with a better way of
> simple editing, that would be even better.
>
> --
> David


Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-20 Thread Jorge A. Alfaro Murillo
I once tried to do something similar in org mode, at the end I thought I
was doing twice the work, so I ended up with just one big .bib file.

I copy the bib info from the website and then I have a function to yank it
a little bit cleaner into my bib file, something like this:

  (defun bibtex-yank-citation ()
"Yanks a citation in a .bib file. Eliminates several fields,
  removes the key for the entry, and changes the abstract field for
  an annote field."
(interactive)
(goto-char (point-max))
(let ((position (point)))
  (insert (current-kill 0))
  (goto-char position)
  (re-search-forward "\\(@.+?{\\).+?," nil t)
  (replace-match "\\1," nil nil)
  (goto-char position)
  (while (re-search-forward "%" nil t)
 (replace-match "%" nil nil))
  (goto-char position)
  (while (re-search-forward "’" nil t)
 (replace-match "'" nil nil))
  (goto-char position)
  (while (re-search-forward "á" nil t)
 (replace-match "{\'a}" nil nil))
  (goto-char position)
  (while (re-search-forward "é" nil t)
 (replace-match "{\'e}" nil nil))
  (goto-char position)
  (while (re-search-forward "í" nil t)
 (replace-match "{\'i}" nil nil))
  (goto-char position)
  (while (re-search-forward "ó" nil t)
 (replace-match "{\'o}" nil nil))
  (goto-char position)
  (while (re-search-forward "ú" nil t)
 (replace-match "{\'u}" nil nil))
  (goto-char position)
  (while (re-search-forward "ñ" nil t)
 (replace-match "{~n}" nil nil))
  (goto-char position)
  (while (re-search-forward "ç" nil t)
 (replace-match "{c{c}}" nil nil))
  (goto-char position)
  (while (re-search-forward "–" nil t)
 (replace-match "-" nil nil))
  (goto-char position)
  (delete-matching-lines

"^[[:space:]]*\\(keywords\\)\\|\\(note\\)\\|\\(url\\)\\|\\(jstor\\)\\|\\(doi\\)\\|\\(issn\\)\\|\\(html\\)\\|\\(language\\)\\|\\(copyright\\)\\|\\(eprint\\)")
  (goto-char position)
  (while (re-search-forward "\\(^[[:space:]]*\\)abstract" nil t)
 (replace-match "annote" nil nil


It also removes the key, so that then I just add extra information into the
annote field and then I generate the key with C-c C-c (bibtex-clean-entry).
You can configure your key type very specifically. See all the variables
bibtex-autokey-

That takes care of the new bibtex entry without effort. Now I have

  (defun bibtex-kill-ring-save-key ()
"Kill-ring-save the bibtex key."
(interactive)
(let ((position (point)))
  (if (not (eq (point-max) position))
  (forward-char))
  (search-backward-regexp "^@" nil nil)
  (search-forward "{")
  (copy-region-as-kill (point)
   (funcall (lambda ()
  (search-forward ",")
  (backward-char)
  (point
  (goto-char position)))

To save the key to the kill-ring, and then I save the paper with that
filename under a unique folder.

Finally I have a function that opens the respective pdf when the cursor is
within one entry. And keys for the functions, bound to Hyper keys:
  (eval-after-load "bibtex" '(progn
   (define-key bibtex-mode-map
 (kbd "H-y") 'bibtex-yank-citation)
   (define-key bibtex-mode-map
 (kbd "H-r") 'bibtex-kill-ring-save-key)
   (define-key bibtex-mode-map
 (kbd "H-o")
'bibtex-open-reference-at-point)))

I even have a similar function that I use globally:
  (defun open-reference-at-point ()
(interactive)
(er/expand-region 2)
(let* ((beg (region-beginning))
  (end (region-end))
  (article-name (buffer-substring beg end)))
  (call-process "evince" nil 0 nil
(concat "~/documents/references/articles/"
article-name
".pdf")))
(keyboard-quit))

So if I am in LaTeX, it is enough to call open-reference-at-point over the
text in \cite{...} and the pdf opens automatically.

As you can see everything just depends on using one folder for all the
references, one file for all the bib entries and the same name of the key
dot pdf for the pdf name. And you end up with an automatically super good
documented bib file. Which is very handy when you call C-c [ in LaTeX
(reftex-citation) and just vaguely remember something about what you want
to cite. Also if you want to open a certain reference you can search your
well documented bib file and open the reference with one key.

One last thing to get navigation a la org mode (C-c C-p and C-c C-n) and
folding with TAB in your bib file:

  (defun bi

Re: [O] Scheduling a meeting every week for a given time

2015-10-02 Thread Jorge A. Alfaro-Murillo

Hi Claude.

Claude Fuhrer writes:

I'm trying to add recurring events, but only for a given period 
of time. 


You should probably use org-class. See below.

For example, I would like to write: 

Project meeting,  every monday between 10:00 and 12:00 from 
1. October until 1. December 2015


%%(org-class 2015 10 1 2015 12 1 1) 10:00-12:00 Project meeting

or 

Staff conference, every friday from 15:00 to 17:00, during seven 
weeks


%%(org-class 2015 10 1 2015 11 1 5) 15:00-17:00 Staff conference

Best,

--
Jorge.




Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-05 Thread Jorge A. Alfaro-Murillo

Xebar Saram writes:

i was wondering if anyone was syncing orgmode calendar with 
google cal, and if so how? i tried this 

https://github.com/myuhe/org-gcal.el/issues 

which gave errors all the time and thus stopped being usable 


im looking for a robust solution. any ideas?


I export the agenda using org-icalendar-combine-agenda-files. If 
you have access to a server, it is enough to point 
org-icalendar-combined-agenda-file to the right location in your 
server and then adding the ics file location in google calendar 
(Other calendars/Add by URL). You can automate this with a timer:


#+BEGIN_SRC emacs-lisp
 (org-icalendar-combined-agenda-file 
 "~/public_html/calendar.ics")
 (run-with-idle-timer (* 60 60) t 
 'org-icalendar-combine-agenda-files) 
#+END_SRC


If you do not have access to a server, you could use github 
(https://pages.github.com/) or bitbucket 
(https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-221449776.html) 
to create a website for your account. Then you can point 
org-icalendar-combined-agenda-file to the repo of your website and 
commit and push every time that you export the agenda to the ics 
file. In this case change org-icalendar-combined-agenda-file 
accordingly.


#+BEGIN_SRC emacs-lisp
 (org-icalendar-combined-agenda-file 
 "/path/to/personal/website/repo/calendar.ics")

#+END_SRC

If you do not like timers, you can also automate the process 
creating an sh file:


#+BEGIN_EXAMPLE
 #!/bin/bash
 emacsclient -a '' -e "(org-icalendar-combine-agenda-files nil)"
 cd /path/to/personal/website/repo
 git add calendar.ics
 git commit -m "Update calendar"
 git push
#+END_EXAMPLE

And then using a cronjob.

Best,

--
Jorge.




Re: [O] Agenda to iCal not working

2015-10-27 Thread Jorge A. Alfaro-Murillo

Ken Mankoff writes:

I'm using the examples from 
https://www.gnu.org/software/emacs/manual/html_node/org/Exporting-Agenda-Views.html 

Specifically, 

(setq org-agenda-custom-commands [...] 




But the HTML, PS, and ICS files are not being created. If I'm 
visiting an Org file and run (org-icalendar-export-to-ics) then 
the ICS is generated. 

Can someone offer advice why the ICS isn't generated when I 
generate a specific agenda view?


Setting up the agenda custom commands is not related to ical 
export. Have you run org-icalendar-combine-agenda-files?


--
Jorge.




Re: [O] Agenda to iCal not working

2015-10-28 Thread Jorge A. Alfaro-Murillo

Matt Lundin writes:

Jorge A. Alfaro-Murillo writes: 

Ken Mankoff writes: 

I'm using the examples from 
https://www.gnu.org/software/emacs/manual/html_node/org/Exporting-Agenda-Views.html 

Specifically,  

(setq org-agenda-custom-commands [...]  




But the HTML, PS, and ICS files are not being created. If I'm 
visiting an Org file and run (org-icalendar-export-to-ics) 
then the ICS is generated.  

Can someone offer advice why the ICS isn't generated when I 
generate a specific agenda view? 


Setting up the agenda custom commands is not related to ical 
export. 


In fact, it is. 


Yes, sorry what I meant to say is that that alone does not produce 
the files. You have to use org-store-agenda-views (C-c a e) from 
the agenda view or export directly using 
org-icalendar-combine-agenda-files.


--
Jorge.




Re: [O] Favorite contrib/ packages?

2015-11-03 Thread Jorge A. Alfaro-Murillo

Kaushal Modi writes:

What are your favorite org contrib/ packages that you simply 
can't live without, and consider them to be a part of your 
org-mode core?


org-contacts and org-passwords, definitely. Sometimes I use 
org-checklist.


--
Jorge.




Re: [O] Using orgstruct-mode (or just org-cycle) in emacs-lisp-mode

2015-11-08 Thread Jorge A. Alfaro-Murillo

Jonas Bernoulli writes:

`orgstruct-mode' sounds like it could be really useful too, but 
as I mentioned it doesn't work for me at all.  So for now I 
would like to stick to just `outline-minor-mode'. 


  Thanks
  Jonas 

Ps: I am still not sure whether I am just doing something stupid 
or why else `orgstruct-mode' doesn't work for me.  So I would 
apprechiate a little tutorial starting from emacs -Q that 
demonstrates what setup is required and what keys I have to 
press for things to happen. 


Generally it is enough to set orgstruct-heading-prefix-regexp and 
turn-on-orgstruct. I do this on a per mode basis, for example:


#+BEGIN_SRC emacs-lisp
 (add-hook 'elisp-mode-hook 'turn-on-orgtbl)
 (add-hook 'elisp-mode-hook
   (lambda ()
   (setq-local orgstruct-heading-prefix-regexp
   ";; ")))
#+END_SRC

Then you can organize your code using

;; * section-name

;; ** subsection-name

and folding with TAB, shift-TAB, etc will work when you are in 
those lines.


To use lists you just have to start a line with -, +, 1., etc and 
then lists keybindings work, for example M-C-m for new items. I do 
not know why lists do not respect orgstruct-heading-prefix-regexp, 
it has always seem weird to me that I cannot gain orgstruct 
functionality with something like:


;; - first item
;; - second item

--
Jorge.




Re: [O] syncing my life (orgmode :)) to a mobile (android) device..cant find a holistic reliable way..how do you guys manage to do it?

2015-12-06 Thread Jorge A. Alfaro-Murillo

Xebar Saram writes:

So my question is (sorry for the long intro :)) what do orgmode 
users (who also are heavy mobile users) do? do they give up on 
contacts and calendaring on the mobile? maintain 2 separate 
databases? what tools do people use to overcome this issue?


I have a computer always running an emacs server, and I connect to 
it from my android phone using JuiceSSH. To see the org agenda in 
my google calendar I export every now and then the agenda to an 
ics file in the cloud using org-icalendar-combined-agenda-file. In 
google I have the address to that file as one of the calendars 
(from the calendar "Other calendars", "Add by URL").


--
Jorge.




Re: [O] Require feedback on an idea: move to a central server all my org file and edit from there?

2016-01-26 Thread Jorge A. Alfaro-Murillo

Marcin Borkowski writes:

On 2016-01-23, at 19:28, Xebar Saram  wrote: 

Thanks for the feedback guys! 

Marcin: do you know of good packages or methods to auto 
push/pull from emacs each time you save a file (preferably ones 
that dont require coding skills :-)) 


Sadly, no.  But this shouldn't be too difficult - basically, 
just put some code to run hg/git/whatever into one of the 
numerous Emacs hooks.  For instance, check out after-save-hook. 
Alternatively, you could advice a function responsible for 
actually doing the autosave (do-auto-save - unfortunately, it's 
written in C and not in Elisp).


You also might want to check git-annex, specifically the 
assistant: https://git-annex.branchable.com/assistant/


Best,
--
Jorge.




Re: [O] complex dates (ie schedule a class in a time range)

2016-02-03 Thread Jorge A. Alfaro-Murillo

Hi Xebar,

Xebar Saram writes:

im having difficulty understanding how the complex date input 
works and would appreciate any help.  What i want is to schedule 
a class i teach on a sunday from 09:00 to 11:00 between 3/6/2016 
to 1/7/2016


%%(org-class 2016 6 3 2016 7 1 0) 9:00-11:00 You should be 
 sleeping


Best,
--
Jorge.




Re: [O] complex dates (ie schedule a class in a time range)

2016-02-03 Thread Jorge A. Alfaro-Murillo

Xebar Saram writes:

i added this to my meet.org file : 

** 3D class %%(org-class 2016 6 3 2016 7 1 0) 9:00-11:00 You 
should be sleeping 

yet in my agenda on 3/6/2016 there is no meeting present. what 
am i missing here?


I do not know. That works for me. You mean June 3rd right? Another 
obvious question, is meet.org part of your org-agenda-files?


--
Jorge.




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

2015-02-13 Thread Jorge A. Alfaro-Murillo

hymie! writes:

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



And this

#+BEGIN_SRC
  command1
  command2
  command3
#+END_SRC

is just IMO ugly.


It shouldn't be. Try adding the word "shell" after BEGIN_SRC, so 
that it fontifies the code correctly (the variable 
org-src-fontify-natively should be set to t, but that has been 
default for a while). Also, add shell to the loaded babel 
languages, so that you can execute the code and get the results 
right away in org:


#+BEGIN_SRC emacs-lisp
 (org-babel-do-load-languages
 'org-babel-load-languages
  '((shell . t)))
#+END_SRC

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

Another added benefit is that it is way easier to add the shell 
scripts inside a SRC block after you press C-c ' (C-c ' again to 
go back to your org file), since then you will have the power of 
Shell-script mode available, for example:


C-c (to define a function
C-c TAB  for an if statement
C-c C-l  for an indexed loop

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


#+BEGIN_SRC shell
 echo "hello"
 cd
 ls
 n=1
 while [ $n -le 10 ]; do
 echo $n
 n=$(( n + 1 ))
 done
 echo "bye"
#+END_SRC

Best,

--
Jorge.




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

2015-02-14 Thread Jorge A. Alfaro-Murillo

hymie! writes:

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


Yes, or that you can ssh to it.

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

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

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


You could add a \ at the end of each line that does not end the 
command.


Best,

--
Jorge.




Re: [O] Citation syntax: a revised proposal

2015-02-16 Thread Jorge A. Alfaro-Murillo

0.

John Kitchin writes:

Citations in org are /far/ more than just references in the text 
for me. They are functional links, gateways to a lot of 
information connected to the citation. My org-files are much 
more useful than the PDF manuscripts that get exported. 


I completely agree.

I also would like to see if it is workable. 


Same here.

There is nothing to lose in trying. org-ref will always be an 
alternative option, and if the new syntax is extendable enough 
it might even replace the citation links.


The big advantage of org-ref is that it builds on BibTeX. From 
what I read in this and the previous thread, the new proposal 
tries more or less to reimplement BibTeX in org. (If it is not so, 
I apologize, because I confess that I haven't read every single 
email in these two veery long threads. If you plan to use BibTeX 
as a base, disregard the rest of the email).


BibTeX is IMHO one of the best pieces of software ever created. It 
had a stable version from 1988 to 2010, in 2010 it was last 
updated, because we started to cite with long URLs (not the norm 
in 1988). It is something that just works as it is supposed to and 
has all you need for creating bibliographies.


The biggest advantage of having something org/elisp native as in 
the proposal would be the implementation of functions to create 
bibliographies with a specific style, what Oren Patashnik called 
"Bibliography-style hacking", which is very cumbersome in BibTeX 
(maybe is just that I cannot read WEB/Pascal and have a strong 
preference for Lisp dialects).


Just let me drop the mandatory reading:

http://www.tex.ac.uk/tex-archive/bibliography/bibtex/base/btxdoc.pdf
http://www.tex.ac.uk/tex-archive/bibliography/bibtex/base/btxhak.pdf

and references therein.

Best,

--
Jorge.




Re: [O] Citation syntax: a revised proposal

2015-02-16 Thread Jorge A. Alfaro-Murillo

John Kitchin writes:

Stefan Nobis writes: 

Hmmm... nowadays one uses biblatex[fn:1] (with its companion 
biber) which makes hacking bibliography styles quite easy (in 
LaTeX; compared to customizing bst files). I do not think that 
the current discussion will lead to writing bib-styles in Lisp 
instead of LaTeX (at least not in the foreseeable future). 


This is not universally true. None of the journals we submit to 
accept biblatex, only bibtex. I don't know of any major science 
publishers that use biblatex.


Same here. Journals either do not support LaTeX or support LaTeX 
and BibTeX.


--
Jorge.




Re: [O] Citation syntax: a revised proposal

2015-02-16 Thread Jorge A. Alfaro-Murillo

Stefan Nobis writes:

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

From what I read in this and the previous thread, the new 
proposal tries more or less to reimplement BibTeX in org. 


No, that's wrong, not the database should be replaced. The goal 
is to make citations a first class citizen in the org world (so 
no fallback to LaTeX commands or links with special handlings 
are needed).


I see, so in the examples provided Doe99 is only the key, org 
would not have to know that the author name is Doe and its year is 
1999, or any other information about the citation. I thought it 
was more or less the equivalent of implementing natbib 
(http://merkel.zoneo.net/Latex/natbib.php) in org, a way to decide 
if I wanted textual, parenthesis or numerical citations, and thus 
you would have to go to the process of determining what 
information each citation needs, for example: an article always 
has an author, a book always has a publisher, but a book can have 
an author or an editor if each chapter has a different author, 
that kind of thing, among many other complicated things. Sorry for 
the noise.


But now it is not clear to me what the actual org reference points 
to.  If it is the actual reference, I mean the article's PDF or 
URL, what would you do when you need to cite a physical book? Also 
in this case you will not be able to produce a proper bibliography 
when exporting since the key cannot contain all the information 
needed. Now if the reference points to be entry for that reference 
in a database, isn't there a lot of compatibility problems if one 
uses one type of database vs another? Again here you will not be 
able to produce the bibliography when exporting


--
Jorge.




Re: [O] How to set a default language for source blocks?

2015-02-17 Thread Jorge A. Alfaro-Murillo

Hi, Grant.

Grant Rettke writes:

It would be simpler to say "this whole document will be R source 
blocks, unless I specify other wise". I looked at [the spec]. I 
wanted to obtain this behavior. I couldn't figure out how. Is it 
possible?


The problem is that if there is nothing after #+BEGIN_SRC, then 
org-babel-get-src-block-info returns nil. Probably you would have 
to modify org-babel-get-src-block-info so that it returns a 
default when there is nothing after #+BEGIN_SRC. But isn't it 
easier to set org-structure-template-alist as a local buffer 
variable, say in the first line of your file something like:


#+BEGIN_EXAMPLE
 # -*- org-structure-template-alist: '(("s" "#+BEGIN_SRC 
 python\n?\n#+END_SRC")) -*-

#+END_EXAMPLE

Then file, for example.


Best,

--
Jorge.




Re: [O] Org agenda time table formatting reverses when loading zenburn theme

2015-02-20 Thread Jorge A. Alfaro-Murillo

Claudius Mueller writes:

if I load a theme (such as zenburn) and then rebuild my agenda - 
the time table has changed: (i) the sorting of time is reversed, 
and (ii) tasks that were inline before are now sorted out of the 
time table (see arrow in both pictures).


I do not use zenburn very often, but I just tried to replicate the 
behavior and couldn't. What version of zenburn do you have? I 
haven't pulled the origin since commit 0ded23f of April of last 
year. You could try checking out that commit (git checkout 
0ded23f) and see if your agenda behaves as expected, if so report 
the bug to the developers of zenburn.


Best,
--
Jorge.




Re: [O] Citation syntax and ODT

2015-02-24 Thread Jorge A. Alfaro-Murillo

Thomas S. Dye writes:

AFAIK, the only software that has proposed a solution to the 
problem of maintaining a citation database that can support the 
universe of citation styles developed "in the wild" is BibLaTeX. 


Well with BibTeX alone you can maintain a citation database and to 
support any citation style, you just:


"reverse polish notation"
know?
'skip
{"reverse polish notation" learn}
if
"citation style"
write

--
Jorge.




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Alexis writes:

When i scroll down to look at the current value of 
`calendar-holidays`, however, i see that neither the current 
value nor the original value makes any reference to the 
`holiday-local-holidays` variable. And indeed, when i examine my 
agenda for next Monday, which is a local holiday i've specified 
in `holiday-local-holidays`, i can't see that local holiday. To 
fix this, i use M-: to evaluate: 

   (setq calendar-holidays (append calendar-holidays 
holiday-local-holidays)) 

after which the local holiday next Monday appears in my Org 
agenda.


You do not need to add that, calendar-holidays appends 
holiday-local-holidays when holidays.el is loaded, just restart 
emacs. 

Given the documentation for the `calendar-holidays` variable, 
the fact that i need to manually add the value of the 
`holiday-local-holidays` variable to `calendar-holidays` seems 
to me like it might be a coding or documentation bug in Emacs 
 ?


It is also not a documentation bug, at least in my emacs 
(25.0.50.1) the documentation of calendar-holidays says clearly:


"Note that these variables [`holiday-other-holidays', 
`holiday-general-holidays', `holiday-local-holidays', 
`holiday-christian-holidays', `holiday-hebrew-holidays', 
`holiday-islamic-holidays', `holiday-bahai-holidays', 
`holiday-oriental-holidays' and `holiday-solar-holidays'] have no 
effect on `calendar-holidays' after it has been set (e.g. after 
the calendar is loaded). In that case, customize 
`calendar-holidays' directly."


Best,

--
Jorge.




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Hi Melleus.

Melleus writes:

Does %%(org-calendar-holiday) know about holiday-local-holidays? 
I'm not programmer, sorry. I've set up those local holidays but 
cannot see them in my agenda.


They should show up after you restart emacs.

Best,
--
Jorge.




Re: [O] org-calendar-holiday and local holidays

2015-03-02 Thread Jorge A. Alfaro-Murillo

Melleus  writes:

Alexis  writes: 

see that local holiday. To fix this, i use M-: to evaluate: 

   (setq calendar-holidays (append calendar-holidays 
holiday-local-holidays)) 


Works perfectly this way, thank you. 

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

They should show up after you restart emacs. 


I supposed it should. But in fact in does not work.


holidays.el appends holiday-local-holidays to calendar-holidays 
via a defcustom, so if you set holiday-local-holidays in your 
.emacs, restart emacs and the local holidays are not in 
calendar-holidays, it is because you are calling something that 
loads holidays.el before you set holiday-local-holidays.


If you add the code above to your .emacs and later modify your 
configuration and remove or move the part that loads holidays.el, 
then either your code will fail (because calendar-holidays is not 
yet defined) or calendar-holidays will have your local holidays 
twice and they will show twice in your agenda.


I think that you should look for whatever calls holidays.el and 
set holiday-local-holidays before that.


If not, then at least use eval-after-load so that 
calendar-holidays is already defined when the code is run, and 
add-to-list so that the entries do not get added twice if they are 
already there:


#+BEGIN_SRC emacs-lisp
 (eval-after-load 'holidays
   '(dolist (holiday holiday-local-holidays)
(add-to-list 'calendar-holidays holiday))
#+END_SRC

Best,
--
Jorge.




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread Jorge A. Alfaro-Murillo

J. David Boyd writes:

I have 4 files I use for work in my main org folder.  And I have 
a personal.org in another folder, that is inside of Dropbox. 

I created a symlink to personal.org in my main org folder. When 
I start emacs and load the agenda, it asks me 

Symbolic link to Git-controlled source file; follow link? (y or 
n) 

Is there some setting (that I can't seem to find) that will 
always just allow this, rather than querying me?


#+BEGIN_SRC emacs-lisp
 (setq vc-follow-symlinks t)
#+END_SRC

BTW, I think that using dropbox in a git controlled directory 
might not be a good idea: if there are conflicts of files inside 
of the .git directory between two machines, you will never notice 
them because dropbox doesn't report them, so the actual git repos 
might be different between the two machines. I you are using git, 
why don't you clone the main org directory in the other machine 
and pull changes when you use the other machine?


Best,
--
Jorge.




Re: [O] automatically follow symlink to other folder when loading agenda

2015-03-16 Thread Jorge A. Alfaro-Murillo

J. David Boyd writes:

I don't need the level of versioning that git provides for the 
few config files and org files that I have there.


Have you check this: https://git-annex.branchable.com/assistant/ ? 
It is as easy as dropbox, it just keeps directories synchronized, 
but it has all the power of git in case you ever need it, you are 
not limited to the 2GB of dropbox, and it automatically encrypts 
your data in the remote.


--
Jorge.




Re: [O] Define Keyboard Shortcut for "Open in Emacs"

2015-04-03 Thread Jorge A. Alfaro-Murillo

Rainer M Krug writes:

I would like to open pdfs in emacs (using pdf-viewer) but there 
is only a shortcut (C-c C-o) to open a pdf externally, and no 
shortcut for the menu item below "Open in Emacs" in the context 
menu. 

How can I define a shortcut for this command (or re-use C-c 
C-o)?


If you want C-c C-o to open in emacs, you can configure your 
org-file-apps:


#+BEGIN_SRC emacs-lisp
 (eval-after-load "org"
   '(if (assoc "\\.pdf\\'" org-file-apps)
(setcdr (assoc "\\.pdf\\'" org-file-apps) 'emacs)
  (add-to-list 'org-file-apps '("\\.pdf\\'" . 'emacs) t)))
#+END_SRC

Alternatively, if you are on Linux, you could make your 
emacsclient your default pdf-viewer:


#+BEGIN_SRC shell
 xdg-mime default emacsclient.desktop application/pdf
#+END_SRC

Then the external program called by C-c C-o would also be emacs =)

Best,
--
Jorge.




Re: [O] Define Keyboard Shortcut for "Open in Emacs"

2015-04-04 Thread Jorge A. Alfaro-Murillo

Xavier Maillard writes:

What is emacsclient.desktop exactly ? On my slackware, there is 
nothing named like this. 


Inside a desktop environment (e.g. GNOME, KDE, Xfce), xdg-open
passes the arguments to that desktop environment's file-opener
application (gvfs-open, kde-open, or exo-open, respectively).
When no desktop environment is detected (e.g. using Openbox), 
xdg-open will use its own configuration files, emacsclient.desktop 
is the call to the emacs server, if you do not use the server you 
could use emacs.desktop instead.


Best,
--
Jorge.




Re: [O] Define Keyboard Shortcut for "Open in Emacs"

2015-04-06 Thread Jorge A. Alfaro-Murillo

Xavier Maillard writes:

Thank you very much for these clarifications. Should I expect 
anything from xdg-* when not using a desktop environment at all? 
(I am using something home-brewed where I could add support for 
something like this but that's not for now).


I am not sure. You could try xdg-open in any file from the 
terminal, to see if it works as expected



Also, can you share an emacsclient.desktop file ?


That is not a file, but how xdg identifies emacsclient. You can 
find more about it here: 
https://wiki.archlinux.org/index.php/Xdg-open


Best,

--
Jorge.




Re: [O] Best practices to get reminders?

2015-04-06 Thread Jorge A. Alfaro-Murillo

Nikolaus Rath writes:

However, there's one thing where I feel lost. I don't expect to 
be editing my orgmode files on a daily basis (at least not yet), 
so how can I make sure that I don't miss an important deadline? 
It seems to me that it doesn't help much if instead of worrying 
to forget a deadline I now have to worry about forgetting to 
check my org-mode agenda... 

How do other people handle this? Is everyone else opening and 
working on their org files daily so that this becomes a 
non-issue?


You can put this after your org-agenda-files configuration in your 
.emacs:


#+BEGIN_SRC emacs-lisp
 (appt-activate 1)
 (org-agenda-to-appt)
#+END_SRC

Then you will be reminded of things in your org files, before the 
appointment time (I think 12 min is the default).


You could also add this, so that the appointments refresh and new 
get added every time that you call the agenda:


#+BEGIN_SRC emacs-lisp
 (add-hook 'org-agenda-finalize-hook (lambda () 
 (org-agenda-to-appt t)))

#+END_SRC

Best,
--
Jorge.




Re: [O] Best practices to get reminders?

2015-04-06 Thread Jorge A. Alfaro-Murillo

Nikolaus Rath writes:

On Apr 06 2015, jorge.alfaro-muri...@yale.edu (Jorge A. 
Alfaro-Murillo) wrote: 
Nikolaus Rath writes: 

However, there's one thing where I feel lost. I don't expect 
to  be editing my orgmode files on a daily basis (at least not 
yet),  so how can I make sure that I don't miss an important 
deadline?  It seems to me that it doesn't help much if instead 
of worrying  to forget a deadline I now have to worry about 
forgetting to  check my org-mode agenda...How do other 
people handle this? Is everyone else opening and  working on 
their org files daily so that this becomes a  non-issue? 


You can put this after your org-agenda-files configuration in 
your  .emacs: 

#+BEGIN_SRC emacs-lisp 
  (appt-activate 1) (org-agenda-to-appt) 
#+END_SRC Then you will be reminded of things in your org 
files, before the  appointment time (I think 12 min is the 
default). 


Hmm. I tried it with this test-event: 

* TODO Test task 
  SCHEDULED: <2015-04-07 Tue> 

But running (org-agenda-to-appt) just gives "No event to add". 


Is this because there is no time specified?


Yes.

I'm not really concerned with appointments that have a time 
span, but with projects that have specific due dates...


Well that is what the org agenda is for.

If you just can't remember to check the agenda every so often you 
could do something like (not tested):


#+BEGIN_SRC emacs-lisp
 (run-at-time t 120 'org-agenda-list)
#+END_SRC

To run the agenda every two hours automatically.

Best,

--
Jorge.




Re: [O] paste from clip to code block

2015-04-17 Thread Jorge A. Alfaro-Murillo

John Kitchin writes:

I like this kind of keyboard shortcut: 

For python: 
For emacs-lisp 




I agree, this is the best method. Although probably you mean C-y 
instead of C-w.


For the record, this requires you to set up 
`org-structure-template-alist' to include python and emacs-lisp. 
For example, I use p and E, for python and emacs-lisp, so in my 
.emacs I have:


#+BEGIN_SRC emacs-lisp
 (eval-after-load "org"
'(progn
   (add-to-list 'org-structure-template-alist
'("E"
  "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"
  "  lang=\\"emacs-lisp\\">\n\n?"))

   (add-to-list 'org-structure-template-alist
'("p"
  "#+BEGIN_SRC python\n?\n#+END_SRC"
  "  lang=\\"python\\">\n\n?"

#+END_SRC

I even use the method in message-mode, for writing emails with 
code, like I just did now =)


Best,

--
Jorge.




Re: [O] Sparse tree for undated TODOs, or hierachical agenda?

2015-04-21 Thread Jorge A. Alfaro-Murillo

Hi, Nikolaus.

Nikolaus Rath writes:

Hello, 

I'm starting to like orgmode more and more. Thanks for working 
on this! 

However, for me the global todo list in the Agenda very hard to 
digest (even when excluding sublevels), so I'd rather have a 
view that conserves the document structure.


If you want to restrict to your current document before building 
the agenda use '<', so if 'C-c a' calls your agenda (suggested org 
key), then you can do 'C-c a < a' to get the agenda restricted to 
the buffer that you are in.


Is there a way to create a sparse tree that shows only undated 
TODOs (i.e., excludes anything that scheduled or has a 
deadline)?


I do not know what you mean by sparse tree, but this excludes 
anything scheduled or with a deadline from the global todo list:


#+BEGIN_SRC emacs-lisp
 (setq org-agenda-todo-ignore-scheduled 'all)
 (setq org-agenda-todo-ignore-deadlines 'all)
#+END_SRC

Instead of 'all you can also use 'past or 'future to exclude only 
scheduled and deadlines from the past or the future, respectively.


Best,
--
Jorge.




Re: [O] Sparse tree for undated TODOs, or hierachical agenda?

2015-04-21 Thread Jorge A. Alfaro-Murillo

Nikolaus Rath writes:

Jorge A. Alfaro-Murillo writes: 
If you want to restrict to your current document before 
building the agenda use '<', so if 'C-c a' calls your agenda 
(suggested org key), then you can do 'C-c a < a' to get the 
agenda restricted to the buffer that you are in. 


Well, yes, but that still throws away all the headings. E.g. 

* Task 1 ** TODO Do A ** Other stuff * Task 2 ** TODO Do B ** 
TODO Do C 
   SCHEDULED: <2015-05-31 Sun> 

becomes (after C-c a t): 

* TODO Do A * TODO Do B 

What I would like to get is 


* Task 1 ** TODO Do A * Task 2 ** TODO Do B


I do not know what you mean by sparse tree, 


The sparse tree is what you get with C-c \ t (org-sparse-tree). 
For the above example, you get: 

* Task 1 ** TODO Do A * Task 2 ** TODO Do B ** TODO Do C 
   SCHEDULED: <2015-05-31 Sun> 

so the structure is conserved like I want, but even with.. 

but this excludes  anything scheduled or with a deadline from 
the global todo list: 

#+BEGIN_SRC emacs-lisp 
  (setq org-agenda-todo-ignore-scheduled 'all) (setq 
  org-agenda-todo-ignore-deadlines 'all) 
#+END_SRC 


.. the scheduled items are still included (because the todo-* 
settings apply only to the Agenda view, not the sparse tree 
view).


It seems to me that these are two different issues. If you want 
the TODO list in the org-agenda to show your headlines you can 
configure the view to show breadcrumbs (and order by category):


#+BEGIN_SRC emacs-lisp
 (setq org-agenda-prefix-format
   '((agenda . " %i %-12:c%?-12t% s")
 (timeline . "  % s")
 (todo . " %i %-12:c%-24:b")
 (tags . " %i %-12:c")
 (search . " %i %-12:c")))

 (setq org-agenda-sorting-strategy
   ((agenda habit-down time-up priority-down category-keep)
(todo category-keep)
(tags priority-down category-keep)
(search category-keep)))

#+END_SRC

Now, if you want to narrow the agenda (C-c a) or org-sparse-tree 
(C-c /) to show TODO items not SCHEDULED or DEADLINE'd use the key 
'm' and the following match:


-SCHEDULED={.+}-DEADLINE={.+}+TODO="TODO"

Best,
--
Jorge.




Re: [O] Sparse tree for undated TODOs, or hierachical agenda?

2015-04-22 Thread Jorge A. Alfaro-Murillo

Nikolaus Rath writes:

Jorge A. Alfaro-Murillo writes:  


#+BEGIN_SRC emacs-lisp 
  (setq org-agenda-prefix-format 
'((agenda . " %i %-12:c%?-12t% s") 
  (timeline . "  % s") (todo . " %i %-12:c%-24:b") 
  (tags . " %i %-12:c") (search . " %i %-12:c"))) 

  (setq org-agenda-sorting-strategy 
((agenda habit-down time-up priority-down 
category-keep) 
 (todo category-keep) (tags priority-down 
 category-keep) (search category-keep))) 
#+END_SRC 


For me the second assignment fails with:


Sorry, I am missing a quote for the list, the second part should 
be


#+BEGIN_SRC emacs-lisp
 (setq org-agenda-sorting-strategy
'((agenda habit-down time-up priority-down category-keep)
  (todo category-keep)
  (tags priority-down category-keep)
  (search category-keep)))

#+END_SRC 


Best,
--
Jorge.




Re: [O] How to match TODO items not SCHEDULED or DEADLINE'd

2015-04-22 Thread Jorge A. Alfaro-Murillo

Nikolaus Rath writes:

On Apr 21 2015, Nikolaus Rath  wrote: 
On Apr 21 2015, jorge.alfaro-muri...@yale.edu (Jorge A. 
Alfaro-Murillo) wrote: 
Now, if you want to narrow the agenda (C-c a) or 
org-sparse-tree  (C-c /) to show TODO items not SCHEDULED or 
DEADLINE'd use the key  'm' and the following match: 

-SCHEDULED={.+}-DEADLINE={.+}+TODO="TODO" 


This, however, works perfectly, thanks a lot! 


Actually, it seems it does not work for some cases. If I have a 
file with 

* TODO Item 1 * TODO Item 2 
  SCHEDULED: <2015-04-24 Fri> 
* Heading ** TODO Subitem 1 ** TODO Subitem 1 
  SCHEDULED: <2015-04-24 Fri> 

end do the above procedure, I'm getting 

* TODO Item 1 * TODO Item 2...  * Heading ** TODO Subitem 1... 


Why is "Item 2" not being hidden?


That is a good question, I don't know. It fails for me as well in 
the org-sparse-tree, but not in the agenda. In the agenda it only 
shows Item 1 and Subitem 1, as it should. I had never used the 
sparse tree, it might by what it is supposed to do, perhaps it 
shows by default all entries up to a certain level. Hopefully 
someone can answer, if not perhaps a new thread with just that 
issue could serve as a bug report.


--
Jorge.




Re: [O] New Org-HTML-theme!!

2015-04-22 Thread Jorge A. Alfaro-Murillo

Fabrice Niessen writes:

I've just published a new theme, called ReadTheOrg, on 
https://github.com/fniessen/org-html-themes.


Thank you very much! I just tried it and it is very nice.

--
Jorge.




Re: [O] How to match TODO items not SCHEDULED or DEADLINE'd

2015-04-22 Thread Jorge A. Alfaro-Murillo

Nicolas Goaziou writes:

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

Nikolaus Rath writes: 
Actually, it seems it does not work for some cases. If I have 
a file with  

* TODO Item 1 * TODO Item 2   SCHEDULED: <2015-04-24 Fri> * 
Heading ** TODO Subitem 1 ** TODO Subitem 1   SCHEDULED: 
<2015-04-24 Fri>  

end do the above procedure, I'm getting  

* TODO Item 1 * TODO Item 2...  * Heading ** TODO Subitem 1...  

Why is "Item 2" not being hidden? 


That is a good question, I don't know. It fails for me as well 
in the org-sparse-tree, but not in the agenda. In the agenda it 
only shows Item 1 and Subitem 1, as it should. I had never used 
the sparse tree, it might by what it is supposed to do, perhaps 
it shows by default all entries up to a certain level. 
Hopefully someone can answer, if not perhaps a new thread with 
just that issue could serve as a bug report. 


If you're using development version, see 
`org-show-context-detail'. 


Thank you that answers the question, that list has (default . 
ancestors) in the default. Nikolaus, for the sparse trees to look 
like you want, probably you want to add:


#+BEGIN_SRC emacs-lisp
 (add-to-list 'org-show-context-detail '(tags-tree . minimal))
 (add-to-list 'org-show-context-detail '(occur-tree . minimal))

#+END_SRC 


Best,
--
Jorge.




Re: [O] Redefine key for sorting

2015-05-08 Thread Jorge A. Alfaro-Murillo

Hi Igor.

Igor Sosa Mayor writes:

I'm using very often the sort function of lists. Unfortunately 
it is bound to a key combination (C-c ^) which is rather uneasy. 
I would like to change it to C-c ñ. Which is the best method to 
redefine it?


Doesn't the standard

(eval-after-load "org" '(define-key org-mode-map (kbd "C-c ñ") 
'org-sort))


work?

--
Jorge.




Re: [O] Installing from Git

2015-05-14 Thread Jorge A. Alfaro-Murillo

Marcin Borkowski writes:

But one problem remains: the info manual is still taken from 
Emacs, not from the newest Org. 


Did you try to do 'make install-info'?

--
Jorge.




Re: [O] email ui choices?

2015-07-14 Thread Jorge A. Alfaro-Murillo

Rasmus writes:

In any case, I have moved ALL sending configuration to 
gnus-posting-style and it's brilliant.  Before I was messing 
with hooks to change variables before dispatching.


I agree, gnus-posting-styles is the way to go. Check: 


(info "(gnus) Posting Styles")

Best,
--
Jorge.




Re: [O] importing and compliting contacts [WAS:email ui choices?]

2015-07-14 Thread Jorge A. Alfaro-Murillo

Matt Price writes:

Also, I'm wondering what the best way is to deal with contacts. 
Can I import my existing contacts into org-contacts? 


Where do you have your contacts right now?

And if so, do I get tab completion in a message-mode buffer for 
those contacts?


Yes, at least I'm sure about it in the default message mode which 
is the one that I use.


--
Jorge.




Re: [O] Query on TODO headers for specific words

2015-07-22 Thread Jorge A. Alfaro-Murillo

Xebar Saram writes:

Thats exactly what i was looking for.  does anyone know or show 
me an example of how to create a org-agenda-custom-commands with 
the 'S' from above where i would go C-a 'x' and it would auto 
search all TODO headers for a custom string?


Probably you mean C-c a. If you have that bind to org-agenda, then 
do C-c a S. To repeat the previous string searched use the arrow 
up key.


--
Jorge.




Re: [O] Exporting Org Agenda -> todo.txt and todo.txt -> Org Files + Suggestion/Feature request.

2015-07-23 Thread Jorge A. Alfaro-Murillo

Tim O'Callaghan writes:

Does anyone else out there generate todo.txt files[1] from 
org/org-agenda? If you do, how do you do it. Or if not, do you 
have a good idea about how if it can be approximated in an 
agenda configuration?


You could write your own export back-end 
(http://orgmode.org/worg/dev/org-export-reference.html). 
Alternatively, you could modify org-agenda-custom-commands and use 
C-x C-w to save the agenda view to a file.


Best,
--
Jorge.




Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-06 Thread Jorge A. Alfaro-Murillo

Xebar Saram writes:

What i want is basically pretty simple. an easy to setup email 
for emacs, but one that would work tightly with gmail since i do 
a lot of mail checking on the road via my cellphone. 

any advise. recommendations or setups that maybe people are 
willing to share?


The setup of gnus for gmail is quite simply:

#+BEGIN_SRC emacs-lisp
 (setq gnus-select-method '(nnimap "imap.gmail.com"))
 (setq smtpmail-default-smtp-server "smtp.gmail.com")
#+END_SRC

and in ~/.authinfo.gpg:

#+BEGIN_EXAMPLE
 machine imap.gmail.com login  password  port 
 imap
 machine smtp.gmail.com login  password  port 
 587
#+END_EXAMPLE  That is enough to get and check mail (M-x gnus) and 
send mail (C-x m).  Since it is imap, nothing is kept locally so 
whatever you do in gnus is reflected on your phone and vice versa.


One thing that bears mentioning is that gnus treats mail as news 
so it won't show you by default already read messages (like most 
mail apps), hit L to show all groups (as opposed to l for only 
groups with new messages) and enter the INBOX group to see all 
previous messages.


Best,
--
Jorge.




Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-14 Thread Jorge A. Alfaro-Murillo

Peter Davis writes:

I'd like to store information in an org page that gets 
automatically encrypted when I save it, and decrypted when I 
open it. Is there some built-in functionality or hooks for this?


You could save the file as .gpg, and put as its first line

# -*- mode: org-mode -*-

By the way if you want to store passwords, take a look at 
org-passwords in /contrib


Best,
--
Jorge.




  1   2   >