[O] hiding the PROPERTIES drawer

2015-03-25 Thread Randomcoder

Is there an easier solution to hiding the :PROPERTIES: drawer by default ?
I was reading through this [1] but it's extremely complicated and I would
like to use this but.. currently it's absent from org-mode.

What do you use for this ?
(Btw, I mainly want to hide the PROPERTIES drawer because of the ID that's
always there for me. I need the ID to be there, but I don't want to see it,
and so I would prefer the drawer to be hidden/folded)


[O] org-mode timestamp and calendar questions

2015-03-24 Thread Randomcoder

Is it possible to make org-mode timestamps inactive? (I mean, the
calendar(Google calendar) and the org-agenda would ignore them)

I tried specifying that I should be notified 1h in advance for an
event like this :  2015-03-24 Mon 07:30 -1h but apparently this is
not the way to do it.
Is it currently possible to do this and if so, what is the correct
org-mode timestamp markup for this ?

Best regards,

Re: [O] Possible bug: Can not search for text in links - only description

2015-03-21 Thread Randomcoder
Hi Rainer,

In terms of searching through all open buffers,
here is what I use (helm and helm-multi-occur):

| (setq helm-M-x-requires-pattern 0)
| ;; http://emacs.stackexchange.com/a/740
| (require 'helm-regexp)
| (eval-after-load helm-regexp
|   '(setq helm-source-moccur
|  (helm-make-source Moccur 'helm-source-multi-occur :follow 1)))
| (defun my-helm-multi-occur-buffers ()
|   multi-occur in all buffers backed by files.
|   (interactive)
|   (helm-multi-occur
|(delq nil
|  (mapcar (lambda (b)
|(when (buffer-file-name b) (buffer-name b)))
|  (buffer-list)
| (global-set-key (kbd C-x C-p) (lambda ()
|   (interactive)
|   (helm-mode 1)
|   (my-helm-multi-occur-buffers) 
|   (helm-mode 0)
|   ))

There are other solutions to this such as org-velocity:

- http://orgmode.org/worg/org-contrib/org-velocity.html
- https://github.com/Fuco1/org-velocity

Both helm + helm-multi-occur and org-velocity offer auto-complete
search functionality.

Best regards

On Fri, Mar 20, 2015 at 02:44:29PM +0100, Rainer M Krug wrote:
 I got an error as follow when I tried to export:
 | org-babel-exp process R at line 5495...
 | Evaluation of this R code-block is disabled.
 | user-error: Unable to resolve link *uLELFit
 I thought OK - I'll search for uLELFit and just fix this link - but I
 could do what I wanted, I did not manage to find the link.
 I figured out that I can not search for text in the link.
 Thins is quite annoying, especially as I even thought of opening the
 file in another texteditor, search for the string, and save it again.
 As an example: if this link is in an org-mode file, A search for exa
 does not return any results.
 [[*Examples][Link to exp]]
 Is this a problem on my side?
 | Org-mode version 8.3beta (release_8.3beta-927-ge0b19d @ 
 | GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, Carbon Version 157 AppKit 
 1343.16) of 2015-02-02 on Rainers-MacBook-Pro-4.local
 Rainer M. Krug
 email: Raineratkrugsdotde
 PGP: 0x0F52F982

Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-20 Thread Randomcoder
Hi Eric,

I've also seen these threads from the archive of the mailing list
discussing about the very same thing. 
In summary it seems that in 2008 Carsten's opinion on this was
that it would add a lot of complexity and it's a pandora's box
about to be open.

In 2014, Nicolas's reply seems a bit more encouraging.


On Wed, Mar 18, 2015 at 04:33:44PM +, Eric S Fraga wrote:
 There is no specific solution unfortunately.  Having spent a year living
 and working across time zones, I was unable to find a good
 solution.  And, in fact, the problem was compounded by trying to
 synchronise org data with Google's calendar and with MS Outlook.  I
 eventually simply stopped synchronising and relied on my computer
 having the time that was appropriate for where I was at the time. All

So would your computer find out the timezone and switch it automatically ?
(IIRC Ubuntu does that by default)

On Wed, Mar 18, 2015 at 04:33:44PM +, Eric S Fraga wrote:
 org data were local time with a fluid definition of local.

I'd be interested in knowing a bit more about the fluid definition.

Re: [O] [proposal] timezone-aware timestamps enhancement

2015-03-20 Thread Randomcoder
On Wed, Mar 18, 2015 at 02:09:31PM -0400, Ken Mankoff wrote:
 I have a solution that works quite well outside of Org. Apple Calendar
 supports timezones plus a floating option.  I use Org for all my
 floating events - local to the computer and me, whatever TZ we're in. I
 haven't found a way to put TZ-specific events into Org.
 If scheduling a Skype with someone in NZ, I enter it in iCal at the NZ
 time in the NZ timezone. Org pulls in my iCal events. Then wherever I
 am when that event happens, I get the alert at the correct time. Most
 things are local to me, so I use floating and stay in Org.

I wrote a silly elisp function that does the conversion for me.  Hah,
yeah ! exactly, I use it for the exact same thing, scheduling an interview
with someone on the other side of the planet.

So for example they ask me 

Can you provide us with times when you're available for an interview ?
and I just make a table and let them decide when:

| time Tokyo | time Sofia |
| 2015-03-20 18:00 | 2015-03-20 Fri 11:00 |
| 2015-03-21 14:00 | 2015-03-21 Sat 07:00 |
| 2015-03-22 14:00 | 2015-03-22 Sun 07:00 |
| 2015-03-23 14:00 | 2015-03-23 Mon 07:00 |
| 2015-03-24 14:00 | 2015-03-24 Tue 07:00 |
#+TBLFM: $1='(concat  (org-tz-conv $2 Asia/Tokyo to) )

You said above you're using iCal (do you mean, Google Calendar or
Apple Calendar?). I'd be interested in setting this up as well, which one
should I be using ?

At this point in time I'm using Org-Mode's agenda to view events.
Should I try to sync them up with my phone and if so what is the recommended
way to go ?

This is the implementation of org-tz-conv:

(defun org-tz-conv (stamp tz way)
  (let* (
 (current-tz-offset (shell-command-to-string date +%z))
 (stamp1(concat (replace-regexp-in-string []  stamp)   
 (date-cmd-p0  TZ=%s date -d \%s\)
 (date-cmd-p1  date --date=\TZ=\\\%s\\\ %s\)
 (date-cmd-p2   +\%F %H:%M\)
 (date-cmd-rendered1  (format date-cmd-p1 tz stamp1 ))
 (date-cmd-from  (concat date-cmd-rendered1 date-cmd-p2))
 (date-cmd-to(concat (format date-cmd-p0 tz stamp1) 
 (shell-result-from (shell-command-to-string date-cmd-from ))
 (shell-result-to   (shell-command-to-string date-cmd-to   ))

 (result-from (replace-regexp-in-string \n  shell-result-from) )
 (result-to   (replace-regexp-in-string \n  shell-result-to  ) )
(message shell-result-from)
(message shell-result-to)
(cond ((string-equal way from) result-from)
  ((string-equal way to  ) result-to  ))

[O] ID property generated by org-mobile

2015-03-20 Thread Randomcoder
Does the ID property have any use? I know I can disable it, but where
is it being used ?
(the ID property that org-mobile generates for each heading)

Are there any drawbacks to just disabling it
with (setq org-mobile-force-id-on-agenda-items nil) ?

Is it being used somewhere in particular ?

Re: [O] How to represent Emacs keystrokes in Org?

2015-03-20 Thread Randomcoder
Hi Marcin,

I'm going to reference a hangout of Sacha Chua and Xah Lee
where they talked about this https://www.youtube.com/watch?v=rKPKWqvTImA

( you can download it with livestreamer like so
livestreamer -o xlsc.mp4 https://www.youtube.com/watch?v=rKPKWqvTImA 360p )

At 26:53 Xah Lee starts explaining about how his
setup related to rendering keystrokes in emacs.

At 27:13 he mentions this function = xhm-htmlize-keyboard-shortcut-notation
Apparently this is used to render the keystrokes.

On Thu, Mar 19, 2015 at 10:48:30PM +0100, Marcin Borkowski wrote:
 Hi there,
 it seems that reviving old threads is my new hobby;-).
 On 2014-11-29, at 22:58, Marcin Borkowski mb...@wmi.amu.edu.pl wrote:
  On 2014-11-29, at 22:53, Marcin Borkowski wrote:
  On 2014-11-24, at 19:38, Rasmus wrote:
  Marcin Borkowski mb...@wmi.amu.edu.pl writes:
  I'm writing (in Org) a text on Emacs usage.  How to
  correctly/canonically represent keystrokes, like C-x RET f?
  Currently, I use =C-x RET f=; are there any alternatives?
  That's what I'd do.  Or ~C-x RET f~.  You could also use a macro, if you
  want it to me be more semantic (I hope I use this word correctly).
 This might seem a good idea, but how do I do it?  (See below for
 a concrete problem statement.)
  Houston, we've got a problem.  What about =M-,=?  Somehow it seems not
  to be interpreted in the right way: it does not get fontified correctly,
  nor does export in the right way.  What can I do about it?  I found
  about org-emphasis-regexp-components, is it the only way?  Also, how do
  I reload Org without restarting Emacs?  (I am an Emacs geek and I try to
  beat my record of emacs-uptime, you know. ;-) )
  Wow, I got an idea, and it worked.  Here's an excerpt from `C-u C-x ='
  at my solution;-):
   position: 11859 of 16051 (74%), column: 253
  character: ‍ (displayed as ‍) (codepoint 8205, #o20015, #x200d)
  preferred charset: unicode (Unicode (ISO10646))
  code point in charset: 0x200D
 syntax: .which means: punctuation
   to input: type C-x 8 RET HEX-CODEPOINT or C-x 8 RET NAME
buffer code: #xE2 #x80 #x8D
  file code: #xE2 #x80 #x8D (encoded by coding system utf-8-unix)
display: by this font (glyph code)
  OT-normal-normal-normal-*-17-*-*-*-*-0-iso10646-1 (#x120)
  Character code properties: customize what to show
  A bit ugly trick, but works.  What are the opinions?
 After a while I have to say that my opinion is strongly negative: this
 breaks LaTeX export.  (LaTeX doesn’t like some unicode characters, it
 turns out.)  Also, this was really an ugly hack...
 So, here is my problem: how to represent a key like M-, or
 e.g. a sequence \, (important in regexps) as “code” or “verbatim stuff”
 in org-mode?  Neither =\,= nor ~\,~ work, of course.  Also, I’d like
 this to be backend-agnostic, so \texttt{M-,} doesn’t really work.
 What is the rationale behind forbidding the comma as the “border”
 character in org-emphasis-regexp-components?  Should I change this
 variable in my setup or is there a more general way to convince Org that
 I really want verbatim/code snippets like =\,=?
 Marcin Borkowski
 Faculty of Mathematics and Computer Science
 Adam Mickiewicz University

[O] [proposal] timezone-aware timestamps enhancement

2015-03-18 Thread Randomcoder

Currently, AFAIK when scheduling something in Org-Mode, the timestamp
doesn't have a timezone.

Use-case example: Let's say Carsten Dominik schedules a meeting with
someone, then jumps on a plane and travels to some place that's on a
timezone difference of -/+ 3 hours. He will probably miss the meeting.

I propose one of the following alternatives:

* either all timestamps are considered UTC and they dynamically change
with the timezone of the system where Emacs is running
* timestamps come with timezone so the user can see what time the
meeting was scheduled at.

Thanks for taking the time to read this. I welcome any feedback on this
as I'm interested in how other people are solving this sort of problem.

[O] [proposal] better documentation around syntax highlighting Org-Mode code blocks when exporting to LaTeX

2015-03-17 Thread Randomcoder

While writing technical documents, as a programmer and an Org-Mode user,
for me it's important to have ways to syntax highlight code blocks when
exporting them to LaTeX.

While I am aware of the customizations that need to be done
to Org-Mode's configuration in order to get that to work, in
particular customizing these variables(see [1] for details):

* org-latex-listings
* org-latex-custom-lang-environments
* org-latex-minted-options

and having tried them, I got this working for one document, but it
really felt like a lot of trial-and-error and a lot of room for error
on my side as a user.

Although this is Org-Mode and it is supposed to be very customizable
(like Emacs is), I still believe the documentation and the implementation
can be improved on this.

I think there's even reason to believe that this should be working out
of the box. The only reason I see for this not being the default setting
is to not add pygments [2] as a dependency. Still, I think it should be
much easier for me as a user to spend less time getting it to work.

I welcome any feedback on this.

Thank you for taking the time to read my proposal.

[1] http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-2
[2] http://pygments.org/

[O] Bug: columns in tables with fixed length affected by folded links

2015-03-17 Thread Randomcoder

I've noticed that if I have a table like this:

| l30  | l85
| Question   | Answer   
|Stuff   |  
|| [[http://very-long-link/][text that would 
fit the column fixed width]] |

And I do  C-c C-c (or M-x org-table-align) and 
org-toggle-link-display to fold the link, it still shows up as = which means
that Org-Mode has taken into consideration the actual length of the entire link
when it did the folding. Instead, I propose that it only takes
into consideration the length of the link text.

I'm not sure what part of the code is responsible for this.

I am reporting this as a bug here on the mailing list.

[O] [proposal] enhancement of Org-Mode tables and related features

2015-03-17 Thread Randomcoder

1) Org-Mode tables currently do not have an easy way to format each
cell individually.  For regular text, I can select a region and do M-x
fill-paragraph and that works fine, but for Org-Mode tables, I cannot
do that.  Yes, I know about M-x org-table-wrap-region , I have tried to
use it for a few hours, read the manuals, read pages that talked about
it and I was unable to get it working.

2) As a user, I'd also really appreciate M-x RET to work better.
Currently if I go somewhere on a line and run that, the text until
the end of that line is deleted and prepended to the start of the next
line. So, by doing that, I solved the length of the text on the current
line, but now I moved the problem to the next line, where the text is
again longer than it should be.

3) I've used C-c ` a few times and tried to make sense of it. As far
as I can tell it only works for one line.
For me personally, in order for C-c ` to be useful, I would expect 
it to work on the entire table cell, not just one line in the table cell.

These are my suggestions for improvements. I welcome feedback on them.

Thanks for taking the time to read this

[O] Bug: columns in tables with fixed length affected by folded links

2015-03-16 Thread Randomcoder

I've noticed that if I have a table like this:

| l30  | l85
| Question   | Answer   
|Stuff   |  
|| [[http://very-long-link/][text that would 
fit the column fixed width]] |

And I do  C-c C-c (or M-x org-table-align) and 
org-toggle-link-display to fold the link, it still shows up as = which means
that Org-Mode has taken into consideration the actual length of the entire link
when it did the folding. Instead, I propose that it only takes
into consideration the length of the link text.

I'm not sure what part of the code is responsible for this.

I am reporting this as a bug here on the mailing list.