* [PATCH] Display invisible entry text at point when visiting a task from the agenda
@ 2011-01-01 13:33 Bernt Hansen
2011-01-03 12:18 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Bernt Hansen @ 2011-01-01 13:33 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Bernt Hansen
* lisp/org-agenda.el (org-agenda-goto): Display invisible entry text
* lisp/org-agenda.el (org-agenda-switch-to): Display invisible entry text
Visiting clock lines with RET or TAB in the agenda can put point on a
folded clock drawer. This means you are editing invisible/hidden text
inside the task entry. Now when moving to invisible regions show the
entry so point is always visible.
---
Hi,
I regularly visit clock line details from the agenda (C-u l then TAB or
RET on a clock line or state change log entry line). My clocks and state changes
are in two separate drawers :CLOCK: and :LOGBOOK: respectively.
Visiting lines inside drawers are normally folded for me and the point is
buried in invisible text.
This patch is available at git://git.norang.ca/org-mode.git agenda-visit-shows-entry
Happy New Year all!
-Bernt
lisp/org-agenda.el | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f787240..bf36758 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6486,7 +6486,9 @@ and by additional input from the age of a schedules or deadline entry."
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
- (org-flag-heading nil)))) ; show the next heading
+ (org-flag-heading nil)))) ; show the next heading
+ (when (outline-invisible-p)
+ (show-entry)) ; display invisible text
(recenter (/ (window-height) 2))
(run-hooks 'org-agenda-after-show-hook)
(and highlight (org-highlight (point-at-bol) (point-at-eol)))))
@@ -6672,7 +6674,9 @@ at the text of the entry itself."
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
- (org-flag-heading nil))))))) ; show the next heading
+ (org-flag-heading nil))) ; show the next heading
+ (when (outline-invisible-p)
+ (show-entry)))))) ; display invisible text
(defun org-agenda-goto-mouse (ev)
"Go to the Org-mode file which contains the item at the mouse click."
--
1.7.4.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Display invisible entry text at point when visiting a task from the agenda
2011-01-01 13:33 [PATCH] Display invisible entry text at point when visiting a task from the agenda Bernt Hansen
@ 2011-01-03 12:18 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2011-01-03 12:18 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Applied, thanks.
- Carsten
On Jan 1, 2011, at 2:33 PM, Bernt Hansen wrote:
> * lisp/org-agenda.el (org-agenda-goto): Display invisible entry text
> * lisp/org-agenda.el (org-agenda-switch-to): Display invisible entry
> text
>
> Visiting clock lines with RET or TAB in the agenda can put point on a
> folded clock drawer. This means you are editing invisible/hidden text
> inside the task entry. Now when moving to invisible regions show the
> entry so point is always visible.
> ---
> Hi,
>
> I regularly visit clock line details from the agenda (C-u l then TAB
> or
> RET on a clock line or state change log entry line). My clocks and
> state changes
> are in two separate drawers :CLOCK: and :LOGBOOK: respectively.
>
> Visiting lines inside drawers are normally folded for me and the
> point is
> buried in invisible text.
>
> This patch is available at git://git.norang.ca/org-mode.git agenda-
> visit-shows-entry
>
> Happy New Year all!
>
> -Bernt
>
> lisp/org-agenda.el | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index f787240..bf36758 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6486,7 +6486,9 @@ and by additional input from the age of a
> schedules or deadline entry."
> (org-show-context 'agenda)
> (save-excursion
> (and (outline-next-heading)
> - (org-flag-heading nil)))) ; show the next heading
> + (org-flag-heading nil)))) ; show the next heading
> + (when (outline-invisible-p)
> + (show-entry)) ; display invisible text
> (recenter (/ (window-height) 2))
> (run-hooks 'org-agenda-after-show-hook)
> (and highlight (org-highlight (point-at-bol) (point-at-eol)))))
> @@ -6672,7 +6674,9 @@ at the text of the entry itself."
> (org-show-context 'agenda)
> (save-excursion
> (and (outline-next-heading)
> - (org-flag-heading nil))))))) ; show the next heading
> + (org-flag-heading nil))) ; show the next heading
> + (when (outline-invisible-p)
> + (show-entry)))))) ; display invisible text
>
> (defun org-agenda-goto-mouse (ev)
> "Go to the Org-mode file which contains the item at the mouse
> click."
> --
> 1.7.4.rc0
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-03 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-01 13:33 [PATCH] Display invisible entry text at point when visiting a task from the agenda Bernt Hansen
2011-01-03 12:18 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).