[O] Documentation error/bug regarding checkboxes

2014-02-12 Thread E Sabof
According to the footnote [3] on http://orgmode.org/manual/Checkboxes.html, if 
I press C-u C-c C-c on the first item of a list, all items on that list will 
get checkboxes. However only the first one does.

Evgeni



Re: [O] Documentation error/bug regarding checkboxes

2014-02-12 Thread E Sabof

Josiah Schwab jsch...@gmail.com writes:

 I just tried C-u C-c C-c on the following list and it worked as documented.

 + foo
 + bar
 + baz

 I am using the current maint branch.

Actually I did it like this:

+ |foo
+ bar
+ baz

If I do this instead, it works as you've said:

|+ foo
+ bar
+ baz

I've switch to the maint branch as well, for the purposes of the experiment.

Evgeni



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread E Sabof
Bastien b...@gnu.org writes:

 Thanks.  Why is it more useful than

 (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)

 ?

It's more targeted -- I don't use dot that often, and I'd rather not have an 
additional side effect when executing any org-babel snippet.

Evgeni



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-06 Thread E Sabof

Bastien b...@altern.org writes:

 Ok, thanks.  I'd rather have ob-dot.el and friends have their own
 hooks (e.g. org-babel-execute:dot-hook).  But I'm not yet convince,
 as `org-redisplay-inline-images' is already bound to `C-c C-x C-M-v'.

I'm not a heavy babel user, but maybe something like this could be run from 
each time babel evaluates a block. A person wanting to run code for one 
language, but not another seems reasonable.

