[O] [patchattached] Store link to url of eww

2014-09-23 Thread marcowahlsoft
Hello all,

since eww comes bundled with Emacs nowadays it feels natural to be able
store a link to the current url of an eww buffer.  This functionality
has already been in place for w3m for a while.

Find a respective patch attached.  I hope the fact that the patch is
attached is acceptable as well as the patch itself.


Best wishes,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2
From a4ead864a14931ef2a8dd43719fb6ee90861d346 Mon Sep 17 00:00:00 2001
From: Marco Wahl marcowahls...@gmail.com
Date: Tue, 23 Sep 2014 09:46:34 +0200
Subject: [PATCH] org-eww: Org-module to store url from eww

* contrib/lisp/org-eww.el: New file

* contrib/lisp/org-eww.el(org-eww-store-link): Hook to store a link.

* contrib/README: Added a line for the org-eww.

* lisp/org.el (org-modules): Add org-eww to the pool of org-modules.

The hook gets hooked in the module.

The file is more or less a fraction of the org-w3m module with 'w3m'
replaced by 'eww'.

TINYCHANGE
---
 contrib/README  |  1 +
 contrib/lisp/org-eww.el | 54 +
 lisp/org.el |  1 +
 3 files changed, 56 insertions(+)
 create mode 100644 contrib/lisp/org-eww.el

diff --git a/contrib/README b/contrib/README
index e92da14..7bffeee 100644
--- a/contrib/README
+++ b/contrib/README
@@ -29,6 +29,7 @@ org-element.el   --- Parser and applications for Org syntax
 org-elisp-symbol.el  --- Org links to emacs-lisp symbols
 org-eval-light.el--- Evaluate in-buffer code on demand
 org-eval.el  --- The lisp tag, adapted from Muse
+org-eww.el   --- Store link to url of eww
 org-expiry.el--- Expiry mechanism for Org entries
 org-export-generic.el--- Export framework for configurable backends
 org-git-link.el  --- Provide org links to specific file version
diff --git a/contrib/lisp/org-eww.el b/contrib/lisp/org-eww.el
new file mode 100644
index 000..c25057d
--- /dev/null
+++ b/contrib/lisp/org-eww.el
@@ -0,0 +1,54 @@
+;;; org-eww.el --- Storing link in eww-mode for Org-mode
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Marco Wahl marcowahlsoftagmailcom
+;; Keywords: link, eww
+;; Homepage: http://orgmode.org
+;;
+;; This file is not part of GNU Emacs.
+;;
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+
+
+;;; Commentary:
+
+;; When this module is active `org-store-link' (often on key C-c l) in
+;; a eww buffer stores a link to the current url of the eww buffer.
+
+;; `org-eww-store-link' below is almost the same as
+;; `org-w3m-store-link' of the org-w3m module.
+
+;; Hint: There are further features in module org-w3m which might be
+;; interesting for org-eww also.
+
+
+;;; Code:
+
+(require 'org)
+
+(add-hook 'org-store-link-functions 'org-eww-store-link)
+(defun org-eww-store-link ()
+  Store a link to the url of a eww buffer.
+  (when (eq major-mode 'eww-mode)
+(org-store-link-props
+ :type eww
+ :link eww-current-url
+ :url (url-view-url t)
+ :description (or eww-current-title eww-current-url
+
+
+(provide 'org-eww)
+
+;;; org-eww.el ends here
diff --git a/lisp/org.el b/lisp/org.el
index b09e72d..0bf91d3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -640,6 +640,7 @@ For export specific modules, see also `org-export-backends'.
 	(const :tag C  eshell Support for links to working directories in eshell org-eshell)
 	(const :tag C  eval-light:Evaluate inbuffer-code on demand org-eval-light)
 	(const :tag C  eval:  Include command output as text org-eval)
