If you use Bookmark+ then you can add a bmkp-jump
tag to any bookmark, to carry out any action just after that particular bookmark location is jumped to.
Give this tag a value that is a function, which then is called
whenever the tagged bookmark is visited. Any Lisp-readable
function value is allowed: a symbol or a lambda expression.
For example, to display Hello!
when a bookmark is visited you
can use this on that bookmark in the bookmark-list display:
T v bmkp-jump RET (lambda () (message "Hello!"))
That prompts you for the name of the bookmark to add that jump-function to as the value of tag bmkp-jump
.
T v
is bound in the bookmark-list display to command bmkp-set-tag-value
. Elsewhere, the command is bound to C-x p t v
. It adds a value to a tag that has none, or it changes the current value of a tag.
The function that is the value of a bmkp-jump
tag is called just
after the the standard hook bookmark-after-jump-hook
is invoked.
You can use this tag to invoke functions that are specific to
individual bookmarks; bookmarks can thus have their own, extra
jump functions.
So you just need a function that unfolds/unhides the current bit of text that you want to show. Use that in place of the function shown above. Try function outline-show-entry
, for example.
org-mode
...the problem does not occur", what do you mean? When you do what in Org mode?