mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-30 03:20:01 +00:00
org-w3m.el: Always deactivate the mark after copying.
Patch from Andy Steward.
This commit is contained in:
parent
0ccc48c78a
commit
c52ec32582
|
@ -1,5 +1,8 @@
|
||||||
2009-01-06 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-01-06 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-w3m.el (org-w3m-copy-for-org-mode): Always deactivate the
|
||||||
|
mark after copying.
|
||||||
|
|
||||||
* org-agenda.el (org-run-agenda-series): Have series options set
|
* org-agenda.el (org-run-agenda-series): Have series options set
|
||||||
when finalizing the agenda.
|
when finalizing the agenda.
|
||||||
|
|
||||||
|
|
|
@ -43,16 +43,6 @@
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(declare-function w3m-anchor "ext:w3m-util" (position))
|
(declare-function w3m-anchor "ext:w3m-util" (position))
|
||||||
|
|
||||||
(defgroup org-w3m nil
|
|
||||||
"Transforming the HTML content in w3m buffer with org-mode style."
|
|
||||||
:group 'org)
|
|
||||||
|
|
||||||
(defcustom org-w3m-deactivate-mark t
|
|
||||||
"Non-nil means, deactivate mark after copying and region in Org-mode style.
|
|
||||||
When nil, keep the region active."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'org-w3m)
|
|
||||||
|
|
||||||
(defun org-w3m-copy-for-org-mode ()
|
(defun org-w3m-copy-for-org-mode ()
|
||||||
"Copy current buffer content or active region with `org-mode' style links.
|
"Copy current buffer content or active region with `org-mode' style links.
|
||||||
This will encode `link-title' and `link-location' with
|
This will encode `link-title' and `link-location' with
|
||||||
|
@ -69,8 +59,7 @@ so that it can be yanked into an Org-mode buffer with links working correctly."
|
||||||
(setq transform-start (region-beginning))
|
(setq transform-start (region-beginning))
|
||||||
(setq transform-end (region-end))
|
(setq transform-end (region-end))
|
||||||
;; Deactivate mark if current mark is activate.
|
;; Deactivate mark if current mark is activate.
|
||||||
(if org-w3m-deactivate-mark
|
(if (fboundp 'deactivate-mark) (deactivate-mark)))
|
||||||
(deactivate-mark)))
|
|
||||||
(message "Transforming links...")
|
(message "Transforming links...")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char transform-start)
|
(goto-char transform-start)
|
||||||
|
|
Loading…
Reference in a new issue