+	(const :tag C  eww:   Store link to url of eww org-eww)
 	(const :tag C  expiry:Expiry mechanism for Org-mode entries org-expiry)
 	(const :tag C  favtable:  Lookup table of favorite references and links org-favtable)
 	(const :tag C  git-link:  Provide org links to specific file version org-git-link)
-- 
2.1.0



[O] [PATCH] Fix to determine a bulk-markable line

2014-09-20 Thread marcowahlsoft

* lisp/org-agenda.el (org-agenda-bulk-mark,
  org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): This fixes
  e.g. org-agenda-bulk-mark-all when time-grid is shown.

TINYCHANGE
---
 lisp/org-agenda.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dbc9861..1bec8dc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9680,7 +9680,7 @@ This is a command that has to be installed in 
`calendar-mode-map'.
  (overlay-put ov 'type 'org-marked-entry-overlay))
(end-of-line 1)
(or (ignore-errors
- (goto-char (next-single-property-change (point) 'txt)))
+ (goto-char (next-single-property-change (point) 'org-hd-marker)))
(beginning-of-line 2))
(while (and (get-char-property (point) 'invisible) (not (eobp)))
  (beginning-of-line 2))
@@ -9698,7 +9698,7 @@ This is a command that has to be installed in 
`calendar-mode-map'.
   (let ((entries-marked 0) txt-at-point)
 (save-excursion
   (goto-char (point-min))
-  (goto-char (next-single-property-change (point) 'txt))
+  (goto-char (next-single-property-change (point) 'org-hd-marker))
   (while (and (re-search-forward regexp nil t)
  (setq txt-at-point (get-text-property (point) 'txt)))
(when (string-match regexp txt-at-point)
@@ -9734,7 +9734,7 @@ This is a command that has to be installed in 
`calendar-mode-map'.
   (save-excursion
 (goto-char (point-min))
 (while (ignore-errors
-(goto-char (next-single-property-change (point) 'txt)))
+(goto-char (next-single-property-change (point) 'org-hd-marker)))
   (org-agenda-bulk-toggle
 
 (defun org-agenda-bulk-toggle ()
-- 
2.1.0





Re: [O] [PATCH][mini] bulk-mark-regexp and -toggle also with time grid

2014-09-20 Thread marcowahlsoft
Hi Nicolas,

 Mark all entries for future agenda bulk action.
 Currently this is not true if there is a time grid in the agenda buffer.

 Please consider to apply the attached patch.
 ...

 Would you mind providing a proper commit message (don't forget the
 TINYCHANGE at the end) and send it again using git format-patch?

I did my very best.  See the respective post.  It's actually been my
first git format-patch.  Hopefully it's useful for the integration.


Best regards,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2




Re: [O] [PATCH][mini] bulk-mark-regexp and -toggle also with time grid

2014-09-19 Thread marcowahlsoft
 (org-agenda-bulk-mark-all)

 Mark all entries for future agenda bulk action.

 Currently this is not true if there is a time grid in the agenda buffer.

 Please consider to apply the attached patch.

I forgot one line in the previous patch.  Please consider the new patch only.

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dbc9861..1bec8dc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9680,7 +9680,7 @@ This is a command that has to be installed in `calendar-mode-map'.
 	  (overlay-put ov 'type 'org-marked-entry-overlay))
 	(end-of-line 1)
 	(or (ignore-errors
-	  (goto-char (next-single-property-change (point) 'txt)))
+	  (goto-char (next-single-property-change (point) 'org-hd-marker)))
 	(beginning-of-line 2))
 	(while (and (get-char-property (point) 'invisible) (not (eobp)))
 	  (beginning-of-line 2))
@@ -9698,7 +9698,7 @@ This is a command that has to be installed in `calendar-mode-map'.
   (let ((entries-marked 0) txt-at-point)
 (save-excursion
   (goto-char (point-min))
-  (goto-char (next-single-property-change (point) 'txt))
+  (goto-char (next-single-property-change (point) 'org-hd-marker))
   (while (and (re-search-forward regexp nil t)
 		  (setq txt-at-point (get-text-property (point) 'txt)))
 	(when (string-match regexp txt-at-point)
@@ -9734,7 +9734,7 @@ This is a command that has to be installed in `calendar-mode-map'.
   (save-excursion
 (goto-char (point-min))
 (while (ignore-errors
-	 (goto-char (next-single-property-change (point) 'txt)))
+	 (goto-char (next-single-property-change (point) 'org-hd-marker)))
   (org-agenda-bulk-toggle
 
 (defun org-agenda-bulk-toggle ()


Sorry for the extra noise,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2


[O] [PATCH][mini] bulk-mark-regexp and -toggle also with time grid

2014-09-18 Thread marcowahlsoft
Hi!

From the documentation for * in an agenda-buffer (C-h k *):

--8---cut here---start-8---
* runs the command org-agenda-bulk-mark-all (found in
  org-agenda-mode-map), which is an interactive compiled Lisp function
  in `org-agenda.el'.

It is bound to *, menu-bar Agenda Bulk action Mark all.

(org-agenda-bulk-mark-all)

Mark all entries for future agenda bulk action.
--8---cut here---end---8---

Currently this is not true if there is a time grid in the agenda buffer.

--8---cut here---start-8---
G runs the command org-agenda-toggle-time-grid (found in...
--8---cut here---end---8---

Please consider to apply the attached patch.


Ciao,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dbc9861..c8808e5 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9680,7 +9680,7 @@ This is a command that has to be installed in `calendar-mode-map'.
 	  (overlay-put ov 'type 'org-marked-entry-overlay))
 	(end-of-line 1)
 	(or (ignore-errors
-	  (goto-char (next-single-property-change (point) 'txt)))
+	  (goto-char (next-single-property-change (point) 'org-hd-marker)))
 	(beginning-of-line 2))
 	(while (and (get-char-property (point) 'invisible) (not (eobp)))
 	  (beginning-of-line 2))
@@ -9734,7 +9734,7 @@ This is a command that has to be installed in `calendar-mode-map'.
   (save-excursion
 (goto-char (point-min))
 (while (ignore-errors
-	 (goto-char (next-single-property-change (point) 'txt)))
+	 (goto-char (next-single-property-change (point) 'org-hd-marker)))
   (org-agenda-bulk-toggle
 
 (defun org-agenda-bulk-toggle ()


[O] Docu bug for key of 'org-babel-load-in-session'

2014-07-14 Thread marcowahlsoft
Hi!

I think the texi documentation of the key triggering
'org-babel-load-in-session' is not up to date.  The documentation says
'C-up' but it looks like it should be 'M-up'.

Suggestion for a patch:

Modified   doc/org.texi
diff --git a/doc/org.texi b/doc/org.texi
index b21c93d..05c1575 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -15792,6 +15792,6 @@ are active:
 @kindex C-c C-o
 @item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result}
-@kindex C-up
-@item @kbd{C-@key{up}}@tab @code{org-babel-load-in-session}
+@kindex M-up
+@item @kbd{M-@key{up}}@tab @code{org-babel-load-in-session}
 @kindex M-down
 @item @kbd{M-@key{down}}  @tab @code{org-babel-pop-to-session}


My 1 ₰,  Marco
-- 
http://www.wahlzone.de




[O] Latest Speed Keys D and U behavior

2014-06-23 Thread marcowahlsoft
Hi,

In the past speed key D (analog U) on a headline moved the whole
subtree down.  In the latest org-mode version the effect of speed key
D is to move the headline (and only just the headline) down.  BTW this
change of behavior is due to a change in `org-shiftmetadown' AFAICT.

Is the user who wants the old behavior back supposed to configure
`org-speed-commands-user' with `org-metadown'?

Personal note: I used those keys a lot as I can clearly observe since
their functionality changed.  And I vote for giving the speed keys D
and U back their old functionality.


Best regards,  Marco
-- 
Marco Wahl -- Freelancer