"Christopher M. Miles" writes: >> What about the following treatment of ARG: >> >> 1. No argument, no region selected :: toggle (display or hide dwim) images in current section >> 2. No argument, region selected: toggle images in region >> 3. C-u argument :: toggle images in the whole buffer >> 4. C-u C-u argument, no region selected :: unconditionally hide images in the buffer >> 5. M-1 argument, no region selected :: display images in current section with INCLUDE-LINKED >> 6. M-1 argument, region selected :: ... in region ... >> 7. M-11 argument :: ... in the whole buffer ... >> 8. Any other argument :: treat as INCLUDE-LINKED = t >> >> And please document all the new arguments in the manual and etc/ORG-NEWS file. > > I followed you upper 8 conditions to re-write my patch. > Except the 8. condition I'm not sure I understand correctly. > And I extend 1. condition to support the inline image link at point toggle displaying. > ... I do not like the code repetitions in the patch and relying upon `use-region-p' even for non-interactive use. I am attaching a complete rewrite of your idea. Please let me know if my patch does everything you want to include into the command. Note that I went with a new idea of introducing a branch new function instead of changing `org-toggle-inline-images'. This way, existing users of `org-toggle-inline-images' will not be affected at all. We are just changing the default C-c C-x C-v binding. This way, the breakage is a little as possible.