* lisp/org-protocol.el: (org-protocol-do-capture) Don't push link to
kill-ring when invoking `org-protocol-capture'. Otherwise,
`org-protocol-do-capture' interferes with capture templates that
insert the contents of the clipboard or the kill ring.
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Do
not catch every error so as to ease old style support. Re-format
code to fit within 80 columns.
Reported-by: Adam Porter <adam@alphapapa.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/113102>
* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
curvy quotes in help echo (in emacs 25.1).
* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.
The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):
http://thread.gmane.org/gmane.emacs.orgmode/105594
Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).
So below will render that single quote as curly.
(message "C-c '")
The fix (Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html)
is to print that quote verbatim using the "%s" modifier:
(message "%s" "C-c '")
Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that. Instead \\[COMMAND]
should be used directly in the string.
* lisp/org-protocol.el: Update documentation.
(org-protocol-store-link, org-protocol-capture,
org-protocol-open-source): Accept new-style links.
(org-protocol-check-filename-for-protocol): Update documentation.
(org-protocol-parse-parameters, org-protocol-assign-parameters):
New functions.
This allows the use of org-protocol on KDE 5 and makes org-protocol
links more URI-like. New-style links are of the form:
org-protocol://store-link?title=TITLE&url=URL
* testing/lisp/test-org-protocol.el: New file.
These changes are the combination of the commits below (in order
applied). Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits. Changes to message and help quote
display for Emacs 25 seem to be here to stay. The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.
Quoting fixes in lisp/org
6cd2629bd1b3ce77d29ac28e29237c94a4197116
Paul Eggert
Mon Aug 31 00:29:40 2015 -0700
More-conservative ‘format’ quote restyling
fbb5531fa11d13854b274d28ccd329c9b6652cfc
Paul Eggert
Sun Aug 23 22:39:06 2015 -0700
Prefer directed to neutral quotes
875a5d0ead827d3da32ecbd30e739a29f07bbc87
Paul Eggert
Mon Aug 24 23:57:25 2015 -0700
Escape ` and ' in doc
19532d147b431a4fe34f088d6de07891c48e2c5c
Paul Eggert
Tue Sep 1 18:23:21 2015 -0700
Fix some more docstring etc. quoting problems
26bd978d87dfbf9baa115cd961a67d42b416c4bf
Paul Eggert
Thu Sep 3 15:32:54 2015 -0700
Go back to grave quoting in source-code docstrings etc.
6afef3f6ca2f3009c722b84e249903b7f807b044
Paul Eggert
Mon Sep 7 16:09:27 2015 -0700
Add changes from Emacs repo that should have been backported with
bb77dd2.
Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
* lisp/org-protocol.el: (org-protocol-convert-query-to-plist): New
function.
(org-protocol-do-capture): Use new function.
(org-protocol-data-separator): Change default separator.
When org-protocol's url has query, org-capture get query using
plist-get from store-link. For example:
Url is "org-protocol:/capture:/URL/TITLE/BODY?key=value"
org-capture can get (:key value) with (plist-get org-store-link-plist :query).
TINYCHANGE
* org-protocol.el:
* org-bibtex.el: Remove remember support.
* org-clock.el (org-clock-heading-for-remember): Delete.
(org-clock-in): Do not set the heading for remember.
Users are encouraged to migrate their remember templates to
`org-capture-templates' instead of `org-remember-templates'.
See `org-capture-import-remember-templates' on how to ease
the transition.
* lisp/org-compat.el (org-define-obsolete-function-alias,
org-define-obsolete-variable-alias): Introduce new compatibility
macros to obsolete functions and variables.
* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
`org-define-obsolete-{function,variable}-alias´instead of
`define-obsolate{function,variable}-alias´.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* org-protocol.el (org-protocol-do-capture): allow template
keys of two characters.
(org-protocol-default-template-key): Update the docstring to
reflect the change in `org-protocol-do-capture'.
* org-protocol.el (org-protocol-unhex-single-byte-sequence)
(org-protocol-unhex-string, org-protocol-unhex-compound): Change date
of obsolete declaration to 2011-02-17.
* org-protocol.el (org-protocol-unhex-string)
(org-protocol-unhex-compound)
(org-protocol-unhex-single-byte-sequence): Declare obsolete and
alias to respective org-link-unescape-* functions.
* org-macs.el (org-char-to-string): Inline function to properly decode
utf8 characters in Emacs 22. Moved and renamed from org-protocol.el.
* org-protocol.el (org-protocol-unhex-compound): Use renamed inline
function.
* org-protocol.el (org-protocol-unhex-single-byte-sequence): New
function. Decode hex-encoded singly byte sequences.
(org-protocol-unhex-compound): Use new function if decoding sequence
as unicode character failed.
* org-protocol.el (org-protocol-unhex-string): Normalize percent
escape sequence to upper case letters.
Otherwise the underlying function produces wrong results for percent
escape sequences that happen to use lower case characters.
Hi Carsten,
this little patch fixes an issue Richard brought up.
We always used the "w" template as the default for `org-remember' and
also used it for `org-capture' for historical reasons.
Unfortunately, this breaks, if the user has no "w" template defined.
The patch below simply set's the custom variable
`org-protocol-default-template-key' to nil, so the interactive template
selection is used by default. This works for both, remember an capture.
I will adjust the docs, once the patch is applied.
Thanks,
Sebastian
This patch removes an obsolete declaration and call of the function
`org-publish-initialize-files-alist' from org-protocol.el.
This function does not exist anymore. It was removed when we
implemented the new publishing cache.
Best wishes
Sebastian
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 3 Why a new name?
> ~~~~~~~~~~~~~~~~~~
>
> I have - at least for now - chosen a new name for the new setup:
> ` org-capture'. There are two reasons for this:
In the manual it is "Capture - Refile - Archive". I remember searching
for "Remember" and never found it :)
> 5 Setup
> ~~~~~~~~
>
> To use the new setup, do the following:
>
> 1. Run
>
> M-x org-capture-import-remember-templates RET
Worked perfectly here :)
I tested all my important templates and they work.
Abandoning org-remember seems painless.
> '(("t" "templates adding table lines")
> ("ta" "add to table a" table-line (file+headline "~/notes.org" "Table A))
> ("tb" "add to table b" table-line (file+headline "~/notes.org" "Table B))
> ("tc" "add to table c" table-line (file+headline "~/notes.org" "Table C)))
>
> When starting capture, you can then first press "t" and then see
> the individual options.
This is great. Number of templates is constantly growing and the new
features will increase the speed of this process.
> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.
Good track I guess.
Here's the tested and working patch for org-protocol.el.
To use `org-remember' and/or `org-capture' alike, copy your org-remember
link and change
javascript:location.href='org-protocol://remember://'+...
to
javascript:location.href='org-protocol://capture://'+...
The template char used is the same for both --- which is OK for me, but
could be changed.
Sebastian Rose writes:
> * This is how it works:
>
> Each project in `org-protocol-project-alist' may now have a new
> element `:rewrites'. `:rewrites' is a list of cons cells, that maps
> regular expressions to relative paths.
>
>
>
> * Example:
>
> (setq org-protocol-project-alist
> '(("http://fairposter.de/"
> :base-url "http://example-web-shop.de/"
> :working-directory "/path/to/working/directory/"
> :online-suffix ".php"
> :working-suffix ".php"
> :rewrites (("example-web-shop.de/cars/" . "products.php")
> ("example-web-shop.de/$" . "index.php")
> ))
>
> ;; .... more projects here
> ))
>
>
> Today, if I visit http://www.example-web-shop.de/, the URL would
> not match a path to any of the files below my working directory.
>
> Tomorrow, /path/to/working/directory/index.php is opened, because there's
> a matching rewrite.
>
>
> Today, a rewritten URL like
> http://example-web-shop.de/cars/lamborghini/Gallardo_LP560-4_MY09
> would not match a path to any of the files below my working
> directory, because URLS like `..../cars/' would be rewritten on the
> server and served through http://example-web-shop.de/products.php.
>
> Tomorrow, that URL will be mapped to
> /path/to/working/directory/products.php, because there's a matching
> rewrite defined.