(let* ((language (the-language-being-executed)))
  (run-hooks (intern (format org-babel-execute:%s-hook language

Alternatively a variable similar to org-babel-last-executed-language could be 
set before the existing hook runs, and customizations could be made from there.

Evgeni



[O] Auto-refreshing rendered images from org-babel

2014-02-05 Thread E Sabof
I have the org snippet below. What I would like, is to see the rendered image 
when I press C-c C-c. I can achieve this with the elisp snippet below. Is there 
a proper, or at least a better way of doing this?

Evgeni


#+BEGIN_SRC dot :file files/graphviz/example1.png
digraph test {
size=6,5;
home [label = Home];
prod [label = Products];
news [label = News];
cont [label = Contact];

home - {prod news cont}
}
#+END_SRC


(org-babel-do-load-languages
 'org-babel-load-languages
 '((dot . t)
   ))

(defadvice org-babel-execute:dot (after refresh-images activate)
  (run-with-timer 1 nil 'org-display-inline-images))



Re: [O] Auto-refreshing rendered images from org-babel

2014-02-05 Thread E Sabof
Thanks. I've changed it to the version below, which covers my needs. I think it 
would make sense as a (default?) feature for ob-dot, ob-ditaa, and any other 
babel language that renders images.

Evgeni

;; Must be defined in a lexical environment
(defun es-org-babel-refresh-images-after-execution ()
  (let (refresh-and-remove-self)
(setq refresh-and-remove-self
  (lambda ()
(org-redisplay-inline-images)
(remove-hook 'org-babel-after-execute-hook
 refresh-and-remove-self)))
(add-hook 'org-babel-after-execute-hook refresh-and-remove-self)))

(defadvice org-babel-execute:dot (after refresh-images activate)
  (es-org-babel-refresh-images-after-execution))


Bastien b...@gnu.org writes:

 E Sabof esa...@gmail.com writes:

 I have the org snippet below. What I would like, is to see the
 rendered image when I press C-c C-c. I can achieve this with the elisp
 snippet below. Is there a proper, or at least a better way of doing
 this?

 Not tested but should work:

 (add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)

 HTH,



Re: [O] bug#14346: 24.3; beginning-of-visual-line jumps to previous line in org-mode

2013-05-06 Thread E Sabof
Even if the behavior doesn't change (soon), could the equivalent of the
following be implemented in org-mode? It's the only place where this has
been problematic for me.

(defadvice org-beginning-of-line (after smart-point-adjustment activate)
  (setq disable-point-adjustment
(or (not (invisible-p (point)))
(not (invisible-p (max (point-min) (1- (point

(defadvice org-end-of-line (after smart-point-adjustment activate)
  (setq disable-point-adjustment
(or (not (invisible-p (point)))
(not (invisible-p (max (point-min) (1- (point

Evgeni


On Sat, May 4, 2013 at 2:27 PM, E Sabof esa...@gmail.com wrote:

 Wouldn't it be better if forward/backward-char kept the old behavior, and
 the rest of the commands did something similar to this in the end:

 (setq disable-point-adjustment
   (preceding-or-following-character-visible-p))

 I'm not entirely sure whether it would be better, but at the moment, I
 can't think of a case where it wouldn't.

 Evgeni


 On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii e...@gnu.org wrote:

  Date: Sat, 4 May 2013 12:17:35 +0100
  From: E Sabof esa...@gmail.com
  Cc: 14...@debbugs.gnu.org
 
  I see what you mean. But it still looks like a bug - whether I follow
 the
  above recipe, or press C-e C-a, the point will (should?) go to the same
  position, but the behavior is different.

 The behavior depends on the direction point was moving before ending
 up in the invisible text.  It's a heuristic, and as every heuristic,
 it sometimes fails.





Re: [O] org-bullets extension

2013-02-20 Thread E Sabof
In any case, I've updated org-bullets to use compose-region. You can get it
from here:

https://github.com/sabof/org-bullets

Evgeni


On Wed, Feb 13, 2013 at 7:40 AM, E Sabof esa...@gmail.com wrote:

 I tend to agree. It might also be better to enable it by default. At the
 same time I'm not very familiar with org code base, so I'm probably not the
 best person to do it.

 Btw, the current version of org-bullets makes it possible to use a
 separate face for the bullets. It might make sense to implement that as
 well.

 Evgeni


 On Mon, Feb 11, 2013 at 5:38 PM, Bastien b...@altern.org wrote:

 E Sabof esa...@gmail.com writes:

  What is the current status of the package? Was it accepted? Was it
  superseded?

 org-bullets.el is in the contrib/ directory.

  If it wasn't superseded, I might spend some time re-implementing it.

 I think it would be nice to adapt Jambunathan's solution for Org's
 core: something like a `org-replace-leading-stars' that, when non-nil,
 would be used as the char/string for compose-region.  Then users could
 turn this on/off using #+STARTUP.

 What do you think?

 --
  Bastien





Re: [O] org-bullets extension

2013-02-12 Thread E Sabof
I tend to agree. It might also be better to enable it by default. At the
same time I'm not very familiar with org code base, so I'm probably not the
best person to do it.

Btw, the current version of org-bullets makes it possible to use a separate
face for the bullets. It might make sense to implement that as well.

Evgeni


On Mon, Feb 11, 2013 at 5:38 PM, Bastien b...@altern.org wrote:

 E Sabof esa...@gmail.com writes:

  What is the current status of the package? Was it accepted? Was it
  superseded?

 org-bullets.el is in the contrib/ directory.

  If it wasn't superseded, I might spend some time re-implementing it.

 I think it would be nice to adapt Jambunathan's solution for Org's
 core: something like a `org-replace-leading-stars' that, when non-nil,
 would be used as the char/string for compose-region.  Then users could
 turn this on/off using #+STARTUP.

 What do you think?

 --
  Bastien



Re: [O] org-bullets extension

2013-01-27 Thread E Sabof
What is the current status of the package? Was it accepted? Was it
superseded?

If it wasn't superseded, I might spend some time re-implementing it.

Evgeni


On Tue, Dec 18, 2012 at 11:05 AM, Bastien b...@altern.org wrote:

 Hi Jambunathan,

 Jambunathan K kjambunat...@gmail.com writes:

  (font-lock-add-keywords
   'org-mode `((\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)
(0 (progn (compose-region
   (match-beginning 1) (match-end 1)
   (pcase (length (match-string 1))
 (1 ?\u2219)
 (2 ?\u2022)
 (3 ?\u25c9)
 (_ ?\u25CB)))
  nil)

 This does convert all headlines characters (*+) to a single
 unicode character.  Close to what many users are looking for,
 but extending this snippet to handle converting several *
 characters would come closer.

 Are you working on this?  If so, could this be a minor mode?

 Thanks,

 --
  Bastien



Re: [O] Bug: org-time-stamp sometimes moves my cursor to another monitor ( [7.8.11]

2013-01-06 Thread E Sabof
In emacs -Q
(setq mouse-autoselect-window t)
M-x org-mode
C-c .
The cursor will move.

Sometimes it will move the cursor on top of another frame, which will
become active on my computer, since my window manager is also
cursor-sensitive.



On Sun, Jan 6, 2013 at 7:58 AM, Bastien b...@altern.org wrote:

 Hi,

 E Sabof esa...@gmail.com writes:

  The culprit has proved to be the last line of this function, which I
  commented out in my config:

 Please provide a way to reproduce the bug.

 Thanks,

 --
  Bastien



Re: [O] Bug: org-time-stamp sometimes moves my cursor to another monitor ( [7.8.11]

2013-01-06 Thread E Sabof
Apparently what doesn't work is (select-frame-set-input-focus), which might
have something to do with calendar appearing in a separate frame depending
on the value of calendar-setup.
Meaning it's probably either an emacs bug, an xmonad bug or a xinerama bug.


On Sun, Jan 6, 2013 at 8:46 AM, E Sabof esa...@gmail.com wrote:

 In emacs -Q
 (setq mouse-autoselect-window t)
 M-x org-mode
 C-c .
 The cursor will move.

 Sometimes it will move the cursor on top of another frame, which will
 become active on my computer, since my window manager is also
 cursor-sensitive.



 On Sun, Jan 6, 2013 at 7:58 AM, Bastien b...@altern.org wrote:

 Hi,

 E Sabof esa...@gmail.com writes:

  The culprit has proved to be the last line of this function, which I
  commented out in my config:

 Please provide a way to reproduce the bug.

 Thanks,

 --
  Bastien





[O] Bug: org-time-stamp sometimes moves my cursor to another monitor ( [7.8.11]

2013-01-05 Thread E Sabof
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


The culprit has proved to be the last line of this function, which I
commented out in my config:

(defun org-eval-in-calendar (form optional keepdate)
Eval FORM in the calendar window and return to current window.
Also, store the cursor date in variable org-ans2.
(let ((sf (selected-frame))
  (sw (selected-window)))
  (select-window (get-buffer-window *Calendar* t))
  (eval form)
  (when (and (not keepdate) (calendar-cursor-to-date))
(let* ((date (calendar-cursor-to-date))
   (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2
date
  (setq org-ans2 (format-time-string %Y-%m-%d time
  (move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
  (select-window sw)
  ;; (org-select-frame-set-input-focus sf)
  ))

At least superficially, it would seem that with-current-buffer could be
used instead

Emacs  : GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.24.10)
 of 2012-10-20 on ubuntu
Package: Org-mode version 7.8.11


[O] Fwd: org-bullets extension

2012-12-15 Thread E Sabof
* Currently the bullets get painted with background color on occasion.
* Overlays are easy to turn on/off. Same might be true for font-lock, I
just haven't figured out a way.
* Org-bullets conflict with overlay-heavy modes (ex. org-columns). This
probably won't be the case with font-lock.
* An important point is that in my version every character in text
translates to a single character on display. Which makes it easier to work
with headlines.

In any case, I'm open to the possibility that this approach might lead to a
better/shorter solution.

On Sat, Dec 15, 2012 at 9:10 AM, Jambunathan K kjambunat...@gmail.comwrote:

 I think what the package does can be achieved by the following snippet
 or with minor tweaks to it.  Is my understanding correct?

 (font-lock-add-keywords
  'org-mode `((\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)
   (0 (progn (compose-region
  (match-beginning 1) (match-end 1)
  (pcase (length (match-string 1))
(1 ?\u2219)
(2 ?\u2022)
(3 ?\u25c9)
(_ ?\u25CB)))
 nil)